RunTest.t revision 137587
1137587Snik#!/bin/sh 2137587Snik# $FreeBSD: head/tools/regression/geom/RunTest.t 137587 2004-11-11 19:47:55Z nik $ 3137587Snik 4137587SnikMD=34 5137587SnikTMP=/tmp/$$ 6137587Snik 7137587Snikset -e 8137587Snik 9137587Snik# Start from the right directory so we can find all our data files. 10137587Snikcd `dirname $0` 11137587Snik 12137587Snik(cd MdLoad && make) > /dev/null 2>&1 13137587Snik 14137587Snik# Print the test header 15137587Snikecho -n '1..' 16137587Snikecho `ls -1 Data/disk.*.xml | wc -l` 17137587Snik 18137587Snikfor f in Data/disk.*.xml 19137587Snikdo 20137587Snik b=`basename $f` 21137587Snik mdconfig -d -u $MD > /dev/null 2>&1 || true 22137587Snik if [ -c /dev/md$MD ] ; then 23137587Snik sleep 1 24137587Snik fi 25137587Snik if [ -c /dev/md$MD ] ; then 26137587Snik sleep 1 27137587Snik fi 28137587Snik if [ -c /dev/md$MD ] ; then 29137587Snik echo "Bail out!" 30137587Snik echo "/dev/md$MD is busy" 31137587Snik exit 1 32137587Snik fi 33137587Snik MdLoad/MdLoad md${MD} $f 34137587Snik if [ -f Ref/$b ] ; then 35137587Snik if diskinfo /dev/md${MD}* | 36137587Snik diff -I '$FreeBSD' -u Ref/$b - > $TMP; then 37137587Snik echo "ok - $b" 38137587Snik else 39137587Snik echo "not ok - $b" 40137587Snik sed 's/^/# /' $TMP 41137587Snik fi 42137587Snik else 43137587Snik diskinfo /dev/md${MD}* > Ref/`basename $f` 44137587Snik fi 45137587Snikdone 46137587Snik 47137587Snikmdconfig -d -u $MD > /dev/null 2>&1 || true 48137587Snikrm -f $TMP 49137587Snik 50137587Snikexit 0 51