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

kola/tests: Add new cl.tpm.eventlog test for the TPM Event log #558

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

chewi
Copy link
Contributor

@chewi chewi commented Sep 13, 2024

kola/tests: Add test for the TPM Event log

This will only work from GRUB 2.12 onwards, so restrict to 4082+. I initially wanted to add this check to the existing tpmTest function, but that wouldn't allow me to restrict the version.

flatcar/scripts#2318 should be merged first.

I also fixed a small bug while I was at it.

I think this is my first time writing Go, be nice. 😛

How to use

kola run --board=amd64-usr --platform=qemu-unpriv --qemu-firmware=flatcar_production_qemu_uefi_efi_code.fd --qemu-image=flatcar_production_qemu_uefi_image.img --debug cl.tpm.eventlog

Testing done

I've run the above against an existing release image where it fails and my new GRUB 2.12 image where it passes. I have also tried the Docker image from this PR against that 9999.9.9+grub-2.12-1 Jenkins run. Both amd64 and arm64 pass.

It was leaving the /tmp/mantle-ssh-* directory behind.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
kola/tests/misc/tpm.go Outdated Show resolved Hide resolved
kola/tests/misc/tpm.go Outdated Show resolved Hide resolved
kola/tests/misc/tpm.go Outdated Show resolved Hide resolved
kola/tests/misc/tpm.go Show resolved Hide resolved
This will only work from GRUB 2.12 onwards, so restrict to 4082+. I
initially wanted to add this check to the existing tpmTest function, but
that wouldn't allow me to restrict the version.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Copy link
Member

@sayanchowdhury sayanchowdhury left a comment

Choose a reason for hiding this comment

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

LGTM, Can you please also add a changelog entry for this before merge?

@tormath1
Copy link
Contributor

LGTM, Can you please also add a changelog entry for this before merge?

We kind of stop adding changelog entries to Mantle (since we don't really handle release cycle for this as it's not rev in Flatcar via commit ID)

@chewi chewi merged commit be36186 into flatcar-master Sep 17, 2024
2 checks passed
@chewi chewi deleted the chewi/tpm-event-log branch September 17, 2024 09:31
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.

3 participants