Message ID | 1580142994-1836-3-git-send-email-liam.merwick@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tests/boot_linux_console: add extra boot acceptance tests | expand |
Hi Liam, On Mon, Jan 27, 2020 at 04:36:30PM +0000, Liam Merwick wrote: > Add tests to use qboot with the 'pc' and 'microvm' machine classes > by adding the '-bios' option via self.vm.add_args() before calling > do_test_x86_64_machine(). > > Signed-off-by: Liam Merwick <liam.merwick@oracle.com> > --- > tests/acceptance/boot_linux_console.py | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py > index aa5b07b1c609..8daf6461ffac 100644 > --- a/tests/acceptance/boot_linux_console.py > +++ b/tests/acceptance/boot_linux_console.py > @@ -60,7 +60,6 @@ class BootLinuxConsole(Test): > '/vmlinuz') > kernel_hash = '23bebd2680757891cf7adedb033532163a792495' > kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) > - > self.vm.set_console() > kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' > self.vm.add_args('-kernel', kernel_path, > @@ -75,12 +74,26 @@ class BootLinuxConsole(Test): > """ > self.do_test_x86_64_machine() > > + def test_x86_64_pc_qboot(self): > + """ > + :avocado: tags=machine:pc > + """ > + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') > + self.do_test_x86_64_machine() > + > def test_x86_64_microvm(self): > """ > :avocado: tags=machine:microvm > """ > self.do_test_x86_64_machine() > > + def test_x86_64_microvm_qboot(self): > + """ > + :avocado: tags=machine:microvm > + """ > + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') > + self.do_test_x86_64_machine() > + Reading the docs/microvm.rst, microvm should use qboot as default, so the test_x86_64_microvm() and test_x86_64_microvm_qboot() maybe are the same (I didn't test them). > def test_mips_malta(self): > """ > :avocado: tags=arch:mips Thanks for doing these tests! Stefano
On 30/01/2020 11:27, Stefano Garzarella wrote: > Hi Liam, > > On Mon, Jan 27, 2020 at 04:36:30PM +0000, Liam Merwick wrote: >> Add tests to use qboot with the 'pc' and 'microvm' machine classes >> by adding the '-bios' option via self.vm.add_args() before calling >> do_test_x86_64_machine(). >> >> Signed-off-by: Liam Merwick <liam.merwick@oracle.com> >> --- >> tests/acceptance/boot_linux_console.py | 15 ++++++++++++++- >> 1 file changed, 14 insertions(+), 1 deletion(-) >> >> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py >> index aa5b07b1c609..8daf6461ffac 100644 >> --- a/tests/acceptance/boot_linux_console.py >> +++ b/tests/acceptance/boot_linux_console.py ... >> >> + def test_x86_64_microvm_qboot(self): >> + """ >> + :avocado: tags=machine:microvm >> + """ >> + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') >> + self.do_test_x86_64_machine() >> + > > Reading the docs/microvm.rst, microvm should use qboot as default, so > the test_x86_64_microvm() and test_x86_64_microvm_qboot() maybe are the > same (I didn't test them). I traced loader_write_rom() and in both cases bios-microvm.bin got loaded. While there may be a slight benefit in verifying that usage of an explicit -bios works, I think I'll just drop the unnecessary test case in patches 2 and 6 in v2. > >> def test_mips_malta(self): >> """ >> :avocado: tags=arch:mips > > Thanks for doing these tests! And thanks for reviewing the series. Regards, Liam
On 30/01/2020 15:34, Liam Merwick wrote: > On 30/01/2020 11:27, Stefano Garzarella wrote: >> Hi Liam, >> >> On Mon, Jan 27, 2020 at 04:36:30PM +0000, Liam Merwick wrote: >>> Add tests to use qboot with the 'pc' and 'microvm' machine classes >>> by adding the '-bios' option via self.vm.add_args() before calling >>> do_test_x86_64_machine(). >>> >>> Signed-off-by: Liam Merwick <liam.merwick@oracle.com> >>> --- >>> tests/acceptance/boot_linux_console.py | 15 ++++++++++++++- >>> 1 file changed, 14 insertions(+), 1 deletion(-) >>> >>> diff --git a/tests/acceptance/boot_linux_console.py >>> b/tests/acceptance/boot_linux_console.py >>> index aa5b07b1c609..8daf6461ffac 100644 >>> --- a/tests/acceptance/boot_linux_console.py >>> +++ b/tests/acceptance/boot_linux_console.py > > ... > >>> + def test_x86_64_microvm_qboot(self): >>> + """ >>> + :avocado: tags=machine:microvm >>> + """ >>> + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') >>> + self.do_test_x86_64_machine() >>> + >> >> Reading the docs/microvm.rst, microvm should use qboot as default, so >> the test_x86_64_microvm() and test_x86_64_microvm_qboot() maybe are the >> same (I didn't test them). > > I traced loader_write_rom() and in both cases bios-microvm.bin got > loaded. While there may be a slight benefit in verifying that usage of > an explicit -bios works, I think I'll just drop the unnecessary test > case in patches 2 and 6 in v2. > When making that change to remove the test case from Patch2, it dawned on me that it might be worth testing microvm with a different bios instead... --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -87,6 +87,13 @@ class BootLinuxConsole(Test): """ self.do_test_x86_64_machine() + def test_x86_64_microvm_seabios(self): + """ + :avocado: tags=machine:microvm + """ + self.vm.add_args('-bios', 'pc-bios/bios.bin') + self.do_test_x86_64_machine() + >> >>> def test_mips_malta(self): >>> """ >>> :avocado: tags=arch:mips >> >> Thanks for doing these tests! > > And thanks for reviewing the series. > > Regards, > Liam >
On Thu, Jan 30, 2020 at 04:28:52PM +0000, Liam Merwick wrote: > On 30/01/2020 15:34, Liam Merwick wrote: > > On 30/01/2020 11:27, Stefano Garzarella wrote: > > > Hi Liam, > > > > > > On Mon, Jan 27, 2020 at 04:36:30PM +0000, Liam Merwick wrote: > > > > Add tests to use qboot with the 'pc' and 'microvm' machine classes > > > > by adding the '-bios' option via self.vm.add_args() before calling > > > > do_test_x86_64_machine(). > > > > > > > > Signed-off-by: Liam Merwick <liam.merwick@oracle.com> > > > > --- > > > > tests/acceptance/boot_linux_console.py | 15 ++++++++++++++- > > > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/tests/acceptance/boot_linux_console.py > > > > b/tests/acceptance/boot_linux_console.py > > > > index aa5b07b1c609..8daf6461ffac 100644 > > > > --- a/tests/acceptance/boot_linux_console.py > > > > +++ b/tests/acceptance/boot_linux_console.py > > > > ... > > > > > > + def test_x86_64_microvm_qboot(self): > > > > + """ > > > > + :avocado: tags=machine:microvm > > > > + """ > > > > + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') > > > > + self.do_test_x86_64_machine() > > > > + > > > > > > Reading the docs/microvm.rst, microvm should use qboot as default, so > > > the test_x86_64_microvm() and test_x86_64_microvm_qboot() maybe are the > > > same (I didn't test them). > > > > I traced loader_write_rom() and in both cases bios-microvm.bin got > > loaded. While there may be a slight benefit in verifying that usage of > > an explicit -bios works, I think I'll just drop the unnecessary test > > case in patches 2 and 6 in v2. > > > > When making that change to remove the test case from Patch2, it dawned > on me that it might be worth testing microvm with a different bios > instead... Make sense! In docs/microvm.rst we say we support both, so it seems reasonable to test even seabios. Thanks, Stefano > > --- a/tests/acceptance/boot_linux_console.py > +++ b/tests/acceptance/boot_linux_console.py > @@ -87,6 +87,13 @@ class BootLinuxConsole(Test): > """ > self.do_test_x86_64_machine() > > + def test_x86_64_microvm_seabios(self): > + """ > + :avocado: tags=machine:microvm > + """ > + self.vm.add_args('-bios', 'pc-bios/bios.bin') > + self.do_test_x86_64_machine() > +
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index aa5b07b1c609..8daf6461ffac 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -60,7 +60,6 @@ class BootLinuxConsole(Test): '/vmlinuz') kernel_hash = '23bebd2680757891cf7adedb033532163a792495' kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) - self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' self.vm.add_args('-kernel', kernel_path, @@ -75,12 +74,26 @@ class BootLinuxConsole(Test): """ self.do_test_x86_64_machine() + def test_x86_64_pc_qboot(self): + """ + :avocado: tags=machine:pc + """ + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') + self.do_test_x86_64_machine() + def test_x86_64_microvm(self): """ :avocado: tags=machine:microvm """ self.do_test_x86_64_machine() + def test_x86_64_microvm_qboot(self): + """ + :avocado: tags=machine:microvm + """ + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') + self.do_test_x86_64_machine() + def test_mips_malta(self): """ :avocado: tags=arch:mips
Add tests to use qboot with the 'pc' and 'microvm' machine classes by adding the '-bios' option via self.vm.add_args() before calling do_test_x86_64_machine(). Signed-off-by: Liam Merwick <liam.merwick@oracle.com> --- tests/acceptance/boot_linux_console.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)