From: Yu Watanabe Date: Wed, 3 Sep 2025 10:30:34 +0000 (+0900) Subject: TEST-58-REPART: add test case for btrfs specific options and MountPoint= X-Git-Tag: v258-rc4~16^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e34f8128b112067b70cf9652eaef97ae3e83b2c4;p=thirdparty%2Fsystemd.git TEST-58-REPART: add test case for btrfs specific options and MountPoint= --- diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh index e1e18264f8b..19f9ca31c9a 100755 --- a/test/units/TEST-58-REPART.sh +++ b/test/units/TEST-58-REPART.sh @@ -1628,6 +1628,57 @@ EOF assert_in "${image}2 : start= 286680, size= 532480, type=${esp_guid}" "$output" } +testcase_btrfs() { + local defs imgs output root + + if ! systemd-analyze compare-versions "$(btrfs --version | head -n 1 | awk '{ print $2 }')" ge v6.12; then + echo "btrfs-progs is not installed or older than v6.12, skipping test." + return 0 + fi + + if [[ "$OFFLINE" != "yes" ]]; then + return 0 + fi + + defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")" + imgs="$(mktemp --directory "/var/tmp/test-repart.imgs.XXXXXXXXXX")" + root="$(mktemp --directory "/var/test-repart.root.XXXXXXXXXX")" + # shellcheck disable=SC2064 + trap "rm -rf '$defs' '$imgs' '$root'" RETURN + chmod 0755 "$defs" + + echo "*** testcase for btrfs ***" + + tee "$defs/root.conf" <