-
Notifications
You must be signed in to change notification settings - Fork 5
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
vTPM basic tests #160
vTPM basic tests #160
Conversation
759a2d5
to
fc52d28
Compare
Not added to |
5566609
to
1315fd0
Compare
7bfc527
to
11805a7
Compare
11805a7
to
9a42e99
Compare
By the way, |
I'll add |
Not for the sake of check jobs. For your new test to be usable in our CI at all, because all test suites are started by Then yes, we'll have to update our internal CI |
Some xe commands, like vtpm-destroy, need to be passed a --force parameter. Since it doesn't take any value, it needs to be handled like the --minimal argument. This patch adds support for a force=True|False parameter to host.xe(), with force=False being the default. Signed-off-by: Thierry Escande <[email protected]>
59810f3
to
c50e4c4
Compare
This. Actual name is |
30e3ff4
to
ccc2dc2
Compare
If vm.shutdown() is called with force_if_fails set to True and the first call to 'xe vm-shutdown' fails, then a forced shutdown will be tried. The default value for the parameter force_is_false is False. Also, force and force_if_fails parameters are mutually exclusive and cannot be both True. Signed-off-by: Thierry Escande <[email protected]>
This adds get_vtpm(), create_vtpm(), and destroy_vtpm() methods to the VM class. vm.get_vtpm() returns the vtpm uuid associated to the vm if it exists, None otherwise. vm.create_vtpm() creates a vtpm and associates it to the vm. It returns the newly created vtpm uuid, or fails if a vtpm is already associated to the vm. vm.destroy_vm() destroys the existing vtpm associated to the vm if one exists. It doesn't fail if no vtpm is associated to the vm. Signed-off-by: Thierry Escande <[email protected]>
This change adds tests for vTPM functionalities requiring XCP-ng 8.3 and a Unix UEFI VM. The first test creates and destroys a vtpm device. A second test does basic TPM tests (like message signing) using tpm2-tools. Nested fixtures are defined for the second test, starting a snapshotted UEFI VM with a vTPM device attached. Signed-off-by: Thierry Escande <[email protected]>
ccc2dc2
to
43d3391
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.
I think we're good!
I transmitted the informations to Gaël for him to add this new job to our CI. |
\o/ |
This PR adds pytest script to create a vtpm device attached to a VM, execute some basic TPM tests, and destroy the vtpm device.