-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor root package tests #329
Comments
chrisccoulson
added a commit
to chrisccoulson/secboot
that referenced
this issue
Jan 22, 2025
PR canonical#361 addressed the issue that most tpm2 tests were being performed with an empty role, which isn't realistic. It turns out that I missed a few places, particularly in some of the platform tests, that if I had fixed in the previous PR, would have noticed that the role parameter isn't being passed through the platform interface (this would get picked up when changing a password because key validate would fail). This addresses this, and fixes tests in the top-level package to catch it as well. Note that I'm using the same value in most tests - my normal approach to unit testing is to test each input with at least more than one value, but the tests in the top-level secboot package and the tpm2 sub-package are getting a bit complicated with a lot of inconsistencies in their approach to testing. I have issues canonical#329 and canonical#330 open to refactor the tests so they are structured in a more consistent way, like the tests for the recently added plainkey platform are.
chrisccoulson
added a commit
that referenced
this issue
Jan 27, 2025
Fix plumbing of the role via the PlatformKeyDataHandler interface. PR #361 addressed the issue that most tpm2 tests were being performed with an empty role, which isn't realistic. It turns out that I missed a few places, particularly in some of the platform tests, that if I had fixed in the previous PR, would have noticed that the role parameter isn't being passed through the platform interface (this would get picked up when changing a password because key validation would fail). This addresses this, and fixes tests in the top-level package to catch it as well. Note that I'm using the same value in most tests - my normal approach to unit testing is to test each input with at least more than one value, but the tests in the top-level secboot package and the tpm2 sub-package are getting a bit complicated with a lot of inconsistencies in their approach to testing. I have issues #329 and #330 open to refactor the tests so they are structured in a more consistent way, like the tests for the recently added plainkey platform are.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to refactor the testing to be more in line with one of the recently added packages, eg,
plainkey
:New*
functions, test the returned private values against statically compiled values.The text was updated successfully, but these errors were encountered: