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

Move some test data generation to main CMakeLists.txt (/ fix fuzzing build failures) #9122

Conversation

davidhorstmann-arm
Copy link
Contributor

@davidhorstmann-arm davidhorstmann-arm commented May 10, 2024

Fixes a fuzzing build failure.

Move test data file generation to the main CMakeLists.txt and perform it whenever either ENABLE_TESTING or ENABLE_PROGRAMS is on.

PR checklist

Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")

Move the generation of tests/src/test_certs.h and tests/src/test_keys.h
to the main CMakeLists.txt. This is required because these files are
needed both by tests and programs, whereas tests/CMakeLists.txt is only
included when ENABLE_TESTING is on.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
@davidhorstmann-arm davidhorstmann-arm changed the title Fix incorrect CMake dependency addition (/ fuzzing build failures) Move some test data generation to main CMakeLists.txt (/ fix fuzzing build failures) May 10, 2024
Check that we can build under CMake with ENABLE_TESTING=OFF but
ENABLE_PROGRAMS=ON.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
@davidhorstmann-arm davidhorstmann-arm added needs-review Every commit must be reviewed by at least two team members, needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review and removed needs-work labels May 10, 2024
@tom-daubney-arm tom-daubney-arm self-requested a review May 10, 2024 14:18
@tom-daubney-arm tom-daubney-arm removed the needs-reviewer This PR needs someone to pick it up for review label May 10, 2024
We are testing that we don't break OSS-Fuzz, primarily.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

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

LGTM - thanks

Copy link
Contributor

@tom-daubney-arm tom-daubney-arm left a comment

Choose a reason for hiding this comment

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

LGTM - the note helps :)

@tom-daubney-arm tom-daubney-arm added bug approved Design and code approved - may be waiting for CI or backports labels May 10, 2024
@davidhorstmann-arm
Copy link
Contributor Author

Question: Does this need a ChangeLog? It is somewhat user-facing, so I suppose it probably does?

@tom-daubney-arm
Copy link
Contributor

Question: Does this need a ChangeLog? It is somewhat user-facing, so I suppose it probably does?

Oopsie. I would say so yeah. It is a bug fix right?

@davidhorstmann-arm
Copy link
Contributor Author

It is a bug fix right?

Yep that's right! I'll add a ChangeLog

@davidhorstmann-arm
Copy link
Contributor Author

Oh hang on, it was never released! So we don't need a ChangeLog after all :)

@tom-daubney-arm
Copy link
Contributor

Oh hang on, it was never released! So we don't need a ChangeLog after all :)

Huzzah!

@tom-cosgrove-arm tom-cosgrove-arm added needs-backports Backports are missing or are pending review and approval. and removed needs-review Every commit must be reviewed by at least two team members, labels May 10, 2024
@tom-cosgrove-arm
Copy link
Contributor

Marking needs-backports so it's not forgotten at merge time :)

@gilles-peskine-arm gilles-peskine-arm added this pull request to the merge queue May 12, 2024
Merged via the queue into Mbed-TLS:development with commit 2cdc8f7 May 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports bug needs-backports Backports are missing or are pending review and approval. needs-ci Needs to pass CI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants