summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2023-10-13 19:30:19 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2023-10-13 19:30:19 +0000
commit32bda2723d57ff0ef33b166403253679f3fe0cb2 (patch)
tree617171437558dddfe4b05208f8f8f9047f4db430 /regress
parente353db6f245ed6f9628d63f4873f46ba61e31016 (diff)
Use a unique mount point rooted in /mnt in order to not conflict with other
tests.
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/mfs_noperm/Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/regress/sys/mfs_noperm/Makefile b/regress/sys/mfs_noperm/Makefile
index 35f634a48eb..537c010ec93 100644
--- a/regress/sys/mfs_noperm/Makefile
+++ b/regress/sys/mfs_noperm/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.1 2018/12/23 11:23:21 natano Exp $
+# $OpenBSD: Makefile,v 1.2 2023/10/13 19:30:18 anton Exp $
PROG= nopermtest
CDIAGFLAGS= -Wall
@@ -15,20 +15,24 @@ REGRESS_SETUP_ONCE= mount
REGRESS_CLEANUP= umount
REGRESS_TARGETS= run-regress-locked run-regress-unlocked
+MNT= /mnt/regress-mfs_noperm
+
mount:
- mount_mfs -s1M -o noperm swap /mnt
+ mkdir -p ${MNT}
+ mount_mfs -s1M -o noperm swap ${MNT}
umount:
- umount -f /mnt
+ umount -f ${MNT} || true
+ rmdir ${MNT} || true
run-regress-locked: ${PROG}
- chown root:wheel /mnt
- chmod 700 /mnt
- su build -c './${PROG} /mnt locked'
+ chown root:wheel ${MNT}
+ chmod 700 ${MNT}
+ su build -c './${PROG} ${MNT} locked'
run-regress-unlocked: ${PROG}
- chown build /mnt
- chmod 700 /mnt
- su build -c './${PROG} /mnt unlocked'
+ chown build ${MNT}
+ chmod 700 ${MNT}
+ su build -c './${PROG} ${MNT} unlocked'
.include <bsd.regress.mk>