Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add Docker-based compatibility tests, add tests to make quickcheck #562

Merged
merged 18 commits into from
Dec 22, 2024

Conversation

hanno-becker
Copy link
Contributor

@hanno-becker hanno-becker commented Dec 21, 2024

This PR adds Docker-based compatibility tests for various Ubuntu-20, Ubuntu-22, Debian, and Amazon Linux docker images; so far, AArch64 only.

A number of changes had to be made, esp. to the test scripts; see commits, paving the way for the removal of tests.

@hanno-becker hanno-becker requested a review from a team as a code owner December 21, 2024 07:12
@hanno-becker hanno-becker changed the title Compatibility tests CI: Add Ubuntu-20 and Ubuntu-22 compatibility tests Dec 21, 2024
@hanno-becker hanno-becker force-pushed the compatibility_tests branch 3 times, most recently from 450171a to 0f00d5e Compare December 21, 2024 07:22
@hanno-becker hanno-becker changed the title CI: Add Ubuntu-20 and Ubuntu-22 compatibility tests CI: Add Docker-based compatibility tests Dec 21, 2024
@hanno-becker hanno-becker force-pushed the compatibility_tests branch 15 times, most recently from a5d40bf to 2ae4cbb Compare December 21, 2024 15:02
@hanno-becker hanno-becker force-pushed the compatibility_tests branch 6 times, most recently from 2673d61 to b49ea96 Compare December 21, 2024 19:57
@hanno-becker hanno-becker changed the title CI: Add Docker-based compatibility tests CI: Add Docker-based compatibility tests, add tests to make quickcheck Dec 22, 2024
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hanno-becker - very nice step towards better compatibility. We should really eliminate the tests script in the near future.

I don't think it's a good idea to remove -O3 from the default flags as someone may benchmark mlkem-native with default flags and draw wrong conclusions about performance. I instead changed it to explicitlity setting -O0 for some of the CI jobs.
You may want to add that to more jobs.

Rest looks very good to me if the goal is to eliminatethe test script soon, but then we should really finish it soon.

@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Dec 22, 2024
@mkannwischer mkannwischer mentioned this pull request Dec 22, 2024
@mkannwischer mkannwischer added benchmark this PR should be benchmarked in CI and removed benchmark this PR should be benchmarked in CI labels Dec 22, 2024
@mkannwischer mkannwischer force-pushed the compatibility_tests branch 9 times, most recently from 8d9d43e to 27526c5 Compare December 22, 2024 09:09
hanno-becker and others added 8 commits December 22, 2024 17:17
O3 slows down CI runs, and is not needed except when we benchmark
for performance.
This commit explicitly sets -O0 for the compatibility and
compiler tests to speed-up CI.
This also adds an additional variable to pass to the Makefile
called EXTRAFLAGS which can be used to overwrite default flags.
Those will be appended to the CFLAGS after the default flags.
Otherwise, the default optimization flags overwrite the
custom flags.

Signed-off-by: Hanno Becker <[email protected]>
Signed-off-by: Matthias J. Kannwischer <[email protected]>
The test script processes the output of test runs with two functions:
An `actual_proc` and an `expect_proc`. The `actual_proc` is mostly
preprocessing, while the `expect_proc` checks against an expected value.

The does not seem to be a reason for this split. This commit conatenates
`actual_proc` and `expect_proc` into a single output-checking function
`check_proc`.

Signed-off-by: Hanno Becker <[email protected]>
This commit adds a basic script META.sh to query the META.json.
If jq is present, it's used for the query. Otherwise, some basic
fiddling with cat, grep, cut, and tr is used.

This is used to conduct a bash-based KAT test in `make quickcheck`,
rather then running the test scripts, which already require a Python
setup.

Signed-off-by: Hanno Becker <[email protected]>
This enables double-checking in the CI logs whether the desired
tests were run.

Signed-off-by: Hanno Becker <[email protected]>
This will run slightly slower, but hopefully more stable as it
is less likely exceeds the maximum request rate for EC2.

Signed-off-by: Hanno Becker <[email protected]>
The ACVP client was originally introduced as a standalone script
but later added to `tests`, imposing the test infrastructure's
dependencies.

This commit re-introduces the original standalone script and adds
it to `make quickcheck`. The ACVP test within the test scripts
remains for now, but should likely be reconciled.

Signed-off-by: Hanno Becker <[email protected]>
CPPFLAGS was misnamed.
This commit uses EXTRAFLAGS instead.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
@hanno-becker hanno-becker merged commit beab196 into main Dec 22, 2024
104 checks passed
@hanno-becker hanno-becker deleted the compatibility_tests branch December 22, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark this PR should be benchmarked in CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make test scripts usable in older versions of Python
3 participants