-
Notifications
You must be signed in to change notification settings - Fork 3k
Convert TZ target name 'NPSA' to test spec platform name #11487
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
Convert TZ target name 'NPSA' to test spec platform name #11487
Conversation
1. All TZ targets should have name pattern: PLATFORM_[PSA_/NPSA_]S/NS, where: (1) 'PLATFORM' for test spec platform name (2) 'PSA/NPSA' for PSA/non-PSA targets. Defaults to PSA target on absent. (3) 'S'/'NS' for secure/non-secure targets 2. Secure target may participate in Greentea, so its name is also truncated here.
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
tools/test_api.py
Outdated
@@ -2274,20 +2274,21 @@ def test_spec_from_test_builds(test_builds): | |||
for build in test_builds: | |||
# Convert TZ target name to test spec platform name | |||
# | |||
# 1. All TZ targets should have name pattern: PLATFORM_[PSA_]S/NS, where: | |||
# 1. All TZ targets should have name pattern: PLATFORM_[PSA_/NPSA_]S/NS, where: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccli8 Sorry for nitpicking. Having PSA
in the target name is not mandatory as it is the default. I'd write this as
- All TZ targets should have name pattern: PLATFORM_[NPSA_]S/NS, where:
(2) 'NPSA' for non-PSA targets. Defaults to PSA target if absent.
(3) 'S'/'NS' for secure/non-secure targets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccli8 Once updated, leave a comment, we restart CI
tools/test_api.py
Outdated
# (3) 'S'/'NS' for secure/non-secure targets | ||
# 2. Secure target may participate in Greentea, so its name is also truncated here. | ||
if Target.get_target(test_builds[build]['platform']).is_TrustZone_target: | ||
if test_builds[build]['platform'].endswith('_NS'): | ||
test_builds[build]['platform'] = test_builds[build]['platform'][:-3] | ||
elif test_builds[build]['platform'].endswith('_S'): | ||
test_builds[build]['platform'] = test_builds[build]['platform'][:-2] | ||
|
||
if test_builds[build]['platform'].endswith('_PSA'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesbeyond Since we do not have any PSA targets that ends with _PSA
can we remove this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove PSA check or keep it (no change)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly to remote, otherwise not blocking this PR. @ccli8 rather to check the above comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xc0170 @Devran01 @jamesbeyond Removed PSA check from test spec name conversion
This is unnecessary because all TZ targets must follow the naming rule: PLATFORM_[NPSA_]S/NS
Hi @ccli8, apologize for misleading messages earlier, that would caused some back and forth changes. I think mbed os teams really need to have some communication, so we can give consistent messages. @Devran01 I think we'll need to have a documentation some where about PSA target naming conversions . do you think it make sense to put it here From testing perspective, we just care about removing the suffix of the target, if |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@ccli8 Please add a release notes section to this PR covering any additional information that users may need to be aware of regarding these changes... |
@jamesbeyond Yes, we should update https://os.mbed.com/docs/mbed-os/v5.13/porting/porting-security.html |
@adbridge Added Release Notes. |
Description
This PR is continuation of #11467 and to convert TZ target name with suffix NPSA #11288 (comment) to test spec platform name. With this PR, TZ targets are named as follows:
Related PRs
Continuation of #11467
Required by #11288 (comment)
Pull request type
Reviewers
@Devran01
Release Notes
Define naming rule for TrustZone targets: 'PLATFORM'_['NPSA_']'S'/'NS', where: