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

Fixed testing to have comprehensive testing for the library #252

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

DGonzalezVillal
Copy link
Member

Several bugs caught when trying to run cargo test with different feature combinations. Fixed these bugs and made some slight tweaks to be able to run comprehensive testing on the library.

  • When running cargo test with dangerous_hw_tests enabled both has_sev and has_sev_guest tests were run leading to a failure. Fixed by removing an unecessary or
  • Renamed has_sev to host and renamed has_sev_guest to guest
  • ID-BLOCK had to be put behind openssl only
  • Changed snp_config test to hit only the IOCTL and not modify the config. This was done to avoid messing up system configs during testing.
  • Renamed the launch test to sev_launch test. This allows us to test that launch test individually.
  • Added code to create a legacy SEV cert-chain locally. This allows us to test the SEV launch test without the need of an external tool.
  • Cached Turin certificates to the SEV builtin certs and the SNP builtin certs.

larrydewey
larrydewey previously approved these changes Nov 21, 2024
@tylerfanelli
Copy link
Member

The Turin certificate additions that were originally in #242 are also included in this commit. Can you rebase on main and remove the cert additions?

Several bugs caught when trying to run cargo test with different
feature combinations. Fixed these bugs and made some slight tweaks to be
able to run comprehensive testing on the library.

- When running cargo test with dangerous_hw_tests enabled both has_sev
  and has_sev_guest tests were run leading to a failure. Fixed by
removing an unecessary or
- Renamed has_sev to host and renamed has_sev_guest to guest
- ID-BLOCK had to be put behind openssl only
- Changed snp_config test to hit only the IOCTL and not modify the
  config. This was done to avoid messing up system configs during
testing.
- Renamed the launch test to sev_launch test. This allows us to test
  that launch test individually.
- Added code to create a legacy SEV cert-chain locally. This allows us
  to test the SEV launch test without the need of an external tool.
- Cached Turin certificates to the SEV builtin certs and the SNP builtin
  certs.

Signed-off-by: DGonzalezVillal <[email protected]>
mac-os 12 was deprecated by github runners. Bumping to 13.

Signed-off-by: DGonzalezVillal <[email protected]>
@DGonzalezVillal
Copy link
Member Author

Bumped mac-os version in linter

@DGonzalezVillal
Copy link
Member Author

@tylerfanelli

Copy link
Member

@tylerfanelli tylerfanelli left a comment

Choose a reason for hiding this comment

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

Two quick comments, and this can be merged.

Copy link
Member

Choose a reason for hiding this comment

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

Were these not added in #242 ? Edit: I see the SNP builtin certs were added. Are they different?

@@ -11,21 +11,31 @@
//! An entire certificate chain can be created using the `sevctl`
//! utility.

#[cfg(feature = "sev")]
use crate::certs::sev::Chain;
#![cfg(all(feature = "sev", feature = "dangerous_hw_tests"))]
Copy link
Member

Choose a reason for hiding this comment

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

What is this for?

@tylerfanelli tylerfanelli merged commit af1caf1 into virtee:main Nov 25, 2024
27 checks passed
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