btrfs-progs: tests: add runtime check for free-space-tree

The CI hosts have old kernel that does not support the FST, make the
test fail gracefully.

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2018-10-23 16:57:48 +02:00
parent 1cf5833aa6
commit 9d3303fa1b
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@ corrupt_fst_item()
-f offset "$TEST_DEV"
}
if ! [ -f "/sys/fs/btrfs/features/free_space_tree" ]; then
_not_run "kernel does not support free-space-tree feature"
exit
fi
run_check "$TOP/mkfs.btrfs" -n 4k -f "$TEST_DEV"
run_check_mount_test_dev -oclear_cache,space_cache=v2