Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/10_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/10_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/10_test.sh (revision 291287) @@ -1,32 +1,32 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label -r $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/11_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/11_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/11_test.sh (revision 291287) @@ -1,32 +1,32 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label -w $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/2_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/2_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/2_test.sh (revision 291287) @@ -1,32 +1,32 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/3_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/3_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/3_test.sh (revision 291287) @@ -1,36 +1,36 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 # # Reading without one DATA component (so with parity). # graid3 remove -n 1 $name dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/4_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/4_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/4_test.sh (revision 291287) @@ -1,36 +1,36 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait # # Writing without one DATA component. # graid3 remove -n 1 $name dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/5_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/5_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/5_test.sh (revision 291287) @@ -1,36 +1,36 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait # # Writing without PARITY component. # graid3 remove -n 2 $name dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/6_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/6_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/6_test.sh (revision 291287) @@ -1,40 +1,40 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 # # Rebuild of DATA component. # graid3 remove -n 1 $name dd if=/dev/zero of=/dev/${us1} bs=512 count=`expr $nblocks1 + 1` >/dev/null 2>&1 graid3 insert -n 1 $name md${us1} sleep 1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/7_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/7_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/7_test.sh (revision 291287) @@ -1,43 +1,43 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 # # Rebuild of PARITY component. # graid3 remove -n 2 $name dd if=/dev/zero of=/dev/${us2} bs=512 count=`expr $nblocks1 + 1` >/dev/null 2>&1 graid3 insert -n 2 $name md${us2} sleep 1 # Remove DATA component, so PARITY component can be used while reading. graid3 remove -n 1 $name dd if=/dev/zero of=/dev/${us1} bs=512 count=`expr $nblocks1 + 1` >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/8_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/8_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/8_test.sh (revision 291287) @@ -1,39 +1,39 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait # # Writing without DATA component and rebuild of DATA component. # graid3 remove -n 1 $name dd if=/dev/zero of=/dev/${us1} bs=512 count=`expr $nblocks1 + 1` >/dev/null 2>&1 dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 insert -n 1 $name md${us1} sleep 1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/raid3/9_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/raid3/9_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/raid3/9_test.sh (revision 291287) @@ -1,42 +1,42 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait # # Writing without PARITY component and rebuild of PARITY component. # graid3 remove -n 2 $name dd if=/dev/zero of=/dev/${us2} bs=512 count=`expr $nblocks1 + 1` >/dev/null 2>&1 dd if=${src} of=/dev/raid3/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 graid3 insert -n 2 $name md${us2} sleep 1 # Remove DATA component, so PARITY component can be used while reading. graid3 remove -n 1 $name dd if=/dev/zero of=/dev/${us1} bs=512 count=`expr $nblocks1 + 1` >/dev/null 2>&1 dd if=/dev/raid3/${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 rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/shsec/2_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/shsec/2_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/shsec/2_test.sh (revision 291287) @@ -1,52 +1,52 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..4" nblocks1=1024 nblocks2=`expr $nblocks1 + 1` -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 1 dd if=/dev/random of=${src} count=$nblocks1 >/dev/null 2>&1 us0=$(attach_md -t malloc -s $nblocks2) || exit 1 us1=$(attach_md -t malloc -s $nblocks2) || exit 1 us2=$(attach_md -t malloc -s $nblocks2) || exit 1 gshsec label $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 devwait dd if=${src} of=/dev/shsec/${name} count=$nblocks1 >/dev/null 2>&1 dd if=/dev/shsec/${name} of=${dst} count=$nblocks1 >/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} count=$nblocks1 >/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} count=$nblocks1 >/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} count=$nblocks1 >/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} Index: user/ngie/more-tests2/sbin/geom/class/tests/stripe/2_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/stripe/2_test.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/stripe/2_test.sh (revision 291287) @@ -1,30 +1,30 @@ #!/bin/sh # $FreeBSD$ . `dirname $0`/conf.sh echo "1..1" tsize=3 -src=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 -dst=`mktemp $TMPDIR/$base.XXXXXX` || exit 1 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 1 dd if=/dev/random of=${src} bs=1m count=$tsize >/dev/null 2>&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 gstripe create -s 8192 $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 devwait dd if=${src} of=/dev/stripe/${name} bs=1m count=$tsize >/dev/null 2>&1 dd if=/dev/stripe/${name} of=${dst} bs=1m count=$tsize >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok 1" else echo "ok 1" fi rm -f ${src} ${dst} Index: user/ngie/more-tests2/sbin/geom/class/tests/uzip/conf.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/class/tests/uzip/conf.sh (revision 291286) +++ user/ngie/more-tests2/sbin/geom/class/tests/uzip/conf.sh (revision 291287) @@ -1,16 +1,16 @@ #!/bin/sh # $FreeBSD$ class="uzip" base=`basename $0` -mntpoint=$(mktemp -d $TMPDIR/tmp.XXXXXX) || exit +mntpoint=$(mktemp -d tmp.XXXXXX) || exit uzip_test_cleanup() { umount $mntpoint rmdir $mntpoint geom_test_cleanup } trap uzip_test_cleanup ABRT EXIT INT TERM . `dirname $0`/../geom_subr.sh