summaryrefslogtreecommitdiffstats
path: root/tests/gnu/xtype_bind_mount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gnu/xtype_bind_mount.sh')
-rw-r--r--tests/gnu/xtype_bind_mount.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/gnu/xtype_bind_mount.sh b/tests/gnu/xtype_bind_mount.sh
index a6dbed3..9babd9d 100644
--- a/tests/gnu/xtype_bind_mount.sh
+++ b/tests/gnu/xtype_bind_mount.sh
@@ -3,11 +3,9 @@ test "$UNAME" = "Linux" || skip
clean_scratch
"$XTOUCH" scratch/{file,null}
-sudo mount --bind /dev/null scratch/null
ln -s /dev/null scratch/link
-bfs_diff -L scratch -type c
-ret=$?
+sudo mount --bind /dev/null scratch/null
+trap "sudo umount scratch/null" EXIT
-sudo umount scratch/null
-return $ret
+bfs_diff -L scratch -type c