diff options
-rw-r--r-- | regress/sbin/newfs/Makefile | 4 | ||||
-rw-r--r-- | regress/sbin/newfs/checknewfs | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/regress/sbin/newfs/Makefile b/regress/sbin/newfs/Makefile index 269f968063e..a6a9d6ac0e7 100644 --- a/regress/sbin/newfs/Makefile +++ b/regress/sbin/newfs/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.2 2016/08/26 13:10:30 bluhm Exp $ +# $OpenBSD: Makefile,v 1.3 2019/02/12 21:47:19 bluhm Exp $ # # Regress tests for newfs REGRESS_TARGETS = run-regress-checknewfs run-regress-checknewfs: - sh ${.CURDIR}/checknewfs + ${SUDO} sh ${.CURDIR}/checknewfs .include <bsd.regress.mk> diff --git a/regress/sbin/newfs/checknewfs b/regress/sbin/newfs/checknewfs index 99aff12689b..9c18f87a2fe 100644 --- a/regress/sbin/newfs/checknewfs +++ b/regress/sbin/newfs/checknewfs @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: checknewfs,v 1.5 2015/10/14 13:22:56 semarie Exp $ +# $OpenBSD: checknewfs,v 1.6 2019/02/12 21:47:19 bluhm Exp $ # Written by Otto Moerbeek, 2007, Public domain @@ -11,6 +11,10 @@ cleanup() { trap 'cleanup' INT dotest() { + if ! grep -q "$2|" /etc/disktab; then + echo disk type $2 does not exists in /etc/disktab + echo SKIPPED + fi image=$(mktemp -t imageXXXXXXXXXX); dd if=/dev/random of=$image bs=512 count=$1 2>/dev/null && vnconfig vnd0 $image && |