summaryrefslogtreecommitdiffstats
path: root/tests/common/L_mount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common/L_mount.sh')
-rw-r--r--tests/common/L_mount.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/common/L_mount.sh b/tests/common/L_mount.sh
index 5b56762..9ab785e 100644
--- a/tests/common/L_mount.sh
+++ b/tests/common/L_mount.sh
@@ -3,13 +3,12 @@ test "$UNAME" = "Darwin" && skip
clean_scratch
mkdir scratch/{foo,mnt}
+
sudo mount -t tmpfs tmpfs scratch/mnt
+trap "sudo umount scratch/mnt" EXIT
+
ln -s ../mnt scratch/foo/bar
"$XTOUCH" scratch/mnt/baz
ln -s ../mnt/baz scratch/foo/qux
bfs_diff -L scratch -mount
-ret=$?
-
-sudo umount scratch/mnt
-return $ret