]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: add _require_btrfs_free_space_tree
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 13 Dec 2023 11:35:25 +0000 (03:35 -0800)
committerZorro Lang <zlang@kernel.org>
Sun, 14 Jan 2024 12:39:09 +0000 (20:39 +0800)
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/btrfs

index 9dd2a7f49e1621786b3cb7b7e6aa833984b60065..e1b29c61376712c8c303a3bd71a47793175c1e8d 100644 (file)
@@ -127,6 +127,16 @@ _require_btrfs_no_nodatacow()
        fi
 }
 
+_require_btrfs_free_space_tree()
+{
+       _scratch_mkfs > /dev/null 2>&1
+       if ! $BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | \
+               grep -q "FREE_SPACE_TREE"
+       then
+               _notrun "This test requires a free-space-tree"
+       fi
+}
+
 _check_btrfs_filesystem()
 {
        device=$1