Re: svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel
On 3 Dec 2017, at 19:20, Alan Somers wrote: > On Sun, Dec 3, 2017 at 6:52 AM, Kristof Provostwrote: > >> Author: kp >> Date: Sun Dec 3 13:52:35 2017 >> New Revision: 326497 >> URL: https://svnweb.freebsd.org/changeset/base/326497 >> >> Log: >> Add IPSec tests in tunnel mode >> >> Some IPSec in tunnel mode allowing to test multiple IPSec >> configurations. These tests are reusing the jail/vnet scripts from pf >> tests for generating complex network. >> >> Submitted by: olivier@ >> Differential Revision:https://reviews.freebsd.org/D13017 >> > It's not ok to use kldunload during the test heads. Everything in the > head methods gets executed when you do "kyua list". Anything output gets > interpreted by Kyua. In this case, if kldunload outputs anything at all, > Kyua will consider it to be a syntax error, and it will skip the entire > file. You should limit yourself to using just atf_set in the header. Move > the kld commands into the test case bodies. > Thanks. Done in r326500. Regards, Kristof ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel
On Sun, Dec 3, 2017 at 6:52 AM, Kristof Provostwrote: > Author: kp > Date: Sun Dec 3 13:52:35 2017 > New Revision: 326497 > URL: https://svnweb.freebsd.org/changeset/base/326497 > > Log: > Add IPSec tests in tunnel mode > > Some IPSec in tunnel mode allowing to test multiple IPSec > configurations. These tests are reusing the jail/vnet scripts from pf > tests for generating complex network. > > Submitted by: olivier@ > Differential Revision:https://reviews.freebsd.org/D13017 > > Added: > head/tests/sys/netipsec/ > head/tests/sys/netipsec/Makefile (contents, props changed) > head/tests/sys/netipsec/tunnel/ > head/tests/sys/netipsec/tunnel/Makefile (contents, props changed) > head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh (contents, > props changed) > head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh > (contents, props changed) > head/tests/sys/netipsec/tunnel/aes_gcm_128.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/aes_gcm_256.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh > (contents, props changed) > head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh > (contents, props changed) > head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh (contents, props > changed) > head/tests/sys/netipsec/tunnel/empty.sh (contents, props changed) > head/tests/sys/netipsec/tunnel/utils.subr (contents, props changed) > Modified: > head/etc/mtree/BSD.tests.dist > head/tests/sys/Makefile > > > Added: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh > > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh Sun Dec > 3 13:52:35 2017(r326497) > @@ -0,0 +1,47 @@ > +# $FreeBSD$ > + > +. $(atf_get_srcdir)/utils.subr > + > +atf_test_case "v4" "cleanup" > +v4_head() > +{ > + atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1' > + atf_set require.user root > + # Unload AESNI module if loaded > + kldstat -q -n aesni && kldunload aesni > +} > > It's not ok to use kldunload during the test heads. Everything in the head methods gets executed when you do "kyua list". Anything output gets interpreted by Kyua. In this case, if kldunload outputs anything at all, Kyua will consider it to be a syntax error, and it will skip the entire file. You should limit yourself to using just atf_set in the header. Move the kld commands into the test case bodies. -Alan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel
Author: kp Date: Sun Dec 3 13:52:35 2017 New Revision: 326497 URL: https://svnweb.freebsd.org/changeset/base/326497 Log: Add IPSec tests in tunnel mode Some IPSec in tunnel mode allowing to test multiple IPSec configurations. These tests are reusing the jail/vnet scripts from pf tests for generating complex network. Submitted by: olivier@ Differential Revision:https://reviews.freebsd.org/D13017 Added: head/tests/sys/netipsec/ head/tests/sys/netipsec/Makefile (contents, props changed) head/tests/sys/netipsec/tunnel/ head/tests/sys/netipsec/tunnel/Makefile (contents, props changed) head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aes_gcm_128.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aes_gcm_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh (contents, props changed) head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh (contents, props changed) head/tests/sys/netipsec/tunnel/empty.sh (contents, props changed) head/tests/sys/netipsec/tunnel/utils.subr (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Sun Dec 3 12:14:34 2017 (r326496) +++ head/etc/mtree/BSD.tests.dist Sun Dec 3 13:52:35 2017 (r326497) @@ -478,6 +478,10 @@ .. netinet .. +netipsec +tunnel +.. +.. netpfil pf .. Modified: head/tests/sys/Makefile == --- head/tests/sys/Makefile Sun Dec 3 12:14:34 2017(r326496) +++ head/tests/sys/Makefile Sun Dec 3 13:52:35 2017(r326497) @@ -13,6 +13,7 @@ TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+=mac TESTS_SUBDIRS+=mqueue TESTS_SUBDIRS+=netinet +TESTS_SUBDIRS+=netipsec TESTS_SUBDIRS+=netpfil TESTS_SUBDIRS+=opencrypto TESTS_SUBDIRS+=posixshm Added: head/tests/sys/netipsec/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/MakefileSun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/netipsec + +TESTS_SUBDIRS+=tunnel + +.include Added: head/tests/sys/netipsec/tunnel/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/Makefile Sun Dec 3 13:52:35 2017 (r326497) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/netipsec/tunnel + +ATF_TESTS_SH+= empty \ + aes_cbc_128_hmac_sha1 \ + aes_cbc_256_hmac_sha2_256 \ + aes_gcm_128 \ + aes_gcm_256 \ + aesni_aes_cbc_128_hmac_sha1 \ + aesni_aes_cbc_256_hmac_sha2_256 \ + aesni_aes_gcm_128 \ + aesni_aes_gcm_256 + +${PACKAGE}FILES+= utils.subr + +.include Added: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh Sun Dec 3 13:52:35 2017(r326497) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v4_body() +{ + ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" +} + +v4_cleanup() +{ + ist_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPSec inet6 tunnel using aes-cbc-128-hmac-sha1' + atf_set require.user root + # Unload AESNI module if loaded + kldstat -q -n aesni && kldunload aesni +} + +v6_body() +{ + ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" +} + +v6_cleanup() +{ + ist_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" +