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
F102792701: D32895.diff
Sun, Nov 17, 6:41 AM
Unknown Object (File)
Sep 28 2024, 4:31 AM
Unknown Object (File)
Sep 23 2024, 11:20 PM
Unknown Object (File)
Sep 23 2024, 8:00 PM
Unknown Object (File)
Sep 23 2024, 6:17 AM
Unknown Object (File)
Sep 22 2024, 3:21 PM
Unknown Object (File)
Sep 18 2024, 6:42 PM
Unknown Object (File)
Sep 18 2024, 2:52 PM
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.