From 7d4923469910785e75320bf8941626762ca5f6eb Mon Sep 17 00:00:00 2001 From: jkim Date: Wed, 4 Nov 2020 22:41:54 +0000 Subject: [PATCH] Make the tests work without COMPAT_FREEBSD12 in kernel. sysctl 'kern.cryptodevallowsoft' was renamed to 'kern.crypto.allow_soft' in r359374 and the prevous one is only available in kernel built with "options COMPAT_FREEBSD12". --- tests/sys/opencrypto/blake2_test.c | 8 ++++---- tests/sys/opencrypto/poly1305_test.c | 2 +- tests/sys/opencrypto/runtests.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/sys/opencrypto/blake2_test.c b/tests/sys/opencrypto/blake2_test.c index 6809f450041..384b972f235 100644 --- a/tests/sys/opencrypto/blake2_test.c +++ b/tests/sys/opencrypto/blake2_test.c @@ -185,14 +185,14 @@ test_blake2s_vectors(const char *devname, const char *modname) ATF_TC_WITHOUT_HEAD(blake2b_vectors); ATF_TC_BODY(blake2b_vectors, tc) { - ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + ATF_REQUIRE_SYSCTL_INT("kern.crypto.allow_soft", 1); test_blake2b_vectors("cryptosoft0", "nexus/cryptosoft"); } ATF_TC_WITHOUT_HEAD(blake2s_vectors); ATF_TC_BODY(blake2s_vectors, tc) { - ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + ATF_REQUIRE_SYSCTL_INT("kern.crypto.allow_soft", 1); test_blake2s_vectors("cryptosoft0", "nexus/cryptosoft"); } @@ -200,14 +200,14 @@ ATF_TC_BODY(blake2s_vectors, tc) ATF_TC_WITHOUT_HEAD(blake2b_vectors_x86); ATF_TC_BODY(blake2b_vectors_x86, tc) { - ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + ATF_REQUIRE_SYSCTL_INT("kern.crypto.allow_soft", 1); test_blake2b_vectors("blaketwo0", "nexus/blake2"); } ATF_TC_WITHOUT_HEAD(blake2s_vectors_x86); ATF_TC_BODY(blake2s_vectors_x86, tc) { - ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + ATF_REQUIRE_SYSCTL_INT("kern.crypto.allow_soft", 1); test_blake2s_vectors("blaketwo0", "nexus/blake2"); } #endif diff --git a/tests/sys/opencrypto/poly1305_test.c b/tests/sys/opencrypto/poly1305_test.c index 32c103715cd..64a1f093426 100644 --- a/tests/sys/opencrypto/poly1305_test.c +++ b/tests/sys/opencrypto/poly1305_test.c @@ -390,7 +390,7 @@ test_rfc7539_poly1305_vectors(int crid, const char *modname) ATF_TC_WITHOUT_HEAD(poly1305_vectors); ATF_TC_BODY(poly1305_vectors, tc) { - ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + ATF_REQUIRE_SYSCTL_INT("kern.crypto.allow_soft", 1); test_rfc7539_poly1305_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft"); } diff --git a/tests/sys/opencrypto/runtests.sh b/tests/sys/opencrypto/runtests.sh index 0bd3e601175..e411142e51b 100644 --- a/tests/sys/opencrypto/runtests.sh +++ b/tests/sys/opencrypto/runtests.sh @@ -83,7 +83,7 @@ for required_module in $cpu_module cryptodev; do fi done -cdas_sysctl=kern.cryptodevallowsoft +cdas_sysctl=kern.crypto.allow_soft if ! oldcdas=$(sysctl -e $cdas_sysctl); then echo "1..0 # SKIP: could not resolve sysctl: $cdas_sysctl" exit 0 -- 2.45.0