@@ -370,6 +370,8 @@ def kernel_crash(self, crash_type="echo_c"):
370
370
elif crash_type == "hmc" :
371
371
self .cv_HMC .run_command ("chsysstate -r lpar -m %s -n %s -o dumprestart" %
372
372
(self .system_name , self .lpar_name ), timeout = 300 )
373
+ elif crash_type == "lock" :
374
+ self .c .pty .sendline ("insmod /tmp/kernel-module-bug-196448/softlockup.ko" )
373
375
done = False
374
376
boot_type = BootType .NORMAL
375
377
rc = - 1
@@ -1323,6 +1325,32 @@ def runTest(self):
1323
1325
if not obj .update_kernel_cmdline (self .distro , remove_args = "fadump=nocma" , reboot = True , reboot_cmd = True ):
1324
1326
self .fail ("KernelArgTest failed to update kernel args" )
1325
1327
1328
+ class KernelCrash_KdumpSoftlockup (PowerNVDump ):
1329
+
1330
+ '''
1331
+ This test verifies kdump/fadump after inserting softlockup kernel module.
1332
+ '''
1333
+
1334
+ def runTest (self ):
1335
+ self .setup_test ()
1336
+ directory_path = "/tmp/kernel-module-bug-196448"
1337
+ # Make sure /tmp/skiboot directory does not exist
1338
+ self .c .run_command ("cd /tmp; ls -1; rm -rf %s" % directory_path )
1339
+
1340
+ #clone this repo
1341
+ r_cmd = "git clone [email protected] :sjain014/kernel-module-bug-196448.git /tmp/kernel-module-bug-196448"
1342
+ self .c .run_command (r_cmd )
1343
+ time .sleep (20 )
1344
+
1345
+ #compile kernel modeules
1346
+ self .c .run_command ("cd /tmp/kernel-module-bug-196448; make" )
1347
+ time .sleep (30 )
1348
+
1349
+ #Enable softlockup
1350
+ self .c .run_command ("sysctl -w kernel.softlockup_panic=1" )
1351
+
1352
+ boot_type = self .kernel_crash (crash_type = "lock" )
1353
+ self .verify_dump_file (boot_type )
1326
1354
1327
1355
def crash_suite ():
1328
1356
s = unittest .TestSuite ()
@@ -1354,5 +1382,6 @@ def crash_suite():
1354
1382
s .addTest (KernelCrash_DisableAll ())
1355
1383
s .addTest (SkirootKernelCrash ())
1356
1384
s .addTest (OPALCrash_MPIPL ())
1385
+ s .addTest (KernelCrash_KdumpSoftlockup ())
1357
1386
1358
1387
return s
0 commit comments