]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/repart: fix mkfs checker
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Sep 2024 06:33:15 +0000 (15:33 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 17 Sep 2024 08:15:21 +0000 (10:15 +0200)
Follow-up for 27cacec939a46f61706d7b48a51b6f5880be4662.

test/units/TEST-58-REPART.sh

index 05fc017d231e04e3cd16fe511b91212cf3dd9752..bac90649ce0125f037723dc57be6d8cdabb6714e 100755 (executable)
@@ -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