Skip to content

Commit c4e7862

Browse files
committed
OpalErrorLog: Add BasicTest() to default test suite
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]>
1 parent 4929a8f commit c4e7862

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

op-test

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class HostSuite():
111111
self.s.addTest(OpTestNVRAM.HostNVRAM())
112112
self.s.addTest(OpTestHeartbeat.HeartbeatHost())
113113
self.s.addTest(OpTestSensors.OpTestSensors())
114+
self.s.addTest(OpalErrorLog.BasicTest())
114115
self.s.addTest(OpalMsglog.Host())
115116
def suite(self):
116117
return self.s
@@ -152,7 +153,6 @@ class FullSuite():
152153
self.s.addTest(OpTestI2Cdriver.FullI2C())
153154
self.s.addTest(OpTestSensors.OpTestSensors())
154155
self.s.addTest(LightPathDiagnostics.suite())
155-
self.s.addTest(OpalErrorLog.BasicTest())
156156
self.s.addTest(OpalErrorLog.FullTest())
157157
self.s.addTest(OpTestSwitchEndianSyscall.OpTestSwitchEndianSyscall())
158158
self.s.addTest(OpTestMCColdResetEffects.OpTestMCColdResetEffects())

testcases/OpalErrorLog.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ def setUp(self):
5050
self.cv_SYSTEM.goto_state(OpSystemState.OS)
5151

5252
def opal_elog_init(self):
53-
if "FSP" not in self.bmc_type:
54-
self.skipTest("FSP Platform OPAL Error log tests")
55-
5653
rc = self.cv_HOST.host_check_sysfs_path_availability("/sys/firmware/opal/elog/")
57-
self.assertTrue(rc, "opal elog sysfs path is not available in host")
54+
if "FSP" in self.bmc_type:
55+
self.assertTrue(rc, "opal elog sysfs path is not available in host")
56+
else:
57+
self.skipTest("elog test not implemented for non-FSP systems")
58+
5859
self.cv_FSP.fsp_get_console()
5960
if not self.cv_FSP.mount_exists():
6061
raise OpTestError("Please mount NFS and retry the test")
@@ -66,14 +67,11 @@ def opal_elog_init(self):
6667
self.assertTrue(self.cv_HOST.host_get_status_of_opal_errd_daemon(),
6768
"opal_errd daemon is failed to start")
6869

69-
def tearDown(self):
70-
self.cv_HOST.host_gather_opal_msg_log()
71-
self.cv_HOST.host_gather_kernel_log()
7270

7371
class BasicTest(OpalErrorLog):
7472

7573
def count(self):
76-
self.count = 128
74+
self.count = 8
7775
return self.count
7876

7977
##
@@ -105,6 +103,9 @@ def runTest(self):
105103
break
106104
time.sleep(1)
107105
print "Waiting for transfer of error logs to Host: (%d\%d)" % (j, tries)
106+
if not transfer_complete:
107+
self.cv_HOST.host_gather_opal_msg_log()
108+
self.cv_HOST.host_gather_kernel_log()
108109
self.assertTrue(transfer_complete, "Failed to transfer all error logs to Host in a minute")
109110
self.cv_FSP.clear_errorlogs_in_fsp()
110111

0 commit comments

Comments
 (0)