diff mbox

[RESEND] btrfs-progs: tests: Add '-o loop' to mount command line in convert-tests.sh

Message ID b92776bec0a72128214ec931003869a36940e226.1442308835.git.zhaolei@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhaolei Sept. 15, 2015, 9:22 a.m. UTC
To fix following bug:
 # ./convert-tests.sh
     [TEST]   ext2 4k nodesize, btrfs defaults
 failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt
 # tail convert-tests-results.txt
 ...
 ############### mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt
 mount: /root/btrfsprogs/tests/test.img is not a block device (maybe try `-o loop'?)
 failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 tests/convert-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Sterba Sept. 20, 2015, 12:29 p.m. UTC | #1
On Tue, Sep 15, 2015 at 05:22:17PM +0800, Zhao Lei wrote:
> To fix following bug:
>  # ./convert-tests.sh
>      [TEST]   ext2 4k nodesize, btrfs defaults
>  failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt
>  # tail convert-tests-results.txt
>  ...
>  ############### mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt
>  mount: /root/btrfsprogs/tests/test.img is not a block device (maybe try `-o loop'?)
>  failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt
> 
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>

For a reason that I don't remember, I marked the first posting of this
patch to skip it. Looking at it again, it makes sense so I'm applying
it, 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/convert-tests.sh b/tests/convert-tests.sh
index 68c03dc..4d99a61 100755
--- a/tests/convert-tests.sh
+++ b/tests/convert-tests.sh
@@ -42,7 +42,7 @@  convert_test() {
 
 	# create a file to check btrfs-convert can convert regular file
 	# correct
-	run_check $SUDO_HELPER mount $IMAGE $TEST_MNT
+	run_check $SUDO_HELPER mount -o loop $IMAGE $TEST_MNT
 	run_check $SUDO_HELPER dd if=/dev/zero of=$TEST_MNT/test bs=$nodesize \
 		count=1 1>/dev/null 2>&1
 	run_check $SUDO_HELPER umount $TEST_MNT