|
64 | 64 | import time
|
65 | 65 | import re
|
66 | 66 | import tempfile
|
| 67 | +import shutil |
67 | 68 |
|
68 | 69 | import OpTestConfiguration
|
69 | 70 | import OpTestLogger
|
@@ -370,6 +371,8 @@ def kernel_crash(self, crash_type="echo_c"):
|
370 | 371 | elif crash_type == "hmc":
|
371 | 372 | self.cv_HMC.run_command("chsysstate -r lpar -m %s -n %s -o dumprestart" %
|
372 | 373 | (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") |
373 | 376 | done = False
|
374 | 377 | boot_type = BootType.NORMAL
|
375 | 378 | rc = -1
|
@@ -1323,6 +1326,39 @@ def runTest(self):
|
1323 | 1326 | if not obj.update_kernel_cmdline(self.distro, remove_args="fadump=nocma", reboot=True, reboot_cmd=True):
|
1324 | 1327 | self.fail("KernelArgTest failed to update kernel args")
|
1325 | 1328 |
|
| 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 | + |
1326 | 1362 |
|
1327 | 1363 | def crash_suite():
|
1328 | 1364 | s = unittest.TestSuite()
|
@@ -1354,5 +1390,6 @@ def crash_suite():
|
1354 | 1390 | s.addTest(KernelCrash_DisableAll())
|
1355 | 1391 | s.addTest(SkirootKernelCrash())
|
1356 | 1392 | s.addTest(OPALCrash_MPIPL())
|
| 1393 | + s.addTest(KernelCrash_KdumpSoftlockup()) |
1357 | 1394 |
|
1358 | 1395 | return s
|
0 commit comments