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".
This commit is contained in:
Jung-uk Kim 2020-11-04 22:41:54 +00:00
parent 2ceb17a8be
commit 8f02e2ac27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367351
3 changed files with 6 additions and 6 deletions

View file

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

View file

@ -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");
}

View file

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