From 9959681a0d363c6d50f275372cf73124f1a8d1ce Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 17 Sep 2024 15:33:15 +0900 Subject: test/repart: fix mkfs checker Follow-up for 27cacec939a46f61706d7b48a51b6f5880be4662. --- test/units/TEST-58-REPART.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/units/TEST-58-REPART.sh') 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 -- cgit v1.2.3