diff options
authorZhao Lei <>2015-09-01 14:40:13 +0200
committerDavid Sterba <>2015-09-01 14:53:16 +0200
commitd4c4443c2dc417b5ad8d3da8971e1c1996d7b1ed (patch)
parent421e41df492f838b9b78db7bfae1315f1f7c7336 (diff)
btrfs-progs: tests: Fix mount fail of 013-extent-tree-rebuild
mount command in old system can not add "-o loop" option automatically for loop device, and make following test failed: # ./ ... [TEST] 013-extent-tree-rebuild failed: mount /data/btrfsprogs/tests/test.img /data/btrfsprogs/tests/mnt test failed for case 013-extent-tree-rebuild Considering that $TEST_DEV can be block or loop device, we need determine our mount option in a condition for both case. This patch create a wrapper function for above request, to solve current problem in 013-extent-tree-rebuild, and support similar request in future. Signed-off-by: Zhao Lei <> Signed-off-by: David Sterba <>
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/fsck-tests/013-extent-tree-rebuild/ b/tests/fsck-tests/013-extent-tree-rebuild/
index b7909d28..7419d6ea 100755
--- a/tests/fsck-tests/013-extent-tree-rebuild/
+++ b/tests/fsck-tests/013-extent-tree-rebuild/
@@ -12,14 +12,14 @@ test_extent_tree_rebuild()
run_check $SUDO_HELPER $TOP/mkfs.btrfs -f $TEST_DEV
- run_check $SUDO_HELPER mount $TEST_DEV $TEST_MNT
+ run_check_mount_test_dev
run_check $SUDO_HELPER cp -aR /lib/modules/`uname -r`/ $TEST_MNT
for i in `seq 1 100`;do
run_check $SUDO_HELPER $TOP/btrfs sub snapshot $TEST_MNT \
- run_check $SUDO_HELPER umount $TEST_DEV
+ run_check_umount_test_dev
# get extent root bytenr
extent_root_bytenr=`$SUDO_HELPER $TOP/btrfs-debug-tree -r $TEST_DEV | \