diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2014-03-06 13:32:44 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-03-07 14:20:46 -0600 |
| commit | e016f3f0eb6e126f410e66ff3623c8a6d5850b81 (patch) | |
| tree | 50f09e37a15868475404bde23d3cbb211940394c /src | |
| parent | 4083a7cd7829d52121eb26bf41a12d8d298d2062 (diff) | |
| download | blackbird-hostboot-e016f3f0eb6e126f410e66ff3623c8a6d5850b81.tar.gz blackbird-hostboot-e016f3f0eb6e126f410e66ff3623c8a6d5850b81.zip | |
Ensure error logs during IPL are caught as CxxTest fail.
RTC: 39871
Change-Id: I6a3045609d696f5d7d6f3d240da17a150ad70af7
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9362
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/usr/errl/errlmanager.H | 12 | ||||
| -rw-r--r-- | src/usr/cxxtest/cxxtestexec.C | 9 | ||||
| -rw-r--r-- | src/usr/errl/errlmanager.C | 17 |
3 files changed, 35 insertions, 3 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H index 23319a81a..134e3958f 100644 --- a/src/include/usr/errl/errlmanager.H +++ b/src/include/usr/errl/errlmanager.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -170,6 +170,14 @@ public: return iv_hwasProcessCalloutFn; } + /** + * @brief Determines if any non-informational logs have been committed + * during this boot. + * + * @return true - A non-informational log has been committed. + */ + static bool errlCommittedThisBoot(); + protected: /** * @brief Destructor @@ -422,6 +430,8 @@ private: bool iv_isSpBaseServices; // do we need to send to FSP bool iv_isMboxEnabled; // are we able to send to FSP std::list<msg_t *> iv_errlToSend; // msgs still to be sent to FSP + + bool iv_nonInfoCommitted; //< Keeps track of any non-informational logs. }; } // End namespace diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C index 38fa2f501..5b956dc27 100644 --- a/src/usr/cxxtest/cxxtestexec.C +++ b/src/usr/cxxtest/cxxtestexec.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -88,6 +88,13 @@ void cxxinit( errlHndl_t &io_taskRetErrl ) __sync_add_and_fetch(&CxxTest::g_ModulesStarted, 1); + // Before we launch, ensure there aren't any residual error logs from + // the IPL. + if (ERRORLOG::ErrlManager::errlCommittedThisBoot()) + { + TS_FAIL("Error logs committed previously during IPL."); + } + for(std::vector<const char *>::const_iterator i = module_list.begin(); i != module_list.end(); ++i) { diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C index b49ddc763..edd5ac7ac 100644 --- a/src/usr/errl/errlmanager.C +++ b/src/usr/errl/errlmanager.C @@ -105,7 +105,8 @@ ErrlManager::ErrlManager() : iv_maxErrlInPnor(0), iv_pnorOpenSlot(0), iv_isSpBaseServices(true), // queue msgs for fsp until we find we shouldnt - iv_isMboxEnabled(false) // but mbox isn't ready yet.. + iv_isMboxEnabled(false), // but mbox isn't ready yet.. + iv_nonInfoCommitted(false) { TRACFCOMP( g_trac_errl, ENTER_MRK "ErrlManager::ErrlManager constructor" ); @@ -584,6 +585,12 @@ void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp ) TRACFCOMP(g_trac_errl, "commitErrLog() called by %.4X for eid=%.8x, Reasoncode=%.4X", i_committerComp, io_err->eid(), io_err->reasonCode() ); + if (io_err->sev() != ERRORLOG::ERRL_SEV_INFORMATIONAL) + { + iv_nonInfoCommitted = true; + lwsync(); + } + //Ask ErrlEntry to check for any special deferred deconfigure callouts io_err->deferredDeconfigure(); @@ -720,6 +727,14 @@ void ErrlManager::sendResourcesMsg(errlManagerNeeds i_needs) } return; } + +bool ErrlManager::errlCommittedThisBoot() +{ + isync(); + return theErrlManager::instance().iv_nonInfoCommitted; +} + + /////////////////////////////////////////////////////////////////////////////// // ErrlManager::sendErrlogToMessageQueue() /////////////////////////////////////////////////////////////////////////////// |

