simple-test: call umount from cleanup() only when mount point exists

this will avoid errors when cleanup() called before doing actuall job,
IOW just after make and before all tests.
This commit is contained in:
Azat Khuzhin 2014-09-17 13:38:41 +04:00
parent 0a7059cd35
commit 8567b0e113

View File

@ -89,7 +89,7 @@ function do_read_operations()
function cleanup()
{
cd "$root_pwd"
umount -t simplefs "$test_mount_point"
[ -d "$test_mount_point" ] && umount -t simplefs "$test_mount_point"
lsmod | grep -q simplefs && rmmod "$root_pwd/simplefs.ko"
# TODO: prompt deletion