Finish conversion of gconcat(8) regression tests to the new framework.
This commit is contained in:
parent
49984acede
commit
65dce3ed0a
@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# $FreeBSD$
|
|
||||||
#
|
|
||||||
# Regression test for geom_concat.
|
|
||||||
#
|
|
||||||
|
|
||||||
test:
|
|
||||||
@sh runtests.sh
|
|
8
tools/regression/geom_concat/conf.sh
Normal file
8
tools/regression/geom_concat/conf.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
name="test"
|
||||||
|
class="concat"
|
||||||
|
base=`basename $0`
|
||||||
|
|
||||||
|
. `dirname $0`/../geom_subr.sh
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# $FreeBSD$
|
|
||||||
|
|
||||||
dir=`dirname $0`
|
|
||||||
|
|
||||||
for ts in `dirname $0`/test-*.sh; do
|
|
||||||
sh $ts
|
|
||||||
done
|
|
@ -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`
|
|
@ -1,17 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
name="test"
|
. `dirname $0`/conf.sh
|
||||||
base=`basename $0`
|
|
||||||
us=45
|
|
||||||
|
|
||||||
echo '1..1'
|
echo '1..1'
|
||||||
|
|
||||||
|
us=45
|
||||||
|
|
||||||
mdconfig -a -t malloc -s 1M -u $us || exit 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 2M -u `expr $us + 1` || exit 1
|
||||||
mdconfig -a -t malloc -s 3M -u `expr $us + 2` || 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
|
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.
|
# Size of created device should be 1MB + 2MB + 3MB.
|
||||||
|
|
||||||
|
@ -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}
|
|
@ -1,8 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
name="test"
|
. `dirname $0`/conf.sh
|
||||||
base=`basename $0`
|
|
||||||
|
echo '1..1'
|
||||||
|
|
||||||
us=45
|
us=45
|
||||||
tsize=6
|
tsize=6
|
||||||
src=`mktemp /tmp/$base.XXXXXX` || exit 1
|
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
|
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
|
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=${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
|
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
|
if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then
|
||||||
echo "not ok - md5 checksum comparison"
|
echo "not ok - md5 checksum comparison"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user