summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-05-12 14:52:52 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-05-12 15:54:25 -0400
commit956895430edd4a4ea2963798c3485ab227ea525c (patch)
tree27ad3d9d39c616854de0c3eef29ab0ada9d9fd0d /tests.sh
parent2c67e0676ed27055cb622a9da9508defbafc2488 (diff)
downloadbfs-956895430edd4a4ea2963798c3485ab227ea525c.tar.xz
stat: Pass AT_NO_AUTOMOUNT if possible
Previously bfs would trigger automounts even when it didn't descend into the mount directory, while GNU find does not.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 25fda36..f6b7326 100755
--- a/tests.sh
+++ b/tests.sh
@@ -827,6 +827,8 @@ sudo_tests=(
test_inum_bind_mount
test_type_bind_mount
test_xtype_bind_mount
+
+ test_automount
)
case "$UNAME" in
@@ -3019,6 +3021,25 @@ function test_xtype_bind_mount() {
return $ret
}
+function test_automount() {
+ # bfs shouldn't trigger automounts unless it descends into them
+
+ skip_if fail command -v systemd-mount &>/dev/null
+
+ rm -rf scratch/*
+ mkdir scratch/{foo,mnt}
+ quiet sudo systemd-mount -A -o bind basic scratch/mnt
+
+ local before=$(inum scratch/mnt)
+ bfs_diff scratch -inum "$before" -prune
+ local ret=$?
+ local after=$(inum scratch/mnt)
+
+ quiet sudo systemd-umount scratch/mnt
+
+ ((ret == 0 && before == after))
+}
+
function set_acl() {
case "$UNAME" in
Darwin)