diff options
Diffstat (limited to 'tools/regression/geom_mirror')
-rw-r--r-- | tools/regression/geom_mirror/conf.sh | 15 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-1.t | 23 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-2.t | 52 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-3.t | 64 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-4.t | 66 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-5.t | 64 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-6.t | 45 | ||||
-rw-r--r-- | tools/regression/geom_mirror/test-7.t | 64 |
8 files changed, 0 insertions, 393 deletions
diff --git a/tools/regression/geom_mirror/conf.sh b/tools/regression/geom_mirror/conf.sh deleted file mode 100644 index d8595f1..0000000 --- a/tools/regression/geom_mirror/conf.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="$(mktemp -u mirror.XXXXXX)" -class="mirror" -base=`basename $0` - -gmirror_test_cleanup() -{ - [ -c /dev/$class/$name ] && gmirror destroy $name - geom_test_cleanup -} -trap gmirror_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh diff --git a/tools/regression/geom_mirror/test-1.t b/tools/regression/geom_mirror/test-1.t deleted file mode 100644 index af82a14..0000000 --- a/tools/regression/geom_mirror/test-1.t +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -us0=$(attach_md -t malloc -s 1M) || exit 1 -us1=$(attach_md -t malloc -s 2M) || exit 1 -us2=$(attach_md -t malloc -s 3M) || exit 1 - -gmirror label $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 -devwait - -# Size of created device should be 1MB - 512b. - -size=`diskinfo /dev/mirror/${name} | awk '{print $3}'` - -if [ $size -eq 1048064 ]; then - echo "ok 1" -else - echo "not ok 1" -fi diff --git a/tools/regression/geom_mirror/test-2.t b/tools/regression/geom_mirror/test-2.t deleted file mode 100644 index 5605c44..0000000 --- a/tools/regression/geom_mirror/test-2.t +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..4" - -balance="round-robin" -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 - -gmirror label -b $balance $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 -devwait - -dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 1" -else - echo "ok 1" -fi -dd if=/dev/${us0} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 2" -else - echo "ok 2" -fi -dd if=/dev/${us1} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 3" -else - echo "ok 3" -fi - -dd if=/dev/${us2} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 4" -else - echo "ok 4" -fi - -rm -f ${src} ${dst} diff --git a/tools/regression/geom_mirror/test-3.t b/tools/regression/geom_mirror/test-3.t deleted file mode 100644 index b7f8525..0000000 --- a/tools/regression/geom_mirror/test-3.t +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..5" - -balance="round-robin" -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 - -gmirror label -b $balance $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 -devwait - -dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 1" -else - echo "ok 1" -fi - -gmirror remove $name ${us0} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 2" -else - echo "ok 2" -fi - -gmirror remove $name ${us1} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 3" -else - echo "ok 3" -fi - -gmirror remove $name ${us2} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 4" -else - echo "ok 4" -fi - -# mirror/${name} should be removed. -if [ -c /dev/${name} ]; then - echo "not ok 5" -else - echo "ok 5" -fi - -rm -f ${src} ${dst} diff --git a/tools/regression/geom_mirror/test-4.t b/tools/regression/geom_mirror/test-4.t deleted file mode 100644 index 6efcc02..0000000 --- a/tools/regression/geom_mirror/test-4.t +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..5" - -balance="load" -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 - -gmirror label -b $balance $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 -devwait - -dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 1" -else - echo "ok 1" -fi - -gmirror remove $name ${us0} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 2" -else - echo "ok 2" -fi - -gmirror remove $name ${us1} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 3" -else - echo "ok 3" -fi - -gmirror remove $name ${us2} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 4" -else - echo "ok 4" -fi - -gmirror destroy $name - -# mirror/${name} should be removed. -if [ -c /dev/${name} ]; then - echo "not ok 5" -else - echo "ok 5" -fi - -rm -f ${src} ${dst} diff --git a/tools/regression/geom_mirror/test-5.t b/tools/regression/geom_mirror/test-5.t deleted file mode 100644 index 3a176b5..0000000 --- a/tools/regression/geom_mirror/test-5.t +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..5" - -balance="split" -ddbs=8192 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 - -gmirror label -b $balance -s `expr $ddbs / 2` $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 -devwait - -dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 1" -else - echo "ok 1" -fi - -gmirror remove $name ${us0} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 2" -else - echo "ok 2" -fi - -gmirror remove $name ${us1} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 3" -else - echo "ok 3" -fi - -gmirror remove $name ${us2} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 4" -else - echo "ok 4" -fi - -# mirror/${name} should be removed. -if [ -c /dev/${name} ]; then - echo "not ok 5" -else - echo "ok 5" -fi - -rm -f ${src} ${dst} diff --git a/tools/regression/geom_mirror/test-6.t b/tools/regression/geom_mirror/test-6.t deleted file mode 100644 index 68036e9..0000000 --- a/tools/regression/geom_mirror/test-6.t +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..2" - -balance="split" -ddbs=8192 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 - -gmirror label -b $balance -s `expr $ddbs / 2` $name /dev/${us0} /dev/${us1} || exit 1 -devwait - -dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -dd if=/dev/zero of=/dev/${us2} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 1" -else - echo "ok 1" -fi - -# Connect disk to the mirror. -gmirror insert ${name} ${us2} -# Wait for synchronization. -sleep 1 -dd if=/dev/${us2} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 2" -else - echo "ok 2" -fi - -rm -f ${src} ${dst} diff --git a/tools/regression/geom_mirror/test-7.t b/tools/regression/geom_mirror/test-7.t deleted file mode 100644 index f5bf71a..0000000 --- a/tools/regression/geom_mirror/test-7.t +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..5" - -balance="prefer" -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 - -gmirror label -b $balance $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 -devwait - -dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 - -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 1" -else - echo "ok 1" -fi - -gmirror remove $name ${us0} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 2" -else - echo "ok 2" -fi - -gmirror remove $name ${us1} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 3" -else - echo "ok 3" -fi - -gmirror remove $name ${us2} -dd if=/dev/mirror/${name} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok 4" -else - echo "ok 4" -fi - -# mirror/${name} should be removed. -if [ -c /dev/${name} ]; then - echo "not ok 5" -else - echo "ok 5" -fi - -rm -f ${src} ${dst} |