Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 2017 18:35:07 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326500 - head/tests/sys/netipsec/tunnel
Message-ID:  <201712031835.vB3IZ7K0004201@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Sun Dec  3 18:35:07 2017
New Revision: 326500
URL: https://svnweb.freebsd.org/changeset/base/326500

Log:
  tests: ipsec: Don't load/unload aesni.ko in the test header
  
  We can't kldunload in the test head as Kyua interprets any output from
  them. This would lead to syntax errors and skipping the entire file.
  
  Move the kld commands into the test case bodies.
  
  Pointed out by: asomers@

Modified:
  head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh
  head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh
  head/tests/sys/netipsec/tunnel/aes_gcm_128.sh
  head/tests/sys/netipsec/tunnel/aes_gcm_256.sh
  head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh
  head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh
  head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh
  head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh

Modified: head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aes_cbc_128_hmac_sha1.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ 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()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
 }
 
@@ -26,12 +27,13 @@ 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()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
 }
 

Modified: head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aes_cbc_256_hmac_sha2_256.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-cbc-256-hmac-sha2-256'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v4_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-cbc-256-hmac-sha2-256'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v6_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012"
 }
 

Modified: head/tests/sys/netipsec/tunnel/aes_gcm_128.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aes_gcm_128.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aes_gcm_128.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-gcm-128'
 	atf_set require.user root
-	# Unload AESNI module if loaded
-	kldstat -q -n aesni && kldunload aesni
 }
 
 v4_body()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 4 aes-gcm-16 "12345678901234567890"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-gcm-128'
 	atf_set require.user root
-	# Unload AESNI module if loaded
-	kldstat -q -n aesni && kldunload aesni
 }
 
 v6_body()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 6 aes-gcm-16 "12345678901234567890"
 }
 

Modified: head/tests/sys/netipsec/tunnel/aes_gcm_256.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aes_gcm_256.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aes_gcm_256.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-gcm-256'
 	atf_set require.user root
-	# Unload AESNI module if loaded
-	kldstat -q -n aesni && kldunload aesni
 }
 
 v4_body()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 4 aes-gcm-16 "123456789012345678901234567890123456"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-gcm-256'
 	atf_set require.user root
-	# Unload AESNI module if loaded
-	kldstat -q -n aesni && kldunload aesni
 }
 
 v6_body()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 6 aes-gcm-16 "123456789012345678901234567890123456"
 }
 

Modified: head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aesni_aes_cbc_128_hmac_sha1.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-cbc-128-hmac-sha1 and AESNI'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v4_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-cbc-128-hmac-sha1 and AESNI'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v6_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
 }
 

Modified: head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aesni_aes_cbc_256_hmac_sha2_256.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-cbc-256-hmac-sha2-256 and AESNI'
 	atf_set require.user root
-	# Unload AESNI module if loaded
-	kldstat -q -n aesni && kldunload aesni
 }
 
 v4_body()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-cbc-256-hmac-sha2-256 and AESNI'
 	atf_set require.user root
-	# Unload AESNI module if loaded
-	kldstat -q -n aesni && kldunload aesni
 }
 
 v6_body()
 {
+	# Unload AESNI module if loaded
+	kldstat -q -n aesni && kldunload aesni
+
 	ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "12345678901234567890123456789012"
 }
 

Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_128.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-gcm-128 and AESNI'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v4_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	ist_test 4 aes-gcm-16 "12345678901234567890"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-gcm-128 and AESNI'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v6_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	atf_expect_fail "PR 201447"
 	ist_test 6 aes-gcm-16 "12345678901234567890"
 }

Modified: head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh
==============================================================================
--- head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh	Sun Dec  3 16:57:28 2017	(r326499)
+++ head/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh	Sun Dec  3 18:35:07 2017	(r326500)
@@ -7,12 +7,13 @@ v4_head()
 {
 	atf_set descr 'IPSec inet4 tunnel using aes-gcm-256 and AESNI'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v4_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	ist_test 4 aes-gcm-16 "123456789012345678901234567890123456"
 }
 
@@ -26,12 +27,13 @@ v6_head()
 {
 	atf_set descr 'IPSec inet6 tunnel using aes-gcm-256 and AESNI'
 	atf_set require.user root
-	# load AESNI module if not already
-	kldstat -q -n aesni || kldload aesni
 }
 
 v6_body()
 {
+	# load AESNI module if not already
+	kldstat -q -n aesni || kldload aesni
+
 	atf_expect_fail "PR 201447"
 	ist_test 6 aes-gcm-16 "123456789012345678901234567890123456"
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712031835.vB3IZ7K0004201>