summaryrefslogtreecommitdiff
path: root/regress/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-01-10 23:16:16 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-01-10 23:16:16 +0000
commit13cd29f0a09be6241a49f99b2542ae78cc847c26 (patch)
tree0522dc3d9148b7822f6f307a4aa1eb6de80911cd /regress/sys
parent3feb3d9fedff2863348b78acf1f07514a912954e (diff)
Cleanup the mount point and vnd devices before and after the test.
Use objdir and curdir correctly. Link ffs regress to the build.
Diffstat (limited to 'regress/sys')
-rw-r--r--regress/sys/Makefile4
-rw-r--r--regress/sys/ffs/Makefile25
2 files changed, 16 insertions, 13 deletions
diff --git a/regress/sys/Makefile b/regress/sys/Makefile
index 8b0818fb168..74fee3f14e3 100644
--- a/regress/sys/Makefile
+++ b/regress/sys/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.21 2016/03/04 14:16:16 deraadt Exp $
+# $OpenBSD: Makefile,v 1.22 2017/01/10 23:16:15 bluhm Exp $
# $NetBSD: Makefile,v 1.4 1995/04/20 22:41:08 cgd Exp $
-SUBDIR+= copy crypto ddb fifofs kern net netinet netinet6 ptrace sys uvm dev
+SUBDIR+= copy crypto dev ddb ffs fifofs kern net netinet netinet6 ptrace sys uvm
.if exists(arch/${MACHINE}/Makefile)
SUBDIR+= arch/${MACHINE}
.endif
diff --git a/regress/sys/ffs/Makefile b/regress/sys/ffs/Makefile
index 8455d5c29af..064b7f1d249 100644
--- a/regress/sys/ffs/Makefile
+++ b/regress/sys/ffs/Makefile
@@ -1,20 +1,22 @@
-# $OpenBSD: Makefile,v 1.4 2011/04/18 16:52:11 thib Exp $
+# $OpenBSD: Makefile,v 1.5 2017/01/10 23:16:15 bluhm Exp $
PROG= fstest
-mount:
- dd if=/dev/zero of=${.CURDIR}/fakeobj bs=512 count=4k
- vnconfig vnd0 ${.CURDIR}/fakeobj
+mount: unmount
+ dd if=/dev/zero of=fakeobj bs=512 count=4k
+ vnconfig vnd0 fakeobj
newfs /dev/rvnd0c
mount /dev/vnd0c /mnt
-clean:
- -umount /mnt
- -vnconfig -u vnd0
- -vnconfig -u vnd1
- -rm -f ${.CURDIR}/fakeobj
- -rm -f ${.OBJDIR}/fstest
- -rm -f ${.OBJDIR}/fstest.o
+unmount:
+ -umount -f /mnt 2>/dev/null || true
+ -vnconfig -u vnd0 2>/dev/null || true
+ -vnconfig -u vnd1 2>/dev/null || true
+
+clean: unmount
+ -rm -f fakeobj
+ -rm -f fstest
+ -rm -f fstest.o
chflags: ${PROG} mount
cd /mnt && env FSTEST=${.OBJDIR}/fstest /bin/sh ${.CURDIR}/run\
@@ -67,5 +69,6 @@ unlink: ${PROG} mount
run-regress-fstest: mount
cd /mnt && env FSTEST=${.OBJDIR}/fstest /bin/sh ${.CURDIR}/run\
${.CURDIR}/tests/*/*.t
+ cd ${.CURDIR} && ${.MAKE} unmount
.include <bsd.regress.mk>