summaryrefslogtreecommitdiffstats
path: root/tests/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gnu')
-rw-r--r--tests/gnu/fstype_stacked.sh9
-rw-r--r--tests/gnu/inum_automount.sh5
-rw-r--r--tests/gnu/xtype_bind_mount.sh5
3 files changed, 8 insertions, 11 deletions
diff --git a/tests/gnu/fstype_stacked.sh b/tests/gnu/fstype_stacked.sh
index 7110402..16f428f 100644
--- a/tests/gnu/fstype_stacked.sh
+++ b/tests/gnu/fstype_stacked.sh
@@ -1,13 +1,12 @@
-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
+bfs_sudo mount -t tmpfs tmpfs scratch/mnt || skip
+trap "bfs_sudo umount scratch/mnt" EXIT
-sudo mount -t ramfs ramfs scratch/mnt
-trap "sudo umount scratch/mnt; sudo umount scratch/mnt" EXIT
+bfs_sudo mount -t ramfs ramfs scratch/mnt || skip
+trap "bfs_sudo umount scratch/mnt; bfs_sudo umount scratch/mnt" EXIT
bfs_diff scratch/mnt -fstype ramfs -print -o -printf '%p: %F\n'
diff --git a/tests/gnu/inum_automount.sh b/tests/gnu/inum_automount.sh
index da2e3b0..c4450ef 100644
--- a/tests/gnu/inum_automount.sh
+++ b/tests/gnu/inum_automount.sh
@@ -1,13 +1,12 @@
# bfs shouldn't trigger automounts unless it descends into them
-test "$SUDO" || skip
command -v systemd-mount &>/dev/null || skip
clean_scratch
mkdir scratch/{foo,automnt}
-sudo systemd-mount -A -o bind basic scratch/automnt || skip
-trap "sudo systemd-umount scratch/automnt" EXIT
+bfs_sudo systemd-mount -A -o bind basic scratch/automnt || skip
+trap "bfs_sudo systemd-umount scratch/automnt" EXIT
before=$(inum scratch/automnt)
bfs_diff scratch -inum "$before" -prune
diff --git a/tests/gnu/xtype_bind_mount.sh b/tests/gnu/xtype_bind_mount.sh
index 9babd9d..99a11ab 100644
--- a/tests/gnu/xtype_bind_mount.sh
+++ b/tests/gnu/xtype_bind_mount.sh
@@ -1,11 +1,10 @@
-test "$SUDO" || skip
test "$UNAME" = "Linux" || skip
clean_scratch
"$XTOUCH" scratch/{file,null}
ln -s /dev/null scratch/link
-sudo mount --bind /dev/null scratch/null
-trap "sudo umount scratch/null" EXIT
+bfs_sudo mount --bind /dev/null scratch/null || skip
+trap "bfs_sudo umount scratch/null" EXIT
bfs_diff -L scratch -type c