summaryrefslogtreecommitdiffstats
path: root/test/units/TEST-58-REPART.sh
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-09-17 08:33:15 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-09-17 10:15:21 +0200
commit9959681a0d363c6d50f275372cf73124f1a8d1ce (patch)
tree4b7c2e7e31e42df00d9c8c53da9dbff027324b64 /test/units/TEST-58-REPART.sh
parentFix generator logging (diff)
downloadsystemd-9959681a0d363c6d50f275372cf73124f1a8d1ce.tar.xz
systemd-9959681a0d363c6d50f275372cf73124f1a8d1ce.zip
test/repart: fix mkfs checker
Follow-up for 27cacec939a46f61706d7b48a51b6f5880be4662.
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