RunTest.sh revision 113433
10Sstevel@tonic-gate#!/bin/sh 20Sstevel@tonic-gate# $FreeBSD: head/tools/regression/geom/RunTest.sh 113433 2003-04-13 09:06:39Z phk $ 30Sstevel@tonic-gate 40Sstevel@tonic-gateMD=34 51618SrieTMP=/tmp/$$ 61618Srie 70Sstevel@tonic-gateset -e 80Sstevel@tonic-gate 90Sstevel@tonic-gater=0 100Sstevel@tonic-gate 110Sstevel@tonic-gate(cd MdLoad && make) > /dev/null 2>&1 120Sstevel@tonic-gate 130Sstevel@tonic-gatefor f in Data/disk.*.xml 140Sstevel@tonic-gatedo 150Sstevel@tonic-gate b=`basename $f` 160Sstevel@tonic-gate mdconfig -d -u $MD > /dev/null 2>&1 || true 170Sstevel@tonic-gate if [ -c /dev/md$MD ] ; then 180Sstevel@tonic-gate sleep 1 190Sstevel@tonic-gate fi 200Sstevel@tonic-gate if [ -c /dev/md$MD ] ; then 211618Srie sleep 1 220Sstevel@tonic-gate fi 2312692SAli.Bahrami@Oracle.COM if [ -c /dev/md$MD ] ; then 240Sstevel@tonic-gate echo "/dev/md$MD is busy" 1>&2 250Sstevel@tonic-gate exit 1 260Sstevel@tonic-gate fi 270Sstevel@tonic-gate MdLoad/MdLoad md${MD} $f 281618Srie if [ -f Ref/$b ] ; then 290Sstevel@tonic-gate if diskinfo /dev/md${MD}* | 300Sstevel@tonic-gate diff -I '$FreeBSD' -u Ref/$b - > $TMP; then 310Sstevel@tonic-gate echo "PASSED: $b" 320Sstevel@tonic-gate else 330Sstevel@tonic-gate echo "FAILED: $b" 340Sstevel@tonic-gate sed 's/^/ /' $TMP 350Sstevel@tonic-gate r=2; 360Sstevel@tonic-gate fi 370Sstevel@tonic-gate else 380Sstevel@tonic-gate diskinfo /dev/md${MD}* > Ref/`basename $f` 39 fi 40done 41 42mdconfig -d -u $MD > /dev/null 2>&1 || true 43rm -f $TMP 44exit $r 45