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

test_guest_early_printk : test with the kernel in the guest VM #232

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

hector-cao
Copy link
Collaborator

right now, we are testing the host kernel
actually, we want to do this test for the guest VM kernel
I propose to fix that by redesigning the test in 2 steps:

  • append the wanted kernel commandline in the guest VM
  • restart the guest VM

…the host's one

right now, we are testing the host kernel
actually, we want to do this tests for the guest VM kernel
fix that by redesigning the test in 2 steps
  - append the wanted kernel commandline in the guest VM
  - restart the guest VM
Copy link
Contributor

@spmcmillan spmcmillan left a comment

Choose a reason for hiding this comment

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

This makes sense, however, it changes the image permanently and might affect other tests. Should we go through and modify it back? Though if this test fails, we cannot modify it back. Which is not great.

A really ugly way is to use qemu-nbd, mount the image, pull out the kernel, unmount the image and use the pulled out kernel...

@fanchen2
Copy link
Contributor

This makes sense, however, it changes the image permanently and might affect other tests. Should we go through and modify it back? Though if this test fails, we cannot modify it back. Which is not great.

We often add "earlyprintk" in kernel cmdline to show more logs when booting, this is an old common function of kernel, which can be token as a common setting, just FYI.

@spmcmillan
Copy link
Contributor

This makes sense, however, it changes the image permanently and might affect other tests. Should we go through and modify it back? Though if this test fails, we cannot modify it back. Which is not great.

We often add "earlyprintk" in kernel cmdline to show more logs when booting, this is an old common function of kernel, which can be token as a common setting, just FYI.

Thanks @fanchen2 , does the existence of this test imply that this has failed for TD in the past?

@hector-cao
Copy link
Collaborator Author

hector-cao commented Sep 23, 2024

This makes sense, however, it changes the image permanently and might affect other tests. Should we go through and modify it back? Though if this test fails, we cannot modify it back. Which is not great.

A really ugly way is to use qemu-nbd, mount the image, pull out the kernel, unmount the image and use the pulled out kernel...

we designed the tests so that each QEMU machine has its own image layer for its modifications (through overlay mechanism : https://libvirt.org/kbase/backing_chains.html ). So, on top of the original image, each QEMU machine will create an overlay image that sits on top of the original one and all the modifications to the machine will only live in the overlay layer and not go into the original image

@fanchen2
Copy link
Contributor

This makes sense, however, it changes the image permanently and might affect other tests. Should we go through and modify it back? Though if this test fails, we cannot modify it back. Which is not great.

We often add "earlyprintk" in kernel cmdline to show more logs when booting, this is an old common function of kernel, which can be token as a common setting, just FYI.

Thanks @fanchen2 , does the existence of this test imply that this has failed for TD in the past?

The original case is to check if TDVM can boot up with debug=off and earlyprintk, the previous failure is caused by "debug" function, which is not integrated into this software stack. I understand you, we expect earlyprintk works all the time, but on one can ensure it.

@spmcmillan
Copy link
Contributor

This makes sense, however, it changes the image permanently and might affect other tests. Should we go through and modify it back? Though if this test fails, we cannot modify it back. Which is not great.
A really ugly way is to use qemu-nbd, mount the image, pull out the kernel, unmount the image and use the pulled out kernel...

we designed the tests so that each QEMU machine has its own image layer for its modifications (through overlay mechanism : https://libvirt.org/kbase/backing_chains.html ). So, on top of the original image, each QEMU machine will create an overlay image that sits on top of the original one and all the modifications to the machine will only live in the overlay layer and not go into the original image

Good deal. LGTM

Copy link
Contributor

@spmcmillan spmcmillan left a comment

Choose a reason for hiding this comment

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

LGTM

@hector-cao hector-cao merged commit 54efe7b into noble-24.04 Sep 23, 2024
1 check passed
@hector-cao hector-cao deleted the noble-24.04-fix-test-earlyprintk branch October 11, 2024 07:13
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