-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backport 2.28: Start testing the PSA built-in drivers: hashes #8222
Backport 2.28: Start testing the PSA built-in drivers: hashes #8222
Conversation
A couple of questions:
|
That's fine. The signoff line isn't the author line, it's a claim that we have the rights to contribute the code. Between arm employees, we don't really care who signs off: we're all signing off as agents of our employer.
In 2.28, all generated files are checked into git (because we don't require users to have the necessary tools). When you do something that affects a generated source file, you need to run |
74a08ac
to
890ca87
Compare
Perfect, thanks for the information @gilles-peskine-arm ! I've just updated the files accordingly |
Looks like I merged #7803 without waiting for its backport, which is this pull request. That's not ideal, but it's not a big deal either since this is just tests. The original pull request was motivated by improved driver support, which doesn't exist in 2.28: we wanted extra tests to make sure the driver interface supports drivers well. The reason to backport is mostly to facilitate the backports of future tests. Since this is just tests and not bug fixes, it doesn't matter if we make a release with #7803 but not its backport. |
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.
The code move wasn't backported correctly.
@@ -0,0 +1,162 @@ | |||
"""Collect information about PSA cryptographic mechanisms. |
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.
The commit "Move PSA information and dependency automation into their own module" should be doing the following:
- Create
psa_information.py
and write some stuff at the top (docstring, copyright notice, imports). - Move blocks of code from
generate_psa_tests.py
topsa_information.py
. - In
generate_psa_tests.py
, addpsa_information.
when referencing functions that have moved to the new module. - (not in 2.28) update dependencies in makefiles.
b4b5402 is not doing this correctly: it's adding code from development
. This commit needs to be reconstructed rather than cherry-picked.
This has consequences, some benign, some not. One bad consequence is that PSA_WANT_KEY_TYPE_xxx_KEY_PAIR
dependencies have moved to their 3.5 names, which is wrong because those names don't exist in 2.28. This causes some test cases to be never executed.
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.
I think I now managed to do the backport properly, sorry for the confusion
890ca87
to
5f6057b
Compare
This will let us use these features from other modules (yet to be created). Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
Some basic test coverage for now: * Nominal operation. * Larger output buffer. * Clone an operation and use it after the original operation stops. Generate test data automatically. For the time being, only do that for hashes that Python supports natively. Supporting all algorithms is future work. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
Do explain why we don't test a smaller buffer in addition to testing the nominal size and a larger buffer. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
5f6057b
to
9043a2f
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.
LGTM
if not all((dep.lstrip('!') in _implemented_dependencies or | ||
not dep.lstrip('!').startswith('PSA_WANT')) |
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.
734d22c changed these two lines from
if not all((dep.lstrip('!') in _implemented_dependencies or 'PSA_WANT' not in dep)
The new code is better, so that's ok. It would have been better to do this in a separate commit, but never mind now.
This PR looks good code-wise but I think it should be be updated to the newer licence headers. |
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
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
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
Backport of #7803
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")
Notes for the submitter
Please refer to the contributing guidelines, especially the
checklist for PR contributors.