-
Notifications
You must be signed in to change notification settings - Fork 299
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
Test import_mok_state() when MokListRT would be bigger than available size #417
Conversation
Should the tests maybe have more descriptive names than 0 and 1? And/Or comments would be nice, so you won't need to dig through commits later to find out what the test tests. |
Yeah, that's a big part of why this is still a draft. |
3dc8189
to
a439ec2
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.
This needs rebased on main - I'm not sure where github is getting "no conflicts" from.
37de20a
to
af376e5
Compare
When SetVariable() is called, currently the test for being out of space is correct, but the accounting is backwards - success adds more space available. This fixes the accounting and (with SHIM_DEBUG) logs the variable size. Signed-off-by: Peter Jones <[email protected]>
This splits up the API for setting default usage limits, adding a test API function to set alternate usage limits. Signed-off-by: Peter Jones <[email protected]>
This makes a generic test_mok_mirror() which can validate the result of (hopefully) any run of any result of import_mok_state(), and changes test_mok_mirror_0() to use it, and also documents what's being tested and the results it expects to see. Signed-off-by: Peter Jones <[email protected]>
This adds another test case for mirroring mok variables - in this case there is arbitrarily not enough space in the SetVariable() storage backend for some or all of the variables, and so some variables are mirrored to both variables and the config space storage, and some only to the config space storage. Currently the test only ensures that the out-of-resources condition on the variable storage is handled correctly; we don't (yet) test the config space. That's an avenue for future work. Signed-off-by: Peter Jones <[email protected]>
af376e5
to
4eb84a0
Compare
This patch set adds
test_mok_mirror_1()
, which is basically liketest_mok_mirror_0()
except with a variable size limit smaller thanMokListRT
would be, and with the.must_be_absent
flag set totrue
in the test data, so the test will fail if the variable is successfully created or if the data is not in the mokvars config variable.