svn commit: r326497 - in head: etc/mtree tests/sys tests/sys/netipsec tests/sys/netipsec/tunnel

Alan Somers asomers at freebsd.org
Sun Dec 3 18:21:00 UTC 2017


On Sun, Dec 3, 2017 at 6:52 AM, Kristof Provost <kp at freebsd.org> wrote:

> 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


More information about the svn-src-all mailing list