turns printfs back on
[freebsd-src/fkvm-freebsd.git] / tools / regression / geom / RunTest.sh
blob46a14b4ab828bd84012fed38b31374d27e7d8f6c
1 #!/bin/sh
2 # $FreeBSD$
4 MD=34
5 TMP=/tmp/$$
7 set -e
9 r=0
11 (cd MdLoad && make) > /dev/null 2>&1
13 for f in Data/disk.*.xml
15 b=`basename $f`
16 mdconfig -d -u $MD > /dev/null 2>&1 || true
17 if [ -c /dev/md$MD ] ; then
18 sleep 1
20 if [ -c /dev/md$MD ] ; then
21 sleep 1
23 if [ -c /dev/md$MD ] ; then
24 echo "/dev/md$MD is busy" 1>&2
25 exit 1
27 MdLoad/MdLoad md${MD} $f
28 if [ -f Ref/$b ] ; then
29 if diskinfo /dev/md${MD}* |
30 diff -I '$FreeBSD' -u Ref/$b - > $TMP; then
31 echo "PASSED: $b"
32 else
33 echo "FAILED: $b"
34 sed 's/^/ /' $TMP
35 r=2;
37 else
38 diskinfo /dev/md${MD}* > Ref/`basename $f`
40 done
42 mdconfig -d -u $MD > /dev/null 2>&1 || true
43 rm -f $TMP
44 exit $r