From: Aditya Gupta Date: Fri, 24 Apr 2026 08:38:36 +0000 (+0530) Subject: tests/functional: Add test for MPIPL in PowerNV X-Git-Tag: v11.1.0-rc0~146^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10235ca883276f2bc5a7f0fdfe33cb240ef5ad0f;p=thirdparty%2Fqemu.git tests/functional: Add test for MPIPL in PowerNV With MPIPL support implemented, enable fadump's functional test for PowerNV Also, current functional test for powernv uses op-build's Linux 5.10 image, which doesn't support adding "fadump=on" in argument due to this: Kernel is locked down from Kernel configuration; see man kernel_lockdown.7 Hence, instead of op-build's image, use the newer fedora vmlinuz as used in FADump PSeries functional test Also due to "bash#" string not showing up, rely on sh: no job control to check if testcase has reached till shell Reviewed-by: Hari Bathini Reviewed-by: Sourabh Jain Signed-off-by: Aditya Gupta Tested-by: Shivang Upadhyay Link: https://lore.kernel.org/qemu-devel/20260424083837.214947-10-adityag@linux.ibm.com Signed-off-by: Harsh Prateek Bora --- diff --git a/tests/functional/ppc64/test_fadump.py b/tests/functional/ppc64/test_fadump.py index bd9692f64c0..7ea65974e0e 100755 --- a/tests/functional/ppc64/test_fadump.py +++ b/tests/functional/ppc64/test_fadump.py @@ -14,6 +14,7 @@ class QEMUFadump(LinuxKernelTest): 1. test_fadump_pseries: PSeries 2. test_fadump_pseries_kvm: PSeries + KVM + 3. test_fadump_powernv: PowerNV """ timeout = 90 @@ -24,11 +25,6 @@ class QEMUFadump(LinuxKernelTest): msg_registered_failed = '' msg_dump_active = '' - ASSET_EPAPR_KERNEL = Asset( - ('https://github.com/open-power/op-build/releases/download/v2.7/' - 'zImage.epapr'), - '0ab237df661727e5392cee97460e8674057a883c5f74381a128fa772588d45cd') - ASSET_VMLINUZ_KERNEL = Asset( ('https://archives.fedoraproject.org/pub/archive/fedora-secondary/' 'releases/39/Everything/ppc64le/os/ppc/ppc64/vmlinuz'), @@ -62,16 +58,14 @@ class QEMUFadump(LinuxKernelTest): # SLOF takes upto >20s in startup time, use VOF self.set_machine("pseries") self.vm.add_args("-machine", "x-vof=on") - self.vm.add_args("-m", "6G") + + self.vm.add_args("-m", "6G") self.vm.set_console() kernel_path = None - if is_powernv: - kernel_path = self.ASSET_EPAPR_KERNEL.fetch() - else: - kernel_path = self.ASSET_VMLINUZ_KERNEL.fetch() + kernel_path = self.ASSET_VMLINUZ_KERNEL.fetch() initrd_path = self.ASSET_FEDORA_INITRD.fetch() @@ -102,16 +96,14 @@ class QEMUFadump(LinuxKernelTest): timeout=20 ) - # Ensure fadump is registered successfully, if registration - # succeeds, we get a log from rtas fadump: - # - # rtas fadump: Registration is successful! - self.wait_for_console_pattern( - "rtas fadump: Registration is successful!" - ) + # Ensure fadump is registered successfully + if not is_powernv: + self.wait_for_console_pattern( + "rtas fadump: Registration is successful!" + ) # Wait for the shell - self.wait_for_console_pattern("#") + self.wait_for_console_pattern("sh: no job control") # Mount /proc since not available in the initrd used exec_command(self, command="mount -t proc proc /proc") @@ -135,7 +127,7 @@ class QEMUFadump(LinuxKernelTest): # that qemu didn't pass the 'ibm,kernel-dump' device tree node wait_for_console_pattern( test=self, - success_message="rtas fadump: Firmware-assisted dump is active", + success_message="fadump: Firmware-assisted dump is active", failure_message="fadump: Reserved " ) @@ -148,7 +140,7 @@ class QEMUFadump(LinuxKernelTest): self.wait_for_console_pattern("preserving crash data") # Wait for prompt - self.wait_for_console_pattern("sh-5.2#") + self.wait_for_console_pattern("Run /bin/sh as init process") # Mount /proc since not available in the initrd used exec_command_and_wait_for_pattern(self, @@ -166,9 +158,8 @@ class QEMUFadump(LinuxKernelTest): def test_fadump_pseries(self): return self.do_test_fadump(is_kvm=False, is_powernv=False) - @skip("PowerNV Fadump not supported yet") def test_fadump_powernv(self): - return + return self.do_test_fadump(is_kvm=False, is_powernv=True) def test_fadump_pseries_kvm(self): """