-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add softlockup scenario for kdump/Fadump testing
Signed-off-by: Sachin P Bappalige <[email protected]>
- Loading branch information
Sachin P Bappalige
committed
Sep 20, 2023
1 parent
7e75b5a
commit 671bdce
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ | |
import time | ||
import re | ||
import tempfile | ||
import shutil | ||
|
||
import OpTestConfiguration | ||
import OpTestLogger | ||
|
@@ -370,6 +371,8 @@ def kernel_crash(self, crash_type="echo_c"): | |
elif crash_type == "hmc": | ||
self.cv_HMC.run_command("chsysstate -r lpar -m %s -n %s -o dumprestart" % | ||
(self.system_name, self.lpar_name), timeout=300) | ||
elif crash_type == "lock": | ||
self.c.pty.sendline("insmod /tmp/kernel-module-bug-196448/softlockup.ko") | ||
done = False | ||
boot_type = BootType.NORMAL | ||
rc = -1 | ||
|
@@ -1323,6 +1326,39 @@ def runTest(self): | |
if not obj.update_kernel_cmdline(self.distro, remove_args="fadump=nocma", reboot=True, reboot_cmd=True): | ||
self.fail("KernelArgTest failed to update kernel args") | ||
|
||
class KernelCrash_KdumpSoftlockup(PowerNVDump): | ||
|
||
# This test verifies kdump/fadump after inserting softlockup kernel module. | ||
# Linux-Debugging url needs to be given in ~/.op-test-framework.conf. | ||
# Ex: url=http://liquidtelecom.dl.sourceforge.net/project/ebizzy/ebizzy/0.3/ebizzy-0.3.tar.gz | ||
|
||
|
||
def runTest(self): | ||
self.setup_test() | ||
directory_path = "/tmp/kernel-module-bug-196448" | ||
# Make sure /tmp/skiboot directory does not exist | ||
self.c.run_command("cd /tmp; ls -1; rm -rf %s" % directory_path) | ||
|
||
#clone this repo | ||
r_cmd = "git clone [email protected]:sjain014/kernel-module-bug-196448.git /tmp/kernel-module-bug-196448" | ||
self.c.run_command(r_cmd) | ||
time.sleep(20) | ||
|
||
#compile kernel modeules | ||
self.c.run_command("cd /tmp/kernel-module-bug-196448; make") | ||
time.sleep(30) | ||
|
||
#Enable softlockup | ||
self.c.run_command("sysctl -w kernel.softlockup_panic=1") | ||
|
||
boot_type = self.kernel_crash(crash_type="lock") | ||
self.verify_dump_file(boot_type) | ||
|
||
#Insert kernel module for softlockup | ||
#self.c.pty.sendline("insmod /tmp/kernel-module-bug-196448/softlockup.ko") | ||
#time.sleep(500) | ||
#self.verify_dump_file() | ||
|
||
|
||
def crash_suite(): | ||
s = unittest.TestSuite() | ||
|
@@ -1354,5 +1390,6 @@ def crash_suite(): | |
s.addTest(KernelCrash_DisableAll()) | ||
s.addTest(SkirootKernelCrash()) | ||
s.addTest(OPALCrash_MPIPL()) | ||
s.addTest(KernelCrash_KdumpSoftlockup()) | ||
|
||
return s |