diff mbox

btrfs-progs-tests: Add -o loop to fsck-tests/012-leaf-corruption for loop device

Message ID 7d731282f5ddb1a3f1baedf6586772c4fe8838b9.1438002072.git.zhaolei@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhaolei July 27, 2015, 1:01 p.m. UTC
From: Zhao Lei <zhaolei@cn.fujitsu.com>

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>
---
 tests/fsck-tests/012-leaf-corruption/test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Sterba July 27, 2015, 1:24 p.m. UTC | #1
On Mon, Jul 27, 2015 at 09:01:50PM +0800, Zhaolei wrote:
> From: Zhao Lei <zhaolei@cn.fujitsu.com>
> 
> 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>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/fsck-tests/012-leaf-corruption/test.sh b/tests/fsck-tests/012-leaf-corruption/test.sh
index 98e3185..f8701ad 100755
--- a/tests/fsck-tests/012-leaf-corruption/test.sh
+++ b/tests/fsck-tests/012-leaf-corruption/test.sh
@@ -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