summaryrefslogtreecommitdiffstats
path: root/tests/gnu
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-12-16 17:44:29 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-12-16 17:44:29 -0500
commitf92fa445c278ffa601b13b4ba98f35c8af16b761 (patch)
tree9a5b044bab5ceabab2959b2577c7f439dbab6387 /tests/gnu
parentd056ec6d2d4728b695cc146c5119b251e8234393 (diff)
downloadbfs-f92fa445c278ffa601b13b4ba98f35c8af16b761.tar.xz
tests: New test for -fstype on a stacked mount point
Diffstat (limited to 'tests/gnu')
-rw-r--r--tests/gnu/fstype_stacked.out1
-rw-r--r--tests/gnu/fstype_stacked.sh13
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/gnu/fstype_stacked.out b/tests/gnu/fstype_stacked.out
new file mode 100644
index 0000000..99c7511
--- /dev/null
+++ b/tests/gnu/fstype_stacked.out
@@ -0,0 +1 @@
+scratch/mnt
diff --git a/tests/gnu/fstype_stacked.sh b/tests/gnu/fstype_stacked.sh
new file mode 100644
index 0000000..7110402
--- /dev/null
+++ b/tests/gnu/fstype_stacked.sh
@@ -0,0 +1,13 @@
+test "$SUDO" || skip
+test "$UNAME" = "Linux" || skip
+
+clean_scratch
+mkdir scratch/mnt
+
+sudo mount -t tmpfs tmpfs scratch/mnt
+trap "sudo umount scratch/mnt" EXIT
+
+sudo mount -t ramfs ramfs scratch/mnt
+trap "sudo umount scratch/mnt; sudo umount scratch/mnt" EXIT
+
+bfs_diff scratch/mnt -fstype ramfs -print -o -printf '%p: %F\n'