-
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
Add PSA interruptible key generation get num ops API #9665
Add PSA interruptible key generation get num ops API #9665
Conversation
6c807b7
to
7e7eda9
Compare
7e7eda9
to
05cb194
Compare
bd0df25
to
fafae23
Compare
fafae23
to
d4276fb
Compare
Signed-off-by: Waleed Elmelegy <[email protected]>
Signed-off-by: Waleed Elmelegy <[email protected]>
Signed-off-by: Waleed Elmelegy <[email protected]>
d4276fb
to
f7ebd73
Compare
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.
Looks mostly good to me, but there's a design decision that I 100% agree with, but that isn't documented, and I'd like it to be documented.
if (status == PSA_SUCCESS || status == PSA_OPERATION_INCOMPLETE) { | ||
num_ops = psa_generate_key_iop_get_num_ops(&operation); | ||
|
||
TEST_ASSERT(num_ops > num_ops_prior); |
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.
Minor: we have TEST_LE_U
which is similar to TEST_EQUAL
, but for <=
, the advantage being that it displays the values on failure.
TEST_ASSERT(num_ops > num_ops_prior); | |
TEST_LE_U(num_ops_prior + 1, num_ops); |
We could define TEST_GT_U
and variants for better readability.
Signed-off-by: Waleed Elmelegy <[email protected]>
Signed-off-by: Waleed Elmelegy <[email protected]>
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.
Thanks for the updates, LGTM
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.
LGTM
Description
fixes #9106
fixes #9644
Add PSA interruptible key generation get num ops API
PR checklist
Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.