summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-01-22 14:21:36 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-01-22 14:21:36 -0500
commit869e4010433c8610ba59f9a6a310df8be228d718 (patch)
tree6054e9225ff8cd8e9a0276c7d2c8b0483b2fff16 /tests
parentd2f3a10f4373610e912e586814e26e2a06fd7d88 (diff)
downloadbfs-869e4010433c8610ba59f9a6a310df8be228d718.tar.xz
mtab: Mitigate the race between bfs_mtab_parse() and bfs_mtab_fill_types()
Fixes #97.
Diffstat (limited to 'tests')
-rw-r--r--tests/gnu/fstype_umount.out0
-rw-r--r--tests/gnu/fstype_umount.sh12
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/gnu/fstype_umount.out b/tests/gnu/fstype_umount.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/gnu/fstype_umount.out
diff --git a/tests/gnu/fstype_umount.sh b/tests/gnu/fstype_umount.sh
new file mode 100644
index 0000000..e817831
--- /dev/null
+++ b/tests/gnu/fstype_umount.sh
@@ -0,0 +1,12 @@
+test "$UNAME" = "Linux" || skip
+
+clean_scratch
+
+mkdir scratch/tmp
+bfs_sudo mount -t tmpfs tmpfs scratch/tmp || skip
+trap "bfs_sudo umount -R scratch/tmp" EXIT
+
+mkdir scratch/tmp/ram
+bfs_sudo mount -t ramfs ramfs scratch/tmp/ram || skip
+
+bfs_diff scratch/tmp -path scratch/tmp -exec "${SUDO[@]}" umount scratch/tmp/ram \; , -fstype ramfs -print