PSA tests: use a few common test macros #2
No reviewers
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto!2
Loading…
Reference in a new issue
No description provided.
Delete branch "psa-test_macros"
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?
Declare a few macros in
helpers.functionand use them in the PSA tests. I haven't touched non-PSA tests.TEST_EQUAL(slightly more readable thanTEST_ASSERT(a==b), but the real payoff will come later when we instrument it to print the values on failure)PSA_ASSERT(TEST_ASSERT(…==PSA_SUCCESS))ARRAY_LENGTH(with protection against usage on a pointer when compiling with GCC)MIN,MAXThere's some refactoring going on, so I recommend reviewing commit by commit.
Style: begin continued comment lines with a
*.Where is
IS_ARRAY_NOT_POINTERdefined for non GNUC platforms? ShouldSTATIC_ASSERT_EXPR_IF_POSSIBLEinstead beIS_ARRAY_NOT_POINTER? Where isSTATIC_ASSERT_EXPR_IF_POSSIBLEused?Leftover from a slightly different design that I abandoned without committing. I have amended the corresponding commit.
Fixed in the amended commit.
I've amended the commit "Add a safety check to ARRAY_LENGTH" to address the issues that @Patater pointed out. Previous history at https://github.com/gilles-peskine-arm/mbed-crypto/tree/psa-test_macros-1
LGTM
CI failure is test_suite_timing on FreeBSD, a known issue.
Release job: https://jenkins-internal.mbed.com/job/mbedtls-psa-release-new/201/ → PASS
Other half of the release job: https://jenkins-internal.mbed.com/job/mbedtls-psa-release-new/202/
Basic build and test passed. Mbed OS testing went badly because the test is broke: not this PR's fault.
re-checked after rebase - still look fine.
The test failure is the FreeBSD timing test, a known issue.