btrfs-progs: tests: introduce test dev mount helpers
authorZhao Lei <zhaolei@cn.fujitsu.com>
Tue, 1 Sep 2015 12:45:22 +0000 (14:45 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 1 Sep 2015 12:53:16 +0000 (14:53 +0200)
commit421e41df492f838b9b78db7bfae1315f1f7c7336
tree86866d1df3ba74f51a22bd7ce033201bcd0f0175
parent3ca185850bca6e227adf584851343dd69c2aaf05
btrfs-progs: tests: introduce test dev mount helpers

mount command in old system can not add "-o loop" option automatically
for a loop device, and make following test 013-extent-tree-rebuild fail.

Considering that $TEST_DEV can be block or loop device, we need to determine
our mount option in a condition for both case.

Introduce a wrapper that will add the loop options if needed.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
tests/common