Skip to content

Commit

Permalink
simple-test: call umount from cleanup() only when mount point exists
Browse files Browse the repository at this point in the history
this will avoid errors when cleanup() called before doing actuall job,
IOW just after make and before all tests.
  • Loading branch information
azat committed Sep 17, 2014
1 parent 0a7059c commit 8567b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8567b0e

Please sign in to comment.