From 3b387d81e63893ed3fe3b45e3721fbcfb1c5dde0 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 19 Oct 2022 10:29:05 -0400 Subject: tests: Split test cases into separate files --- tests/gnu/inum_automount.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/gnu/inum_automount.sh (limited to 'tests/gnu/inum_automount.sh') diff --git a/tests/gnu/inum_automount.sh b/tests/gnu/inum_automount.sh new file mode 100644 index 0000000..0149043 --- /dev/null +++ b/tests/gnu/inum_automount.sh @@ -0,0 +1,17 @@ +# bfs shouldn't trigger automounts unless it descends into them + +skip_unless test "$SUDO" +skip_unless command -v systemd-mount &>/dev/null + +rm -rf scratch/* +mkdir scratch/{foo,mnt} +skip_unless sudo systemd-mount -A -o bind basic scratch/mnt + +before=$(inum scratch/mnt) +bfs_diff scratch -inum "$before" -prune +ret=$? +after=$(inum scratch/mnt) + +sudo systemd-umount scratch/mnt + +((ret == 0 && before == after)) -- cgit v1.2.3