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
Signed-off-by: Aditya Gupta <[email protected]>
---
tests/functional/ppc64/test_fadump.py | 35 ++++++++++-----------------
1 file changed, 13 insertions(+), 22 deletions(-)
diff --git a/tests/functional/ppc64/test_fadump.py
b/tests/functional/ppc64/test_fadump.py
index 2d6b8017e8f0..e3238ceadfe6 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'),
@@ -64,16 +60,14 @@ def do_test_fadump(self, is_kvm=False, is_powernv=False):
# 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()
@@ -104,16 +98,14 @@ def do_test_fadump(self, is_kvm=False, is_powernv=False):
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")
@@ -137,7 +129,7 @@ def do_test_fadump(self, is_kvm=False, is_powernv=False):
# 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 "
)
@@ -150,7 +142,7 @@ def do_test_fadump(self, is_kvm=False, is_powernv=False):
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,
@@ -168,9 +160,8 @@ def do_test_fadump(self, is_kvm=False, is_powernv=False):
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):
"""
--
2.52.0