diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-02-12 21:47:20 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-02-12 21:47:20 +0000 |
commit | 2b4f8c1c93b9361a5a2aaea1df239122c1e90d82 (patch) | |
tree | d85839aa8011a4d23f0bce0ff1e5ccc11a399265 | |
parent | fe8fb0d308080fedcdf057d740392a9802be7464 (diff) |
Skip test if disk type is not in /etc/disktab. There is no floppy
on arm.
from Moritz Buhl
-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 && |