diff options
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/geom_concat/Makefile | 8 | ||||
-rw-r--r-- | tools/regression/geom_concat/conf.sh | 8 | ||||
-rw-r--r-- | tools/regression/geom_concat/runtests.sh | 8 | ||||
-rw-r--r-- | tools/regression/geom_concat/test-1.sh | 27 | ||||
-rw-r--r-- | tools/regression/geom_concat/test-1.t | 7 | ||||
-rw-r--r-- | tools/regression/geom_concat/test-2.sh | 32 | ||||
-rw-r--r-- | tools/regression/geom_concat/test-2.t | 9 |
7 files changed, 17 insertions, 82 deletions
diff --git a/tools/regression/geom_concat/Makefile b/tools/regression/geom_concat/Makefile deleted file mode 100644 index 5df6a3b..0000000 --- a/tools/regression/geom_concat/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# $FreeBSD$ -# -# Regression test for geom_concat. -# - -test: - @sh runtests.sh diff --git a/tools/regression/geom_concat/conf.sh b/tools/regression/geom_concat/conf.sh new file mode 100644 index 0000000..0eaf1ba --- /dev/null +++ b/tools/regression/geom_concat/conf.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# $FreeBSD$ + +name="test" +class="concat" +base=`basename $0` + +. `dirname $0`/../geom_subr.sh diff --git a/tools/regression/geom_concat/runtests.sh b/tools/regression/geom_concat/runtests.sh deleted file mode 100644 index 38089c5..0000000 --- a/tools/regression/geom_concat/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_concat/test-1.sh b/tools/regression/geom_concat/test-1.sh deleted file mode 100644 index 9304ebd..0000000 --- a/tools/regression/geom_concat/test-1.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="test" -base=`basename $0` -us=45 - -mdconfig -a -t malloc -s 1M -u $us || exit 1 -mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 -mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 - -gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 - -# Size of created device should be 1MB + 2MB + 3MB. - -size=`diskinfo /dev/concat/${name} | awk '{print $3}'` - -if [ $size -eq 6291456 ]; then - echo "PASS" -else - echo "FAIL" -fi - -gconcat destroy $name -mdconfig -d -u $us -mdconfig -d -u `expr $us + 1` -mdconfig -d -u `expr $us + 2` diff --git a/tools/regression/geom_concat/test-1.t b/tools/regression/geom_concat/test-1.t index ce04ace..8984f79 100644 --- a/tools/regression/geom_concat/test-1.t +++ b/tools/regression/geom_concat/test-1.t @@ -1,17 +1,18 @@ #!/bin/sh # $FreeBSD$ -name="test" -base=`basename $0` -us=45 +. `dirname $0`/conf.sh echo '1..1' +us=45 + mdconfig -a -t malloc -s 1M -u $us || exit 1 mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 +devwait # Size of created device should be 1MB + 2MB + 3MB. diff --git a/tools/regression/geom_concat/test-2.sh b/tools/regression/geom_concat/test-2.sh deleted file mode 100644 index 990ecfc..0000000 --- a/tools/regression/geom_concat/test-2.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="test" -base=`basename $0` -us=45 -tsize=6 -src=`mktemp /tmp/$base.XXXXXX` || exit 1 -dst=`mktemp /tmp/$base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=1m count=$tsize >/dev/null 2>&1 - -mdconfig -a -t malloc -s 1M -u $us || exit 1 -mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 -mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 - -gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 - -dd if=${src} of=/dev/concat/${name} bs=1m count=$tsize >/dev/null 2>&1 -dd if=/dev/concat/${name} of=${dst} bs=1m count=$tsize >/dev/null 2>&1 - -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "FAIL" -else - echo "PASS" -fi - -gconcat destroy $name -mdconfig -d -u $us -mdconfig -d -u `expr $us + 1` -mdconfig -d -u `expr $us + 2` -rm -f ${src} ${dst} diff --git a/tools/regression/geom_concat/test-2.t b/tools/regression/geom_concat/test-2.t index c3accff..445d9bc 100644 --- a/tools/regression/geom_concat/test-2.t +++ b/tools/regression/geom_concat/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=6 src=`mktemp /tmp/$base.XXXXXX` || exit 1 @@ -15,12 +17,11 @@ mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1 mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1 gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1 +devwait dd if=${src} of=/dev/concat/${name} bs=1m count=$tsize >/dev/null 2>&1 dd if=/dev/concat/${name} of=${dst} bs=1m count=$tsize >/dev/null 2>&1 -echo '1..1' - if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok - md5 checksum comparison" else |