redpanda-data / redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!
https://redpanda.com
9.69k stars 591 forks source link

crypto: Bazelize some tests #24219

Open oleiman opened 4 days ago

oleiman commented 4 days ago

This PR bazelizes some crypto tests.

In support of that, I've also added a custom rule to copy generated files out of a target into the working directory of a dependent package. This is relevant for OSSL tests in particular, since we need to generate an openssl cnf file (from a template) and push information about module and config file location down into the tests through environment variables. This is a bit tricky for openssl because it's build by a foreign_cc rule.

CORE-7476 CORE-7479 CORE-7478

Backports Required

Release Notes

oleiman commented 4 days ago

force push linter

oleiman commented 4 days ago

force push couple more tests

oleiman commented 4 days ago

force push left header out of the second commit

oleiman commented 3 days ago

force push use select_file for fips module shared object

vbotbuildovich commented 3 days ago

ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/58428#01934d72-ef2f-4a4a-a81b-8a17b5416142

IoannisRP commented 3 days ago

In cmake we also have the Redpanda_BUILD_COMPLIANCE option. Which make is skip some tests when it is turned off. https://github.com/redpanda-data/redpanda/blob/a91f6cb8e97abd9cb088d1433be5912d266f14a2/src/v/crypto/tests/CMakeLists.txt#L18-L20

Is there something similar in the bazel build? or can we safely ignore it?

rockwotj commented 3 days ago

IIRC that's because the public cmake build didn't support fips (only vtools). But Bazel will support the fips build so we can ignore

IoannisRP commented 3 days ago

But Bazel will support the fips build so we can ignore

cmake has FIPS_MODULE_REQUIRED defined turned on by default. We should probably define it as well. Without it, some tests are skipped if the fips setup is not correct. Preferably, with a comment to delete everything around it when cmake gets deprecated?

oleiman commented 3 days ago

force push contents:

oleiman commented 3 days ago

force push bazel linter

oleiman commented 2 days ago

force push rebase dev to get defines attribute for test rules, and use them (instead of local_defines)