Message ID | 20250129104844.1322100-1-clg@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] tests/functional: Extend PPC 40p test with Linux boot | expand |
On Wed, 29 Jan 2025, Cédric Le Goater wrote: > Fetch the cdrom image for the IBM 6015 PReP PowerPC machine hosted on > the Juneau Linux Users Group site, boot and check Linux version. Not related to this patch just by the way, I've noticed that the rom image is loaded from within hw/pci-host/raven.c instead of hw/ppc/prep.c which is odd and unlike other machines. Is there a reason for that? Regards, BALATON Zoltan > Reviewed-by: Thomas Huth <thuth@redhat.com> > Signed-off-by: Cédric Le Goater <clg@redhat.com> > --- > > Changes in v2: > > - Kept the 2 empty lines lines between the imports and the class > statements > > tests/functional/test_ppc_40p.py | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/tests/functional/test_ppc_40p.py b/tests/functional/test_ppc_40p.py > index 7a74e0cca70b..614972a7eb38 100755 > --- a/tests/functional/test_ppc_40p.py > +++ b/tests/functional/test_ppc_40p.py > @@ -9,6 +9,7 @@ > > from qemu_test import QemuSystemTest, Asset > from qemu_test import wait_for_console_pattern, skipUntrustedTest > +from qemu_test import exec_command_and_wait_for_pattern > > > class IbmPrep40pMachine(QemuSystemTest): > @@ -72,5 +73,22 @@ def test_openbios_and_netbsd(self): > self.vm.launch() > wait_for_console_pattern(self, 'NetBSD/prep BOOT, Revision 1.9') > > + ASSET_40P_SANDALFOOT = Asset( > + 'http://www.juneau-lug.org/zImage.initrd.sandalfoot', > + '749ab02f576c6dc8f33b9fb022ecb44bf6a35a0472f2ea6a5e9956bc15933901') > + > + def test_openbios_and_linux(self): > + self.set_machine('40p') > + self.require_accelerator("tcg") > + drive_path = self.ASSET_40P_SANDALFOOT.fetch() > + self.vm.set_console() > + self.vm.add_args('-cdrom', drive_path, > + '-boot', 'd') > + > + self.vm.launch() > + wait_for_console_pattern(self, 'Please press Enter to activate this console.') > + exec_command_and_wait_for_pattern(self, '\012', '#') > + exec_command_and_wait_for_pattern(self, 'uname -a', 'Linux ppc 2.4.18') > + > if __name__ == '__main__': > QemuSystemTest.main() >
On 29/1/25 18:34, BALATON Zoltan wrote: > On Wed, 29 Jan 2025, Cédric Le Goater wrote: >> Fetch the cdrom image for the IBM 6015 PReP PowerPC machine hosted on >> the Juneau Linux Users Group site, boot and check Linux version. > > Not related to this patch just by the way, I've noticed that the rom > image is loaded from within hw/pci-host/raven.c instead of hw/ppc/prep.c > which is odd and unlike other machines. Is there a reason for that? I agree the cleanup would be nice (probably breaking migration). > Regards, > BALATON Zoltan
diff --git a/tests/functional/test_ppc_40p.py b/tests/functional/test_ppc_40p.py index 7a74e0cca70b..614972a7eb38 100755 --- a/tests/functional/test_ppc_40p.py +++ b/tests/functional/test_ppc_40p.py @@ -9,6 +9,7 @@ from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern, skipUntrustedTest +from qemu_test import exec_command_and_wait_for_pattern class IbmPrep40pMachine(QemuSystemTest): @@ -72,5 +73,22 @@ def test_openbios_and_netbsd(self): self.vm.launch() wait_for_console_pattern(self, 'NetBSD/prep BOOT, Revision 1.9') + ASSET_40P_SANDALFOOT = Asset( + 'http://www.juneau-lug.org/zImage.initrd.sandalfoot', + '749ab02f576c6dc8f33b9fb022ecb44bf6a35a0472f2ea6a5e9956bc15933901') + + def test_openbios_and_linux(self): + self.set_machine('40p') + self.require_accelerator("tcg") + drive_path = self.ASSET_40P_SANDALFOOT.fetch() + self.vm.set_console() + self.vm.add_args('-cdrom', drive_path, + '-boot', 'd') + + self.vm.launch() + wait_for_console_pattern(self, 'Please press Enter to activate this console.') + exec_command_and_wait_for_pattern(self, '\012', '#') + exec_command_and_wait_for_pattern(self, 'uname -a', 'Linux ppc 2.4.18') + if __name__ == '__main__': QemuSystemTest.main()