The test misc-tests/035-receive-common-mount-point-prefix does another
mount inside TEST_MNT but current 'make test-clean' will not properly
undo the nested mount and this will break subsequent tests. The
recursive unmount can handle that.
Signed-off-by: David Sterba <dsterba@suse.com>
Make the TOP variable more configurable, allow to set it to any path
where to find binaries when the testsuite is exported, or fallback to
system binaries.
There's now more code duplication, the logic is now more complex so it's
left open coded for clarity. Further cleanups are possible.
Signed-off-by: David Sterba <dsterba@suse.com>
If a testcase failed, we can't run it(or other tests needs mount) again,
# ./misc-tests.sh 007
[TEST] 007-subvolume-sync
failed: fail
test failed for case 007-subvolume-sync
# ./misc-tests.sh 007
[TEST] 007-subvolume-sync
failed: mount /root/btrfs-progs/tests/test.img /root/btrfs-progs/tests/mnt
test failed for case 007-subvolume-sync
This patch add "umount $TEST_MNT" to clean-tests.sh, to let user
clean mountpoint easily.
After patch:
# ./misc-tests.sh 007
[TEST] 007-subvolume-sync
failed: fail
test failed for case 007-subvolume-sync
#
# clean-tests.sh
#
# ./misc-tests.sh 007
[TEST] 007-subvolume-sync
failed: fail
test failed for case 007-subvolume-sync
Suggested-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
[added sudo helper to umount]
Signed-off-by: David Sterba <dsterba@suse.com>