https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14710/testReport/junit/sys.opencrypto/blake2_test/blake2b_vectors_x86/ /usr/src/tests/sys/opencrypto/blake2_test.c:108: alg 29 keylen 64, errno=45 (Operation not supported) https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14710/testReport/junit/sys.opencrypto/blake2_test/blake2s_vectors_x86/ /usr/src/tests/sys/opencrypto/blake2_test.c:108: alg 30 keylen 32, errno=45 (Operation not supported)
jhb, cem: are these two modules still relevant?
A commit references this bug: Author: lwhsu Date: Wed Apr 22 14:45:00 UTC 2020 New revision: 360198 URL: https://svnweb.freebsd.org/changeset/base/360198 Log: Temporarily skip sys.opencrypto.blake2_test.blake2{b,s}_vectors_x86 in CI PR: 245825 Sponsored by: The FreeBSD Foundation Changes: head/tests/sys/opencrypto/blake2_test.c
Oh, it just needs to use FLAG_SOFTWARE still instead of FLAG_HARDWARE as these are accelerated software rather than accelerated hardware. Alternatively, this should really be doing a lookup by name of "blake0" and using the returned 'crid' instead of the flag. That's probably the real solution actually as it's meant to test that specific backend and not, say, some hardware offload that supports blake in the future.
(In reply to John Baldwin from comment #3) Thanks for the analysis. I've tried with CRYPTO_FLAG_SOFTWARE but they failed with another message: blake2_test:blake2b_vectors_x86 -> failed: /usr/home/lwhsu/freebsd-src/tests/sys/opencrypto/blake2_test.c:108: alg 29 keylen 64, errno=22 (Invalid argument) blake2_test:blake2s_vectors_x86 -> failed: /usr/home/lwhsu/freebsd-src/tests/sys/opencrypto/blake2_test.c:108: alg 30 keylen 32, errno=22 (Invalid argument) Haven't tried the "real solution" yet.
I have a stab at what I think is the real fix at https://reviews.freebsd.org/D24540. It compiles, but I haven't run-tested it yet.
A commit references this bug: Author: jhb Date: Wed Apr 22 20:43:18 UTC 2020 New revision: 360203 URL: https://svnweb.freebsd.org/changeset/base/360203 Log: Update blake2 accelerated software tests to work after OCF refactoring. - Lookup device drivers to test by name instead of assuming that the software / hardware flags will select specific drivers. - Set the sysctl to permit software /dev/crypto requests when testing the accelerated software blake2 driver. PR: 245825 Reported by: lwhsu Reviewed by: cem, lwhsu Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24540 Changes: head/tests/sys/opencrypto/blake2_test.c