Skip to content

Commit 7360f78

Browse files
committed
SystemLogin: Add BMC checks for OOM
Add filtering to check the BMC dmesg's for Out of memory and Killed process. Signed-off-by: Deb McLemore <[email protected]>
1 parent 675d88f commit 7360f78

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

testcases/SystemLogin.py

+18
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ def runTest(self):
8383
if (isinstance(self.cv_BMC, OpTestMambo.OpTestMambo)) \
8484
or (isinstance(self.cv_BMC, OpTestQemu.OpTestQemu)):
8585
raise unittest.SkipTest("QEMU/Mambo so skipping BMCLogin test")
86+
87+
filter_list = [
88+
'Out of memory: Kill process',
89+
'Killed process',
90+
]
91+
92+
found_issues = []
93+
8694
r = self.cv_BMC.run_command("echo 'Hello World'")
8795
self.assertIn("Hello World", r)
8896
try:
@@ -91,6 +99,16 @@ def runTest(self):
9199
self.assertEqual(r.exitcode, 1)
92100
for i in range(2):
93101
self.cv_BMC.run_command("dmesg")
102+
try:
103+
r = self.cv_BMC.run_command("dmesg")
104+
for f in filter_list:
105+
fre = re.compile(f)
106+
found_issues = [l for l in r if fre.search(l)]
107+
log.debug("BMC found_issues={}".format(found_issues))
108+
msg = '\n'.join(filter(None, found_issues))
109+
self.assertTrue( len(found_issues) == 0, "REPORT_BUG BMC dmesg, debug log has full details:\n{}".format(msg))
110+
except CommandFailed as r:
111+
log.debug("BMC dmesg grep for issues failed")
94112

95113
class SSHHostLogin(unittest.TestCase):
96114
'''

0 commit comments

Comments
 (0)