summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/errl/errlentry_consts.H1
-rw-r--r--src/usr/errl/test/errltest.H33
2 files changed, 33 insertions, 1 deletions
diff --git a/src/usr/errl/errlentry_consts.H b/src/usr/errl/errlentry_consts.H
index f8c9f82f5..2577cb196 100644
--- a/src/usr/errl/errlentry_consts.H
+++ b/src/usr/errl/errlentry_consts.H
@@ -99,6 +99,7 @@ const epubTargetTypeToSub_t TARGET_TO_SUBSYS_TABLE[] =
{ TARGETING::TYPE_PEC , EPUB_IO_PHB },
{ TARGETING::TYPE_PHB , EPUB_IO_PHB },
{ TARGETING::TYPE_TPM , EPUB_CEC_HDW_SUBSYS },
+ { TARGETING::TYPE_MC , EPUB_MEMORY_SUBSYS },
};
struct epubBusTypeToSub_t
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 4fa789b53..00a5f90f6 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -1173,6 +1173,37 @@ public:
}
}
+ /**
+ * @brief Verify subsystem mapping
+ *
+ * Simple test for now that targets test for TYPE_MC related defect
+ * Can be expanded on later if time permits
+ */
+ void testErrl_verifySubsystem(void)
+ {
+ errlHndl_t l_err = nullptr;
+ l_err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
+ 0x494E464F, //INFO
+ 0);
+ // Simple test for now to verify correct subsys comes back
+ // for MC target type
+ epubSubSystem_t l_subsys = l_err->getSubSystem(TARGETING::TYPE_MC);
+ if(l_subsys != EPUB_MEMORY_SUBSYS)
+ {
+ TS_FAIL( "Incorrect subsystem type returned for TYPE_MC" );
+ }
+ else
+ {
+ TS_INFO( "Correct subsystem type returned for TYPE_MC!" );
+ }
+ // Delete the log
+ delete l_err;
+ l_err = NULL;
+ }
+
};
OpenPOWER on IntegriCloud