[Skiboot] [PATCH] fsp-leds: add missing \n in duplicate loc code error msg

Stewart Smith stewart at linux.vnet.ibm.com
Fri Mar 10 09:45:01 AEDT 2017


Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
> On 03/09/2017 10:45 AM, Stewart Smith wrote:
>> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
>
> Thanks for fixing this. I think we are hitting few duplicate location code 
> issues in P9 box. Will look into that next week.

That's exactly where I found it :)

Using the updated op-test-framework, I wrote this small test to check
for any errors/warnings in skiboot log, and it found some on P9 (and P8
too, I have other patches for those):


--- a/op-test
+++ b/op-test
@@ -56,6 +56,7 @@ from testcases import OpTestNVRAM
 from testcases import OpTestOOBIPMI
 from testcases import OpTestOCC
 from testcases import HostLogin
+from testcases import OpalMsglog
 import testcases
 
 args, remaining_args = OpTestConfiguration.conf.parse_args(sys.argv)
@@ -80,6 +81,7 @@ class SkirootSuite():
         self.s.addTest(OpTestFastReboot.OpTestFastReboot())
         self.s.addTest(OpTestHeartbeat.HeartbeatSkiroot())
         self.s.addTest(OpTestNVRAM.SkirootNVRAM())
+        self.s.addTest(OpalMsglog.Skiroot())
 #        self.s.addTest(OpTestEnergyScale.runtime_suite())
     def suite(self):
         return self.s
@@ -103,6 +105,7 @@ class HostSuite():
         self.s.addTest(OpTestNVRAM.HostNVRAM())
         self.s.addTest(OpTestHeartbeat.HeartbeatHost())
         self.s.addTest(OpTestSensors.OpTestSensors())
+        self.s.addTest(OpalMsglog.Host())
     def suite(self):
         return self.s
 
diff --git a/testcases/OpalMsglog.py b/testcases/OpalMsglog.py
new file mode 100644
index 000000000000..4807fc0ad428
--- /dev/null
+++ b/testcases/OpalMsglog.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# OpenPOWER Automated Test Project
+#
+# Contributors Listed Below - COPYRIGHT 2017
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+
+import unittest
+
+import OpTestConfiguration
+from common.OpTestSystem import OpSystemState
+from common.OpTestConstants import OpTestConstants as BMC_CONST
+
+class OpalMsglog():
+    def setUp(self):
+        conf = OpTestConfiguration.conf
+        self.cv_HOST = conf.host()
+        self.cv_IPMI = conf.ipmi()
+        self.cv_SYSTEM = conf.system()
+
+    def runTest(self):
+        self.setup_test()
+        log_entries = self.c.run_command("grep ',[0-4]\]' /sys/firmware/opal/msglog")
+        if isinstance(log_entries, list):
+            msg = '\n'.join(log_entries)
+        else:
+            msg = log_entries
+        self.assertTrue( len(log_entries) == 0, "Warnings/Errors in OPAL log:\n%s" % msg)
+
+class Skiroot(OpalMsglog, unittest.TestCase):
+    def setup_test(self):
+        self.cv_SYSTEM.goto_state(OpSystemState.PETITBOOT_SHELL)
+        self.c = self.cv_SYSTEM.sys_get_ipmi_console()
+        self.cv_SYSTEM.host_console_unique_prompt()
+
+class Host(OpalMsglog, unittest.TestCase):
+    def setup_test(self):
+        self.cv_SYSTEM.goto_state(OpSystemState.OS)
+        self.c = self.cv_SYSTEM.host().get_ssh_connection()



-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list