@@ -89,6 +89,21 @@ def ipmi_monitor_sol_ipl(self, console, timeout):
89
89
self .assertTrue (ipl_status , "HMI Core checkstop: IPL not started/finished" )
90
90
return
91
91
92
+ def verify_proc_recovery (self , l_res ):
93
+ if any ("Processor Recovery done" in line for line in l_res ) and \
94
+ any ("Harmless Hypervisor Maintenance interrupt [Recovered]" in line for line in l_res ):
95
+ print "Processor recovery done"
96
+ return
97
+ else :
98
+ raise Exception ("HMI handling failed to log message: for proc_recv_done" )
99
+
100
+ def verify_timer_facility_recovery (self , l_res ):
101
+ if any ("Timer facility experienced an error" in line for line in l_res ) and \
102
+ any ("Severe Hypervisor Maintenance interrupt [Recovered]" in line for line in l_res ):
103
+ print "Timer facility experienced an error and got recovered"
104
+ return
105
+ else :
106
+ raise Exception ("HMI handling failed to log message" )
92
107
93
108
def init_test (self ):
94
109
self .cv_SYSTEM .goto_state (OpSystemState .OS )
@@ -253,28 +268,22 @@ def _test_proc_recv_done(self):
253
268
console = self .cv_SYSTEM .sys_get_ipmi_console ()
254
269
console .run_command ("dmesg -C" )
255
270
try :
256
- l_res = console .run_command (l_cmd )
271
+ l_res = console .run_command (l_cmd , timeout = 120 )
257
272
except CommandFailed as cf :
258
- if cf .exitcode == 5 :
273
+ if cf .exitcode == 1 :
259
274
pass
260
275
else :
261
- raise cf
262
- else :
263
- if any ("Kernel panic - not syncing" in line for line in l_res ):
264
- raise Exception ("Processor recovery failed: Kernel got panic" )
265
- elif any ("Petitboot" in line for line in l_res ):
266
- raise Exception ("System reached petitboot:Processor recovery failed" )
267
- elif any ("ISTEP" in line for line in l_res ):
268
- raise Exception ("System started booting: Processor recovery failed" )
269
- else :
270
- raise Exception ("Failed to inject thread hang recoverable error" )
271
-
276
+ if any ("Kernel panic - not syncing" in line for line in l_res ):
277
+ raise Exception ("Processor recovery failed: Kernel got panic" )
278
+ elif any ("Petitboot" in line for line in l_res ):
279
+ raise Exception ("System reached petitboot:Processor recovery failed" )
280
+ elif any ("ISTEP" in line for line in l_res ):
281
+ raise Exception ("System started booting: Processor recovery failed" )
282
+ else :
283
+ raise Exception ("Failed to inject thread hang recoverable error %s" , str (cf ))
284
+ time .sleep (0.2 )
272
285
l_res = console .run_command ("dmesg" )
273
- if any ("Processor Recovery done" in line for line in l_res ) and \
274
- any ("Harmless Hypervisor Maintenance interrupt [Recovered]" in line for line in l_res ):
275
- print "Processor recovery done"
276
- else :
277
- raise Exception ("HMI handling failed to log message: for proc_recv_done" )
286
+ self .verify_proc_recovery (l_res )
278
287
return
279
288
280
289
##
@@ -290,28 +299,22 @@ def _test_proc_recv_error_masked(self):
290
299
console = self .cv_SYSTEM .sys_get_ipmi_console ()
291
300
console .run_command ("dmesg -C" )
292
301
try :
293
- l_res = console .run_command (l_cmd )
302
+ l_res = console .run_command (l_cmd , timeout = 120 )
294
303
except CommandFailed as cf :
295
304
if cf .exitcode == 1 :
296
305
pass
297
306
else :
298
- raise cf
299
- else :
300
- if any ("Kernel panic - not syncing" in line for line in l_res ):
301
- raise Exception ("Processor recovery failed: Kernel got panic" )
302
- elif any ("Petitboot" in line for line in l_res ):
303
- raise Exception ("System reached petitboot:Processor recovery failed" )
304
- elif any ("ISTEP" in line for line in l_res ):
305
- raise Exception ("System started booting: Processor recovery failed" )
306
- else :
307
- raise Exception ("Failed to inject thread hang recoverable error" )
308
-
307
+ if any ("Kernel panic - not syncing" in line for line in l_res ):
308
+ raise Exception ("Processor recovery failed: Kernel got panic" )
309
+ elif any ("Petitboot" in line for line in l_res ):
310
+ raise Exception ("System reached petitboot:Processor recovery failed" )
311
+ elif any ("ISTEP" in line for line in l_res ):
312
+ raise Exception ("System started booting: Processor recovery failed" )
313
+ else :
314
+ raise Exception ("Failed to inject thread hang recoverable error %s" , str (cf ))
315
+ time .sleep (0.2 )
309
316
l_res = console .run_command ("dmesg" )
310
- if any ("Processor Recovery done" in line for line in l_res ) and \
311
- any ("Harmless Hypervisor Maintenance interrupt [Recovered]" in line for line in l_res ):
312
- print "Processor recovery done"
313
- else :
314
- raise Exception ("HMI handling failed to log message" )
317
+ self .verify_proc_recovery (l_res )
315
318
return
316
319
317
320
##
@@ -376,30 +379,23 @@ def _testTFMR_Errors(self, i_error):
376
379
console = self .cv_SYSTEM .sys_get_ipmi_console ()
377
380
console .run_command ("dmesg -C" )
378
381
try :
379
- l_res = console .run_command (l_cmd )
382
+ l_res = console .run_command (l_cmd , timeout = 120 )
380
383
except CommandFailed as cf :
381
384
if cf .exitcode == 1 :
382
385
pass
383
386
else :
384
- raise cf
385
- else :
386
- if any ("Kernel panic - not syncing" in line for line in l_res ):
387
- l_msg = "TFMR error injection: Kernel got panic"
388
- elif any ("Petitboot" in line for line in l_res ):
389
- l_msg = "System reached petitboot:TFMR error injection recovery failed"
390
- elif any ("ISTEP" in line for line in l_res ):
391
- l_msg = "System started booting: TFMR error injection recovery failed"
392
- else :
393
- raise Exception ("Failed to inject TFMR error %s " % l_error )
387
+ if any ("Kernel panic - not syncing" in line for line in l_res ):
388
+ l_msg = "TFMR error injection: Kernel got panic"
389
+ elif any ("Petitboot" in line for line in l_res ):
390
+ l_msg = "System reached petitboot:TFMR error injection recovery failed"
391
+ elif any ("ISTEP" in line for line in l_res ):
392
+ l_msg = "System started booting: TFMR error injection recovery failed"
393
+ else :
394
+ raise Exception ("Failed to inject TFMR error %s " % str (cf ))
394
395
395
396
time .sleep (0.2 )
396
397
l_res = console .run_command ("dmesg" )
397
- if any ("Timer facility experienced an error" in line for line in l_res ) and \
398
- any ("Severe Hypervisor Maintenance interrupt [Recovered]" in line for line in l_res ):
399
- print "Timer facility experienced an error and got recovered"
400
- else :
401
- raise Exception ("HMI handling failed to log message" )
402
-
398
+ self .verify_timer_facility_recovery (l_res )
403
399
return
404
400
405
401
##
@@ -425,31 +421,24 @@ def _test_tod_errors(self, i_error):
425
421
# But getscom to TOD error reg there is no access
426
422
# TOD Error reg has only WO access and there is no read access
427
423
try :
428
- l_res = console .run_command (l_cmd )
424
+ l_res = console .run_command (l_cmd , timeout = 120 )
429
425
except CommandFailed as cf :
430
426
if cf .exitcode == 1 :
431
427
pass
432
428
else :
433
- raise cf
434
- else :
435
- if any ("Kernel panic - not syncing" in line for line in l_res ):
436
- print "TOD ERROR Injection-kernel got panic"
437
- elif any ("login:" in line for line in l_res ):
438
- print "System booted to host OS without any kernel panic message"
439
- elif any ("Petitboot" in line for line in l_res ):
440
- print "System reached petitboot without any kernel panic message"
441
- elif any ("ISTEP" in line for line in l_res ):
442
- print "System started booting without any kernel panic message"
443
- else :
444
- raise Exception ("TOD: PSS Hamming distance error injection failed" )
445
-
429
+ if any ("Kernel panic - not syncing" in line for line in l_res ):
430
+ print "TOD ERROR Injection-kernel got panic"
431
+ elif any ("login:" in line for line in l_res ):
432
+ print "System booted to host OS without any kernel panic message"
433
+ elif any ("Petitboot" in line for line in l_res ):
434
+ print "System reached petitboot without any kernel panic message"
435
+ elif any ("ISTEP" in line for line in l_res ):
436
+ print "System started booting without any kernel panic message"
437
+ else :
438
+ raise Exception ("TOD: PSS Hamming distance error injection failed %s" , str (c ))
439
+ time .sleep (0.2 )
446
440
l_res = console .run_command ("dmesg" )
447
- if any ("Timer facility experienced an error" in line for line in l_res ) and \
448
- any ("Severe Hypervisor Maintenance interrupt [Recovered]" in line for line in l_res ):
449
- print "Timer facility experienced an error and got recovered"
450
- else :
451
- raise Exception ("HMI handling failed to log message" )
452
-
441
+ self .verify_timer_facility_recovery (l_res )
453
442
return
454
443
455
444
##
0 commit comments