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

[Framework] Move test_psa_*.py scripts to the framework #132

Merged
merged 75 commits into from
Feb 5, 2025

Conversation

valeriosetti
Copy link
Contributor

@valeriosetti valeriosetti commented Jan 29, 2025

gilles-peskine-arm and others added 30 commits January 8, 2025 16:51
Running `make library/foo`, `make programs/foo` or `make tests/foo` only
rebuilt the given target if it was not an existing file, because the
toplevel makefile does not know the file's dependencies and thus thought
that every such target had empty dependencies. Fix this by always invoking
make recursively.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Remove all code guarded by `PSA_WANT_ECC_SECP_K1_224`, which is not and will
not be implemented. (It would be K1_225 anyway, but we don't intend to
implement it anyway.)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Update TF-PSA-Crypto to have the latest framework with
Mbed-TLS#83 .

Update the framework to match.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
…es-never-supported-positive-dev

Switch generate_psa_test.py to automatic dependencies for positive test cases
The following files are moved to the framework repo (deleted here):

tests/scripts/check_names.py

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Move tests/scripts/check_names.py to the framework
The following files are moved to the framework repo (deleted here):

scripts/min_requirements.py

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This call into the "old" script that has been moved to the framework
repository. The *.requirements.txt files are kept on this repo though.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Move most of min_requirements.py to the framework
The following files are moved to the framework repo (deleted here):

tests/scripts/pkgconfig.sh

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
The script was moved to the framework sub-repo.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This dependency was never right in the first place.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit removes the check_test_dependencies from Mbed TLS as it has
been added to TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit updates TF-PSA-Crypto pointer to include the moved test in
Mbed TLS via TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit updates the framework pointer to include modified
collect_test_cases.py which can run independently for TF-PSA-Crypto.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
Remove deprecated function mbedtls_x509write_crt_set_serial()
@valeriosetti valeriosetti self-assigned this Jan 29, 2025
@valeriosetti valeriosetti 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 priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most) labels Jan 29, 2025
Affected files are:

- test_psa_compliance.py
- test_psa_constant_names.py

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
@valeriosetti valeriosetti force-pushed the issue94-framework branch 3 times, most recently from 0061c9d to 3399879 Compare January 30, 2025 09:23
Harry-Ramsey
Harry-Ramsey previously approved these changes Jan 31, 2025
Copy link
Contributor

@Harry-Ramsey Harry-Ramsey left a comment

Choose a reason for hiding this comment

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

LGTM

@ronald-cron-arm ronald-cron-arm removed the needs-reviewer This PR needs someone to pick it up for review label Jan 31, 2025
@ronald-cron-arm ronald-cron-arm self-requested a review January 31, 2025 13:42
Copy link
Contributor

@ronald-cron-arm ronald-cron-arm left a comment

Choose a reason for hiding this comment

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

This looks almost good to me but one pre-existing condition that I'd like to improve.

The script had small differences between the development branch and the
mbedtls-3.6 ones. The goal of this commit is to reconcile those
differences in order to make it usable from both branches. This is
necessary now that the scripts lives in the framework repo.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Copy link
Contributor

@ronald-cron-arm ronald-cron-arm left a comment

Choose a reason for hiding this comment

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

Just one comment in check-python-files.sh that would be nicer to update:

#     tests/scripts/test_psa_constant_names.py:34: error: Cannot find implementation or library stub for module named 'mbedtls_framework'

Update the path of the file now that it has been moved to the framework
repo.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Copy link
Contributor

@ronald-cron-arm ronald-cron-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

@ronald-cron-arm
Copy link
Contributor

Validated by the CI of Mbed-TLS/mbedtls#9940 (dev) and Mbed-TLS/mbedtls#9941 (3.6).

@ronald-cron-arm ronald-cron-arm merged commit 2000db4 into Mbed-TLS:main Feb 5, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Every commit must be reviewed by at least two team members, priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most)
Development

Successfully merging this pull request may close these issues.

8 participants