summaryrefslogtreecommitdiffstats
path: root/tests/common/mount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common/mount.sh')
-rw-r--r--tests/common/mount.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/common/mount.sh b/tests/common/mount.sh
new file mode 100644
index 0000000..6e20d90
--- /dev/null
+++ b/tests/common/mount.sh
@@ -0,0 +1,13 @@
+skip_unless test "$SUDO"
+skip_if test "$UNAME" = "Darwin"
+
+rm -rf scratch/*
+mkdir scratch/{foo,mnt}
+sudo mount -t tmpfs tmpfs scratch/mnt
+$TOUCH scratch/foo/bar scratch/mnt/baz
+
+bfs_diff scratch -mount
+ret=$?
+
+sudo umount scratch/mnt
+return $ret