Convert gnop(8) regression tests to the new framework.
This commit is contained in:
parent
7d4ec059d3
commit
028f760b81
@ -1,8 +0,0 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Regression test for geom_nop.
|
||||
#
|
||||
|
||||
test:
|
||||
@sh runtests.sh
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
for ts in `dirname $0`/test-*.sh; do
|
||||
sh $ts
|
||||
done
|
@ -5,6 +5,8 @@ name="test"
|
||||
base=`basename $0`
|
||||
us=45
|
||||
|
||||
echo "1..1"
|
||||
|
||||
mdconfig -a -t malloc -s 1M -u $us || exit 1
|
||||
|
||||
gnop create /dev/md${us} || exit 1
|
||||
@ -14,9 +16,9 @@ gnop create /dev/md${us} || exit 1
|
||||
size=`diskinfo /dev/md${us}.nop | awk '{print $3}'`
|
||||
|
||||
if [ $size -eq 1048576 ]; then
|
||||
echo "PASS"
|
||||
echo "ok 1"
|
||||
else
|
||||
echo "FAIL"
|
||||
echo "not ok 1"
|
||||
fi
|
||||
|
||||
gnop destroy md${us}.nop
|
@ -7,6 +7,8 @@ us=45
|
||||
src=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
dst=`mktemp /tmp/$base.XXXXXX` || exit 1
|
||||
|
||||
echo "1..1"
|
||||
|
||||
dd if=/dev/random of=${src} bs=1m count=1 >/dev/null 2>&1
|
||||
|
||||
mdconfig -a -t malloc -s 1M -u $us || exit 1
|
||||
@ -17,9 +19,9 @@ dd if=${src} of=/dev/md${us}.nop bs=1m count=1 >/dev/null 2>&1
|
||||
dd if=/dev/md${us}.nop of=${dst} bs=1m count=1 >/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
|
||||
|
||||
gnop destroy md${us}.nop
|
Loading…
Reference in New Issue
Block a user