From c4e786270c6ef06b599ea28a23e7b50d1eee8d44 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Fri, 17 Mar 2017 15:07:37 +1100 Subject: [PATCH] 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 --- op-test | 2 +- testcases/OpalErrorLog.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/op-test b/op-test index f0955adc9..ace559561 100755 --- a/op-test +++ b/op-test @@ -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 @@ -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()) diff --git a/testcases/OpalErrorLog.py b/testcases/OpalErrorLog.py index 219fe8259..1f8b45d18 100644 --- a/testcases/OpalErrorLog.py +++ b/testcases/OpalErrorLog.py @@ -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") @@ -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 ## @@ -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()