summaryrefslogtreecommitdiff
path: root/regress/sbin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-05-19 19:11:09 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-05-19 19:11:09 +0000
commit45205ade2baf59f98f0cc9c6fb26e9b6a727bbea (patch)
tree297fcaf867c5e467d941e7837224fd8803f89a2b /regress/sbin
parentd75a44db6f7f52fc0e4481f6f91ce60f5fae8b0a (diff)
detect if newfs fails and add an extra test (amd64 floppy)
Diffstat (limited to 'regress/sbin')
-rw-r--r--regress/sbin/newfs/checknewfs16
1 files changed, 11 insertions, 5 deletions
diff --git a/regress/sbin/newfs/checknewfs b/regress/sbin/newfs/checknewfs
index fd95b2dccf1..537847ff18f 100644
--- a/regress/sbin/newfs/checknewfs
+++ b/regress/sbin/newfs/checknewfs
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: checknewfs,v 1.1 2007/04/18 10:18:23 otto Exp $
+# $OpenBSD: checknewfs,v 1.2 2007/05/19 19:11:08 otto Exp $
# Written by Otto Moerbeek, 2007, Public domain
@@ -15,13 +15,18 @@ dotest() {
dd if=/dev/prandom of=$image bs=512 count=$1 2>/dev/null &&
vnconfig svnd0 $image &&
disklabel -w -r svnd0 $2 &&
- newfs $3 /dev/rsvnd0a &&
- fsck -nf /dev/svnd0a | fgrep SALVAGE
- if [ $? == 0 ]; then
+ newfs $3 /dev/rsvnd0a
+ if [ $? != 0 ]; then
ret=$(($ret + 1))
echo TEST $1 $2 \"$3\" failed
else
- echo TEST $1 $2 \"$3\" OK
+ (fsck -nf /dev/svnd0a | fgrep SALVAGE)
+ if [ $? == 0 ]; then
+ ret=$(($ret + 1))
+ echo TEST $1 $2 \"$3\" failed
+ else
+ echo TEST $1 $2 \"$3\" OK
+ fi
fi
echo ==========================
if [ $clean = 1 ]; then
@@ -41,6 +46,7 @@ if [ $# == 0 ]; then
dotest 5760 floppy288 "-m 0 -o space -i 524288 -c 5761"
dotest 2880 floppy3 "-m 0 -o space -i 81920"
dotest 2880 floppy3 "-m 0 -o space -i 81920 -c 2880"
+ dotest 2880 floppy3 "-m 0 -o space -i 524288 -c 2880"
else
clean=0
dotest "${@}"