Skip to content
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

attestation: verifier: tdx: Allow equals in kernel param values #227

Conversation

jodh-intel
Copy link
Member

Allow kernel parameter values to contain equal signs, for example:

module_foo=bar=baz,wibble_setting=2

Fixes: #163.

Signed-off-by: James O. D. Hunt [email protected]

@jodh-intel
Copy link
Member Author

@@ -275,4 +272,229 @@ mod tests {

assert_json_eq!(expected, claims);
}

#[test]
fn test_parse_kernel_parameters() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the detailed test cases very much, thanks for this! Could you use https://crates.io/crates/rstest crate to make it more rusty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Xynnn007 - Branch updated.

Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thanks for adding so many test cases. See Ding's comment about rstest.

Added a unit test for `parse_kernel_parameters()`.

Signed-off-by: James O. D. Hunt <[email protected]>
Allow kernel parameter values to contain equal signs, for example:

```
module_foo=bar=baz,wibble_setting=2
```

Fixes: confidential-containers#226.

Signed-off-by: James O. D. Hunt <[email protected]>
@jodh-intel jodh-intel force-pushed the tdx-verifier-kernel-params-with-equals branch from 84e802f to 130a536 Compare November 22, 2023 14:31
@fitzthum fitzthum merged commit 54820fd into confidential-containers:main Nov 22, 2023
6 checks passed
@mythi
Copy link
Contributor

mythi commented Nov 22, 2023

The fixes link looks wrong

@fitzthum
Copy link
Member

The fixes link looks wrong

True. Probably because this PR was originally opened against the AS repo. We don't actually require the fixes thing in this repo.

@mythi
Copy link
Contributor

mythi commented Nov 22, 2023

The fixes link looks wrong

True. Probably because this PR was originally opened against the AS repo. We don't actually require the fixes thing in this repo.

I mentioned it because I'm not able to re-open to continue the work. Are you able to do that?

@fitzthum
Copy link
Member

I mentioned it because I'm not able to re-open to continue the work. Are you able to do that?

Ah, yes. I can reopen. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants