Skip to content

Commit

Permalink
SystemLogin: Add BMC checks for OOM
Browse files Browse the repository at this point in the history
Add filtering to check the BMC dmesg's for Out of memory and Killed
process.

Signed-off-by: Deb McLemore <debmc@linux.ibm.com>
  • Loading branch information
debmc committed Apr 22, 2019
1 parent 675d88f commit 7360f78
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions testcases/SystemLogin.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def runTest(self):
if (isinstance(self.cv_BMC, OpTestMambo.OpTestMambo)) \
or (isinstance(self.cv_BMC, OpTestQemu.OpTestQemu)):
raise unittest.SkipTest("QEMU/Mambo so skipping BMCLogin test")

filter_list = [
'Out of memory: Kill process',
'Killed process',
]

found_issues = []

r = self.cv_BMC.run_command("echo 'Hello World'")
self.assertIn("Hello World", r)
try:
Expand All @@ -91,6 +99,16 @@ def runTest(self):
self.assertEqual(r.exitcode, 1)
for i in range(2):
self.cv_BMC.run_command("dmesg")
try:
r = self.cv_BMC.run_command("dmesg")
for f in filter_list:
fre = re.compile(f)
found_issues = [l for l in r if fre.search(l)]
log.debug("BMC found_issues={}".format(found_issues))
msg = '\n'.join(filter(None, found_issues))
self.assertTrue( len(found_issues) == 0, "REPORT_BUG BMC dmesg, debug log has full details:\n{}".format(msg))
except CommandFailed as r:
log.debug("BMC dmesg grep for issues failed")

class SSHHostLogin(unittest.TestCase):
'''
Expand Down

0 comments on commit 7360f78

Please sign in to comment.