diff options
author | pjd <pjd@FreeBSD.org> | 2005-12-07 01:30:44 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-12-07 01:30:44 +0000 |
commit | 4ed0dcf09fd85f4fd2c1e14c2a25a1904bd7df42 (patch) | |
tree | 747004ab0cd0d38971da07072bf406b7cafc8211 /tools | |
parent | 5250c7022c73d349fa528f604d1d9fc67bd54cec (diff) | |
download | FreeBSD-src-4ed0dcf09fd85f4fd2c1e14c2a25a1904bd7df42.zip FreeBSD-src-4ed0dcf09fd85f4fd2c1e14c2a25a1904bd7df42.tar.gz |
Convert gstripe(8) regression tests to the new framework.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/geom_stripe/Makefile | 8 | ||||
-rw-r--r-- | tools/regression/geom_stripe/conf.sh | 8 | ||||
-rw-r--r-- | tools/regression/geom_stripe/runtests.sh | 8 | ||||
-rw-r--r-- | tools/regression/geom_stripe/test-1.t (renamed from tools/regression/geom_stripe/test-1.sh) | 11 | ||||
-rw-r--r-- | tools/regression/geom_stripe/test-2.t (renamed from tools/regression/geom_stripe/test-2.sh) | 11 |
5 files changed, 22 insertions, 24 deletions
diff --git a/tools/regression/geom_stripe/Makefile b/tools/regression/geom_stripe/Makefile deleted file mode 100644 index de8d14b..0000000 --- a/tools/regression/geom_stripe/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# $FreeBSD$ -# -# Regression test for geom_stripe. -# - -test: - @sh runtests.sh diff --git a/tools/regression/geom_stripe/conf.sh b/tools/regression/geom_stripe/conf.sh new file mode 100644 index 0000000..22e5864 --- /dev/null +++ b/tools/regression/geom_stripe/conf.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# $FreeBSD$ + +name="test" +class="stripe" +base=`basename $0` + +. `dirname $0`/../geom_subr.sh diff --git a/tools/regression/geom_stripe/runtests.sh b/tools/regression/geom_stripe/runtests.sh deleted file mode 100644 index 38089c5..0000000 --- a/tools/regression/geom_stripe/runtests.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -dir=`dirname $0` - -for ts in `dirname $0`/test-*.sh; do - sh $ts -done diff --git a/tools/regression/geom_stripe/test-1.sh b/tools/regression/geom_stripe/test-1.t index a5d4668..9b398f0 100644 --- a/tools/regression/geom_stripe/test-1.sh +++ b/tools/regression/geom_stripe/test-1.t @@ -1,8 +1,10 @@ #!/bin/sh # $FreeBSD$ -name="test" -base=`basename $0` +. `dirname $0`/conf.sh + +echo "1..1" + us=45 mdconfig -a -t malloc -s 1M -u $us || exit 1 @@ -10,15 +12,16 @@ mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 gstripe create -s 16384 $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 +devwait # Size of created device should be 1MB * 3. size=`diskinfo /dev/stripe/${name} | awk '{print $3}'` if [ $size -eq 3145728 ]; then - echo "PASS" + echo "ok 1" else - echo "FAIL" + echo "not ok 1" fi gstripe destroy $name diff --git a/tools/regression/geom_stripe/test-2.sh b/tools/regression/geom_stripe/test-2.t index b78221d..73937f4 100644 --- a/tools/regression/geom_stripe/test-2.sh +++ b/tools/regression/geom_stripe/test-2.t @@ -1,8 +1,10 @@ #!/bin/sh # $FreeBSD$ -name="test" -base=`basename $0` +. `dirname $0`/conf.sh + +echo "1..1" + us=45 tsize=3 src=`mktemp /tmp/$base.XXXXXX` || exit 1 @@ -15,14 +17,15 @@ mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 gstripe create -s 8192 $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 +devwait dd if=${src} of=/dev/stripe/${name} bs=1m count=$tsize >/dev/null 2>&1 dd if=/dev/stripe/${name} of=${dst} bs=1m count=$tsize >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "FAIL" + echo "not ok 1" else - echo "PASS" + echo "ok 1" fi gstripe destroy $name |