@@ -87,6 +87,14 @@ def runTest(self):
87
87
if (isinstance (self .cv_BMC , OpTestMambo .OpTestMambo )) \
88
88
or (isinstance (self .cv_BMC , OpTestQemu .OpTestQemu )):
89
89
raise unittest .SkipTest ("QEMU/Mambo so skipping BMCLogin test" )
90
+
91
+ filter_list = [
92
+ 'Out of memory: Kill process' ,
93
+ 'Killed process' ,
94
+ ]
95
+
96
+ found_issues = []
97
+
90
98
r = self .cv_BMC .run_command ("echo 'Hello World'" )
91
99
self .assertIn ("Hello World" , r )
92
100
try :
@@ -95,6 +103,19 @@ def runTest(self):
95
103
self .assertEqual (r .exitcode , 1 )
96
104
for i in range (2 ):
97
105
self .cv_BMC .run_command ("dmesg" )
106
+ try :
107
+ r = self .cv_BMC .run_command ("dmesg" )
108
+ for f in filter_list :
109
+ fre = re .compile (f )
110
+ found_issues = [l for l in r if fre .search (l )]
111
+ log .debug ("BMC found_issues={}" .format (found_issues ))
112
+ msg = '\n ' .join (filter (None , found_issues ))
113
+ if len (found_issues ) != 0 :
114
+ r = self .cv_BMC .run_command ("dmesg -c" )
115
+ log .debug ("REPORT_BUG so we cleared dmesg to allow other tests to succeed" )
116
+ self .assertTrue ( len (found_issues ) == 0 , "REPORT_BUG BMC dmesg, debug log has full details:\n {}" .format (msg ))
117
+ except CommandFailed as r :
118
+ log .debug ("BMC dmesg grep for issues failed" )
98
119
99
120
100
121
class SSHHostLogin (unittest .TestCase ):
0 commit comments