new file mode 100755
@@ -0,0 +1,21 @@
+#!/bin/bash
+# test btrfstune --convert-to-free-space-tree option
+
+source "$TEST_TOP/common" || exit
+source "$TEST_TOP/common.convert" || exit
+
+check_prereq mkfs.btrfs
+check_prereq btrfstune
+check_prereq btrfs
+
+setup_root_helper
+prepare_test_dev
+
+run_check_mkfs_test_dev -O ^free-space-tree
+run_check_mount_test_dev
+populate_fs
+run_check_umount_test_dev
+
+run_check $SUDO_HELPER "$TOP/btrfstune" --convert-to-free-space-tree $TEST_DEV
+
+run_check "$TOP/btrfs" check "$TEST_DEV"
The new test case would create a fs without free space tree, then popluate it, convert to free-space-tree feature, and make sure everything is fine. Signed-off-by: Qu Wenruo <wqu@suse.com> --- .../057-btrfstune-free-space-tree/test.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tests/misc-tests/057-btrfstune-free-space-tree/test.sh