summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-10-23 16:57:48 +0200
committerDavid Sterba <dsterba@suse.com>2018-10-25 16:11:40 +0200
commit9d3303fa1b5d8e797a63c588934d0f7a6c84fa1c (patch)
treec97a8959d9aab5c2ef884664fb81c93caf596d0a
parent1cf5833aa671f935eb3372e13c4eb039ee81d53e (diff)
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>
-rwxr-xr-xtests/fsck-tests/037-freespacetree-repair/test.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/fsck-tests/037-freespacetree-repair/test.sh b/tests/fsck-tests/037-freespacetree-repair/test.sh
index c38a4c8..261d7cc 100755
--- a/tests/fsck-tests/037-freespacetree-repair/test.sh
+++ b/tests/fsck-tests/037-freespacetree-repair/test.sh
@@ -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