Skip to content

Check union initialization in test drivers #168

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

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented May 15, 2025

Improved testing for Mbed-TLS/mbedtls#9814 and Mbed-TLS/mbedtls#9975:

Needs preceding PR: this must not be merged until the bug fix in Mbed-TLS/mbedtls#10168 and Mbed-TLS/TF-PSA-Crypto#295 is merged, since this adds new validation in auxiliary functions that the unit tests already call.

PR checklist

In every existing test driver entry point that is the setup for a multipart
operation, check that the driver operation structure is all-bits-zero on
entry, as guaranteed by the driver specification.

There is a risk that this isn't the case, mostly, on platforms where
initializing a union to `{0}` initializes only the default member and not
all members.

Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Copy link
Contributor

@mpg mpg 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

@gabor-mezei-arm gabor-mezei-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

@github-project-automation github-project-automation bot moved this from In Development to Has Approval in Roadmap pull requests (new board) May 21, 2025
@gabor-mezei-arm gabor-mezei-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, labels May 21, 2025
@mpg mpg merged commit 115d9af into Mbed-TLS:main May 21, 2025
2 of 3 checks passed
@github-project-automation github-project-automation bot moved this from Has Approval to Done in Roadmap pull requests (new board) May 21, 2025
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 priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Development

Successfully merging this pull request may close these issues.

3 participants