Page MenuHomeFreeBSD

tests: do not build ktls_test if WITHOUT_OPENSSL
ClosedPublic

Authored by emaste on Nov 8 2021, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 7 2024, 1:08 AM
Unknown Object (File)
Dec 21 2023, 9:58 AM
Unknown Object (File)
Dec 20 2023, 2:40 AM
Unknown Object (File)
Oct 4 2023, 11:35 PM
Unknown Object (File)
Jun 6 2023, 1:26 AM
Unknown Object (File)
May 21 2023, 8:33 PM
Unknown Object (File)
Mar 22 2023, 6:16 PM
Unknown Object (File)
Mar 5 2023, 7:53 AM
Subscribers

Details

Summary

ktls_test requires openssl to build, and fails if it is not available.
I used MK_OPENSSL in the condition because the test still has some value
even if the system is built without KTLS (i.e., it can be used to verify
that the KTLS build option works correctly).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Nov 8 2021, 5:13 PM
emaste created this revision.
jhb added inline comments.
tests/sys/kern/Makefile
17

It actually uses libcrypto, not libssl, so I wonder if this should be MK_CRYPTO instead? Ah, we don't have a MK_CRYPTO, just a MK_CRYPT which turns off various things.

This revision is now accepted and ready to land.Nov 9 2021, 5:47 PM

Note that this test does not depend on WITH_OPENSSL_KTLS. It doesn't use that part of OpenSSL, it only uses crypto code from libcrypto. So you might want to adjust your commit log a bit?

Note that this test does not depend on WITH_OPENSSL_KTLS. It doesn't use that part of OpenSSL, it only uses crypto code from libcrypto.

Yeah. In the commit message I wanted to convey that the "natural" knob would be MK_OPENSSL_KTLS, but there's some value in building it with or without KTLS support, as long as the prerequisites are available.

So maybe just:

ktls_test requires libcrypto to build, and fails if it is not available (which is the case when building WITHOUT_OPENSSL).

Yes. It was the last sentence about the KTLS build option that I think was confusing as it doesn't really test if the KTLS build option works (e.g. the tests don't fail if you build WITHOUT_OPENSSL_KTLS=yes).

brnrd added inline comments.
tests/sys/kern/Makefile
17

@emaste Should this not be

.if ${MK_OPENSSL_KTLS} != "no"

?

Scrap that. Test tests for ktls in the code.