Skip to content

Conversation

@gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Dec 4, 2025

Fix #244

Needs preceding PR: Mbed-TLS/mbedtls#10530 to fix a problem that this was reporting, but only as some lines in the log, not with a failure status. Note that the CI passes regardless, because on the CI in mbedtls-framework, we set both copies of the framework to the head of the pull request, and this PR only causes a CI failure at the moment because mbedtls/tf-psa-crypto/framework is outdated compared to mbedtls/framework. If we merge this PR before the mbedtls PR, it may cause breakage if we then update the framework in TF-PSA-Crypto but not in Mbed TLS.

PR checklist

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Help make review efficient:

  • Multiple simple commits
    • please structure your PR into a series of small commits, each of which does one thing
  • Avoid force-push
    • please do not force-push to update your PR - just add new commit(s)
  • See our Guidelines for Contributors for more details about the review process.

@gilles-peskine-arm gilles-peskine-arm added the bug Something isn't working label Dec 4, 2025
@gilles-peskine-arm gilles-peskine-arm added needs-preceding-pr Requires another PR to be merged first priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most) labels Dec 4, 2025
@gilles-peskine-arm gilles-peskine-arm force-pushed the make_generated_files-fix-check branch from d11a4cb to 043ef98 Compare December 4, 2025 15:17
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, thanks for the fix.

@ronald-cron-arm
Copy link
Contributor

It seems the PR needs to be rebased though.

mypy only checks types in functions that have a return type annotation.

In `check_generated_files`, change from returning `None` to returning a
boolean, since the function is supposed to check some boolean-valued
assertion. So far, the function always returns `True`.

In `main`, explicitly return an `int` value as expected by the caller. When
calling `check_generated_files`, convert the boolean result into an exit
status.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Return a nonzero status if called with `--check` and the check finds some
problems.

Fixes Mbed-TLS#244.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-preceding-pr Requires another PR to be merged first priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most)

Projects

Development

Successfully merging this pull request may close these issues.

make_generated_files.py --check doesn't return a failure status

2 participants