Skip to content

Commit

Permalink
OpalErrorLog: Add BasicTest() to default test suite
Browse files Browse the repository at this point in the history
We reduce the number of error logs generated, as >128 is best suited
to the longer full test run.

Signed-off-by: Stewart Smith <[email protected]>
  • Loading branch information
stewartsmith committed Mar 17, 2017
1 parent 4929a8f commit c4e7862
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion op-test
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class HostSuite():
self.s.addTest(OpTestNVRAM.HostNVRAM())
self.s.addTest(OpTestHeartbeat.HeartbeatHost())
self.s.addTest(OpTestSensors.OpTestSensors())
self.s.addTest(OpalErrorLog.BasicTest())
self.s.addTest(OpalMsglog.Host())
def suite(self):
return self.s
Expand Down Expand Up @@ -152,7 +153,6 @@ class FullSuite():
self.s.addTest(OpTestI2Cdriver.FullI2C())
self.s.addTest(OpTestSensors.OpTestSensors())
self.s.addTest(LightPathDiagnostics.suite())
self.s.addTest(OpalErrorLog.BasicTest())
self.s.addTest(OpalErrorLog.FullTest())
self.s.addTest(OpTestSwitchEndianSyscall.OpTestSwitchEndianSyscall())
self.s.addTest(OpTestMCColdResetEffects.OpTestMCColdResetEffects())
Expand Down
17 changes: 9 additions & 8 deletions testcases/OpalErrorLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ def setUp(self):
self.cv_SYSTEM.goto_state(OpSystemState.OS)

def opal_elog_init(self):
if "FSP" not in self.bmc_type:
self.skipTest("FSP Platform OPAL Error log tests")

rc = self.cv_HOST.host_check_sysfs_path_availability("/sys/firmware/opal/elog/")
self.assertTrue(rc, "opal elog sysfs path is not available in host")
if "FSP" in self.bmc_type:
self.assertTrue(rc, "opal elog sysfs path is not available in host")
else:
self.skipTest("elog test not implemented for non-FSP systems")

self.cv_FSP.fsp_get_console()
if not self.cv_FSP.mount_exists():
raise OpTestError("Please mount NFS and retry the test")
Expand All @@ -66,14 +67,11 @@ def opal_elog_init(self):
self.assertTrue(self.cv_HOST.host_get_status_of_opal_errd_daemon(),
"opal_errd daemon is failed to start")

def tearDown(self):
self.cv_HOST.host_gather_opal_msg_log()
self.cv_HOST.host_gather_kernel_log()

class BasicTest(OpalErrorLog):

def count(self):
self.count = 128
self.count = 8
return self.count

##
Expand Down Expand Up @@ -105,6 +103,9 @@ def runTest(self):
break
time.sleep(1)
print "Waiting for transfer of error logs to Host: (%d\%d)" % (j, tries)
if not transfer_complete:
self.cv_HOST.host_gather_opal_msg_log()
self.cv_HOST.host_gather_kernel_log()
self.assertTrue(transfer_complete, "Failed to transfer all error logs to Host in a minute")
self.cv_FSP.clear_errorlogs_in_fsp()

Expand Down

0 comments on commit c4e7862

Please sign in to comment.