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

Backport 3.6: Test cases not executed: switch to enforcement mode #9680

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Oct 10, 2024

Switch the test coverage analysis in analyze_outcomes.py to enforcement mode. In other words, the CI will now complain if there is a test case that is not executed in any configuration. Legitimate exceptions can be recorded in the script.

This is a backport of #9593. Most commits are cherry-picked, but there are a few differences due to how development has already diverged from 3.6.

PR checklist

This clears more than half of the test cases that are not executed.
This also captures a few negative test cases that are executed.
Subsequent commits will refine the filtering.

Signed-off-by: Gilles Peskine <[email protected]>
… tests

Some negative tests involving unsupported mechanisms are executed, because
they're testing what happens if the mechanism is unsupported. Refine the
ignore list for `test_suite_psa_crypto_generate_key.generated` and
`test_suite_psa_crypto_op_fail.generated` accordingly.

Signed-off-by: Gilles Peskine <[email protected]>
…aised

Ignore certain test cases which either should not be generated or should be
executed. For each ignore list entry, link to a GitHub issue whose
definition of done includes removing the entry.

Signed-off-by: Gilles Peskine <[email protected]>
Our PSA crypto implementation does not and will not support SECP224K1.

Signed-off-by: Gilles Peskine <[email protected]>
For each ignore list entry, link to a GitHub issue for its resolution,
except for ssl-opt Valgrind tests which we never intend to run on the CI.

Signed-off-by: Gilles Peskine <[email protected]>
For each ignore list entry, link to a GitHub issue for its resolution.

Signed-off-by: Gilles Peskine <[email protected]>
For each ignore list entry, link to a GitHub issue for its resolution,
except for a few configurations which there is a good reason to leave
uncovered.

Signed-off-by: Gilles Peskine <[email protected]>
MBEDTLS_ECP_NO_FALLBACK is only relevant when an ALT implementation of ECP
is used. We don't test ALT implementations so we don't test
MBEDTLS_ECP_NO_FALLBACK either.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added needs-ci Needs to pass CI tests size-s Estimated task size: small (~2d) component-test Test framework and CI scripts priority-high High priority - will be reviewed soon labels Oct 10, 2024
@gilles-peskine-arm gilles-peskine-arm force-pushed the test-cases-not-executed-enforce-3.6 branch from 71341c6 to 8f88645 Compare October 10, 2024 19:39
In 3.6, compared with the state of development that this work was based on,
we're doing more testing with TLS12_PRF and TLS12_PSK_TO_MS disabled, thanks
to some configurations with MBEDTLS_PSA_CRYPTO_CONFIG disabled.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review and removed needs-ci Needs to pass CI tests labels Oct 11, 2024
Signed-off-by: Gilles Peskine <[email protected]>
yanesca
yanesca previously approved these changes Oct 11, 2024
Copy link
Contributor

@yanesca yanesca left a comment

Choose a reason for hiding this comment

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

The new commits look good to me and the rest is faithful backport of the original.

@paul-elliott-arm paul-elliott-arm self-requested a review October 16, 2024 16:17
Copy link
Member

@paul-elliott-arm paul-elliott-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

@gilles-peskine-arm gilles-peskine-arm added approved Design and code approved - may be waiting for CI or backports needs-preceding-pr Requires another PR to be merged first and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Oct 16, 2024
Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, and removed approved Design and code approved - may be waiting for CI or backports needs-preceding-pr Requires another PR to be merged first labels Oct 16, 2024
yanesca
yanesca previously approved these changes Oct 17, 2024
Copy link
Contributor

@yanesca yanesca left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@paul-elliott-arm paul-elliott-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

…ed-enforce-3.6

Conflicts:
* framework: update to the head of 'main'.
Copy link
Contributor

@yanesca yanesca left a comment

Choose a reason for hiding this comment

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

Did the merge locally and arrived at the same result.

Copy link
Member

@paul-elliott-arm paul-elliott-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

@paul-elliott-arm paul-elliott-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 Oct 18, 2024
@gilles-peskine-arm gilles-peskine-arm added this pull request to the merge queue Oct 18, 2024
Merged via the queue into Mbed-TLS:mbedtls-3.6 with commit 043f6dc Oct 18, 2024
4 of 5 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 component-test Test framework and CI scripts 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