Finish conversion of gconcat(8) regression tests to the new framework.

This commit is contained in:
Pawel Jakub Dawidek 2005-12-07 01:24:25 +00:00
parent 6d3e81df97
commit db5f9b8b22
7 changed files with 17 additions and 82 deletions

View File

@ -1,8 +0,0 @@
#
# $FreeBSD$
#
# Regression test for geom_concat.
#
test:
@sh runtests.sh

View File

@ -0,0 +1,8 @@
#!/bin/sh
# $FreeBSD$
name="test"
class="concat"
base=`basename $0`
. `dirname $0`/../geom_subr.sh

View File

@ -1,8 +0,0 @@
#!/bin/sh
# $FreeBSD$
dir=`dirname $0`
for ts in `dirname $0`/test-*.sh; do
sh $ts
done

View File

@ -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`

View File

@ -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.

View File

@ -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}

View File

@ -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