diff options
| author | Richard J. Knight <rjknight@us.ibm.com> | 2013-05-28 22:40:00 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-06-11 09:40:22 -0500 |
| commit | 38426697653080768b76928d98b0b4d33f6f891e (patch) | |
| tree | 21e6b7d62373a302a41f0ed0907174572cd15d3a /src/usr/errl/test | |
| parent | 0e4d11615a5808b534ad7d0bbec53294c3f9f9f9 (diff) | |
| download | talos-hostboot-38426697653080768b76928d98b0b4d33f6f891e.tar.gz talos-hostboot-38426697653080768b76928d98b0b4d33f6f891e.zip | |
Set failing subsystem ID based on callout priority
Change-Id: I1b1dc7c9fc9331603246d8be7a5313fe84163f51
RTC:51414
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4746
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/test')
| -rw-r--r-- | src/usr/errl/test/errltest.H | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index 97ac196be..5a8b1f769 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -478,6 +478,143 @@ public: while(0); #endif } + + /** + * @brief Test callouts + */ + void testErrl4(void) + { + TS_TRACE( "test testErrl4"); +#if 1 + // these tests deconfigure and gard targets. and even tho they + // restore their state after the tests, since the cxxtests are + // all run in parallel, during the time that a target is non- + // functional due to this test, another test may be running that + // might be adversly affected. + // tests are left in the code so that a developer can enable them + // to test these specific functions - just keep in mind that there + // could be side effects in other cxxtests. + TS_TRACE( " - SKIPPING -- other tests could be adversly affected"); +#else + do + { + // find a proc target + TARGETING::PredicateCTM procChipFilter( + TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC); + TARGETING::TargetRangeFilter pProc( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &procChipFilter); + + // find a membuf target + TARGETING::PredicateCTM membufChipFilter( + TARGETING::CLASS_CHIP,TARGETING::TYPE_MEMBUF); + TARGETING::TargetRangeFilter pMembuf( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &membufChipFilter); + + // Create an error log + errlHndl_t errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE); + + // test the different callout types + TS_TRACE( "test callout pProc %p", *pProc); + ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl); + + errl->addHwCallout(*pMembuf, + HWAS::SRCI_PRIORITY_MED, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addProcedureCallout( + HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, + HWAS::SRCI_PRIORITY_HIGH); + + errlCommit(errl, CXXTEST_COMP_ID); + + TS_TRACE( "testErrl4 done"); + + } + while(0); +#endif + } + + /** + * @brief Test callouts + */ + void testErrlr5(void) + { + TS_TRACE( "test testErrl5"); +#if 1 + // these tests deconfigure and gard targets. and even tho they + // restore their state after the tests, since the cxxtests are + // all run in parallel, during the time that a target is non- + // functional due to this test, another test may be running that + // might be adversly affected. + // tests are left in the code so that a developer can enable them + // to test these specific functions - just keep in mind that there + // could be side effects in other cxxtests. + TS_TRACE( " - SKIPPING -- other tests could be adversly affected"); +#else + do + { + // find a proc target + TARGETING::PredicateCTM procChipFilter( + TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC); + TARGETING::TargetRangeFilter pProc( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &procChipFilter); + + // find a membuf target + TARGETING::PredicateCTM membufChipFilter( + TARGETING::CLASS_CHIP,TARGETING::TYPE_MEMBUF); + TARGETING::TargetRangeFilter pMembuf( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &membufChipFilter); + + // Create an error log + errlHndl_t errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE); + + // test the different callout types + TS_TRACE( "test callout pProc %p", *pProc); + ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl); + + errl->addHwCallout(*pMembuf, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, + HWAS::SRCI_PRIORITY_LOW, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addProcedureCallout( + HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, + HWAS::SRCI_PRIORITY_MED ); + + errlCommit(errl, CXXTEST_COMP_ID); + + TS_TRACE( "testErrl5 done"); + + } + while(0); +#endif + } + }; #endif |

