Integrate

tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
in to the FreeBSD test suite as
tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}

The tools/regression/geom and tools/regression/geom_part testcases are being
left alone because both test sets are both currently broken.

The majority of this work was done on ^/user/ngie/more-tests2 . The differences
are as follows:
- tests/sys/geom/class/Makefile.inc is not present; it was
  inlined into the class's Makefiles for explicitness.
- The testcases officially require root via kyua
- The geom_gate(4) tests don't use the pidfile changes proposed in
  https://reviews.freebsd.org/D4836 .

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
ngie 2016-01-13 09:14:27 +00:00
commit 68e22a452a
77 changed files with 268 additions and 24 deletions

View File

@ -376,6 +376,32 @@
..
file
..
geom
class
concat
..
eli
..
gate
..
gpt
..
mirror
..
nop
..
raid3
..
shsec
..
stripe
..
uzip
etalon
..
..
..
..
kern
acct
..

View File

@ -8,6 +8,7 @@ TESTS_SUBDIRS+= acl
TESTS_SUBDIRS+= aio
TESTS_SUBDIRS+= fifo
TESTS_SUBDIRS+= file
TESTS_SUBDIRS+= geom
TESTS_SUBDIRS+= kern
TESTS_SUBDIRS+= kqueue
TESTS_SUBDIRS+= mac

7
tests/sys/geom/Makefile Normal file
View File

@ -0,0 +1,7 @@
# $FreeBSD$
TESTSDIR= ${TESTSBASE}/sys/geom
TESTS_SUBDIRS+= class
.include <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -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 <bsd.test.mk>

View File

@ -6,7 +6,7 @@ testsdir=$(dirname $0)
echo "1..1"
UUE=$testsdir/test-1.img.uzip.uue
UUE=$testsdir/1.img.uzip.uue
uudecode $UUE
us0=$(attach_md -f $(basename $UUE .uue)) || exit 1
sleep 1

View File

@ -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 <bsd.test.mk>

View File

@ -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}