Index: stable/10/etc/mtree/BSD.tests.dist =================================================================== --- stable/10/etc/mtree/BSD.tests.dist (revision 296820) +++ stable/10/etc/mtree/BSD.tests.dist (revision 296821) @@ -1,446 +1,472 @@ # $FreeBSD$ # # Please see the file src/etc/mtree/README before making changes to this file. # /set type=dir uname=root gname=wheel mode=0755 . bin cat .. chown .. date .. dd .. expr .. ls .. mv .. pax .. pkill .. sh builtins .. errors .. execution .. expansion .. parameters .. parser .. set-e .. .. sleep .. test .. .. cddl lib .. sbin .. usr.bin .. usr.sbin .. .. etc rc.d .. .. games .. gnu lib .. usr.bin diff .. .. .. lib atf libatf-c detail .. .. libatf-c++ detail .. .. test-programs .. .. libarchive .. libc c063 .. db .. gen execve .. posix_spawn .. .. hash data .. .. inet .. locale .. net getaddrinfo data .. .. .. nss .. regex data .. .. resolv .. rpc .. ssp .. stdio .. stdlib .. string .. sys .. time .. tls dso .. .. termios .. ttyio .. .. libcrypt .. libmp .. libnv .. librt .. libthr dlopen .. .. libutil .. msun .. .. libexec atf atf-check .. atf-sh .. .. .. sbin dhclient .. devd .. growfs .. mdconfig .. .. secure lib .. libexec .. usr.bin .. usr.sbin .. .. share examples tests atf .. plain .. .. .. .. sys acl .. aio .. fifo .. file .. + geom + class + concat + .. + eli + .. + gate + .. + gpt + .. + mirror + .. + nop + .. + raid3 + .. + shsec + .. + stripe + .. + uzip + etalon + .. + .. + .. + .. kern acct .. execve .. pipe .. .. kqueue .. mac bsdextended .. portacl .. .. mqueue .. netinet .. pjdfstest chflags .. chmod .. chown .. ftruncate .. granular .. link .. mkdir .. mkfifo .. mknod .. open .. rename .. rmdir .. symlink .. truncate .. unlink .. .. posixshm .. vfs .. vm .. .. usr.bin apply .. basename .. bmake archives fmt_44bsd .. fmt_44bsd_mod .. fmt_oldbsd .. .. basic t0 .. t1 .. t2 .. t3 .. .. execution ellipsis .. empty .. joberr .. plus .. .. shell builtin .. meta .. path .. path_select .. replace .. select .. .. suffixes basic .. src_wild1 .. src_wild2 .. .. syntax directive-t0 .. enl .. funny-targets .. semi .. .. sysmk t0 2 1 .. .. mk .. .. t1 2 1 .. .. mk .. .. t2 2 1 .. .. mk .. .. .. variables modifier_M .. modifier_t .. opt_V .. t0 .. .. .. calendar .. cmp .. cpio .. col .. comm .. cut .. dirname .. file2c .. grep .. gzip .. join .. jot .. lastcomm .. limits .. m4 .. ncal .. opensm .. printf .. sed regress.multitest.out .. .. tar .. timeout .. tr .. truncate .. uudecode .. uuencode .. xargs .. yacc yacc .. .. .. usr.sbin etcupdate .. fstyp .. makefs .. newsyslog .. nmtree .. pw .. sa .. .. .. # vim: set expandtab ts=4 sw=4: Index: stable/10/tests/sys/Makefile =================================================================== --- stable/10/tests/sys/Makefile (revision 296820) +++ stable/10/tests/sys/Makefile (revision 296821) @@ -1,25 +1,26 @@ # $FreeBSD$ .include TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file +TESTS_SUBDIRS+= geom TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mac TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= posixshm TESTS_SUBDIRS+= vfs TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default SUBDIR+= pjdfstest SUBDIR_PARALLEL= .include Index: stable/10/tests/sys/geom/Makefile =================================================================== --- stable/10/tests/sys/geom/Makefile (nonexistent) +++ stable/10/tests/sys/geom/Makefile (revision 296821) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom + +TESTS_SUBDIRS+= class + +.include Property changes on: stable/10/tests/sys/geom/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/Makefile =================================================================== --- stable/10/tests/sys/geom/class/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/Makefile (revision 296821) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class + +TESTS_SUBDIRS+= concat +TESTS_SUBDIRS+= eli +TESTS_SUBDIRS+= gate +# XXX: might not work due to geom(4) changes; more investigation's needed +#TESTS_SUBDIRS+= gpt +TESTS_SUBDIRS+= mirror +TESTS_SUBDIRS+= nop +TESTS_SUBDIRS+= raid3 +TESTS_SUBDIRS+= shsec +TESTS_SUBDIRS+= stripe +TESTS_SUBDIRS+= uzip + +BINDIR= ${TESTSDIR} + +FILES+= geom_subr.sh + +.include Property changes on: stable/10/tests/sys/geom/class/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/concat/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/concat/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/concat/1_test.sh (revision 296821) @@ -0,0 +1,23 @@ +#!/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 + +gconcat create $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 +devwait + +# Size of created device should be 1MB + 2MB + 3MB. + +size=`diskinfo /dev/concat/${name} | awk '{print $3}'` + +if [ $size -eq 6291456 ]; then + echo "ok - Size is 6291456" +else + echo "not ok - Size is 6291456" +fi Property changes on: stable/10/tests/sys/geom/class/concat/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/concat/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/concat/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/concat/2_test.sh (revision 296821) @@ -0,0 +1,30 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo '1..1' + +tsize=6 +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 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 + +dd if=/dev/random of=${src} bs=1m count=$tsize >/dev/null 2>&1 + +gconcat create $name /dev/$us0 /dev/$us1 /dev/$us2 || 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 + +if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then + echo "not ok - md5 checksum comparison" +else + echo "ok - md5 checksum comparison" +fi + +rm -f ${src} ${dst} Property changes on: stable/10/tests/sys/geom/class/concat/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/concat/Makefile =================================================================== --- stable/10/tests/sys/geom/class/concat/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/concat/Makefile (revision 296821) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/concat/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/concat/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/concat/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/concat/conf.sh (revision 296821) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +name="$(mktemp -u concat.XXXXXX)" +class="concat" +base=`basename $0` + +gconcat_test_cleanup() +{ + [ -c /dev/$class/$name ] && gconcat destroy $name + geom_test_cleanup +} +trap gconcat_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/concat/conf.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/Makefile =================================================================== --- stable/10/tests/sys/geom/class/eli/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/eli/Makefile (revision 296821) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= attach_d_test +TAP_TESTS_SH+= configure_b_B_test +TAP_TESTS_SH+= delkey_test +TAP_TESTS_SH+= detach_l_test +TAP_TESTS_SH+= init_B_test +TAP_TESTS_SH+= init_J_test +TAP_TESTS_SH+= init_a_test +TAP_TESTS_SH+= init_i_P_test +TAP_TESTS_SH+= init_test +TAP_TESTS_SH+= integrity_copy_test +TAP_TESTS_SH+= integrity_data_test +TAP_TESTS_SH+= integrity_hmac_test +TAP_TESTS_SH+= kill_test +TAP_TESTS_SH+= nokey_test +TAP_TESTS_SH+= onetime_a_test +TAP_TESTS_SH+= onetime_d_test +TAP_TESTS_SH+= onetime_test +TAP_TESTS_SH+= readonly_test +TAP_TESTS_SH+= resize_test +TAP_TESTS_SH+= setkey_test + +TEST_METADATA.init_a_test+= timeout="1200" +TEST_METADATA.init_test+= timeout="300" +TEST_METADATA.integrity_copy_test+= timeout="1200" +TEST_METADATA.integrity_data_test+= timeout="600" +TEST_METADATA.integrity_hmac_test+= timeout="600" +TEST_METADATA.onetime_a_test+= timeout="600" +TEST_METADATA.onetime_test+= timeout="600" + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/eli/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/attach_d_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/attach_d_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/attach_d_test.sh (revision 296821) @@ -0,0 +1,38 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..3" + +dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K $keyfile md${no} +geli attach -d -p -k $keyfile md${no} +if [ -c /dev/md${no}.eli ]; then + echo "ok 1" +else + echo "not ok 1" +fi +# Be sure it doesn't detach on read. +dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null +sleep 1 +if [ -c /dev/md${no}.eli ]; then + echo "ok 2" +else + echo "not ok 2" +fi +true > /dev/md${no}.eli +sleep 1 +if [ ! -c /dev/md${no}.eli ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/attach_d_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/configure_b_B_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/configure_b_B_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/configure_b_B_test.sh (revision 296821) @@ -0,0 +1,129 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..17" + +geli init -B none -P -K /dev/null md${no} +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi + +geli dump md${no} | egrep 'flags: 0x0$' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +geli init -B none -b -P -K /dev/null md${no} +if [ $? -eq 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +geli dump md${no} | egrep 'flags: 0x2$' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +geli configure -B md${no} +if [ $? -eq 0 ]; then + echo "ok 5" +else + echo "not ok 5" +fi + +geli dump md${no} | egrep 'flags: 0x0$' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 6" +else + echo "not ok 6" +fi + +geli configure -b md${no} +if [ $? -eq 0 ]; then + echo "ok 7" +else + echo "not ok 7" +fi + +geli dump md${no} | egrep 'flags: 0x2$' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 8" +else + echo "not ok 8" +fi + +geli attach -p -k /dev/null md${no} +if [ $? -eq 0 ]; then + echo "ok 9" +else + echo "not ok 9" +fi + +geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 10" +else + echo "not ok 10" +fi + +geli configure -B md${no} +if [ $? -eq 0 ]; then + echo "ok 11" +else + echo "not ok 11" +fi + +geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null +if [ $? -ne 0 ]; then + echo "ok 12" +else + echo "not ok 12" +fi + +geli dump md${no} | egrep 'flags: 0x0$' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 13" +else + echo "not ok 13" +fi + +geli configure -b md${no} +if [ $? -eq 0 ]; then + echo "ok 14" +else + echo "not ok 14" +fi + +geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 15" +else + echo "not ok 15" +fi + +geli dump md${no} | egrep 'flags: 0x2$' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 16" +else + echo "not ok 16" +fi + +geli detach md${no} +if [ $? -eq 0 ]; then + echo "ok 17" +else + echo "not ok 17" +fi Property changes on: stable/10/tests/sys/geom/class/eli/configure_b_B_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/delkey_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/delkey_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/delkey_test.sh (revision 296821) @@ -0,0 +1,140 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile1=`mktemp $base.XXXXXX` || exit 1 +keyfile2=`mktemp $base.XXXXXX` || exit 1 +keyfile3=`mktemp $base.XXXXXX` || exit 1 +keyfile4=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..14" + +dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile3} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile4} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K $keyfile1 md${no} +geli attach -p -k $keyfile1 md${no} +geli setkey -n 1 -P -K $keyfile2 md${no} + +# Remove key 0 for attached provider. +geli delkey -n 0 md${no} +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi +geli detach md${no} + +# We cannot use keyfile1 anymore. +geli attach -p -k $keyfile1 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Attach with key 1. +geli attach -p -k $keyfile2 md${no} +if [ $? -eq 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +# We cannot remove last key without -f option (for attached provider). +geli delkey -n 1 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +# Remove last key for attached provider. +geli delkey -f -n 1 md${no} +if [ $? -eq 0 ]; then + echo "ok 5" +else + echo "not ok 5" +fi + +# If there are no valid keys, but provider is attached, we can save situation. +geli setkey -n 0 -P -K $keyfile3 md${no} +if [ $? -eq 0 ]; then + echo "ok 6" +else + echo "not ok 6" +fi +geli detach md${no} + +# We cannot use keyfile2 anymore. +geli attach -p -k $keyfile2 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 7" +else + echo "not ok 7" +fi + +# Attach with key 0. +geli attach -p -k $keyfile3 md${no} +if [ $? -eq 0 ]; then + echo "ok 8" +else + echo "not ok 8" +fi + +# Setup key 1. +geli setkey -n 1 -P -K $keyfile4 md${no} +if [ $? -eq 0 ]; then + echo "ok 9" +else + echo "not ok 9" +fi +geli detach md${no} + +# Remove key 1 for detached provider. +geli delkey -n 1 md${no} +if [ $? -eq 0 ]; then + echo "ok 10" +else + echo "not ok 10" +fi + +# We cannot use keyfile4 anymore. +geli attach -p -k $keyfile4 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 11" +else + echo "not ok 11" +fi + +# We cannot remove last key without -f option (for detached provider). +geli delkey -n 0 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 12" +else + echo "not ok 12" +fi + +# Remove last key for detached provider. +geli delkey -f -n 0 md${no} +if [ $? -eq 0 ]; then + echo "ok 13" +else + echo "not ok 13" +fi + +# We cannot use keyfile3 anymore. +geli attach -p -k $keyfile3 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 14" +else + echo "not ok 14" +fi + +rm -f $keyfile1 $keyfile2 $keyfile3 $keyfile4 Property changes on: stable/10/tests/sys/geom/class/eli/delkey_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/detach_l_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/detach_l_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/detach_l_test.sh (revision 296821) @@ -0,0 +1,44 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..4" + +dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K $keyfile md${no} +geli attach -p -k $keyfile md${no} +if [ -c /dev/md${no}.eli ]; then + echo "ok 1" +else + echo "not ok 1" +fi +# Be sure it doesn't detach before 'detach -l'. +dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null +sleep 1 +if [ -c /dev/md${no}.eli ]; then + echo "ok 2" +else + echo "not ok 2" +fi +geli detach -l md${no} +if [ -c /dev/md${no}.eli ]; then + echo "ok 3" +else + echo "not ok 3" +fi +dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null +sleep 1 +if [ ! -c /dev/md${no}.eli ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/detach_l_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/init_B_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/init_B_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/init_B_test.sh (revision 296821) @@ -0,0 +1,104 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +backupfile=`mktemp $base.XXXXXX` || exit 1 + +echo "1..13" + +dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + +mdconfig -a -t malloc -s $sectors -u $no || exit 1 + +# -B none +rm -f /var/backups/md${no}.eli +geli init -B none -P -K $keyfile md${no} 2>/dev/null +if [ ! -f /var/backups/md${no}.eli ]; then + echo "ok 1 - -B none" +else + echo "not ok 1 - -B none" +fi + +# no -B +rm -f /var/backups/md${no}.eli +geli init -P -K $keyfile md${no} >/dev/null 2>&1 +if [ -f /var/backups/md${no}.eli ]; then + echo "ok 2 - no -B" +else + echo "not ok 2 - no -B" +fi +geli clear md${no} +geli attach -p -k $keyfile md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 3 - no -B" +else + echo "not ok 3 - no -B" +fi +if [ ! -c /dev/md${no}.eli ]; then + echo "ok 4 - no -B" +else + echo "not ok 4 - no -B" +fi +geli restore /var/backups/md${no}.eli md${no} +if [ $? -eq 0 ]; then + echo "ok 5 - no -B" +else + echo "not ok 5 - no -B" +fi +geli attach -p -k $keyfile md${no} 2>/dev/null +if [ $? -eq 0 ]; then + echo "ok 6 - no -B" +else + echo "not ok 6 - no -B" +fi +if [ -c /dev/md${no}.eli ]; then + echo "ok 7 - no -B" +else + echo "not ok 7 - no -B" +fi +geli detach md${no} +rm -f /var/backups/md${no}.eli + +# -B file +rm -f $backupfile +geli init -B $backupfile -P -K $keyfile md${no} >/dev/null 2>&1 +if [ -f $backupfile ]; then + echo "ok 8 - -B file" +else + echo "not ok 8 - -B file" +fi +geli clear md${no} +geli attach -p -k $keyfile md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 9 - -B file" +else + echo "not ok 9 - -B file" +fi +if [ ! -c /dev/md${no}.eli ]; then + echo "ok 10 - -B file" +else + echo "not ok 10 - -B file" +fi +geli restore $backupfile md${no} +if [ $? -eq 0 ]; then + echo "ok 11 - -B file" +else + echo "not ok 11 - -B file" +fi +geli attach -p -k $keyfile md${no} 2>/dev/null +if [ $? -eq 0 ]; then + echo "ok 12 - -B file" +else + echo "not ok 12 - -B file" +fi +if [ -c /dev/md${no}.eli ]; then + echo "ok 13 - -B file" +else + echo "not ok 13 - -B file" +fi + +rm -f $backupfile $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/init_B_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/init_J_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/init_J_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/init_J_test.sh (revision 296821) @@ -0,0 +1,126 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile0=`mktemp $base.XXXXXX` || exit 1 +keyfile1=`mktemp $base.XXXXXX` || exit 1 +passfile0=`mktemp $base.XXXXXX` || exit 1 +passfile1=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..150" + +dd if=/dev/random of=${keyfile0} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random bs=512 count=16 2>/dev/null | sha1 > ${passfile0} +dd if=/dev/random bs=512 count=16 2>/dev/null | sha1 > ${passfile1} + +i=1 +for iter in -1 0 64; do + geli init -i ${iter} -B none -J ${passfile0} -P md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli init -i ${iter} -B none -J ${passfile0} -P -K ${keyfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli init -i ${iter} -B none -J ${passfile0} -K ${keyfile0} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -p md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${keyfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${passfile0} -p md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${keyfile0} -k ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${keyfile0} -k ${keyfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile0} -k ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile0} -k ${keyfile0} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${keyfile0} | geli attach -j ${passfile0} -k - md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${passfile0} | geli attach -j - -k ${keyfile0} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + + geli init -i ${iter} -B none -J ${passfile0} -J ${passfile1} -P md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli init -i ${iter} -B none -J ${passfile0} -J ${passfile1} -P -K ${keyfile0} -K ${keyfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli init -i ${iter} -B none -J ${passfile0} -J ${passfile1} -K ${keyfile0} -K ${keyfile1} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -p md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile1} -p md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -k ${keyfile1} -p md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile1} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile1} -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -k ${keyfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -k ${keyfile1} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile1} -k ${keyfile0} -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile0} -k ${keyfile1} -j ${passfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -k ${keyfile1} -k ${keyfile0} -j ${passfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli attach -j ${passfile0} -j ${passfile1} -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${passfile0} | geli attach -j - -j ${passfile1} -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${passfile1} | geli attach -j ${passfile0} -j - -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${keyfile0} | geli attach -j ${passfile0} -j ${passfile1} -k - -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${keyfile1} | geli attach -j ${passfile0} -j ${passfile1} -k ${keyfile0} -k - md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${keyfile0} ${keyfile1} | geli attach -j ${passfile0} -j ${passfile1} -k - md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + cat ${passfile0} ${passfile1} | awk '{printf "%s", $0}' | geli attach -j - -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " + echo "ok ${i}"; i=$((i+1)) + geli detach md${no} || echo -n "not " + echo "ok ${i}"; i=$((i+1)) +done + +rm -f ${keyfile0} ${keyfile1} ${passfile0} ${passfile1} Property changes on: stable/10/tests/sys/geom/class/eli/init_J_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/init_a_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/init_a_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/init_a_test.sh (revision 296821) @@ -0,0 +1,60 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 + +echo "1..1380" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do + for secsize in 512 1024 2048 4096 8192; do + rnd=`mktemp $base.XXXXXX` || exit 1 + mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1 + + dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + + geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null + geli attach -p -k $keyfile md${no} + + secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` + + dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 + dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null + + md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` + md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` + + if [ ${md_rnd} = ${md_ddev} ]; then + echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + rm -f $rnd + mdconfig -d -u $no + done + done +done + +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/init_a_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/init_i_P_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/init_i_P_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/init_i_P_test.sh (revision 296821) @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..1" + +dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -i 64 -P -K ${keyfile} md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi + +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/init_i_P_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/init_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/init_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/init_test.sh (revision 296821) @@ -0,0 +1,65 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 + +echo "1..460" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for secsize in 512 1024 2048 4096 8192; do + rnd=`mktemp $base.XXXXXX` || exit 1 + mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1 + + dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + + geli init -B none -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null + geli attach -p -k $keyfile md${no} + + secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` + + dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 + dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null + + md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` + md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` + md_edev=`dd if=/dev/md${no} bs=${secsize} count=${secs} 2>/dev/null | md5` + + if [ ${md_rnd} = ${md_ddev} ]; then + echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + if [ ${md_rnd} != ${md_edev} ]; then + echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + rm -f $rnd + mdconfig -d -u $no + done +done + +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/init_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/integrity_copy_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/integrity_copy_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/integrity_copy_test.sh (revision 296821) @@ -0,0 +1,99 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +sector=`mktemp $base.XXXXXX` || exit 1 + +echo "1..5520" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do + for secsize in 512 1024 2048 4096 8192; do + #mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 + mdconfig -a -t malloc -s $sectors -u $no || exit 1 + + dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + + geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null + geli attach -p -k $keyfile md${no} + + dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + + dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + # Copy first small sector to the second small sector. + # This should be detected as corruption. + dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1 + dd if=${sector} of=/dev/md${no} bs=512 count=1 seek=1 >/dev/null 2>&1 + geli attach -p -k $keyfile md${no} + + dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=1 >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "ok $i - small 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - small 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + ms=`diskinfo /dev/md${no} | awk '{print $3 - 512}'` + ns=`diskinfo /dev/md${no}.eli | awk '{print $4}'` + usecsize=`echo "($ms / $ns) - (($ms / $ns) % 512)" | bc` + + dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=2 >/dev/null 2>&1 + + dd if=/dev/md${no}.eli bs=${secsize} count=2 >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "ok $i - big 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - big 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + # Copy first big sector to the second big sector. + # This should be detected as corruption. + dd if=/dev/md${no} of=${sector} bs=${usecsize} count=1 >/dev/null 2>&1 + dd if=${sector} of=/dev/md${no} bs=${usecsize} count=1 seek=1 >/dev/null 2>&1 + geli attach -p -k $keyfile md${no} + + dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=2 >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "ok $i - big 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - big 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + mdconfig -d -u $no + done + done +done + +rm -f $keyfile $sector Property changes on: stable/10/tests/sys/geom/class/eli/integrity_copy_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/integrity_data_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/integrity_data_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/integrity_data_test.sh (revision 296821) @@ -0,0 +1,69 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +sector=`mktemp $base.XXXXXX` || exit 1 + +echo "1..2760" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do + for secsize in 512 1024 2048 4096 8192; do + mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 + + dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + + geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null + geli attach -p -k $keyfile md${no} + + dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + + dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + # Corrupt 8 bytes of data. + dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1 + dd if=/dev/random of=${sector} bs=1 count=8 seek=64 conv=notrunc >/dev/null 2>&1 + dd if=${sector} of=/dev/md${no} bs=512 count=1 >/dev/null 2>&1 + geli attach -p -k $keyfile md${no} + + dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=1 >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + mdconfig -d -u $no + done + done +done + +rm -f $keyfile $sector Property changes on: stable/10/tests/sys/geom/class/eli/integrity_data_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/integrity_hmac_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/integrity_hmac_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/integrity_hmac_test.sh (revision 296821) @@ -0,0 +1,69 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +sector=`mktemp $base.XXXXXX` || exit 1 + +echo "1..2760" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do + for secsize in 512 1024 2048 4096 8192; do + mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 + + dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + + geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null + geli attach -p -k $keyfile md${no} + + dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + + dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + # Corrupt 8 bytes of HMAC. + dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1 + dd if=/dev/random of=${sector} bs=1 count=16 conv=notrunc >/dev/null 2>&1 + dd if=${sector} of=/dev/md${no} bs=512 count=1 >/dev/null 2>&1 + geli attach -p -k $keyfile md${no} + + dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + mdconfig -d -u $no + done + done +done + +rm -f $keyfile $sector Property changes on: stable/10/tests/sys/geom/class/eli/integrity_hmac_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/kill_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/kill_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/kill_test.sh (revision 296821) @@ -0,0 +1,97 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile1=`mktemp $base.XXXXXX` || exit 1 +keyfile2=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..9" + +dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K $keyfile1 md${no} +geli attach -p -k $keyfile1 md${no} +geli setkey -n 1 -P -K $keyfile2 md${no} + +# Kill attached provider. +geli kill md${no} +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi +sleep 1 +# Provider should be automatically detached. +if [ ! -c /dev/md{$no}.eli ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# We cannot use keyfile1 anymore. +geli attach -p -k $keyfile1 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +# We cannot use keyfile2 anymore. +geli attach -p -k $keyfile2 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +geli init -B none -P -K $keyfile1 md${no} +geli setkey -n 1 -p -k $keyfile1 -P -K $keyfile2 md${no} + +# Should be possible to attach with keyfile1. +geli attach -p -k $keyfile1 md${no} +if [ $? -eq 0 ]; then + echo "ok 5" +else + echo "not ok 5" +fi +geli detach md${no} + +# Should be possible to attach with keyfile2. +geli attach -p -k $keyfile2 md${no} +if [ $? -eq 0 ]; then + echo "ok 6" +else + echo "not ok 6" +fi +geli detach md${no} + +# Kill detached provider. +geli kill md${no} +if [ $? -eq 0 ]; then + echo "ok 7" +else + echo "not ok 7" +fi + +# We cannot use keyfile1 anymore. +geli attach -p -k $keyfile1 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 8" +else + echo "not ok 8" +fi + +# We cannot use keyfile2 anymore. +geli attach -p -k $keyfile2 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 9" +else + echo "not ok 9" +fi + +rm -f $keyfile1 $keyfile2 Property changes on: stable/10/tests/sys/geom/class/eli/kill_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/nokey_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/nokey_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/nokey_test.sh (revision 296821) @@ -0,0 +1,65 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..8" + +geli init -B none -P md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi + +dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K ${keyfile} md${no} 2>/dev/null +if [ $? -eq 0 ]; then + echo "ok 2" +else + echo "not ok 2" +fi +geli attach -p md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi +geli attach -p -k ${keyfile} md${no} 2>/dev/null +if [ $? -eq 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi +geli setkey -n 0 -P md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 5" +else + echo "not ok 5" +fi +geli detach md${no} 2>/dev/null +if [ $? -eq 0 ]; then + echo "ok 6" +else + echo "not ok 6" +fi +geli setkey -n 0 -p -P -K ${keyfile} md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 7" +else + echo "not ok 7" +fi +geli setkey -n 0 -p -k ${keyfile} -P md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 8" +else + echo "not ok 8" +fi + +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/nokey_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/onetime_a_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/onetime_a_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/onetime_a_test.sh (revision 296821) @@ -0,0 +1,54 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 + +echo "1..1380" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do + for secsize in 512 1024 2048 4096 8192; do + rnd=`mktemp $base.XXXXXX` || exit 1 + mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1 + + geli onetime -a $aalgo -e $ealgo -l $keylen -s $secsize md${no} 2>/dev/null + + secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` + + dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 + dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null + + md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` + md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` + + if [ ${md_rnd} = ${md_ddev} ]; then + echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + rm -f $rnd + mdconfig -d -u $no + done + done +done Property changes on: stable/10/tests/sys/geom/class/eli/onetime_a_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/onetime_d_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/onetime_d_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/onetime_d_test.sh (revision 296821) @@ -0,0 +1,34 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +mdconfig -a -t malloc -s $sectors -u $no || exit 1 + +echo "1..3" + +geli onetime -d md${no} +if [ -c /dev/md${no}.eli ]; then + echo "ok 1" +else + echo "not ok 1" +fi +# Be sure it doesn't detach on read. +dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null +sleep 1 +if [ -c /dev/md${no}.eli ]; then + echo "ok 2" +else + echo "not ok 2" +fi +true > /dev/md${no}.eli +sleep 1 +if [ ! -c /dev/md${no}.eli ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +mdconfig -d -u $no Property changes on: stable/10/tests/sys/geom/class/eli/onetime_d_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/onetime_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/onetime_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/onetime_test.sh (revision 296821) @@ -0,0 +1,59 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 + +echo "1..460" + +i=1 +for cipher in aes:0 aes:128 aes:256 \ + aes-xts:0 aes-xts:128 aes-xts:256 \ + aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des:0 3des:192 \ + 3des-cbc:0 3des-cbc:192 \ + blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ + blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ + blowfish:416 blowfish:448 \ + blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ + blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia:0 camellia:128 camellia:192 camellia:256 \ + camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for secsize in 512 1024 2048 4096 8192; do + rnd=`mktemp $base.XXXXXX` || exit 1 + mdconfig -a -t malloc -s `expr $secsize \* $sectors`b -u $no || exit 1 + + geli onetime -e $ealgo -l $keylen -s $secsize md${no} 2>/dev/null + + secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` + + dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 + dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null + + md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` + md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` + md_edev=`dd if=/dev/md${no} bs=${secsize} count=${secs} 2>/dev/null | md5` + + if [ ${md_rnd} = ${md_ddev} ]; then + echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + if [ ${md_rnd} != ${md_edev} ]; then + echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + else + echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" + fi + i=$((i+1)) + + geli detach md${no} + rm -f $rnd + mdconfig -d -u $no + done +done Property changes on: stable/10/tests/sys/geom/class/eli/onetime_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/readonly_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/readonly_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/readonly_test.sh (revision 296821) @@ -0,0 +1,94 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +keyfile=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..11" + +dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K $keyfile md${no} +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi + +geli attach -r -p -k $keyfile md${no} +if [ $? -eq 0 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +sh -c "true >/dev/md${no}.eli" 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +geli kill md${no} +if [ $? -eq 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +# kill should detach provider... +if [ ! -c /dev/md{$no}.eli ]; then + echo "ok 5" +else + echo "not ok 5" +fi + +# ...but not destroy the metadata. +geli attach -r -p -k $keyfile md${no} +if [ $? -eq 0 ]; then + echo "ok 6" +else + echo "not ok 6" +fi + +geli setkey -n 1 -P -K /dev/null md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 7" +else + echo "not ok 7" +fi + +geli delkey -n 0 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 8" +else + echo "not ok 8" +fi + +geli delkey -f -n 0 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 9" +else + echo "not ok 9" +fi + +geli list md${no}.eli | egrep '^Flags: .*READ-ONLY' >/dev/null +if [ $? -eq 0 ]; then + echo "ok 10" +else + echo "not ok 10" +fi + +geli detach md${no} +if [ $? -eq 0 ]; then + echo "ok 11" +else + echo "not ok 11" +fi + +mdconfig -d -u $no +rm -f $keyfile Property changes on: stable/10/tests/sys/geom/class/eli/readonly_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/resize_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/resize_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/resize_test.sh (revision 296821) @@ -0,0 +1,148 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +echo 1..27 + +BLK=512 +BLKS_PER_MB=2048 + +md=$(mdconfig -s40m) || exit 1 +unit=${md#md} +i=1 + +setsize() { + partszMB=$1 unitszMB=$2 + + { + echo a: $(($partszMB * $BLKS_PER_MB)) 0 4.2BSD 1024 8192 + echo c: $(($unitszMB * $BLKS_PER_MB)) 0 unused 0 0 + } | disklabel -R $md /dev/stdin +} + +# Initialise + +setsize 10 40 || echo -n "not " +echo ok $i - "Sized ${md}a to 10m" +i=$((i + 1)) + +echo secret >tmp.key +geli init -Bnone -PKtmp.key ${md}a || echo -n "not " +echo ok $i - "Initialised geli on ${md}a" +i=$((i + 1)) +geli attach -pk tmp.key ${md}a || echo -n "not " +echo ok $i - "Attached ${md}a as ${md}a.eli" +i=$((i + 1)) + +newfs -U ${md}a.eli >/dev/null || echo -n "not " +echo ok $i - "Initialised the filesystem on ${md}a.eli" +i=$((i + 1)) +out=$(fsck -tufs -y ${md}a.eli) +echo "$out" | fgrep -q MODIFIED && echo -n "not " +echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \ + "lines of output" +i=$((i + 1)) + + +# Doing a backup, resize & restore must be forced (with -f) as geli +# verifies that the provider size in the metadata matches the consumer. + +geli backup ${md}a tmp.meta || echo -n "not " +echo ok $i - "Backed up ${md}a metadata" +i=$((i + 1)) + +geli detach ${md}a.eli || echo -n "not " +echo ok $i - "Detached ${md}a.eli" +i=$((i + 1)) + +setsize 20 40 || echo -n "not " +echo ok $i - "Sized ${md}a to 20m" +i=$((i + 1)) +geli attach -pktmp.key ${md}a && echo -n "not " +echo ok $i - "Attaching ${md}a fails after resizing the consumer" +i=$((i + 1)) + +geli restore tmp.meta ${md}a && echo -n "not " +echo ok $i - "Restoring metadata on ${md}a.eli fails without -f" +i=$((i + 1)) +geli restore -f tmp.meta ${md}a || echo -n "not " +echo ok $i - "Restoring metadata on ${md}a.eli can be forced" +i=$((i + 1)) + +geli attach -pktmp.key ${md}a || echo -n "not " +echo ok $i - "Attaching ${md}a is now possible" +i=$((i + 1)) + +growfs -y ${md}a.eli >/dev/null || echo -n "not " +echo ok $i - "Extended the filesystem on ${md}a.eli" +i=$((i + 1)) + +out=$(fsck -tufs -y ${md}a.eli) +echo "$out" | fgrep -q MODIFIED && echo -n "not " +echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \ + "lines of output" +i=$((i + 1)) + + +# Now do the resize properly + +geli detach ${md}a.eli || echo -n "not " +echo ok $i - "Detached ${md}a.eli" +i=$((i + 1)) + +setsize 30 40 || echo -n "not " +echo ok $i - "Sized ${md}a to 30m" +i=$((i + 1)) + +geli resize -s20m ${md}a || echo -n "not " +echo ok $i - "Resizing works ok" +i=$((i + 1)) +geli resize -s20m ${md}a && echo -n "not " +echo ok $i - "Resizing doesn't work a 2nd time (no old metadata)" +i=$((i + 1)) + +geli attach -pktmp.key ${md}a || echo -n "not " +echo ok $i - "Attaching ${md}a works ok" +i=$((i + 1)) + +growfs -y ${md}a.eli >/dev/null || echo -n "not " +echo ok $i - "Extended the filesystem on ${md}a.eli" +i=$((i + 1)) + +out=$(fsck -tufs -y ${md}a.eli) +echo "$out" | fgrep -q MODIFIED && echo -n "not " +echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \ + "lines of output" +i=$((i + 1)) + +geli detach ${md}a.eli +gpart destroy -F $md >/dev/null + + +# Verify that the man page example works, changing ada0 to $md, +# 1g to 20m, 2g to 30m and keyfile to tmp.key, and adding -B none +# to geli init. + +gpart create -s GPT $md || echo -n "not " +echo ok $i - "Installed a GPT on ${md}" +i=$((i + 1)) +gpart add -s 20m -t freebsd-ufs -i 1 $md || echo -n "not " +echo ok $i - "Added a 20m partition in slot 1" +i=$((i + 1)) +geli init -B none -K tmp.key -P ${md}p1 || echo -n "not " +echo ok $i - "Initialised geli on ${md}p1" +i=$((i + 1)) +gpart resize -s 30m -i 1 $md || echo -n "not " +echo ok $i - "Resized partition ${md}p1 to 30m" +i=$((i + 1)) +geli resize -s 20m ${md}p1 || echo -n "not " +echo ok $i - "Resized geli on ${md}p1 to 30m" +i=$((i + 1)) +geli attach -k tmp.key -p ${md}p1 || echo -n "not " +echo ok $i - "Attached ${md}p1.eli" +i=$((i + 1)) + +geli detach ${md}p1.eli + +rm tmp.* Property changes on: stable/10/tests/sys/geom/class/eli/resize_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/setkey_test.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/setkey_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/setkey_test.sh (revision 296821) @@ -0,0 +1,156 @@ +#!/bin/sh +# $FreeBSD$ + +. $(dirname $0)/conf.sh + +base=`basename $0` +sectors=100 +rnd=`mktemp $base.XXXXXX` || exit 1 +keyfile1=`mktemp $base.XXXXXX` || exit 1 +keyfile2=`mktemp $base.XXXXXX` || exit 1 +keyfile3=`mktemp $base.XXXXXX` || exit 1 +keyfile4=`mktemp $base.XXXXXX` || exit 1 +keyfile5=`mktemp $base.XXXXXX` || exit 1 +mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 + +echo "1..16" + +dd if=/dev/random of=${rnd} bs=512 count=${sectors} >/dev/null 2>&1 +hash1=`dd if=${rnd} bs=512 count=${sectors} 2>/dev/null | md5` +dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile3} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile4} bs=512 count=16 >/dev/null 2>&1 +dd if=/dev/random of=${keyfile5} bs=512 count=16 >/dev/null 2>&1 + +geli init -B none -P -K $keyfile1 md${no} +geli attach -p -k $keyfile1 md${no} + +dd if=${rnd} of=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null +rm -f $rnd +hash2=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` + +# Change current key (0) for attached provider. +geli setkey -P -K $keyfile2 md${no} +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi +geli detach md${no} + +# We cannot use keyfile1 anymore. +geli attach -p -k $keyfile1 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Attach with new key. +geli attach -p -k $keyfile2 md${no} +if [ $? -eq 0 ]; then + echo "ok 3" +else + echo "not ok 3" +fi +hash3=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` + +# Change key 1 for attached provider. +geli setkey -n 1 -P -K $keyfile3 md${no} +if [ $? -eq 0 ]; then + echo "ok 4" +else + echo "not ok 4" +fi +geli detach md${no} + +# Attach with key 1. +geli attach -p -k $keyfile3 md${no} +if [ $? -eq 0 ]; then + echo "ok 5" +else + echo "not ok 5" +fi +hash4=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` +geli detach md${no} + +# Change current (1) key for detached provider. +geli setkey -p -k $keyfile3 -P -K $keyfile4 md${no} +if [ $? -eq 0 ]; then + echo "ok 6" +else + echo "not ok 6" +fi + +# We cannot use keyfile3 anymore. +geli attach -p -k $keyfile3 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 7" +else + echo "not ok 7" +fi + +# Attach with key 1. +geli attach -p -k $keyfile4 md${no} +if [ $? -eq 0 ]; then + echo "ok 8" +else + echo "not ok 8" +fi +hash5=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` +geli detach md${no} + +# Change key 0 for detached provider. +geli setkey -n 0 -p -k $keyfile4 -P -K $keyfile5 md${no} +if [ $? -eq 0 ]; then + echo "ok 9" +else + echo "not ok 9" +fi + +# We cannot use keyfile2 anymore. +geli attach -p -k $keyfile2 md${no} 2>/dev/null +if [ $? -ne 0 ]; then + echo "ok 10" +else + echo "not ok 10" +fi + +# Attach with key 0. +geli attach -p -k $keyfile5 md${no} +if [ $? -eq 0 ]; then + echo "ok 11" +else + echo "not ok 11" +fi +hash6=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` +geli detach md${no} + +if [ ${hash1} = ${hash2} ]; then + echo "ok 12" +else + echo "not ok 12" +fi +if [ ${hash1} = ${hash3} ]; then + echo "ok 13" +else + echo "not ok 13" +fi +if [ ${hash1} = ${hash4} ]; then + echo "ok 14" +else + echo "not ok 14" +fi +if [ ${hash1} = ${hash5} ]; then + echo "ok 15" +else + echo "not ok 15" +fi +if [ ${hash1} = ${hash6} ]; then + echo "ok 16" +else + echo "not ok 16" +fi + +rm -f $keyfile1 $keyfile2 $keyfile3 $keyfile4 $keyfile5 Property changes on: stable/10/tests/sys/geom/class/eli/setkey_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/eli/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/eli/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/eli/conf.sh (revision 296821) @@ -0,0 +1,21 @@ +#!/bin/sh +# $FreeBSD$ + +class="eli" +base=`basename $0` + +# We need to use linear probing in order to detect the first available md(4) +# device instead of using mdconfig -a -t, because geli(8) attachs md(4) devices +no=0 +while [ -c /dev/md$no ]; do + : $(( no += 1 )) +done + +geli_test_cleanup() +{ + [ -c /dev/md${no}.eli ] && geli detach md${no}.eli + mdconfig -d -u $no +} +trap geli_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/eli/conf.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/gate/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/gate/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/gate/1_test.sh (revision 296821) @@ -0,0 +1,62 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo '1..2' + +base=`basename $0` +us=0 +while [ -c /dev/ggate${us} ]; do + : $(( us += 1 )) +done +conf=`mktemp $base.XXXXXX` || exit 1 +pidfile=/var/run/ggated.pid +port=33080 + +work=$(attach_md -t malloc -s 1M) +src=$(attach_md -t malloc -s 1M) + +test_cleanup() +{ + ggatec destroy -f -u $us + pkill -F $pidfile + geom_test_cleanup +} +trap test_cleanup ABRT EXIT INT TERM + +dd if=/dev/random of=/dev/$work bs=1m count=1 conv=sync +dd if=/dev/random of=/dev/$src bs=1m count=1 conv=sync +src_checksum=$(md5 -q /dev/$src) + +echo "127.0.0.1 RW /dev/$work" > $conf + +if ! ggated -p $port $conf; then + echo 'ggated failed to start' + echo 'Bail out!' + exit 1 +fi +sleep 1 +if ! ggatec create -p $port -u $us 127.0.0.1 /dev/$work; then + echo 'ggatec create failed' + echo 'Bail out!' + exit 1 +fi + +dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 +sleep 1 + +work_checksum=$(md5 -q /dev/$work) +if [ "$work_checksum" != "$src_checksum" ]; then + echo "not ok 1 - md5 checksums didn't match ($work_checksum != $src_checksum)" + echo "not ok 2 # SKIP" +else + echo 'ok 1 - md5 checksum' + + ggate_checksum=$(md5 -q /dev/ggate${us}) + if [ "$ggate_checksum" != "$src_checksum" ]; then + echo "not ok 2 - md5 checksums didn't match ($ggate_checksum != $src_checksum)" + else + echo 'ok 2 - md5 checksum' + fi +fi Property changes on: stable/10/tests/sys/geom/class/gate/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/gate/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/gate/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/gate/2_test.sh (revision 296821) @@ -0,0 +1,48 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +base=`basename $0` +us=46 +work=`mktemp -u $base.XXXXXX` || exit 1 +src=`mktemp -u $base.XXXXXX` || exit 1 + +test_cleanup() +{ + ggatel destroy -f -u $us + rm -f $work $src + + geom_test_cleanup +} +trap test_cleanup ABRT EXIT INT TERM + +dd if=/dev/random of=$work bs=1m count=1 conv=sync +dd if=/dev/random of=$src bs=1m count=1 conv=sync + +if ! ggatel create -u $us $work; then + echo 'ggatel create failed' + echo 'Bail out!' + exit 1 +fi + +dd if=${src} of=/dev/ggate${us} bs=1m count=1 +sleep 1 + +echo '1..2' + +src_checksum=$(md5 -q $src) +work_checksum=$(md5 -q $work) +if [ "$work_checksum" != "$src_checksum" ]; then + echo "not ok 1 - md5 checksums didn't match ($work_checksum != $src_checksum) # TODO: bug 204616" + echo 'not ok 2 # SKIP' +else + echo 'ok 1 - md5 checksum' + + ggate_checksum=$(md5 -q /dev/ggate${us}) + if [ "$ggate_checksum" != "$src_checksum" ]; then + echo "not ok 2 - md5 checksums didn't match ($ggate_checksum != $src_checksum)" + else + echo 'ok 2 - md5 checksum' + fi +fi Property changes on: stable/10/tests/sys/geom/class/gate/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/gate/3_test.sh =================================================================== --- stable/10/tests/sys/geom/class/gate/3_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/gate/3_test.sh (revision 296821) @@ -0,0 +1,48 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +base=`basename $0` +us=47 + +test_cleanup() +{ + ggatel destroy -f -u $us + + geom_test_cleanup +} +trap test_cleanup ABRT EXIT INT TERM + +work=$(attach_md -t malloc -s 1M) +src=$(attach_md -t malloc -s 1M) + +dd if=/dev/random of=/dev/$work bs=1m count=1 conv=sync +dd if=/dev/random of=/dev/$src bs=1m count=1 conv=sync +src_checksum=$(md5 -q /dev/$src) + +if ! ggatel create -u $us /dev/$work; then + echo 'ggatel create failed' + echo 'Bail out!' + exit 1 +fi + +dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 conv=sync +sleep 1 + +echo '1..2' + +work_checksum=$(md5 -q /dev/$work) +if [ "$work_checksum" != "$src_checksum" ]; then + echo "not ok 1 - md5 checksums didn't match ($work_checksum != $src_checksum)" + echo 'not ok 2 # SKIP' +else + echo 'ok 1 - md5 checksum' + + ggate_checksum=$(md5 -q /dev/ggate${us}) + if [ "$ggate_checksum" != "$src_checksum" ]; then + echo "not ok 2 - md5 checksums didn't match ($ggate_checksum != $src_checksum)" + else + echo 'ok 2 - md5 checksum' + fi +fi Property changes on: stable/10/tests/sys/geom/class/gate/3_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/gate/Makefile =================================================================== --- stable/10/tests/sys/geom/class/gate/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/gate/Makefile (revision 296821) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test +TAP_TESTS_SH+= 3_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/gate/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/gate/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/gate/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/gate/conf.sh (revision 296821) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +name="$(mktemp -u gate.XXXXXX)" +class="gate" +base=`basename $0` + +kldstat -q -m g_${class} || kldload geom_${class} || exit 1 + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/gate/conf.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/geom_subr.sh =================================================================== --- stable/10/tests/sys/geom/class/geom_subr.sh (nonexistent) +++ stable/10/tests/sys/geom/class/geom_subr.sh (revision 296821) @@ -0,0 +1,60 @@ +#!/bin/sh +# $FreeBSD$ + +devwait() +{ + while :; do + if [ -c /dev/${class}/${name} ]; then + return + fi + sleep 0.2 + done +} + +attach_md() +{ + local test_md + + test_md=$(mdconfig -a "$@") || exit + echo $test_md >> $TEST_MDS_FILE || exit + echo $test_md +} + +geom_test_cleanup() +{ + local test_md + + if [ -f "$TEST_MDS_FILE" ]; then + while read test_md; do + # The "#" tells the TAP parser this is a comment + echo "# Removing test memory disk: $test_md" + mdconfig -d -u $test_md + done < $TEST_MDS_FILE + fi + rm -f "$TEST_MDS_FILE" +} + +if [ $(id -u) -ne 0 ]; then + echo 'Tests must be run as root' + echo 'Bail out!' + exit 1 +fi +# If the geom class isn't already loaded, try loading it. +if ! kldstat -q -m g_${class}; then + if ! geom ${class} load; then + echo "Could not load module for geom class=${class}" + echo 'Bail out!' + exit 1 + fi +fi + +# Need to keep track of the test md devices to avoid the scenario where a test +# failing will cause the other tests to bomb out, or a test failing will leave +# a large number of md(4) devices lingering around +: ${TMPDIR=/tmp} +export TMPDIR +if ! TEST_MDS_FILE=$(mktemp ${TMPDIR}/test_mds.XXXXXX); then + echo 'Failed to create temporary file for tracking the test md(4) devices' + echo 'Bail out!' + exit 1 +fi Property changes on: stable/10/tests/sys/geom/class/geom_subr.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/1_test.sh (revision 296821) @@ -0,0 +1,23 @@ +#!/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 Property changes on: stable/10/tests/sys/geom/class/mirror/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/2_test.sh (revision 296821) @@ -0,0 +1,52 @@ +#!/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} Property changes on: stable/10/tests/sys/geom/class/mirror/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/3_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/3_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/3_test.sh (revision 296821) @@ -0,0 +1,64 @@ +#!/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} Property changes on: stable/10/tests/sys/geom/class/mirror/3_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/4_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/4_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/4_test.sh (revision 296821) @@ -0,0 +1,66 @@ +#!/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} Property changes on: stable/10/tests/sys/geom/class/mirror/4_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/5_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/5_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/5_test.sh (revision 296821) @@ -0,0 +1,64 @@ +#!/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} Property changes on: stable/10/tests/sys/geom/class/mirror/5_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/6_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/6_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/6_test.sh (revision 296821) @@ -0,0 +1,45 @@ +#!/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} Property changes on: stable/10/tests/sys/geom/class/mirror/6_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/7_test.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/7_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/7_test.sh (revision 296821) @@ -0,0 +1,64 @@ +#!/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} Property changes on: stable/10/tests/sys/geom/class/mirror/7_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/Makefile =================================================================== --- stable/10/tests/sys/geom/class/mirror/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/Makefile (revision 296821) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test +TAP_TESTS_SH+= 3_test +TAP_TESTS_SH+= 4_test +TAP_TESTS_SH+= 5_test +TAP_TESTS_SH+= 6_test +TAP_TESTS_SH+= 7_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/mirror/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/mirror/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/mirror/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/mirror/conf.sh (revision 296821) @@ -0,0 +1,15 @@ +#!/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 Property changes on: stable/10/tests/sys/geom/class/mirror/conf.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/nop/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/nop/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/nop/1_test.sh (revision 296821) @@ -0,0 +1,20 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +us=$(attach_md -t malloc -s 1M) || exit 1 + +gnop create /dev/${us} || exit 1 + +# Size of created device should be 1MB. + +size=`diskinfo /dev/${us}.nop | awk '{print $3}'` + +if [ $size -eq 1048576 ]; then + echo "ok 1" +else + echo "not ok 1" +fi Property changes on: stable/10/tests/sys/geom/class/nop/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/nop/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/nop/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/nop/2_test.sh (revision 296821) @@ -0,0 +1,26 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +src=`mktemp $base.XXXXXX` || exit 1 +dst=`mktemp $base.XXXXXX` || exit 1 + +echo "1..1" + +dd if=/dev/random of=${src} bs=1m count=1 >/dev/null 2>&1 + +us=$(attach_md -t malloc -s 1M) || exit 1 + +gnop create /dev/${us} || exit 1 + +dd if=${src} of=/dev/${us}.nop bs=1m count=1 >/dev/null 2>&1 +dd if=/dev/${us}.nop of=${dst} bs=1m count=1 >/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} Property changes on: stable/10/tests/sys/geom/class/nop/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/nop/Makefile =================================================================== --- stable/10/tests/sys/geom/class/nop/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/nop/Makefile (revision 296821) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/nop/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/nop/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/nop/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/nop/conf.sh (revision 296821) @@ -0,0 +1,14 @@ +#!/bin/sh +# $FreeBSD$ + +class="nop" +base=`basename $0` + +gnop_test_cleanup() +{ + [ -c /dev/${us}.nop ] && gnop destroy ${us}.nop + geom_test_cleanup +} +trap gnop_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/nop/conf.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/10_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/10_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/10_test.sh (revision 296821) @@ -0,0 +1,32 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/10_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/11_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/11_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/11_test.sh (revision 296821) @@ -0,0 +1,32 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/11_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/12_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/12_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/12_test.sh (revision 296821) @@ -0,0 +1,38 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +nblocks1=9 +nblocks2=`expr $nblocks1 - 1` +nblocks3=`expr $nblocks2 / 2` + +us0=$(attach_md -t malloc -s $nblocks1) || exit 1 +us1=$(attach_md -t malloc -s $nblocks1) || exit 1 +us2=$(attach_md -t malloc -s $nblocks1) || exit 1 + +dd if=/dev/random of=/dev/${us0} count=$nblocks1 >/dev/null 2>&1 +dd if=/dev/random of=/dev/${us1} count=$nblocks1 >/dev/null 2>&1 +dd if=/dev/random of=/dev/${us2} count=$nblocks1 >/dev/null 2>&1 + +graid3 label -w $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 +devwait +# Wait for synchronization. +sleep 2 +graid3 stop $name +# Break one component. +dd if=/dev/random of=/dev/${us1} count=$nblocks2 >/dev/null 2>&1 +# Provoke retaste of the rest components. +true > /dev/${us0} +true > /dev/${us2} +sleep 1 + +dd if=/dev/raid3/${name} of=/dev/null bs=1k count=$nblocks3 >/dev/null 2>&1 +ec=$? +if [ $ec -eq 0 ]; then + echo "not ok 1" +else + echo "ok 1" +fi Property changes on: stable/10/tests/sys/geom/class/raid3/12_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/1_test.sh (revision 296821) @@ -0,0 +1,28 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..2" + +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 + +graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} 2>/dev/null || exit 1 +devwait + +# Size of created device should be 2MB - 1024B. + +mediasize=`diskinfo /dev/raid3/${name} | awk '{print $3}'` +if [ $mediasize -eq 2096128 ]; then + echo "ok 1" +else + echo "not ok 1" +fi +sectorsize=`diskinfo /dev/raid3/${name} | awk '{print $2}'` +if [ $sectorsize -eq 1024 ]; then + echo "ok 2" +else + echo "not ok 2" +fi Property changes on: stable/10/tests/sys/geom/class/raid3/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/2_test.sh (revision 296821) @@ -0,0 +1,32 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/3_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/3_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/3_test.sh (revision 296821) @@ -0,0 +1,36 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/3_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/4_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/4_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/4_test.sh (revision 296821) @@ -0,0 +1,36 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/4_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/5_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/5_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/5_test.sh (revision 296821) @@ -0,0 +1,36 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/5_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/6_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/6_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/6_test.sh (revision 296821) @@ -0,0 +1,40 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/6_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/7_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/7_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/7_test.sh (revision 296821) @@ -0,0 +1,43 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/7_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/8_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/8_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/8_test.sh (revision 296821) @@ -0,0 +1,39 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/8_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/9_test.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/9_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/9_test.sh (revision 296821) @@ -0,0 +1,42 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +ddbs=2048 +nblocks1=1024 +nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` +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} Property changes on: stable/10/tests/sys/geom/class/raid3/9_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/Makefile =================================================================== --- stable/10/tests/sys/geom/class/raid3/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/Makefile (revision 296821) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test +TAP_TESTS_SH+= 3_test +TAP_TESTS_SH+= 4_test +TAP_TESTS_SH+= 5_test +TAP_TESTS_SH+= 6_test +TAP_TESTS_SH+= 7_test +TAP_TESTS_SH+= 8_test +TAP_TESTS_SH+= 9_test +TAP_TESTS_SH+= 10_test +TAP_TESTS_SH+= 11_test +TAP_TESTS_SH+= 12_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/raid3/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/raid3/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/raid3/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/raid3/conf.sh (revision 296821) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +name="$(mktemp -u graid3.XXXXXX)" +class="raid3" +base=`basename $0` + +graid3_test_cleanup() +{ + [ -c /dev/$class/$name ] && graid3 stop $name + geom_test_cleanup +} +trap graid3_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/raid3/conf.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/shsec/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/shsec/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/shsec/1_test.sh (revision 296821) @@ -0,0 +1,28 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..2" + +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 + +gshsec label $name /dev/${us0} /dev/${us1} /dev/${us2} 2>/dev/null || exit 1 +devwait + +# Size of created device should be 1MB - 512B. + +mediasize=`diskinfo /dev/shsec/${name} | awk '{print $3}'` +if [ $mediasize -eq 1048064 ]; then + echo "ok 1" +else + echo "not ok 1" +fi +sectorsize=`diskinfo /dev/shsec/${name} | awk '{print $2}'` +if [ $sectorsize -eq 512 ]; then + echo "ok 2" +else + echo "not ok 2" +fi Property changes on: stable/10/tests/sys/geom/class/shsec/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/shsec/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/shsec/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/shsec/2_test.sh (revision 296821) @@ -0,0 +1,52 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..4" + +nblocks1=1024 +nblocks2=`expr $nblocks1 + 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} Property changes on: stable/10/tests/sys/geom/class/shsec/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/shsec/Makefile =================================================================== --- stable/10/tests/sys/geom/class/shsec/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/shsec/Makefile (revision 296821) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/shsec/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/shsec/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/shsec/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/shsec/conf.sh (revision 296821) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +name="$(mktemp -u shsec.XXXXXX)" +class="shsec" +base=`basename $0` + +shsec_test_cleanup() +{ + [ -c /dev/$class/$name ] && gshsec stop $name + geom_test_cleanup +} +trap shsec_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/shsec/conf.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/stripe/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/stripe/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/stripe/1_test.sh (revision 296821) @@ -0,0 +1,23 @@ +#!/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 + +gstripe create -s 16384 $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 +devwait + +# Size of created device should be 1MB * 3. + +size=`diskinfo /dev/stripe/${name} | awk '{print $3}'` + +if [ $size -eq 3145728 ]; then + echo "ok 1" +else + echo "not ok 1" +fi Property changes on: stable/10/tests/sys/geom/class/stripe/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/stripe/2_test.sh =================================================================== --- stable/10/tests/sys/geom/class/stripe/2_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/stripe/2_test.sh (revision 296821) @@ -0,0 +1,30 @@ +#!/bin/sh +# $FreeBSD$ + +. `dirname $0`/conf.sh + +echo "1..1" + +tsize=3 +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} Property changes on: stable/10/tests/sys/geom/class/stripe/2_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/stripe/Makefile =================================================================== --- stable/10/tests/sys/geom/class/stripe/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/stripe/Makefile (revision 296821) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +TAP_TESTS_SH+= 1_test +TAP_TESTS_SH+= 2_test + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh +FILESDIR= ${TESTSDIR} + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/stripe/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/stripe/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/stripe/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/stripe/conf.sh (revision 296821) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +name="$(mktemp -u stripe.XXXXXX)" +class="stripe" +base=`basename $0` + +gstripe_test_cleanup() +{ + [ -c /dev/$class/$name ] && gstripe destroy $name + geom_test_cleanup +} +trap gstripe_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tests/sys/geom/class/stripe/conf.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/uzip/1_test.sh =================================================================== --- stable/10/tests/sys/geom/class/uzip/1_test.sh (nonexistent) +++ stable/10/tests/sys/geom/class/uzip/1_test.sh (revision 296821) @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ + +testsdir=$(dirname $0) +. $testsdir/conf.sh + +echo "1..1" + +UUE=$testsdir/1.img.uzip.uue +uudecode $UUE +us0=$(attach_md -f $(basename $UUE .uue)) || exit 1 +sleep 1 + +mount -o ro /dev/${us0}.uzip "${mntpoint}" || exit 1 + +#cat "${mntpoint}/etalon.txt" +diff -I '\$FreeBSD.*\$' -u $testsdir/etalon/etalon.txt "${mntpoint}/etalon.txt" +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi Property changes on: stable/10/tests/sys/geom/class/uzip/1_test.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/uzip/Makefile =================================================================== --- stable/10/tests/sys/geom/class/uzip/Makefile (nonexistent) +++ stable/10/tests/sys/geom/class/uzip/Makefile (revision 296821) @@ -0,0 +1,42 @@ +# +# $FreeBSD$ +# +# Regression test for geom_uzip. +# + +TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} + +IMAGE= 1.img +ZIMAGE= ${IMAGE}.uzip +UZIMAGE= ${ZIMAGE}.uue + +CLEANFILES+= ${IMAGE} ${UZIMAGE} ${ZIMAGE} + +${IMAGE}: + makefs -s 1048576 ${.TARGET} ${.CURDIR}/etalon + +${ZIMAGE}: ${IMAGE} + mkuzip -o ${.TARGET} ${.ALLSRC} + +${UZIMAGE}: ${IMAGE} ${ZIMAGE} + printf "#\n# $$" >${.TARGET} + printf "FreeBSD$$\n#\n\n" >> ${.TARGET} + uuencode ${ZIMAGE} ${ZIMAGE} >>${.TARGET} + +FILES+= conf.sh +FILESNAME_conf.sh= conf.sh + +FILES+= ${UZIMAGE} +FILESDIR= ${TESTSDIR} + +FILESGROUPS= FILES etalon +etalon+= etalon/etalon.txt +etalonDIR= ${TESTSDIR}/etalon + +TAP_TESTS_SH+= 1_test + +.for t in ${TAP_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Property changes on: stable/10/tests/sys/geom/class/uzip/Makefile ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/uzip/conf.sh =================================================================== --- stable/10/tests/sys/geom/class/uzip/conf.sh (nonexistent) +++ stable/10/tests/sys/geom/class/uzip/conf.sh (revision 296821) @@ -0,0 +1,20 @@ +#!/bin/sh +# $FreeBSD$ + +class="uzip" +base=`basename $0` + +uzip_test_cleanup() +{ + if [ -n "$mntpoint" ]; then + umount $mntpoint + rmdir $mntpoint + fi + geom_test_cleanup +} +trap uzip_test_cleanup ABRT EXIT INT TERM + +. `dirname $0`/../geom_subr.sh + +# NOTE: make sure $TMPDIR has been set by geom_subr.sh if unset [by kyua, etc] +mntpoint=$(mktemp -d tmp.XXXXXX) || exit Property changes on: stable/10/tests/sys/geom/class/uzip/conf.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tests/sys/geom/class/uzip/test-1.img.uzip.uue =================================================================== --- stable/10/tests/sys/geom/class/uzip/test-1.img.uzip.uue (nonexistent) +++ stable/10/tests/sys/geom/class/uzip/test-1.img.uzip.uue (revision 296821) @@ -0,0 +1,110 @@ +# +# $FreeBSD$ +# + +begin 755 test-1.img.uzip +M(R$O8FEN+W-H"B-6,BXP($9O&ET("0_"@```````$`````` +M0`````````*0`````````W<````````$F@````````AQ````````")@````` +M```(OP````````CF````````"0T````````)-`````````E;````````"8(` +M```````)J0````````G0````````"?<````````*'@````````I%```````` +M"FP````````*DP````````JZ````````"N$````````+"`````````LO```` +M````"U8````````+?0````````ND````````"\L````````+\@````````P9 +M````````#$`````````,9P````````R.````````#+4````````,W``````` +M``T#````````#2H````````-40````````UX````````#9\````````-Q@`` +M``````WM````````#A0````````..P````````YB````````#HD````````. +ML`````````[7````````#OX````````/)0````````],````````#W,````` +M```/F@````````_!````````#^@````````0#P```````!`V````````$%T` +M```````0A````````!"K````````$-(````````0^0```````!$@```````` +M$4<````````1;@```````!&5````````$<%XVNW4/0K",!3`\1>M$`3!42<[ +M>@1!AX)X`^_@X`VZZ.[%''1V]0+>0(@O[0OMZF`5^?_@-6GS2=L\$0`````` +M````````\"_&&A.-7&-NSX)Z7)=KR41N?1$GUD'OO18#Z[>*EWL(\@QAI-6A +MU.WQHL/J<;ZUF-8++7JM>V?5N-YN<]I7>\@LTGCK%Z.P]CA'J;%(*;/SW_H;W97M*9*ZU>^8]YR7'QWX>"< +MUTV$F>7(?M,OY:9D.W6<"0```````````'3J!63?'NAXVNW9,4I#01#&\6^3 +M"*L@6&IE2@]@$=#B@7@#!6^@X`W2F-Z+6(BEM:6%UK9>P!L(ZTS>K"^"B"&8 +M6/Q_,&]W\W8W0\A.LU)KRV+;8FBQ%Y\5\_9\<*2!]-*7DF*"C;,U:S'OT!^O +MI>B]E$WK;JA][P];UJ[+ZEB_L:8W,T[1]>\[/[Z^G.8PB*CK8YY'$^]]C['% +MJ.Z5-!&P"H\YZREW__3A/\HM_FU=I4G>PDS@0```````````"6[K2W_GFOE_R&[;M[ +M=?W^CN_&XM;BSN+>XB))^Q9G%I.%,BU?1ROS0?MFN%A8EF:;+BI(]H"1M04NE +M2FW%BA-X,IX9MYYQ9'LZS=[V`1`OP0-PV$=`W+ARX@&X\`A(_.Q)2:A8@50J +M0??WD:9V//[Y:W]_GLETVE;KU>:WX5I366V*7W]\//;E#]^\/5PN'UQ39SY\ +MZY>UYECHK_ZE_HNY[F79N2'];Y^OA+)<;S[_--?_[HK^^]?47W^)_HNY_CNM +M/^L??MWH7I;=&UK_I?[]O]'OW;!^]XK^U?Q'-Z1/$`1!$`1!$`1!$`1!$`1! +M$`1!$,3MP?]=\!D>.V0%0;R2U_\;K?65WJ*^VL,/:TU];?SY/1P\&@;TE,M8.]B"O?8)F-/AJ/1 +MWM'3P_%G7S!V(&II8@.&\['+'0AP'"7 +M6]"5RPR&]AB[.Q(UGP<]X7$L3*TG9QTH9F!UV68X73CEM<4.N)!8.IR[[SM1 +M?S1.N)OD;;8\4!6?5C'V-DFS)IM791@J-54A=65AA,W"V#+$WF7L4XQ$\R!' +M?\^UF7(%MM8F\2O-L>^`'>@R`R>+1J+@Y85?4(JY\H;Y%#CH=MFQ!DR_$XEO +MCF>A\TE5N*H`AYNE\<.B5@*\SN6EER$>_<"S.&7K&ZLTE3:_/!=4?%@G+&39 +MJQJ3!6(FT-@44L4+5!GC3\#QTU1)/^^E3>(JE0G,51C+SR:N#.8T";+>SD*T +M&3LLO=.U;L.BUJ2R&8DOZF%"<]-BQ1,4%J4#6\K)F3!=-'ERUO8.*Y$Z+Y$( +M/D],F+IT%E?'$]\E1&9<5<4T]Q./,=9OD^!+SFVP`_]?N5`>7^="H?LM0?R76'O)\_]K6'^SM;%^I'5XVG\=C[=:&^Q(3+65 +M3IM9JW4'V[Y?V;BS5SHCA24S">)_QD!_\=.-@"!N)4LO\Z)^KQ_M&PG#*H/E5WGA]5[$=NDV0!"WB]\!34_J +M#GC:[<$Q`0```,*@]4]M#!^@````````````````````@+%$%=P/6@`"! +M```````````````````````````````````````````````````````````` +2```````````````````````` +` +end Property changes on: stable/10/tests/sys/geom/class/uzip/test-1.img.uzip.uue ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/uzip/etalon/etalon.txt =================================================================== --- stable/10/tests/sys/geom/class/uzip/etalon/etalon.txt (nonexistent) +++ stable/10/tests/sys/geom/class/uzip/etalon/etalon.txt (revision 296821) @@ -0,0 +1,43 @@ +# +# $FreeBSD$ +# + +JABBERWOCKY + +Lewis Carroll +(from Through the Looking-Glass and What Alice Found There, 1872) + +`Twas brillig, and the slithy toves +Did gyre and gimble in the wabe: +All mimsy were the borogoves, +And the mome raths outgrabe. + +"Beware the Jabberwock, my son! +The jaws that bite, the claws that catch! +Beware the Jubjub bird, and shun +The frumious Bandersnatch!" + +He took his vorpal sword in hand: +Long time the manxome foe he sought -- +So rested he by the Tumtum tree, +And stood awhile in thought. + +And, as in uffish thought he stood, +The Jabberwock, with eyes of flame, +Came whiffling through the tulgey wood, +And burbled as it came! + +One, two! One, two! And through and through +The vorpal blade went snicker-snack! +He left it dead, and with its head +He went galumphing back. + +"And, has thou slain the Jabberwock? +Come to my arms, my beamish boy! +O frabjous day! Callooh! Callay!' +He chortled in his joy. + +`Twas brillig, and the slithy toves +Did gyre and gimble in the wabe; +All mimsy were the borogoves, +And the mome raths outgrabe. Property changes on: stable/10/tests/sys/geom/class/uzip/etalon/etalon.txt ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/tests/sys/geom/class/uzip =================================================================== --- stable/10/tests/sys/geom/class/uzip (nonexistent) +++ stable/10/tests/sys/geom/class/uzip (revision 296821) Property changes on: stable/10/tests/sys/geom/class/uzip ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,2 ## +test-1.img +test-1.img.gz Index: stable/10/tools/regression/geom_raid3/test-1.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-1.t (nonexistent) @@ -1,28 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..2" - -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 - -graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} 2>/dev/null || exit 1 -devwait - -# Size of created device should be 2MB - 1024B. - -mediasize=`diskinfo /dev/raid3/${name} | awk '{print $3}'` -if [ $mediasize -eq 2096128 ]; then - echo "ok 1" -else - echo "not ok 1" -fi -sectorsize=`diskinfo /dev/raid3/${name} | awk '{print $2}'` -if [ $sectorsize -eq 1024 ]; then - echo "ok 2" -else - echo "not ok 2" -fi Property changes on: stable/10/tools/regression/geom_raid3/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-2.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-2.t (nonexistent) @@ -1,32 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-3.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-3.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-3.t (nonexistent) @@ -1,36 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-3.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-4.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-4.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-4.t (nonexistent) @@ -1,36 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-4.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-5.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-5.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-5.t (nonexistent) @@ -1,36 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-5.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-6.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-6.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-6.t (nonexistent) @@ -1,40 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-6.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-7.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-7.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-7.t (nonexistent) @@ -1,43 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-7.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-8.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-8.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-8.t (nonexistent) @@ -1,39 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-8.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-9.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-9.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-9.t (nonexistent) @@ -1,42 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-9.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/conf.sh =================================================================== --- stable/10/tools/regression/geom_raid3/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_raid3/conf.sh (nonexistent) @@ -1,15 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="$(mktemp -u graid3.XXXXXX)" -class="raid3" -base=`basename $0` - -graid3_test_cleanup() -{ - [ -c /dev/$class/$name ] && graid3 stop $name - geom_test_cleanup -} -trap graid3_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_raid3/conf.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-10.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-10.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-10.t (nonexistent) @@ -1,32 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-10.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-11.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-11.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-11.t (nonexistent) @@ -1,32 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -ddbs=2048 -nblocks1=1024 -nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -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} Property changes on: stable/10/tools/regression/geom_raid3/test-11.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_raid3/test-12.t =================================================================== --- stable/10/tools/regression/geom_raid3/test-12.t (revision 296820) +++ stable/10/tools/regression/geom_raid3/test-12.t (nonexistent) @@ -1,38 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -nblocks1=9 -nblocks2=`expr $nblocks1 - 1` -nblocks3=`expr $nblocks2 / 2` - -us0=$(attach_md -t malloc -s $nblocks1) || exit 1 -us1=$(attach_md -t malloc -s $nblocks1) || exit 1 -us2=$(attach_md -t malloc -s $nblocks1) || exit 1 - -dd if=/dev/random of=/dev/${us0} count=$nblocks1 >/dev/null 2>&1 -dd if=/dev/random of=/dev/${us1} count=$nblocks1 >/dev/null 2>&1 -dd if=/dev/random of=/dev/${us2} count=$nblocks1 >/dev/null 2>&1 - -graid3 label -w $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 -devwait -# Wait for synchronization. -sleep 2 -graid3 stop $name -# Break one component. -dd if=/dev/random of=/dev/${us1} count=$nblocks2 >/dev/null 2>&1 -# Provoke retaste of the rest components. -true > /dev/${us0} -true > /dev/${us2} -sleep 1 - -dd if=/dev/raid3/${name} of=/dev/null bs=1k count=$nblocks3 >/dev/null 2>&1 -ec=$? -if [ $ec -eq 0 ]; then - echo "not ok 1" -else - echo "ok 1" -fi Property changes on: stable/10/tools/regression/geom_raid3/test-12.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_gate/test-1.t =================================================================== --- stable/10/tools/regression/geom_gate/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_gate/test-1.t (nonexistent) @@ -1,62 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo '1..2' - -base=`basename $0` -us=0 -while [ -c /dev/ggate${us} ]; do - : $(( us += 1 )) -done -conf=`mktemp $base.XXXXXX` || exit 1 -pidfile=/var/run/ggated.pid -port=33080 - -work=$(attach_md -t malloc -s 1M) -src=$(attach_md -t malloc -s 1M) - -test_cleanup() -{ - ggatec destroy -f -u $us - pkill -F $pidfile - geom_test_cleanup -} -trap test_cleanup ABRT EXIT INT TERM - -dd if=/dev/random of=/dev/$work bs=1m count=1 conv=sync -dd if=/dev/random of=/dev/$src bs=1m count=1 conv=sync -src_checksum=$(md5 -q /dev/$src) - -echo "127.0.0.1 RW /dev/$work" > $conf - -if ! ggated -p $port $conf; then - echo 'ggated failed to start' - echo 'Bail out!' - exit 1 -fi -sleep 1 -if ! ggatec create -p $port -u $us 127.0.0.1 /dev/$work; then - echo 'ggatec create failed' - echo 'Bail out!' - exit 1 -fi - -dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 -sleep 1 - -work_checksum=$(md5 -q /dev/$work) -if [ "$work_checksum" != "$src_checksum" ]; then - echo "not ok 1 - md5 checksums didn't match ($work_checksum != $src_checksum)" - echo "not ok 2 # SKIP" -else - echo 'ok 1 - md5 checksum' - - ggate_checksum=$(md5 -q /dev/ggate${us}) - if [ "$ggate_checksum" != "$src_checksum" ]; then - echo "not ok 2 - md5 checksums didn't match ($ggate_checksum != $src_checksum)" - else - echo 'ok 2 - md5 checksum' - fi -fi Property changes on: stable/10/tools/regression/geom_gate/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_gate/test-2.t =================================================================== --- stable/10/tools/regression/geom_gate/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_gate/test-2.t (nonexistent) @@ -1,48 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -base=`basename $0` -us=46 -work=`mktemp -u $base.XXXXXX` || exit 1 -src=`mktemp -u $base.XXXXXX` || exit 1 - -test_cleanup() -{ - ggatel destroy -f -u $us - rm -f $work $src - - geom_test_cleanup -} -trap test_cleanup ABRT EXIT INT TERM - -dd if=/dev/random of=$work bs=1m count=1 conv=sync -dd if=/dev/random of=$src bs=1m count=1 conv=sync - -if ! ggatel create -u $us $work; then - echo 'ggatel create failed' - echo 'Bail out!' - exit 1 -fi - -dd if=${src} of=/dev/ggate${us} bs=1m count=1 -sleep 1 - -echo '1..2' - -src_checksum=$(md5 -q $src) -work_checksum=$(md5 -q $work) -if [ "$work_checksum" != "$src_checksum" ]; then - echo "not ok 1 - md5 checksums didn't match ($work_checksum != $src_checksum) # TODO: bug 204616" - echo 'not ok 2 # SKIP' -else - echo 'ok 1 - md5 checksum' - - ggate_checksum=$(md5 -q /dev/ggate${us}) - if [ "$ggate_checksum" != "$src_checksum" ]; then - echo "not ok 2 - md5 checksums didn't match ($ggate_checksum != $src_checksum)" - else - echo 'ok 2 - md5 checksum' - fi -fi Property changes on: stable/10/tools/regression/geom_gate/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_gate/test-3.t =================================================================== --- stable/10/tools/regression/geom_gate/test-3.t (revision 296820) +++ stable/10/tools/regression/geom_gate/test-3.t (nonexistent) @@ -1,48 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -base=`basename $0` -us=47 - -test_cleanup() -{ - ggatel destroy -f -u $us - - geom_test_cleanup -} -trap test_cleanup ABRT EXIT INT TERM - -work=$(attach_md -t malloc -s 1M) -src=$(attach_md -t malloc -s 1M) - -dd if=/dev/random of=/dev/$work bs=1m count=1 conv=sync -dd if=/dev/random of=/dev/$src bs=1m count=1 conv=sync -src_checksum=$(md5 -q /dev/$src) - -if ! ggatel create -u $us /dev/$work; then - echo 'ggatel create failed' - echo 'Bail out!' - exit 1 -fi - -dd if=/dev/${src} of=/dev/ggate${us} bs=1m count=1 conv=sync -sleep 1 - -echo '1..2' - -work_checksum=$(md5 -q /dev/$work) -if [ "$work_checksum" != "$src_checksum" ]; then - echo "not ok 1 - md5 checksums didn't match ($work_checksum != $src_checksum)" - echo 'not ok 2 # SKIP' -else - echo 'ok 1 - md5 checksum' - - ggate_checksum=$(md5 -q /dev/ggate${us}) - if [ "$ggate_checksum" != "$src_checksum" ]; then - echo "not ok 2 - md5 checksums didn't match ($ggate_checksum != $src_checksum)" - else - echo 'ok 2 - md5 checksum' - fi -fi Property changes on: stable/10/tools/regression/geom_gate/test-3.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_gate/conf.sh =================================================================== --- stable/10/tools/regression/geom_gate/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_gate/conf.sh (nonexistent) @@ -1,10 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="$(mktemp -u gate.XXXXXX)" -class="gate" -base=`basename $0` - -kldstat -q -m g_${class} || kldload geom_${class} || exit 1 - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_gate/conf.sh ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: stable/10/tools/regression/geom_eli/init-B.t =================================================================== --- stable/10/tools/regression/geom_eli/init-B.t (revision 296820) +++ stable/10/tools/regression/geom_eli/init-B.t (nonexistent) @@ -1,104 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -backupfile=`mktemp $base.XXXXXX` || exit 1 - -echo "1..13" - -dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - -mdconfig -a -t malloc -s $sectors -u $no || exit 1 - -# -B none -rm -f /var/backups/md${no}.eli -geli init -B none -P -K $keyfile md${no} 2>/dev/null -if [ ! -f /var/backups/md${no}.eli ]; then - echo "ok 1 - -B none" -else - echo "not ok 1 - -B none" -fi - -# no -B -rm -f /var/backups/md${no}.eli -geli init -P -K $keyfile md${no} >/dev/null 2>&1 -if [ -f /var/backups/md${no}.eli ]; then - echo "ok 2 - no -B" -else - echo "not ok 2 - no -B" -fi -geli clear md${no} -geli attach -p -k $keyfile md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 3 - no -B" -else - echo "not ok 3 - no -B" -fi -if [ ! -c /dev/md${no}.eli ]; then - echo "ok 4 - no -B" -else - echo "not ok 4 - no -B" -fi -geli restore /var/backups/md${no}.eli md${no} -if [ $? -eq 0 ]; then - echo "ok 5 - no -B" -else - echo "not ok 5 - no -B" -fi -geli attach -p -k $keyfile md${no} 2>/dev/null -if [ $? -eq 0 ]; then - echo "ok 6 - no -B" -else - echo "not ok 6 - no -B" -fi -if [ -c /dev/md${no}.eli ]; then - echo "ok 7 - no -B" -else - echo "not ok 7 - no -B" -fi -geli detach md${no} -rm -f /var/backups/md${no}.eli - -# -B file -rm -f $backupfile -geli init -B $backupfile -P -K $keyfile md${no} >/dev/null 2>&1 -if [ -f $backupfile ]; then - echo "ok 8 - -B file" -else - echo "not ok 8 - -B file" -fi -geli clear md${no} -geli attach -p -k $keyfile md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 9 - -B file" -else - echo "not ok 9 - -B file" -fi -if [ ! -c /dev/md${no}.eli ]; then - echo "ok 10 - -B file" -else - echo "not ok 10 - -B file" -fi -geli restore $backupfile md${no} -if [ $? -eq 0 ]; then - echo "ok 11 - -B file" -else - echo "not ok 11 - -B file" -fi -geli attach -p -k $keyfile md${no} 2>/dev/null -if [ $? -eq 0 ]; then - echo "ok 12 - -B file" -else - echo "not ok 12 - -B file" -fi -if [ -c /dev/md${no}.eli ]; then - echo "ok 13 - -B file" -else - echo "not ok 13 - -B file" -fi - -rm -f $backupfile $keyfile Property changes on: stable/10/tools/regression/geom_eli/init-B.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/init-J.t =================================================================== --- stable/10/tools/regression/geom_eli/init-J.t (revision 296820) +++ stable/10/tools/regression/geom_eli/init-J.t (nonexistent) @@ -1,126 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile0=`mktemp $base.XXXXXX` || exit 1 -keyfile1=`mktemp $base.XXXXXX` || exit 1 -passfile0=`mktemp $base.XXXXXX` || exit 1 -passfile1=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..150" - -dd if=/dev/random of=${keyfile0} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random bs=512 count=16 2>/dev/null | sha1 > ${passfile0} -dd if=/dev/random bs=512 count=16 2>/dev/null | sha1 > ${passfile1} - -i=1 -for iter in -1 0 64; do - geli init -i ${iter} -B none -J ${passfile0} -P md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli init -i ${iter} -B none -J ${passfile0} -P -K ${keyfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli init -i ${iter} -B none -J ${passfile0} -K ${keyfile0} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -p md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${keyfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${passfile0} -p md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${keyfile0} -k ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${keyfile0} -k ${keyfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile0} -k ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile0} -k ${keyfile0} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${keyfile0} | geli attach -j ${passfile0} -k - md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${passfile0} | geli attach -j - -k ${keyfile0} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - - geli init -i ${iter} -B none -J ${passfile0} -J ${passfile1} -P md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli init -i ${iter} -B none -J ${passfile0} -J ${passfile1} -P -K ${keyfile0} -K ${keyfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli init -i ${iter} -B none -J ${passfile0} -J ${passfile1} -K ${keyfile0} -K ${keyfile1} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -p md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile1} -p md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -k ${keyfile1} -p md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile1} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile1} -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -k ${keyfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -k ${keyfile1} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile1} -k ${keyfile0} -j ${passfile0} -j ${passfile1} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile0} -k ${keyfile1} -j ${passfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -k ${keyfile1} -k ${keyfile0} -j ${passfile1} -j ${passfile0} md${no} 2>/dev/null && echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli attach -j ${passfile0} -j ${passfile1} -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${passfile0} | geli attach -j - -j ${passfile1} -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${passfile1} | geli attach -j ${passfile0} -j - -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${keyfile0} | geli attach -j ${passfile0} -j ${passfile1} -k - -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${keyfile1} | geli attach -j ${passfile0} -j ${passfile1} -k ${keyfile0} -k - md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${keyfile0} ${keyfile1} | geli attach -j ${passfile0} -j ${passfile1} -k - md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - cat ${passfile0} ${passfile1} | awk '{printf "%s", $0}' | geli attach -j - -k ${keyfile0} -k ${keyfile1} md${no} 2>/dev/null || echo -n "not " - echo "ok ${i}"; i=$((i+1)) - geli detach md${no} || echo -n "not " - echo "ok ${i}"; i=$((i+1)) -done - -rm -f ${keyfile0} ${keyfile1} ${passfile0} ${passfile1} Property changes on: stable/10/tools/regression/geom_eli/init-J.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/init-a.t =================================================================== --- stable/10/tools/regression/geom_eli/init-a.t (revision 296820) +++ stable/10/tools/regression/geom_eli/init-a.t (nonexistent) @@ -1,60 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 - -echo "1..1380" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do - for secsize in 512 1024 2048 4096 8192; do - rnd=`mktemp $base.XXXXXX` || exit 1 - mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1 - - dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - - geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null - geli attach -p -k $keyfile md${no} - - secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` - - dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 - dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null - - md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` - md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` - - if [ ${md_rnd} = ${md_ddev} ]; then - echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - rm -f $rnd - mdconfig -d -u $no - done - done -done - -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/init-a.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/onetime-d.t =================================================================== --- stable/10/tools/regression/geom_eli/onetime-d.t (revision 296820) +++ stable/10/tools/regression/geom_eli/onetime-d.t (nonexistent) @@ -1,34 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -mdconfig -a -t malloc -s $sectors -u $no || exit 1 - -echo "1..3" - -geli onetime -d md${no} -if [ -c /dev/md${no}.eli ]; then - echo "ok 1" -else - echo "not ok 1" -fi -# Be sure it doesn't detach on read. -dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null -sleep 1 -if [ -c /dev/md${no}.eli ]; then - echo "ok 2" -else - echo "not ok 2" -fi -true > /dev/md${no}.eli -sleep 1 -if [ ! -c /dev/md${no}.eli ]; then - echo "ok 3" -else - echo "not ok 3" -fi - -mdconfig -d -u $no Property changes on: stable/10/tools/regression/geom_eli/onetime-d.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/init-i-P.t =================================================================== --- stable/10/tools/regression/geom_eli/init-i-P.t (revision 296820) +++ stable/10/tools/regression/geom_eli/init-i-P.t (nonexistent) @@ -1,22 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..1" - -dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -i 64 -P -K ${keyfile} md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi - -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/init-i-P.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/conf.sh =================================================================== --- stable/10/tools/regression/geom_eli/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_eli/conf.sh (nonexistent) @@ -1,21 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -class="eli" -base=`basename $0` - -# We need to use linear probing in order to detect the first available md(4) -# device instead of using mdconfig -a -t, because geli(8) attachs md(4) devices -no=0 -while [ -c /dev/md$no ]; do - : $(( no += 1 )) -done - -geli_test_cleanup() -{ - [ -c /dev/md${no}.eli ] && geli detach md${no}.eli - mdconfig -d -u $no -} -trap geli_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_eli/conf.sh ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: stable/10/tools/regression/geom_eli/integrity-hmac.t =================================================================== --- stable/10/tools/regression/geom_eli/integrity-hmac.t (revision 296820) +++ stable/10/tools/regression/geom_eli/integrity-hmac.t (nonexistent) @@ -1,69 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -sector=`mktemp $base.XXXXXX` || exit 1 - -echo "1..2760" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do - for secsize in 512 1024 2048 4096 8192; do - mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 - - dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - - geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null - geli attach -p -k $keyfile md${no} - - dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - - dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - # Corrupt 8 bytes of HMAC. - dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1 - dd if=/dev/random of=${sector} bs=1 count=16 conv=notrunc >/dev/null 2>&1 - dd if=${sector} of=/dev/md${no} bs=512 count=1 >/dev/null 2>&1 - geli attach -p -k $keyfile md${no} - - dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - mdconfig -d -u $no - done - done -done - -rm -f $keyfile $sector Property changes on: stable/10/tools/regression/geom_eli/integrity-hmac.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/kill.t =================================================================== --- stable/10/tools/regression/geom_eli/kill.t (revision 296820) +++ stable/10/tools/regression/geom_eli/kill.t (nonexistent) @@ -1,97 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile1=`mktemp $base.XXXXXX` || exit 1 -keyfile2=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..9" - -dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K $keyfile1 md${no} -geli attach -p -k $keyfile1 md${no} -geli setkey -n 1 -P -K $keyfile2 md${no} - -# Kill attached provider. -geli kill md${no} -if [ $? -eq 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi -sleep 1 -# Provider should be automatically detached. -if [ ! -c /dev/md{$no}.eli ]; then - echo "ok 2" -else - echo "not ok 2" -fi - -# We cannot use keyfile1 anymore. -geli attach -p -k $keyfile1 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 3" -else - echo "not ok 3" -fi - -# We cannot use keyfile2 anymore. -geli attach -p -k $keyfile2 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 4" -else - echo "not ok 4" -fi - -geli init -B none -P -K $keyfile1 md${no} -geli setkey -n 1 -p -k $keyfile1 -P -K $keyfile2 md${no} - -# Should be possible to attach with keyfile1. -geli attach -p -k $keyfile1 md${no} -if [ $? -eq 0 ]; then - echo "ok 5" -else - echo "not ok 5" -fi -geli detach md${no} - -# Should be possible to attach with keyfile2. -geli attach -p -k $keyfile2 md${no} -if [ $? -eq 0 ]; then - echo "ok 6" -else - echo "not ok 6" -fi -geli detach md${no} - -# Kill detached provider. -geli kill md${no} -if [ $? -eq 0 ]; then - echo "ok 7" -else - echo "not ok 7" -fi - -# We cannot use keyfile1 anymore. -geli attach -p -k $keyfile1 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 8" -else - echo "not ok 8" -fi - -# We cannot use keyfile2 anymore. -geli attach -p -k $keyfile2 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 9" -else - echo "not ok 9" -fi - -rm -f $keyfile1 $keyfile2 Property changes on: stable/10/tools/regression/geom_eli/kill.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/setkey.t =================================================================== --- stable/10/tools/regression/geom_eli/setkey.t (revision 296820) +++ stable/10/tools/regression/geom_eli/setkey.t (nonexistent) @@ -1,156 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -rnd=`mktemp $base.XXXXXX` || exit 1 -keyfile1=`mktemp $base.XXXXXX` || exit 1 -keyfile2=`mktemp $base.XXXXXX` || exit 1 -keyfile3=`mktemp $base.XXXXXX` || exit 1 -keyfile4=`mktemp $base.XXXXXX` || exit 1 -keyfile5=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..16" - -dd if=/dev/random of=${rnd} bs=512 count=${sectors} >/dev/null 2>&1 -hash1=`dd if=${rnd} bs=512 count=${sectors} 2>/dev/null | md5` -dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile3} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile4} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile5} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K $keyfile1 md${no} -geli attach -p -k $keyfile1 md${no} - -dd if=${rnd} of=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null -rm -f $rnd -hash2=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` - -# Change current key (0) for attached provider. -geli setkey -P -K $keyfile2 md${no} -if [ $? -eq 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi -geli detach md${no} - -# We cannot use keyfile1 anymore. -geli attach -p -k $keyfile1 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 2" -else - echo "not ok 2" -fi - -# Attach with new key. -geli attach -p -k $keyfile2 md${no} -if [ $? -eq 0 ]; then - echo "ok 3" -else - echo "not ok 3" -fi -hash3=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` - -# Change key 1 for attached provider. -geli setkey -n 1 -P -K $keyfile3 md${no} -if [ $? -eq 0 ]; then - echo "ok 4" -else - echo "not ok 4" -fi -geli detach md${no} - -# Attach with key 1. -geli attach -p -k $keyfile3 md${no} -if [ $? -eq 0 ]; then - echo "ok 5" -else - echo "not ok 5" -fi -hash4=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` -geli detach md${no} - -# Change current (1) key for detached provider. -geli setkey -p -k $keyfile3 -P -K $keyfile4 md${no} -if [ $? -eq 0 ]; then - echo "ok 6" -else - echo "not ok 6" -fi - -# We cannot use keyfile3 anymore. -geli attach -p -k $keyfile3 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 7" -else - echo "not ok 7" -fi - -# Attach with key 1. -geli attach -p -k $keyfile4 md${no} -if [ $? -eq 0 ]; then - echo "ok 8" -else - echo "not ok 8" -fi -hash5=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` -geli detach md${no} - -# Change key 0 for detached provider. -geli setkey -n 0 -p -k $keyfile4 -P -K $keyfile5 md${no} -if [ $? -eq 0 ]; then - echo "ok 9" -else - echo "not ok 9" -fi - -# We cannot use keyfile2 anymore. -geli attach -p -k $keyfile2 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 10" -else - echo "not ok 10" -fi - -# Attach with key 0. -geli attach -p -k $keyfile5 md${no} -if [ $? -eq 0 ]; then - echo "ok 11" -else - echo "not ok 11" -fi -hash6=`dd if=/dev/md${no}.eli bs=512 count=${sectors} 2>/dev/null | md5` -geli detach md${no} - -if [ ${hash1} = ${hash2} ]; then - echo "ok 12" -else - echo "not ok 12" -fi -if [ ${hash1} = ${hash3} ]; then - echo "ok 13" -else - echo "not ok 13" -fi -if [ ${hash1} = ${hash4} ]; then - echo "ok 14" -else - echo "not ok 14" -fi -if [ ${hash1} = ${hash5} ]; then - echo "ok 15" -else - echo "not ok 15" -fi -if [ ${hash1} = ${hash6} ]; then - echo "ok 16" -else - echo "not ok 16" -fi - -rm -f $keyfile1 $keyfile2 $keyfile3 $keyfile4 $keyfile5 Property changes on: stable/10/tools/regression/geom_eli/setkey.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/readonly.t =================================================================== --- stable/10/tools/regression/geom_eli/readonly.t (revision 296820) +++ stable/10/tools/regression/geom_eli/readonly.t (nonexistent) @@ -1,94 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..11" - -dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K $keyfile md${no} -if [ $? -eq 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi - -geli attach -r -p -k $keyfile md${no} -if [ $? -eq 0 ]; then - echo "ok 2" -else - echo "not ok 2" -fi - -sh -c "true >/dev/md${no}.eli" 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 3" -else - echo "not ok 3" -fi - -geli kill md${no} -if [ $? -eq 0 ]; then - echo "ok 4" -else - echo "not ok 4" -fi - -# kill should detach provider... -if [ ! -c /dev/md{$no}.eli ]; then - echo "ok 5" -else - echo "not ok 5" -fi - -# ...but not destroy the metadata. -geli attach -r -p -k $keyfile md${no} -if [ $? -eq 0 ]; then - echo "ok 6" -else - echo "not ok 6" -fi - -geli setkey -n 1 -P -K /dev/null md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 7" -else - echo "not ok 7" -fi - -geli delkey -n 0 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 8" -else - echo "not ok 8" -fi - -geli delkey -f -n 0 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 9" -else - echo "not ok 9" -fi - -geli list md${no}.eli | egrep '^Flags: .*READ-ONLY' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 10" -else - echo "not ok 10" -fi - -geli detach md${no} -if [ $? -eq 0 ]; then - echo "ok 11" -else - echo "not ok 11" -fi - -mdconfig -d -u $no -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/readonly.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/integrity-copy.t =================================================================== --- stable/10/tools/regression/geom_eli/integrity-copy.t (revision 296820) +++ stable/10/tools/regression/geom_eli/integrity-copy.t (nonexistent) @@ -1,99 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -sector=`mktemp $base.XXXXXX` || exit 1 - -echo "1..5520" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do - for secsize in 512 1024 2048 4096 8192; do - #mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 - mdconfig -a -t malloc -s $sectors -u $no || exit 1 - - dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - - geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null - geli attach -p -k $keyfile md${no} - - dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - - dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - small 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - # Copy first small sector to the second small sector. - # This should be detected as corruption. - dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1 - dd if=${sector} of=/dev/md${no} bs=512 count=1 seek=1 >/dev/null 2>&1 - geli attach -p -k $keyfile md${no} - - dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=1 >/dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "ok $i - small 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - small 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - ms=`diskinfo /dev/md${no} | awk '{print $3 - 512}'` - ns=`diskinfo /dev/md${no}.eli | awk '{print $4}'` - usecsize=`echo "($ms / $ns) - (($ms / $ns) % 512)" | bc` - - dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=2 >/dev/null 2>&1 - - dd if=/dev/md${no}.eli bs=${secsize} count=2 >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "ok $i - big 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - big 1 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - # Copy first big sector to the second big sector. - # This should be detected as corruption. - dd if=/dev/md${no} of=${sector} bs=${usecsize} count=1 >/dev/null 2>&1 - dd if=${sector} of=/dev/md${no} bs=${usecsize} count=1 seek=1 >/dev/null 2>&1 - geli attach -p -k $keyfile md${no} - - dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=2 >/dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "ok $i - big 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - big 2 aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - mdconfig -d -u $no - done - done -done - -rm -f $keyfile $sector Property changes on: stable/10/tools/regression/geom_eli/integrity-copy.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/onetime.t =================================================================== --- stable/10/tools/regression/geom_eli/onetime.t (revision 296820) +++ stable/10/tools/regression/geom_eli/onetime.t (nonexistent) @@ -1,59 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 - -echo "1..460" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for secsize in 512 1024 2048 4096 8192; do - rnd=`mktemp $base.XXXXXX` || exit 1 - mdconfig -a -t malloc -s `expr $secsize \* $sectors`b -u $no || exit 1 - - geli onetime -e $ealgo -l $keylen -s $secsize md${no} 2>/dev/null - - secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` - - dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 - dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null - - md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` - md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` - md_edev=`dd if=/dev/md${no} bs=${secsize} count=${secs} 2>/dev/null | md5` - - if [ ${md_rnd} = ${md_ddev} ]; then - echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - if [ ${md_rnd} != ${md_edev} ]; then - echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - rm -f $rnd - mdconfig -d -u $no - done -done Property changes on: stable/10/tools/regression/geom_eli/onetime.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/integrity-data.t =================================================================== --- stable/10/tools/regression/geom_eli/integrity-data.t (revision 296820) +++ stable/10/tools/regression/geom_eli/integrity-data.t (nonexistent) @@ -1,69 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -sector=`mktemp $base.XXXXXX` || exit 1 - -echo "1..2760" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do - for secsize in 512 1024 2048 4096 8192; do - mdconfig -a -t malloc -s `expr $secsize \* 2 + 512`b -u $no || exit 1 - - dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - - geli init -B none -a $aalgo -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null - geli attach -p -k $keyfile md${no} - - dd if=/dev/random of=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - - dd if=/dev/md${no}.eli bs=${secsize} count=1 >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - # Corrupt 8 bytes of data. - dd if=/dev/md${no} of=${sector} bs=512 count=1 >/dev/null 2>&1 - dd if=/dev/random of=${sector} bs=1 count=8 seek=64 conv=notrunc >/dev/null 2>&1 - dd if=${sector} of=/dev/md${no} bs=512 count=1 >/dev/null 2>&1 - geli attach -p -k $keyfile md${no} - - dd if=/dev/md${no}.eli of=/dev/null bs=${secsize} count=1 >/dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - mdconfig -d -u $no - done - done -done - -rm -f $keyfile $sector Property changes on: stable/10/tools/regression/geom_eli/integrity-data.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/attach-d.t =================================================================== --- stable/10/tools/regression/geom_eli/attach-d.t (revision 296820) +++ stable/10/tools/regression/geom_eli/attach-d.t (nonexistent) @@ -1,38 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..3" - -dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K $keyfile md${no} -geli attach -d -p -k $keyfile md${no} -if [ -c /dev/md${no}.eli ]; then - echo "ok 1" -else - echo "not ok 1" -fi -# Be sure it doesn't detach on read. -dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null -sleep 1 -if [ -c /dev/md${no}.eli ]; then - echo "ok 2" -else - echo "not ok 2" -fi -true > /dev/md${no}.eli -sleep 1 -if [ ! -c /dev/md${no}.eli ]; then - echo "ok 3" -else - echo "not ok 3" -fi - -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/attach-d.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/delkey.t =================================================================== --- stable/10/tools/regression/geom_eli/delkey.t (revision 296820) +++ stable/10/tools/regression/geom_eli/delkey.t (nonexistent) @@ -1,140 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile1=`mktemp $base.XXXXXX` || exit 1 -keyfile2=`mktemp $base.XXXXXX` || exit 1 -keyfile3=`mktemp $base.XXXXXX` || exit 1 -keyfile4=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..14" - -dd if=/dev/random of=${keyfile1} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile2} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile3} bs=512 count=16 >/dev/null 2>&1 -dd if=/dev/random of=${keyfile4} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K $keyfile1 md${no} -geli attach -p -k $keyfile1 md${no} -geli setkey -n 1 -P -K $keyfile2 md${no} - -# Remove key 0 for attached provider. -geli delkey -n 0 md${no} -if [ $? -eq 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi -geli detach md${no} - -# We cannot use keyfile1 anymore. -geli attach -p -k $keyfile1 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 2" -else - echo "not ok 2" -fi - -# Attach with key 1. -geli attach -p -k $keyfile2 md${no} -if [ $? -eq 0 ]; then - echo "ok 3" -else - echo "not ok 3" -fi - -# We cannot remove last key without -f option (for attached provider). -geli delkey -n 1 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 4" -else - echo "not ok 4" -fi - -# Remove last key for attached provider. -geli delkey -f -n 1 md${no} -if [ $? -eq 0 ]; then - echo "ok 5" -else - echo "not ok 5" -fi - -# If there are no valid keys, but provider is attached, we can save situation. -geli setkey -n 0 -P -K $keyfile3 md${no} -if [ $? -eq 0 ]; then - echo "ok 6" -else - echo "not ok 6" -fi -geli detach md${no} - -# We cannot use keyfile2 anymore. -geli attach -p -k $keyfile2 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 7" -else - echo "not ok 7" -fi - -# Attach with key 0. -geli attach -p -k $keyfile3 md${no} -if [ $? -eq 0 ]; then - echo "ok 8" -else - echo "not ok 8" -fi - -# Setup key 1. -geli setkey -n 1 -P -K $keyfile4 md${no} -if [ $? -eq 0 ]; then - echo "ok 9" -else - echo "not ok 9" -fi -geli detach md${no} - -# Remove key 1 for detached provider. -geli delkey -n 1 md${no} -if [ $? -eq 0 ]; then - echo "ok 10" -else - echo "not ok 10" -fi - -# We cannot use keyfile4 anymore. -geli attach -p -k $keyfile4 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 11" -else - echo "not ok 11" -fi - -# We cannot remove last key without -f option (for detached provider). -geli delkey -n 0 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 12" -else - echo "not ok 12" -fi - -# Remove last key for detached provider. -geli delkey -f -n 0 md${no} -if [ $? -eq 0 ]; then - echo "ok 13" -else - echo "not ok 13" -fi - -# We cannot use keyfile3 anymore. -geli attach -p -k $keyfile3 md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 14" -else - echo "not ok 14" -fi - -rm -f $keyfile1 $keyfile2 $keyfile3 $keyfile4 Property changes on: stable/10/tools/regression/geom_eli/delkey.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/configure-b-B.t =================================================================== --- stable/10/tools/regression/geom_eli/configure-b-B.t (revision 296820) +++ stable/10/tools/regression/geom_eli/configure-b-B.t (nonexistent) @@ -1,129 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..17" - -geli init -B none -P -K /dev/null md${no} -if [ $? -eq 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi - -geli dump md${no} | egrep 'flags: 0x0$' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 2" -else - echo "not ok 2" -fi - -geli init -B none -b -P -K /dev/null md${no} -if [ $? -eq 0 ]; then - echo "ok 3" -else - echo "not ok 3" -fi - -geli dump md${no} | egrep 'flags: 0x2$' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 4" -else - echo "not ok 4" -fi - -geli configure -B md${no} -if [ $? -eq 0 ]; then - echo "ok 5" -else - echo "not ok 5" -fi - -geli dump md${no} | egrep 'flags: 0x0$' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 6" -else - echo "not ok 6" -fi - -geli configure -b md${no} -if [ $? -eq 0 ]; then - echo "ok 7" -else - echo "not ok 7" -fi - -geli dump md${no} | egrep 'flags: 0x2$' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 8" -else - echo "not ok 8" -fi - -geli attach -p -k /dev/null md${no} -if [ $? -eq 0 ]; then - echo "ok 9" -else - echo "not ok 9" -fi - -geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 10" -else - echo "not ok 10" -fi - -geli configure -B md${no} -if [ $? -eq 0 ]; then - echo "ok 11" -else - echo "not ok 11" -fi - -geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null -if [ $? -ne 0 ]; then - echo "ok 12" -else - echo "not ok 12" -fi - -geli dump md${no} | egrep 'flags: 0x0$' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 13" -else - echo "not ok 13" -fi - -geli configure -b md${no} -if [ $? -eq 0 ]; then - echo "ok 14" -else - echo "not ok 14" -fi - -geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 15" -else - echo "not ok 15" -fi - -geli dump md${no} | egrep 'flags: 0x2$' >/dev/null -if [ $? -eq 0 ]; then - echo "ok 16" -else - echo "not ok 16" -fi - -geli detach md${no} -if [ $? -eq 0 ]; then - echo "ok 17" -else - echo "not ok 17" -fi Property changes on: stable/10/tools/regression/geom_eli/configure-b-B.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/detach-l.t =================================================================== --- stable/10/tools/regression/geom_eli/detach-l.t (revision 296820) +++ stable/10/tools/regression/geom_eli/detach-l.t (nonexistent) @@ -1,44 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..4" - -dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K $keyfile md${no} -geli attach -p -k $keyfile md${no} -if [ -c /dev/md${no}.eli ]; then - echo "ok 1" -else - echo "not ok 1" -fi -# Be sure it doesn't detach before 'detach -l'. -dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null -sleep 1 -if [ -c /dev/md${no}.eli ]; then - echo "ok 2" -else - echo "not ok 2" -fi -geli detach -l md${no} -if [ -c /dev/md${no}.eli ]; then - echo "ok 3" -else - echo "not ok 3" -fi -dd if=/dev/md${no}.eli of=/dev/null 2>/dev/null -sleep 1 -if [ ! -c /dev/md${no}.eli ]; then - echo "ok 4" -else - echo "not ok 4" -fi - -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/detach-l.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/resize.t =================================================================== --- stable/10/tools/regression/geom_eli/resize.t (revision 296820) +++ stable/10/tools/regression/geom_eli/resize.t (nonexistent) @@ -1,148 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -echo 1..27 - -BLK=512 -BLKS_PER_MB=2048 - -md=$(mdconfig -s40m) || exit 1 -unit=${md#md} -i=1 - -setsize() { - partszMB=$1 unitszMB=$2 - - { - echo a: $(($partszMB * $BLKS_PER_MB)) 0 4.2BSD 1024 8192 - echo c: $(($unitszMB * $BLKS_PER_MB)) 0 unused 0 0 - } | disklabel -R $md /dev/stdin -} - -# Initialise - -setsize 10 40 || echo -n "not " -echo ok $i - "Sized ${md}a to 10m" -i=$((i + 1)) - -echo secret >tmp.key -geli init -Bnone -PKtmp.key ${md}a || echo -n "not " -echo ok $i - "Initialised geli on ${md}a" -i=$((i + 1)) -geli attach -pk tmp.key ${md}a || echo -n "not " -echo ok $i - "Attached ${md}a as ${md}a.eli" -i=$((i + 1)) - -newfs -U ${md}a.eli >/dev/null || echo -n "not " -echo ok $i - "Initialised the filesystem on ${md}a.eli" -i=$((i + 1)) -out=$(fsck -tufs -y ${md}a.eli) -echo "$out" | fgrep -q MODIFIED && echo -n "not " -echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \ - "lines of output" -i=$((i + 1)) - - -# Doing a backup, resize & restore must be forced (with -f) as geli -# verifies that the provider size in the metadata matches the consumer. - -geli backup ${md}a tmp.meta || echo -n "not " -echo ok $i - "Backed up ${md}a metadata" -i=$((i + 1)) - -geli detach ${md}a.eli || echo -n "not " -echo ok $i - "Detached ${md}a.eli" -i=$((i + 1)) - -setsize 20 40 || echo -n "not " -echo ok $i - "Sized ${md}a to 20m" -i=$((i + 1)) -geli attach -pktmp.key ${md}a && echo -n "not " -echo ok $i - "Attaching ${md}a fails after resizing the consumer" -i=$((i + 1)) - -geli restore tmp.meta ${md}a && echo -n "not " -echo ok $i - "Restoring metadata on ${md}a.eli fails without -f" -i=$((i + 1)) -geli restore -f tmp.meta ${md}a || echo -n "not " -echo ok $i - "Restoring metadata on ${md}a.eli can be forced" -i=$((i + 1)) - -geli attach -pktmp.key ${md}a || echo -n "not " -echo ok $i - "Attaching ${md}a is now possible" -i=$((i + 1)) - -growfs -y ${md}a.eli >/dev/null || echo -n "not " -echo ok $i - "Extended the filesystem on ${md}a.eli" -i=$((i + 1)) - -out=$(fsck -tufs -y ${md}a.eli) -echo "$out" | fgrep -q MODIFIED && echo -n "not " -echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \ - "lines of output" -i=$((i + 1)) - - -# Now do the resize properly - -geli detach ${md}a.eli || echo -n "not " -echo ok $i - "Detached ${md}a.eli" -i=$((i + 1)) - -setsize 30 40 || echo -n "not " -echo ok $i - "Sized ${md}a to 30m" -i=$((i + 1)) - -geli resize -s20m ${md}a || echo -n "not " -echo ok $i - "Resizing works ok" -i=$((i + 1)) -geli resize -s20m ${md}a && echo -n "not " -echo ok $i - "Resizing doesn't work a 2nd time (no old metadata)" -i=$((i + 1)) - -geli attach -pktmp.key ${md}a || echo -n "not " -echo ok $i - "Attaching ${md}a works ok" -i=$((i + 1)) - -growfs -y ${md}a.eli >/dev/null || echo -n "not " -echo ok $i - "Extended the filesystem on ${md}a.eli" -i=$((i + 1)) - -out=$(fsck -tufs -y ${md}a.eli) -echo "$out" | fgrep -q MODIFIED && echo -n "not " -echo ok $i - "fsck says ${md}a.eli is clean," $(echo $(echo "$out" | wc -l)) \ - "lines of output" -i=$((i + 1)) - -geli detach ${md}a.eli -gpart destroy -F $md >/dev/null - - -# Verify that the man page example works, changing ada0 to $md, -# 1g to 20m, 2g to 30m and keyfile to tmp.key, and adding -B none -# to geli init. - -gpart create -s GPT $md || echo -n "not " -echo ok $i - "Installed a GPT on ${md}" -i=$((i + 1)) -gpart add -s 20m -t freebsd-ufs -i 1 $md || echo -n "not " -echo ok $i - "Added a 20m partition in slot 1" -i=$((i + 1)) -geli init -B none -K tmp.key -P ${md}p1 || echo -n "not " -echo ok $i - "Initialised geli on ${md}p1" -i=$((i + 1)) -gpart resize -s 30m -i 1 $md || echo -n "not " -echo ok $i - "Resized partition ${md}p1 to 30m" -i=$((i + 1)) -geli resize -s 20m ${md}p1 || echo -n "not " -echo ok $i - "Resized geli on ${md}p1 to 30m" -i=$((i + 1)) -geli attach -k tmp.key -p ${md}p1 || echo -n "not " -echo ok $i - "Attached ${md}p1.eli" -i=$((i + 1)) - -geli detach ${md}p1.eli - -rm tmp.* Property changes on: stable/10/tools/regression/geom_eli/resize.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/nokey.t =================================================================== --- stable/10/tools/regression/geom_eli/nokey.t (revision 296820) +++ stable/10/tools/regression/geom_eli/nokey.t (nonexistent) @@ -1,65 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 -mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1 - -echo "1..8" - -geli init -B none -P md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi - -dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - -geli init -B none -P -K ${keyfile} md${no} 2>/dev/null -if [ $? -eq 0 ]; then - echo "ok 2" -else - echo "not ok 2" -fi -geli attach -p md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 3" -else - echo "not ok 3" -fi -geli attach -p -k ${keyfile} md${no} 2>/dev/null -if [ $? -eq 0 ]; then - echo "ok 4" -else - echo "not ok 4" -fi -geli setkey -n 0 -P md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 5" -else - echo "not ok 5" -fi -geli detach md${no} 2>/dev/null -if [ $? -eq 0 ]; then - echo "ok 6" -else - echo "not ok 6" -fi -geli setkey -n 0 -p -P -K ${keyfile} md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 7" -else - echo "not ok 7" -fi -geli setkey -n 0 -p -k ${keyfile} -P md${no} 2>/dev/null -if [ $? -ne 0 ]; then - echo "ok 8" -else - echo "not ok 8" -fi - -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/nokey.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/onetime-a.t =================================================================== --- stable/10/tools/regression/geom_eli/onetime-a.t (revision 296820) +++ stable/10/tools/regression/geom_eli/onetime-a.t (nonexistent) @@ -1,54 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 - -echo "1..1380" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 hmac/sha384 hmac/sha512; do - for secsize in 512 1024 2048 4096 8192; do - rnd=`mktemp $base.XXXXXX` || exit 1 - mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1 - - geli onetime -a $aalgo -e $ealgo -l $keylen -s $secsize md${no} 2>/dev/null - - secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` - - dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 - dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null - - md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` - md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` - - if [ ${md_rnd} = ${md_ddev} ]; then - echo "ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - aalgo=${aalgo} ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - rm -f $rnd - mdconfig -d -u $no - done - done -done Property changes on: stable/10/tools/regression/geom_eli/onetime-a.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_eli/init.t =================================================================== --- stable/10/tools/regression/geom_eli/init.t (revision 296820) +++ stable/10/tools/regression/geom_eli/init.t (nonexistent) @@ -1,65 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. $(dirname $0)/conf.sh - -base=`basename $0` -sectors=100 -keyfile=`mktemp $base.XXXXXX` || exit 1 - -echo "1..460" - -i=1 -for cipher in aes:0 aes:128 aes:256 \ - aes-xts:0 aes-xts:128 aes-xts:256 \ - aes-cbc:0 aes-cbc:128 aes-cbc:192 aes-cbc:256 \ - 3des:0 3des:192 \ - 3des-cbc:0 3des-cbc:192 \ - blowfish:0 blowfish:128 blowfish:160 blowfish:192 blowfish:224 \ - blowfish:256 blowfish:288 blowfish:320 blowfish:352 blowfish:384 \ - blowfish:416 blowfish:448 \ - blowfish-cbc:0 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 blowfish-cbc:224 \ - blowfish-cbc:256 blowfish-cbc:288 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ - blowfish-cbc:416 blowfish-cbc:448 \ - camellia:0 camellia:128 camellia:192 camellia:256 \ - camellia-cbc:0 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do - ealgo=${cipher%%:*} - keylen=${cipher##*:} - for secsize in 512 1024 2048 4096 8192; do - rnd=`mktemp $base.XXXXXX` || exit 1 - mdconfig -a -t malloc -s `expr $secsize \* $sectors + 512`b -u $no || exit 1 - - dd if=/dev/random of=${keyfile} bs=512 count=16 >/dev/null 2>&1 - - geli init -B none -e $ealgo -l $keylen -P -K $keyfile -s $secsize md${no} 2>/dev/null - geli attach -p -k $keyfile md${no} - - secs=`diskinfo /dev/md${no}.eli | awk '{print $4}'` - - dd if=/dev/random of=${rnd} bs=${secsize} count=${secs} >/dev/null 2>&1 - dd if=${rnd} of=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null - - md_rnd=`dd if=${rnd} bs=${secsize} count=${secs} 2>/dev/null | md5` - md_ddev=`dd if=/dev/md${no}.eli bs=${secsize} count=${secs} 2>/dev/null | md5` - md_edev=`dd if=/dev/md${no} bs=${secsize} count=${secs} 2>/dev/null | md5` - - if [ ${md_rnd} = ${md_ddev} ]; then - echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - if [ ${md_rnd} != ${md_edev} ]; then - echo "ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - else - echo "not ok $i - ealgo=${ealgo} keylen=${keylen} sec=${secsize}" - fi - i=$((i+1)) - - geli detach md${no} - rm -f $rnd - mdconfig -d -u $no - done -done - -rm -f $keyfile Property changes on: stable/10/tools/regression/geom_eli/init.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_nop/test-1.t =================================================================== --- stable/10/tools/regression/geom_nop/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_nop/test-1.t (nonexistent) @@ -1,20 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -us=$(attach_md -t malloc -s 1M) || exit 1 - -gnop create /dev/${us} || exit 1 - -# Size of created device should be 1MB. - -size=`diskinfo /dev/${us}.nop | awk '{print $3}'` - -if [ $size -eq 1048576 ]; then - echo "ok 1" -else - echo "not ok 1" -fi Property changes on: stable/10/tools/regression/geom_nop/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_nop/test-2.t =================================================================== --- stable/10/tools/regression/geom_nop/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_nop/test-2.t (nonexistent) @@ -1,26 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 1 - -echo "1..1" - -dd if=/dev/random of=${src} bs=1m count=1 >/dev/null 2>&1 - -us=$(attach_md -t malloc -s 1M) || exit 1 - -gnop create /dev/${us} || exit 1 - -dd if=${src} of=/dev/${us}.nop bs=1m count=1 >/dev/null 2>&1 -dd if=/dev/${us}.nop of=${dst} bs=1m count=1 >/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} Property changes on: stable/10/tools/regression/geom_nop/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_nop/conf.sh =================================================================== --- stable/10/tools/regression/geom_nop/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_nop/conf.sh (nonexistent) @@ -1,14 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -class="nop" -base=`basename $0` - -gnop_test_cleanup() -{ - [ -c /dev/${us}.nop ] && gnop destroy ${us}.nop - geom_test_cleanup -} -trap gnop_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_nop/conf.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-1.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-1.t (nonexistent) @@ -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 Property changes on: stable/10/tools/regression/geom_mirror/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-2.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-2.t (nonexistent) @@ -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} Property changes on: stable/10/tools/regression/geom_mirror/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-3.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-3.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-3.t (nonexistent) @@ -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} Property changes on: stable/10/tools/regression/geom_mirror/test-3.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-4.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-4.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-4.t (nonexistent) @@ -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} Property changes on: stable/10/tools/regression/geom_mirror/test-4.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-5.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-5.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-5.t (nonexistent) @@ -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} Property changes on: stable/10/tools/regression/geom_mirror/test-5.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-6.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-6.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-6.t (nonexistent) @@ -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} Property changes on: stable/10/tools/regression/geom_mirror/test-6.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/test-7.t =================================================================== --- stable/10/tools/regression/geom_mirror/test-7.t (revision 296820) +++ stable/10/tools/regression/geom_mirror/test-7.t (nonexistent) @@ -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} Property changes on: stable/10/tools/regression/geom_mirror/test-7.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_mirror/conf.sh =================================================================== --- stable/10/tools/regression/geom_mirror/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_mirror/conf.sh (nonexistent) @@ -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 Property changes on: stable/10/tools/regression/geom_mirror/conf.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_concat/test-1.t =================================================================== --- stable/10/tools/regression/geom_concat/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_concat/test-1.t (nonexistent) @@ -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 - -gconcat create $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 -devwait - -# Size of created device should be 1MB + 2MB + 3MB. - -size=`diskinfo /dev/concat/${name} | awk '{print $3}'` - -if [ $size -eq 6291456 ]; then - echo "ok - Size is 6291456" -else - echo "not ok - Size is 6291456" -fi Property changes on: stable/10/tools/regression/geom_concat/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_concat/test-2.t =================================================================== --- stable/10/tools/regression/geom_concat/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_concat/test-2.t (nonexistent) @@ -1,30 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo '1..1' - -tsize=6 -src=`mktemp $base.XXXXXX` || exit 1 -dst=`mktemp $base.XXXXXX` || exit 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 - -dd if=/dev/random of=${src} bs=1m count=$tsize >/dev/null 2>&1 - -gconcat create $name /dev/$us0 /dev/$us1 /dev/$us2 || 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 - -if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then - echo "not ok - md5 checksum comparison" -else - echo "ok - md5 checksum comparison" -fi - -rm -f ${src} ${dst} Property changes on: stable/10/tools/regression/geom_concat/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_concat/conf.sh =================================================================== --- stable/10/tools/regression/geom_concat/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_concat/conf.sh (nonexistent) @@ -1,15 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="$(mktemp -u concat.XXXXXX)" -class="concat" -base=`basename $0` - -gconcat_test_cleanup() -{ - [ -c /dev/$class/$name ] && gconcat destroy $name - geom_test_cleanup -} -trap gconcat_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_concat/conf.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_stripe/test-1.t =================================================================== --- stable/10/tools/regression/geom_stripe/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_stripe/test-1.t (nonexistent) @@ -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 - -gstripe create -s 16384 $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 -devwait - -# Size of created device should be 1MB * 3. - -size=`diskinfo /dev/stripe/${name} | awk '{print $3}'` - -if [ $size -eq 3145728 ]; then - echo "ok 1" -else - echo "not ok 1" -fi Property changes on: stable/10/tools/regression/geom_stripe/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_stripe/test-2.t =================================================================== --- stable/10/tools/regression/geom_stripe/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_stripe/test-2.t (nonexistent) @@ -1,30 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..1" - -tsize=3 -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} Property changes on: stable/10/tools/regression/geom_stripe/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_stripe/conf.sh =================================================================== --- stable/10/tools/regression/geom_stripe/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_stripe/conf.sh (nonexistent) @@ -1,15 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="$(mktemp -u stripe.XXXXXX)" -class="stripe" -base=`basename $0` - -gstripe_test_cleanup() -{ - [ -c /dev/$class/$name ] && gstripe destroy $name - geom_test_cleanup -} -trap gstripe_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_stripe/conf.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_shsec/test-1.t =================================================================== --- stable/10/tools/regression/geom_shsec/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_shsec/test-1.t (nonexistent) @@ -1,28 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..2" - -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 - -gshsec label $name /dev/${us0} /dev/${us1} /dev/${us2} 2>/dev/null || exit 1 -devwait - -# Size of created device should be 1MB - 512B. - -mediasize=`diskinfo /dev/shsec/${name} | awk '{print $3}'` -if [ $mediasize -eq 1048064 ]; then - echo "ok 1" -else - echo "not ok 1" -fi -sectorsize=`diskinfo /dev/shsec/${name} | awk '{print $2}'` -if [ $sectorsize -eq 512 ]; then - echo "ok 2" -else - echo "not ok 2" -fi Property changes on: stable/10/tools/regression/geom_shsec/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_shsec/test-2.t =================================================================== --- stable/10/tools/regression/geom_shsec/test-2.t (revision 296820) +++ stable/10/tools/regression/geom_shsec/test-2.t (nonexistent) @@ -1,52 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -. `dirname $0`/conf.sh - -echo "1..4" - -nblocks1=1024 -nblocks2=`expr $nblocks1 + 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} Property changes on: stable/10/tools/regression/geom_shsec/test-2.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_shsec/conf.sh =================================================================== --- stable/10/tools/regression/geom_shsec/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_shsec/conf.sh (nonexistent) @@ -1,15 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -name="$(mktemp -u shsec.XXXXXX)" -class="shsec" -base=`basename $0` - -shsec_test_cleanup() -{ - [ -c /dev/$class/$name ] && gshsec stop $name - geom_test_cleanup -} -trap shsec_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh Property changes on: stable/10/tools/regression/geom_shsec/conf.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_subr.sh =================================================================== --- stable/10/tools/regression/geom_subr.sh (revision 296820) +++ stable/10/tools/regression/geom_subr.sh (nonexistent) @@ -1,60 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -devwait() -{ - while :; do - if [ -c /dev/${class}/${name} ]; then - return - fi - sleep 0.2 - done -} - -attach_md() -{ - local test_md - - test_md=$(mdconfig -a "$@") || exit - echo $test_md >> $TEST_MDS_FILE || exit - echo $test_md -} - -geom_test_cleanup() -{ - local test_md - - if [ -f "$TEST_MDS_FILE" ]; then - while read test_md; do - # The "#" tells the TAP parser this is a comment - echo "# Removing test memory disk: $test_md" - mdconfig -d -u $test_md - done < $TEST_MDS_FILE - fi - rm -f "$TEST_MDS_FILE" -} - -if [ $(id -u) -ne 0 ]; then - echo 'Tests must be run as root' - echo 'Bail out!' - exit 1 -fi -# If the geom class isn't already loaded, try loading it. -if ! kldstat -q -m g_${class}; then - if ! geom ${class} load; then - echo "Could not load module for geom class=${class}" - echo 'Bail out!' - exit 1 - fi -fi - -# Need to keep track of the test md devices to avoid the scenario where a test -# failing will cause the other tests to bomb out, or a test failing will leave -# a large number of md(4) devices lingering around -: ${TMPDIR=/tmp} -export TMPDIR -if ! TEST_MDS_FILE=$(mktemp ${TMPDIR}/test_mds.XXXXXX); then - echo 'Failed to create temporary file for tracking the test md(4) devices' - echo 'Bail out!' - exit 1 -fi Property changes on: stable/10/tools/regression/geom_subr.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_uzip/test-1.t =================================================================== --- stable/10/tools/regression/geom_uzip/test-1.t (revision 296820) +++ stable/10/tools/regression/geom_uzip/test-1.t (nonexistent) @@ -1,22 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -testsdir=$(dirname $0) -. $testsdir/conf.sh - -echo "1..1" - -UUE=$testsdir/test-1.img.uzip.uue -uudecode $UUE -us0=$(attach_md -f $(basename $UUE .uue)) || exit 1 -sleep 1 - -mount -o ro /dev/${us0}.uzip "${mntpoint}" || exit 1 - -#cat "${mntpoint}/etalon.txt" -diff -I '\$FreeBSD.*\$' -u $testsdir/etalon/etalon.txt "${mntpoint}/etalon.txt" -if [ $? -eq 0 ]; then - echo "ok 1" -else - echo "not ok 1" -fi Property changes on: stable/10/tools/regression/geom_uzip/test-1.t ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_uzip/etalon/etalon.txt =================================================================== --- stable/10/tools/regression/geom_uzip/etalon/etalon.txt (revision 296820) +++ stable/10/tools/regression/geom_uzip/etalon/etalon.txt (nonexistent) @@ -1,43 +0,0 @@ -# -# $FreeBSD$ -# - -JABBERWOCKY - -Lewis Carroll -(from Through the Looking-Glass and What Alice Found There, 1872) - -`Twas brillig, and the slithy toves -Did gyre and gimble in the wabe: -All mimsy were the borogoves, -And the mome raths outgrabe. - -"Beware the Jabberwock, my son! -The jaws that bite, the claws that catch! -Beware the Jubjub bird, and shun -The frumious Bandersnatch!" - -He took his vorpal sword in hand: -Long time the manxome foe he sought -- -So rested he by the Tumtum tree, -And stood awhile in thought. - -And, as in uffish thought he stood, -The Jabberwock, with eyes of flame, -Came whiffling through the tulgey wood, -And burbled as it came! - -One, two! One, two! And through and through -The vorpal blade went snicker-snack! -He left it dead, and with its head -He went galumphing back. - -"And, has thou slain the Jabberwock? -Come to my arms, my beamish boy! -O frabjous day! Callooh! Callay!' -He chortled in his joy. - -`Twas brillig, and the slithy toves -Did gyre and gimble in the wabe; -All mimsy were the borogoves, -And the mome raths outgrabe. Property changes on: stable/10/tools/regression/geom_uzip/etalon/etalon.txt ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_uzip/conf.sh =================================================================== --- stable/10/tools/regression/geom_uzip/conf.sh (revision 296820) +++ stable/10/tools/regression/geom_uzip/conf.sh (nonexistent) @@ -1,20 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -class="uzip" -base=`basename $0` - -uzip_test_cleanup() -{ - if [ -n "$mntpoint" ]; then - umount $mntpoint - rmdir $mntpoint - fi - geom_test_cleanup -} -trap uzip_test_cleanup ABRT EXIT INT TERM - -. `dirname $0`/../geom_subr.sh - -# NOTE: make sure $TMPDIR has been set by geom_subr.sh if unset [by kyua, etc] -mntpoint=$(mktemp -d tmp.XXXXXX) || exit Property changes on: stable/10/tools/regression/geom_uzip/conf.sh ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: stable/10/tools/regression/geom_uzip/test-1.img.uzip.uue =================================================================== --- stable/10/tools/regression/geom_uzip/test-1.img.uzip.uue (revision 296820) +++ stable/10/tools/regression/geom_uzip/test-1.img.uzip.uue (nonexistent) @@ -1,110 +0,0 @@ -# -# $FreeBSD$ -# - -begin 755 test-1.img.uzip -M(R$O8FEN+W-H"B-6,BXP($9O&ET("0_"@```````$`````` -M0`````````*0`````````W<````````$F@````````AQ````````")@````` -M```(OP````````CF````````"0T````````)-`````````E;````````"8(` -M```````)J0````````G0````````"?<````````*'@````````I%```````` -M"FP````````*DP````````JZ````````"N$````````+"`````````LO```` -M````"U8````````+?0````````ND````````"\L````````+\@````````P9 -M````````#$`````````,9P````````R.````````#+4````````,W``````` -M``T#````````#2H````````-40````````UX````````#9\````````-Q@`` -M``````WM````````#A0````````..P````````YB````````#HD````````. -ML`````````[7````````#OX````````/)0````````],````````#W,````` -M```/F@````````_!````````#^@````````0#P```````!`V````````$%T` -M```````0A````````!"K````````$-(````````0^0```````!$@```````` -M$4<````````1;@```````!&5````````$<%XVNW4/0K",!3`\1>M$`3!42<[ -M>@1!AX)X`^_@X`VZZ.[%''1V]0+>0(@O[0OMZF`5^?_@-6GS2=L\$0`````` -M````````\"_&&A.-7&-NSX)Z7)=KR41N?1$GUD'OO18#Z[>*EWL(\@QAI-6A -MU.WQHL/J<;ZUF-8++7JM>V?5N-YN<]I7>\@LTGCK%Z.P]CA'J;%(*;/SW_H;W97M*9*ZU>^8]YR7'QWX>"< -MUTV$F>7(?M,OY:9D.W6<"0```````````'3J!63?'NAXVNW9,4I#01#&\6^3 -M"*L@6&IE2@]@$=#B@7@#!6^@X`W2F-Z+6(BEM:6%UK9>P!L(ZTS>K"^"B"&8 -M6/Q_,&]W\W8W0\A.LU)KRV+;8FBQ%Y\5\_9\<*2!]-*7DF*"C;,U:S'OT!^O -MI>B]E$WK;JA][P];UJ[+ZEB_L:8W,T[1]>\[/[Z^G.8PB*CK8YY'$^]]C['% -MJ.Z5-!&P"H\YZREW__3A/\HM_FU=I4G>PDS@0```````````"6[K2W_GFOE_R&[;M[ -M=?W^CN_&XM;BSN+>XB))^Q9G%I.%,BU?1ROS0?MFN%A8EF:;+BI(]H"1M04NE -M2FW%BA-X,IX9MYYQ9'LZS=[V`1`OP0-PV$=`W+ARX@&X\`A(_.Q)2:A8@50J -M0??WD:9V//[Y:W]_GLETVE;KU>:WX5I366V*7W]\//;E#]^\/5PN'UQ39SY\ -MZY>UYECHK_ZE_HNY[F79N2'];Y^OA+)<;S[_--?_[HK^^]?47W^)_HNY_CNM -M/^L??MWH7I;=&UK_I?[]O]'OW;!^]XK^U?Q'-Z1/$`1!$`1!$`1!$`1!$`1! -M$`1!$,3MP?]=\!D>.V0%0;R2U_\;K?65WJ*^VL,/:TU];?SY/1P\&@;TE,M8.]B"O?8)F-/AJ/1 -MWM'3P_%G7S!V(&II8@.&\['+'0AP'"7 -M6]"5RPR&]AB[.Q(UGP<]X7$L3*TG9QTH9F!UV68X73CEM<4.N)!8.IR[[SM1 -M?S1.N)OD;;8\4!6?5C'V-DFS)IM791@J-54A=65AA,W"V#+$WF7L4XQ$\R!' -M?\^UF7(%MM8F\2O-L>^`'>@R`R>+1J+@Y85?4(JY\H;Y%#CH=MFQ!DR_$XEO -MCF>A\TE5N*H`AYNE\<.B5@*\SN6EER$>_<"S.&7K&ZLTE3:_/!=4?%@G+&39 -MJQJ3!6(FT-@44L4+5!GC3\#QTU1)/^^E3>(JE0G,51C+SR:N#.8T";+>SD*T -M&3LLO=.U;L.BUJ2R&8DOZF%"<]-BQ1,4%J4#6\K)F3!=-'ERUO8.*Y$Z+Y$( -M/D],F+IT%E?'$]\E1&9<5<4T]Q./,=9OD^!+SFVP`_]?N5`>7^="H?LM0?R76'O)\_]K6'^SM;%^I'5XVG\=C[=:&^Q(3+65 -M3IM9JW4'V[Y?V;BS5SHCA24S">)_QD!_\=.-@"!N)4LO\Z)^KQ_M&PG#*H/E5WGA]5[$=NDV0!"WB]\!34_J -M#GC:[<$Q`0```,*@]4]M#!^@````````````````````@+%$%=P/6@`"! -M```````````````````````````````````````````````````````````` -2```````````````````````` -` -end Property changes on: stable/10/tools/regression/geom_uzip/test-1.img.uzip.uue ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_uzip/Makefile =================================================================== --- stable/10/tools/regression/geom_uzip/Makefile (revision 296820) +++ stable/10/tools/regression/geom_uzip/Makefile (nonexistent) @@ -1,23 +0,0 @@ -# -# $FreeBSD$ -# -# Regression test for geom_ugz. -# - -IMAGE= test-1.img -ZIMAGE= ${IMAGE}.uzip -UZIMAGE= ${ZIMAGE}.uue - -test: - prove -rv ./test-1.t - -image: - makefs -s 1048576 ${IMAGE} etalon - printf "#\n# $$" >${UZIMAGE} - printf "FreeBSD$$\n#\n\n" >> ${UZIMAGE} - mkuzip -o ${ZIMAGE} ${IMAGE} - uuencode ${ZIMAGE} ${ZIMAGE} >>${UZIMAGE} - rm ${ZIMAGE} - -clean: - rm -f ${IMAGE} ${ZIMAGE} Property changes on: stable/10/tools/regression/geom_uzip/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/geom_uzip =================================================================== --- stable/10/tools/regression/geom_uzip (revision 296820) +++ stable/10/tools/regression/geom_uzip (nonexistent) Property changes on: stable/10/tools/regression/geom_uzip ___________________________________________________________________ Deleted: svn:ignore ## -1,2 +0,0 ## -test-1.img -test-1.img.gz Index: stable/10 =================================================================== --- stable/10 (revision 296820) +++ stable/10 (revision 296821) Property changes on: stable/10 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r293821