Skip to content

Commit 671bdce

Browse files
author
Sachin P Bappalige
committed
Add softlockup scenario for kdump/Fadump testing
Signed-off-by: Sachin P Bappalige <[email protected]>
1 parent 7e75b5a commit 671bdce

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

testcases/PowerNVDump.py

+37
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
import time
6565
import re
6666
import tempfile
67+
import shutil
6768

6869
import OpTestConfiguration
6970
import OpTestLogger
@@ -370,6 +371,8 @@ def kernel_crash(self, crash_type="echo_c"):
370371
elif crash_type == "hmc":
371372
self.cv_HMC.run_command("chsysstate -r lpar -m %s -n %s -o dumprestart" %
372373
(self.system_name, self.lpar_name), timeout=300)
374+
elif crash_type == "lock":
375+
self.c.pty.sendline("insmod /tmp/kernel-module-bug-196448/softlockup.ko")
373376
done = False
374377
boot_type = BootType.NORMAL
375378
rc = -1
@@ -1323,6 +1326,39 @@ def runTest(self):
13231326
if not obj.update_kernel_cmdline(self.distro, remove_args="fadump=nocma", reboot=True, reboot_cmd=True):
13241327
self.fail("KernelArgTest failed to update kernel args")
13251328

1329+
class KernelCrash_KdumpSoftlockup(PowerNVDump):
1330+
1331+
# This test verifies kdump/fadump after inserting softlockup kernel module.
1332+
# Linux-Debugging url needs to be given in ~/.op-test-framework.conf.
1333+
# Ex: url=http://liquidtelecom.dl.sourceforge.net/project/ebizzy/ebizzy/0.3/ebizzy-0.3.tar.gz
1334+
1335+
1336+
def runTest(self):
1337+
self.setup_test()
1338+
directory_path = "/tmp/kernel-module-bug-196448"
1339+
# Make sure /tmp/skiboot directory does not exist
1340+
self.c.run_command("cd /tmp; ls -1; rm -rf %s" % directory_path)
1341+
1342+
#clone this repo
1343+
r_cmd = "git clone [email protected]:sjain014/kernel-module-bug-196448.git /tmp/kernel-module-bug-196448"
1344+
self.c.run_command(r_cmd)
1345+
time.sleep(20)
1346+
1347+
#compile kernel modeules
1348+
self.c.run_command("cd /tmp/kernel-module-bug-196448; make")
1349+
time.sleep(30)
1350+
1351+
#Enable softlockup
1352+
self.c.run_command("sysctl -w kernel.softlockup_panic=1")
1353+
1354+
boot_type = self.kernel_crash(crash_type="lock")
1355+
self.verify_dump_file(boot_type)
1356+
1357+
#Insert kernel module for softlockup
1358+
#self.c.pty.sendline("insmod /tmp/kernel-module-bug-196448/softlockup.ko")
1359+
#time.sleep(500)
1360+
#self.verify_dump_file()
1361+
13261362

13271363
def crash_suite():
13281364
s = unittest.TestSuite()
@@ -1354,5 +1390,6 @@ def crash_suite():
13541390
s.addTest(KernelCrash_DisableAll())
13551391
s.addTest(SkirootKernelCrash())
13561392
s.addTest(OPALCrash_MPIPL())
1393+
s.addTest(KernelCrash_KdumpSoftlockup())
13571394

13581395
return s

0 commit comments

Comments
 (0)