Mbed-TLS / mbedtls

An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
https://www.trustedfirmware.org/projects/mbed-tls/
Other
5.24k stars 2.56k forks source link

[PSA Client Testing] Refactored code wrapping code #9224

Closed minosgalanakis closed 2 months ago

minosgalanakis commented 3 months ago

Description

This pr introduces a PSAWrapperclass which abstracts the generic code-wrapper code and makes PSATestWrapper inherit from it.

It also migrates all the relevant code in its own sub-package since there will be many more relevant modules planned for dynamic c code generation.

Resolves #8961 Depends on https://github.com/Mbed-TLS/mbedtls-framework/pull/25.

PR checklist

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

Notes for the submitter

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

Help make review efficient:

gilles-peskine-arm commented 3 months ago

I can review this but please resolve the conflicts first.

minosgalanakis commented 3 months ago

Related framework PR #25

gilles-peskine-arm commented 2 months ago

Since there is now a new subdirectory under scripts/mbedtls_framework, we need to make tests/scripts/check-python-files.sh look at it when invoking Pylint.

bump

gilles-peskine-arm commented 2 months ago

As of https://github.com/Mbed-TLS/mbedtls/commit/3b40ce358fbf90862cd011a14907b29b3fdce2d0 there is still a conflict in the framework, and the CI is failing. Please rebase and fix the content of the framework to pass the CI.

gilles-peskine-arm commented 2 months ago

We'll need a 3.6 backport to update the generated files.

gilles-peskine-arm commented 2 months ago

The CI is failing in make generated_files and this seems unrelated to this PR. It looks like something changed in the framework. Can you please try rebasing on top of the latest development and see if things work?

minosgalanakis commented 2 months ago

This pr is no longer required as the framework pointer has been updated as of #9394

gilles-peskine-arm commented 1 month ago

This pull request was still required because it was supposed to extend check-python-files.sh to cover the files in the code_wrapper subdirectory. Now pylint is complaining quite a bit about those files. I'll take care of it, I've already fixed most of the problems in my working copy.