summaryrefslogtreecommitdiffstats
path: root/test/units/TEST-58-REPART.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest/units/TEST-58-REPART.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh
index 05fc017d23..bac90649ce 100755
--- a/test/units/TEST-58-REPART.sh
+++ b/test/units/TEST-58-REPART.sh
@@ -1325,9 +1325,12 @@ testcase_compression() {
# TODO: add btrfs once btrfs-progs v6.11 is available in distributions.
for format in squashfs erofs; do
- if ! command -v "mkfs.$format" && ! command -v mksquashfs >/dev/null; then
- continue
- fi
+ case "$format" in
+ squashfs)
+ command -v mksquashfs >/dev/null || continue ;;
+ *)
+ command -v "mkfs.$format" || continue ;;
+ esac
[[ "$format" == "squashfs" ]] && compression=zstd
[[ "$format" == "erofs" ]] && compression=lz4hc