]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (tests) skip btrfs test if btrfs support is not enabled
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 18 May 2026 16:09:45 +0000 (18:09 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 19 May 2026 20:46:25 +0000 (22:46 +0200)
btrfs support in libmount is optional. If it is not enabled, the test
will fail. Skip the test in that case.

Fixes: 4583d15248fd ("tests: add btrfs RAID is-mounted test for libmount")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/ts/libmount/tabfiles

index 9e52314ce9208db53231727c7f89379dd5234eaa..fa1fe28a92af633fdf2654afb8316cfc2666c873 100755 (executable)
@@ -83,6 +83,7 @@ sed -i -e 's/fs: 0x.*/fs:/g' "$TS_OUTPUT"
 ts_finalize_subtest
 
 ts_init_subtest "is-mounted-btrfs"
+grep -q '#define HAVE_BTRFS_SUPPORT' ${top_builddir}/config.h || ts_skip_subtest "no btrfs support"
 ts_run $TESTPROG --is-mounted "$TS_SELF/files/fstab_btrfs" "$TS_SELF/files/mountinfo_btrfs" &> "$TS_OUTPUT"
 ts_finalize_subtest