Add outcome analysis to TF-PSA-Crypto #729
No reviewers
Labels
No labels
api-break
approved
bug
component-docs
component-platform
component-test
dependencies
deprecation
DO-NOT-MERGE
enhancement
good first issue
help wanted
needs-adoption
needs-backports
needs-ci
needs-design-approval
needs-info
needs-preceding-pr
needs-review
needs-reviewer
needs-work
priority-high
priority-low
priority-medium
priority-scheduled
priority-very-high
resolved-after-1.1
single-reviewer
size-l
size-m
size-optimisation
size-s
size-xs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Mbed-TLS/TF-PSA-Crypto!729
Loading…
Reference in a new issue
No description provided.
Delete branch "analyze_outcomes-add_to_crypto"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
analyze_outcomes.pyto TF-PSA-Crypto.all.sh. Tracked in https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/740.INTERNAL_TEST_CASES, which Mbed TLS's outcome analysis can ignore.Resolves https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/315. Contributes to https://github.com/Mbed-TLS/mbedtls/issues/10221, which the companion Mbed TLS PR will resolve.
PR checklist
@ -2,7 +2,13 @@# This file is only meant to be included by tests/Makefile in Mbed TLS andDo we need a copyright header?
@ -0,0 +1,282 @@#!/usr/bin/env python3Do we need a copyright header?
@ -0,0 +35,4 @@re.compile('.*XTS.*'),],'test_suite_config.psa_boolean': [re.compile('.* !.*'),Minor: I think these broad ignores overlap many other defined tests. Not sure if this is intentional or desired, however it could lead to maintenance issued in the future.
@ -0,0 +116,4 @@# Tests that are not covered for a tracked reason, and that# were also not covered by Mbed TLS testing as of Mbed TLS 4.1.0.UNCOVERED_TESTS = {I think the following could be stale entries:
Not sure if this is an issue, as the whole point it they are ignored. However might be worth cleaning them up if they are not required to aid future maintanence.
@ -0,0 +35,4 @@re.compile('.*XTS.*'),],'test_suite_config.psa_boolean': [re.compile('.* !.*'),This is broad by design: the goal of this PR is only to have the script run and pass. Any test case that isn't covered by
INTERNAL_TEST_CASEScould be inIGNORED_TESTShere: as long as a test case isn't in both lists, we know that it's run in at least one of the projects. So I made an overapproximation here, and there's a task https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/740 to gradually shrink this list.@ -0,0 +1,282 @@#!/usr/bin/env python3This is a copy of an existing script, so it's a preexisting issue, but our python scripts usually do have copyright headers so I'll add one if I do some other rework.
@ -2,7 +2,13 @@# This file is only meant to be included by tests/Makefile in Mbed TLS andOur makefiles historically didn't have copyright headers, so it's a preexisting issue and I'm not going to start adding copyright statements to all the makefiles.
@ -0,0 +116,4 @@# Tests that are not covered for a tracked reason, and that# were also not covered by Mbed TLS testing as of Mbed TLS 4.1.0.UNCOVERED_TESTS = {We know that these test cases aren't covered by Mbed TLS's
all.sh. It's likely that they aren't covered by TF-PSA-Crypto'sall.sheither, since that started out as equivalent to a subset of Mbed TLS'sall.sh. Even if some happen to be also ignored because they're the responsibility of Mbed TLS right now, we want to make them the responsibility of TF-PSA-Crypto, so they should stay.@ -0,0 +35,4 @@re.compile('.*XTS.*'),],'test_suite_config.psa_boolean': [re.compile('.* !.*'),Ok, sounds good if it's covered elsewhere I'll close this one.
@ -2,7 +2,13 @@# This file is only meant to be included by tests/Makefile in Mbed TLS andOK, sounds reasonable.
This looks almost good to me. Only some minor comments.
@ -0,0 +23,4 @@# Tests that may not be covered by TF-PSA-Crypto testing, but are# covered by Mbed TLS testing.# https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/740I've run the CI without IGNORED_TESTS (commit
ea8f3e43fe, see https://ci.trustedfirmware.org/view/Mbed-TLS/job/mbed-tls-restricted-pr-test-parametrized/125/) and I do not see any not executed tests fromtest_suite_ccm. Thus do we need that one?@ -0,0 +1,31 @@"""Information about TF-PSA-Crypto test cases that Mbed TLS can access."""@ -0,0 +23,4 @@# Tests that may not be covered by TF-PSA-Crypto testing, but are# covered by Mbed TLS testing.# https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/740Thanks for checking. IIRC I started from a run that didn't have the release mergeback, and I guess I accidentally kept that entry even though it's no longer required.
@ -0,0 +1,31 @@"""Information about TF-PSA-Crypto test cases that Mbed TLS can access."""That was deliberate: we're likely to start using
re.compilesoon, so this is a signpost suggesting that it's ok to do so.Or maybe I should leave it uncommented, and shut pylint up about a useless import?
@ -0,0 +1,31 @@"""Information about TF-PSA-Crypto test cases that Mbed TLS can access."""sounds good to me, maybe with a comment
The framework has been updated in another PR. So I'm going to rebase on top of
development, with no framework update here.