@@ -370,6 +370,8 @@ def kernel_crash(self, crash_type="echo_c"):
370370 elif crash_type == "hmc" :
371371 self .cv_HMC .run_command ("chsysstate -r lpar -m %s -n %s -o dumprestart" %
372372 (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" )
373375 done = False
374376 boot_type = BootType .NORMAL
375377 rc = - 1
@@ -1323,6 +1325,32 @@ def runTest(self):
13231325 if not obj .update_kernel_cmdline (self .distro , remove_args = "fadump=nocma" , reboot = True , reboot_cmd = True ):
13241326 self .fail ("KernelArgTest failed to update kernel args" )
13251327
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 git@github.ibm.com: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 )
13261354
13271355def crash_suite ():
13281356 s = unittest .TestSuite ()
@@ -1354,5 +1382,6 @@ def crash_suite():
13541382 s .addTest (KernelCrash_DisableAll ())
13551383 s .addTest (SkirootKernelCrash ())
13561384 s .addTest (OPALCrash_MPIPL ())
1385+ s .addTest (KernelCrash_KdumpSoftlockup ())
13571386
13581387 return s
0 commit comments