@@ -256,7 +256,10 @@ def verify_dump_file(self, boot_type=BootType.NORMAL, dump_place="local"):
256
256
"ssh root@%s -i %s \" ls -l %s | grep '^d'\" | awk '{print $9}'" % (self .dump_server_ip , self .rsa_path , self .dump_path ))
257
257
self .crash_content = list (
258
258
set (crash_content_after ) - set (self .crash_content ))
259
- self .crash_content = list (filter (lambda x : re .search ('\d{4}-\d{2}-\d{2}-\d{2}:\d{2}' , x ), self .crash_content ))
259
+ if self .distro == "sles" :
260
+ self .crash_content = list (filter (lambda x : re .search ('\d{4}-\d{2}-\d{2}-\d{2}-\d{2}' , x ), self .crash_content ))
261
+ else :
262
+ self .crash_content = list (filter (lambda x : re .search ('\d{4}-\d{2}-\d{2}-\d{2}:\d{2}' , x ), self .crash_content ))
260
263
if len (self .crash_content ):
261
264
if dump_place == "net" :
262
265
self .c .run_command ('scp -i %s -r root@%s:/%s/%s /var/crash/' %
@@ -294,8 +297,7 @@ def verify_fadump_reg(self):
294
297
if int (res ) == 1 :
295
298
return True
296
299
else :
297
- self .c .run_command ("echo 1 > /sys/kernel/fadump_registered" )
298
- self .c .run_command ('\r \n ' )
300
+ self .c .run_command ("echo 1 > /sys/kernel/fadump_registered; sleep 10" )
299
301
self .c .run_command ("cat /sys/kernel/fadump_registered" )
300
302
301
303
if not self .is_lpar :
@@ -330,14 +332,12 @@ def verify_fadump_unreg(self):
330
332
if int (res ) == 0 :
331
333
return True
332
334
else :
333
- self .c .run_command ("echo 0 > /sys/kernel/fadump_registered" )
334
- self .c .run_command ('\r \n ' )
335
+ self .c .run_command ("echo 0 > /sys/kernel/fadump_registered; sleep 10" )
335
336
336
337
if not self .is_lpar :
337
338
self .c .run_command ("%s > /tmp/opal_log" % BMC_CONST .OPAL_MSG_LOG )
338
339
self .c .run_command ("dmesg > /tmp/dmesg_log" )
339
- self .c .run_command ("echo 0 > /sys/kernel/fadump_registered" )
340
- self .c .run_command ('\r \n ' )
340
+ self .c .run_command ("echo 0 > /sys/kernel/fadump_registered; sleep 10" )
341
341
342
342
opal_data = " " .join (self .c .run_command (
343
343
"%s | diff -a /tmp/opal_log -" % BMC_CONST .OPAL_MSG_LOG ))
@@ -632,7 +632,7 @@ def setup_fadump(self):
632
632
'''
633
633
self .cv_SYSTEM .set_state (OpSystemState .OS )
634
634
if self .distro == "rhel" :
635
- self .c .run_command ("git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
635
+ self .c .run_command ("rm -rf ServiceReport; git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
636
636
"python ./servicereport --plugins kdump package --repair" , timeout = 240 )
637
637
time .sleep (10 )
638
638
self .c .run_command ("sed -e '/nfs/ s/^#*/#/' -i /etc/kdump.conf; sync" )
@@ -718,7 +718,7 @@ def runTest(self):
718
718
self .cv_HOST .host_check_command ("kdump" )
719
719
elif self .distro == "rhel" :
720
720
self .cv_HOST .host_check_command ("kdumpctl" )
721
- self .c .run_command ("git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
721
+ self .c .run_command ("rm -rf ServiceReport; git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
722
722
"python ./servicereport --plugins kdump package --repair" , timeout = 240 )
723
723
time .sleep (10 )
724
724
elif self .distro == "sles" :
@@ -733,9 +733,11 @@ def runTest(self):
733
733
self .cv_HOST .host_enable_kdump_service (os_level )
734
734
log .info ("========= Testing Only kdump enable followed by crash ===========" )
735
735
boot_type = self .kernel_crash ()
736
+ self .verify_dump_file (boot_type )
736
737
if self .is_lpar :
738
+ log .info ("========= Testing kdump with HMC dumprestart ===========" )
737
739
boot_type = self .kernel_crash (crash_type = "hmc" )
738
- self .verify_dump_file (boot_type )
740
+ self .verify_dump_file (boot_type )
739
741
740
742
741
743
class KernelCrash_DisableAll (PowerNVDump ):
@@ -1127,6 +1129,10 @@ class KernelCrash_XIVE_off(PowerNVDump):
1127
1129
'''
1128
1130
1129
1131
def runTest (self ):
1132
+ obj = OpTestInstallUtil .InstallUtil ()
1133
+ if not obj .update_kernel_cmdline (self .distro , remove_args = "default_hugepagesz=1GB hugepagesz=1GB hugepages=80" ,
1134
+ reboot = True , reboot_cmd = True ):
1135
+ self .fail ("KernelArgTest failed to remove kernel args:default_hugepagesz=1GB hugepagesz=1GB hugepages=80" )
1130
1136
self .cv_SYSTEM .goto_state (OpSystemState .OS )
1131
1137
self .setup_test ()
1132
1138
log .info ("=============== Testing kdump/fadump with xive=off ===============" )
@@ -1171,6 +1177,10 @@ class KernelCrash_disable_radix(PowerNVDump):
1171
1177
'''
1172
1178
1173
1179
def runTest (self ):
1180
+ obj = OpTestInstallUtil .InstallUtil ()
1181
+ if not obj .update_kernel_cmdline (self .distro , remove_args = "xive=off" ,
1182
+ reboot = True , reboot_cmd = True ):
1183
+ self .fail ("KernelArgTest failed to remove kernel args:xive=off" )
1174
1184
self .cv_SYSTEM .goto_state (OpSystemState .OS )
1175
1185
self .setup_test ()
1176
1186
log .info ("Testing kdump/fadump with disable_radix" )
@@ -1279,6 +1289,10 @@ def makedump_check(self):
1279
1289
self .c .run_command ("rm -rf dump*" )
1280
1290
1281
1291
def runTest (self ):
1292
+ obj = OpTestInstallUtil .InstallUtil ()
1293
+ if not obj .update_kernel_cmdline (self .distro , remove_args = "disable_radix" ,
1294
+ reboot = True , reboot_cmd = True ):
1295
+ self .fail ("KernelArgTest failed to remove kernel args:disable_radix" )
1282
1296
self .kernel_crash ()
1283
1297
self .makedump_check ()
1284
1298
0 commit comments