btrfs-progs: tests: Add -o loop to fsck-tests/012-leaf-corruption
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 27 Jul 2015 13:01:50 +0000 (21:01 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 31 Aug 2015 17:25:10 +0000 (19:25 +0200)
To avoid following mount error in test:
  mount: /root/btrfs/progs/tests/fsck-tests/012-leaf-corruption/test.img
  is not a block device (maybe try `-o loop'?)

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
tests/fsck-tests/012-leaf-corruption/test.sh

index 98e3185..f8701ad 100755 (executable)
@@ -86,7 +86,7 @@ check_leaf_corrupt_no_data_ext()
 {
        image=$1
        mkdir -p $TEST_MNT || _fail "failed to create mount point"
-       $SUDO_HELPER mount $image -o ro $TEST_MNT
+       $SUDO_HELPER mount -o loop $image -o ro $TEST_MNT
 
        i=0
        while [ $i -lt ${#leaf_no_data_ext_list[@]} ]; do