From 33ded035787b644231d24f048a5a4b0d3951bc31 Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Thu, 12 Oct 2023 16:59:25 +0000 Subject: Let vnconfig select an unused device as opposed of unconditionally assume vnd0 is available. --- regress/sys/kern/unveil-unmount/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'regress/sys/kern/unveil-unmount') diff --git a/regress/sys/kern/unveil-unmount/Makefile b/regress/sys/kern/unveil-unmount/Makefile index 810874203f6..e98b6b26064 100644 --- a/regress/sys/kern/unveil-unmount/Makefile +++ b/regress/sys/kern/unveil-unmount/Makefile @@ -1,27 +1,27 @@ -# $OpenBSD: Makefile,v 1.6 2020/12/17 14:22:42 bluhm Exp $ +# $OpenBSD: Makefile,v 1.7 2023/10/12 16:59:24 anton Exp $ # Call unveil(2) in combination with unlink(2), chroot(2), chdir(2). # Use umount(8) to check that the mountpoint leaks no vnode. # There were vnode reference counting bugs in the kernel. PROGS= unveil-unlink unveil-chroot unveil-perm unveil-chdir -CLEANFILES= diskimage +CLEANFILES= diskimage vnd .PHONY: mount unconfig clean diskimage: unconfig ${SUDO} dd if=/dev/zero of=diskimage bs=512 count=4k - ${SUDO} vnconfig vnd0 diskimage - ${SUDO} newfs vnd0c + ${SUDO} vnconfig diskimage >vnd + ${SUDO} newfs $$(/dev/null || true + -${SUDO} umount -f /dev/$$(/dev/null || true -${SUDO} rmdir /mnt/regress-unveil 2>/dev/null || true - -${SUDO} vnconfig -u vnd0 2>/dev/null || true + -${SUDO} vnconfig -u $$(/dev/null || true -${SUDO} rm -f stamp-setup REGRESS_SETUP = ${PROGS} mount -- cgit v1.2.3