-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Test framework investigation #8223
Comments
I don't understand how you've come to this particular list of files. I'd expect most of |
Roughly that's the list of test files that to me are used in both crypto and TLS testing. Otherwise even though I mentioned 3.6 I did not realize the impact of that: version-agnostic test framework. Could you elaborate what you have in mind when you say "I'd expect most of More generally has this idea of version-agnostic test framework been discussed, documented somewhere? |
Oops, I forgot to write the end of that clause: most of In particular, I'd expect all the test and maintainer scripts to move (for some of them, with a data file getting separated out), as well as all of
I think we've only discussed it orally (and most of the discussion probably happened between the two of us). A lot of the planning is going to be on a file-by-file basis, so if we want to plan the time, we need time to do some analysis, and I believe we'll finally have time next quarter. Although I think the most effective way, in terms of total time spent, would be to not do a detailed analysis and instead directly do the work, file by file, moving things to different directories until we have a directory with version-agnostic files. |
I am quite skeptical about some files in |
I expect the test helper code to have some ifdefs on internal macros in addition to public macros. (It already does!) Sometimes if we change an internal interface we might want to create an internal macro just for the sake of the test code. That's the cost of having separate repositories, and it's not a very high cost. Certainly a lower cost than maintaining a lot of quasi-duplicate code that we spend a lot of effort re-synchronizing, which we're doing now between development and the LTS branches. |
We have a design document for the framework directory now, we know which file we want to move to it and we have estimated the time needed. This investigation issue can be closed now. |
WORK IN PROGRESS
Goal: Move into a repo different from Mbed-TLS and TF-PSA-Crypto, the test/infrastructure code common to Mbed TLS and TF-PSA-Crypto, so called the test framework to avoid file duplication. The test framework code is not tight to a particular version of
Mbed TLS or TF-PSA-Crypto and should thus work across all supported branches of the two repos.
Files from the
scripts
directory:Proposal: The test framework is made of:
tests/scripts/all.sh (not the components), analyze_outcomes.py, generate_test_code.py, test_generate_test_code.py
tests/suites/helpers.function, main_test.function, host_test.function
tests/include/test/arguments.h, helpers.h, macros.h, random.h, psa_crypto_helpers.h(?, partly ?)
tests/src/helpers.c, random.c, psa_crypto_helpers.c(?, partly?)
The test framework code aimed to be integrated into 3.6, 4.x and TF-PSA-Crypto which have different configuration options thus as a first approximation the test framework code should be independent of configuration options (this is not the case for some of it currently).
Some PSA crypto test helpers are of value to TLS test code like mbedtls_test_fail_if_psa_leaking() and associated macros.
What is the development flow for the test framework code?
Local development in Mbed TLS and/or TF-PSA-Crypto to be able to test it locally, then pull request against the development branch of the test framework repo where the code review happens + push of the local work on Mbed TLS and/or TF-PSA-Crypto for the benefit of code reviewers. The pull request is tested by the CI against the head of the Mbed TLS and TF-PSA-Crypto supported branches. Once the PR is merged in the test framework repo, update Mbed TLS and TF-PSA-Crypto supported branches accordingly: should be automated.
Heavy development flow, we probably do not want to execute it too often.
Profile of eligible files:
About infrastructure/test file that depends on version dependent code in the test framework:
The text was updated successfully, but these errors were encountered: