btrfs-progs: tests: cleanup use of IMAGE and replace by helpers

Nearly each use of IMAGE can be replaced by common helpers as there are
no specific requirements on the testing filesystem. There are still a
few left that need to be evaluated and converted eventually.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-03-13 18:07:28 +01:00
parent d4eb5a77d7
commit c2d3f54996
5 changed files with 16 additions and 16 deletions

View File

@ -9,9 +9,9 @@ check_prereq btrfs
setup_root_helper
run_check truncate -s 2G $IMAGE
run_check $TOP/mkfs.btrfs -f $IMAGE
run_check $SUDO_HELPER mount $IMAGE $TEST_MNT
prepare_test_dev
run_check $TOP/mkfs.btrfs -f "$TEST_DEV"
run_check_mount_test_dev
run_check $SUDO_HELPER chmod a+rw $TEST_MNT
cd $TEST_MNT
@ -49,4 +49,4 @@ run_check $SUDO_HELPER $TOP/btrfs subvolume list -d .
wait
cd ..
run_check $SUDO_HELPER umount $TEST_MNT
run_check_umount_test_dev

View File

@ -10,9 +10,9 @@ check_prereq btrfs
setup_root_helper
run_check truncate -s 2G $IMAGE
run_check $TOP/mkfs.btrfs -f $IMAGE
run_check $SUDO_HELPER mount $IMAGE $TEST_MNT
prepare_test_dev
run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
run_check $SUDO_HELPER chmod a+rw $TEST_MNT
cd $TEST_MNT
@ -46,4 +46,4 @@ run_check $SUDO_HELPER $TOP/btrfs subvolume list -d .
wait
cd ..
run_check $SUDO_HELPER umount $TEST_MNT
run_check_umount_test_dev

View File

@ -9,9 +9,9 @@ check_prereq btrfs
setup_root_helper
run_check truncate -s 2G $IMAGE
run_check $TOP/mkfs.btrfs -L BTRFS-TEST-LABEL -f $IMAGE
run_check $SUDO_HELPER mount $IMAGE $TEST_MNT
prepare_test_dev
run_check "$TOP/mkfs.btrfs" -L BTRFS-TEST-LABEL -f "$TEST_DEV"
run_check_mount_test_dev
run_check $SUDO_HELPER chmod a+rw $TEST_MNT
cd $TEST_MNT
@ -66,4 +66,4 @@ run_check $SUDO_HELPER $TOP/btrfs filesystem label $TEST_MNT
cd ..
run_check $SUDO_HELPER umount $TEST_MNT
run_check_umount_test_dev

View File

@ -9,9 +9,9 @@ check_prereq mkfs.btrfs
check_prereq btrfs
setup_root_helper
prepare_test_dev 1g
run_check $TOP/mkfs.btrfs -f $IMAGE
prepare_test_dev 1g
run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
here=`pwd`

View File

@ -8,9 +8,9 @@ check_prereq mkfs.btrfs
check_prereq btrfs
setup_root_helper
prepare_test_dev 1g
run_check $TOP/mkfs.btrfs -f $IMAGE
prepare_test_dev 1g
run_check "$TOP/mkfs.btrfs" -f "$TEST_DEV"
run_check_mount_test_dev
echo -n '' | run_mayfail $SUDO_HELPER "$TOP/btrfs" receive "$TEST_MNT" &&