Fix useless calls in PSA crypto metadata tests #378
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!378
Loading…
Reference in a new issue
No description provided.
Delete branch "psa_crypto_metadata-test_parity"
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?
In ecc_key_family test, the parity of the elliptic curve identifier
was computed but not tested to be even.
In dh_key_family test, the parity of the PSA Diffie-Hellman group
identifier was computed but not tested to be even.
Signed-off-by: Ronald Cron ronald.cron@arm.com
Given the small size of the patch and the fact that the commit needs to be split anyway, please force-push a new history.
@ -56,8 +56,13 @@#define TEST_CLASSIFICATION_MACRO( flag, alg, flags ) \Please comment the why in preference to the what. The job of this function is to test whether the parity is whichever parity is expected for numerical values. The fact that it's even parity is a detail.
See the discussion in https://github.com/ARMmbed/mbed-crypto/pull/330#discussion_r360305364 . This discussion also highlights that “even parity” is not such good documentation: Jaeden calls it “odd parity”!
My bad for not documenting why we're checking the parity of some values. Here's some proposed documentation.
Please don't combine unrelated things into the same commit. Here you have a commit that does four things: adding documentation, renaming a function, changing the return value, and adding the missing
TEST_ASSERTcalls. Adding documentation could go with changing the return value but the other three should be separate.@ -56,8 +56,13 @@#define TEST_CLASSIFICATION_MACRO( flag, alg, flags ) \I've changed the function documentation taking into account your proposal. Please have a look to the new version.
@ -56,8 +56,13 @@#define TEST_CLASSIFICATION_MACRO( flag, alg, flags ) \I don't rename the function and don't change the return value anymore. Two commits now: the first one fix/improve the documentation of the test_parity() function. The second one fixes the useless calls.
LGTM
Everything passed in the CI except for mbed-os and iar tests which are known issues.