diff options
| author | Elliott Dahle <dedahle@us.ibm.com> | 2013-12-09 11:17:38 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-15 13:47:19 -0600 |
| commit | e147a8e14a254784ce4975806d1cc32d55af2df4 (patch) | |
| tree | 3ab4b29d4e715f23250ed10431b4d85990b37529 /src/usr/errl/test | |
| parent | e6629f1ed483f2a73f9757c7dbf8d64b549b8828 (diff) | |
| download | talos-hostboot-e147a8e14a254784ce4975806d1cc32d55af2df4.tar.gz talos-hostboot-e147a8e14a254784ce4975806d1cc32d55af2df4.zip | |
Add Deconfig State / GARD Error parameters to addClockCallout(...)
Change-Id: Ia8bd707604651f8779897a177657eaa5e639a37d
RTC:91649
CMVC-Coreq:910647
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7863
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: Christopher T. Phan <cphan@us.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 | 30 | ||||
| -rw-r--r-- | src/usr/errl/test/errluserdetailtest.H | 207 |
2 files changed, 20 insertions, 217 deletions
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index 8cd640fbb..d061355ae 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -423,8 +423,8 @@ public: errlCommit(errl, CXXTEST_COMP_ID); errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - ERRL_TEST_MOD_ID, - ERRL_TEST_REASON_CODE); + ERRORLOG::ERRL_TEST_MOD_ID, + ERRORLOG::ERRL_TEST_REASON_CODE); errl->addHwCallout(pTarget, HWAS::SRCI_PRIORITY_MED, @@ -434,8 +434,8 @@ public: errlCommit(errl, CXXTEST_COMP_ID); errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - ERRL_TEST_MOD_ID, - ERRL_TEST_REASON_CODE); + ERRORLOG::ERRL_TEST_MOD_ID, + ERRORLOG::ERRL_TEST_REASON_CODE); errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, HWAS::SRCI_PRIORITY_LOW, @@ -446,8 +446,8 @@ public: errlCommit(errl, CXXTEST_COMP_ID); errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - ERRL_TEST_MOD_ID, - ERRL_TEST_REASON_CODE); + ERRORLOG::ERRL_TEST_MOD_ID, + ERRORLOG::ERRL_TEST_REASON_CODE); errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, HWAS::SRCI_PRIORITY_MED, @@ -458,8 +458,8 @@ public: errlCommit(errl, CXXTEST_COMP_ID); errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - ERRL_TEST_MOD_ID, - ERRL_TEST_REASON_CODE); + ERRORLOG::ERRL_TEST_MOD_ID, + ERRORLOG::ERRL_TEST_REASON_CODE); errl->addProcedureCallout( HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, @@ -468,14 +468,22 @@ public: errlCommit(errl, CXXTEST_COMP_ID); errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, - ERRL_TEST_MOD_ID, - ERRL_TEST_REASON_CODE); + ERRORLOG::ERRL_TEST_MOD_ID, + ERRORLOG::ERRL_TEST_REASON_CODE); errl->addClockCallout( pExList[0], HWAS::TODCLK_TYPE, HWAS::SRCI_PRIORITY_MED); + // Clock callout using deconfig/GARD parameters + errl->addClockCallout( + pExList[0], + HWAS::TODCLK_TYPE, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::NO_DECONFIG, + HWAS::GARD_NULL); + if (pExList.size() > 1) { errl->addBusCallout( diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H index f68bf41d4..b2f2bc9a0 100644 --- a/src/usr/errl/test/errluserdetailtest.H +++ b/src/usr/errl/test/errluserdetailtest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -460,211 +460,6 @@ public: TS_TRACE( "testLogRegister errorlog user detail data - complete"); } // testLogRegister - /** - * @test testCallout - Capture a callout - */ - void testCallout(void) - { - do - { - TS_TRACE( "testCallout errorlog user detail data"); -#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 - errlHndl_t errl = NULL; - errlHndl_t gard_errl = NULL; - HWAS::DeconfigGard::DeconfigureRecords_t l_deconfigRecords; - HWAS::DeconfigGard::GardRecords_t l_gardRecords; - uint32_t deconfigCount = 0; - uint32_t gardCount = 0; - - // make sure there aren't any existing deconfigure or gard records - gard_errl = HWAS::theDeconfigGard()._getDeconfigureRecords(NULL, - l_deconfigRecords); - if (gard_errl) - { - TS_FAIL("testCallout: Error from _getDeconfigureRecords"); - errlCommit(gard_errl,HWAS_COMP_ID); - break; - } - if (l_deconfigRecords.size() != 0) - { - TS_TRACE("testCallout: %d existing Deconfigure Records, " - "skipping test", l_deconfigRecords.size()); - break; - } - - gard_errl = HWAS::theDeconfigGard().getGardRecords( - NULL, l_gardRecords); - if (gard_errl) - { - TS_FAIL("testCallout: Error from getGardRecords"); - errlCommit(gard_errl,HWAS_COMP_ID); - break; - } - if (l_gardRecords.size() != 0) - { - TS_TRACE("testCallout: %d existing GARD Records, " - "skipping test", l_gardRecords.size()); - break; - } - - /*@ - * @errortype - * @severity ERRORLOG_SEV_INFORMATIONAL - * @moduleid ERRL_USERDATA_TEST_MOD_ID - * @reasoncode ERRL_TEST_CALLOUT_UD - * @userdata1 Test data 1 - * @userdata2 Test data 2 - * @devdesc User Details unit test - create callout user detail data - */ - errl = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_INFORMATIONAL, - ERRL_USERDATA_TEST_MOD_ID, - ERRL_TEST_CALLOUT_UD, - 0x0001002300450067, // user1 - 0x008900AB00CD00EF ); // user2 - - using namespace TARGETING; - ErrlUserDetailsString("Callout test").addToLog(errl); - - // first test with Master - ErrlUserDetailsCallout( - &HWAS::TARGET_IS_SENTINEL, - sizeof(HWAS::TARGET_IS_SENTINEL), - HWAS::SRCI_PRIORITY_LOW, - HWAS::DELAYED_DECONFIG, - HWAS::GARD_PHYP).addToLog(errl); - deconfigCount++; - gardCount++; - - ErrlUserDetailsCallout( - &HWAS::TARGET_IS_SENTINEL, - sizeof(HWAS::TARGET_IS_SENTINEL), - HWAS::SRCI_PRIORITY_MED, - HWAS::DELAYED_DECONFIG, - HWAS::GARD_NULL).addToLog(errl); - - // find some ex units that we can play with - Target * pSys; - targetService().getTopLevelTarget(pSys); - - PredicateCTM predEx(CLASS_UNIT, TYPE_EX); - PredicateHwas predFunctional; - predFunctional.poweredOn(true).present(true).functional(true); - PredicatePostfixExpr checkExpr; - checkExpr.push(&predEx).push(&predFunctional).And(); - TargetHandleList pExList; - targetService().getAssociated( pExList, pSys, - TargetService::CHILD, TargetService::ALL, &checkExpr ); - - if (pExList.empty()) - { - TS_FAIL("testCallout: empty pExList"); - break; - } - TargetHandle_t l_pTarget = *pExList.begin(); - - TARGETING::EntityPath ep; - ep = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // size is total EntityPath size minus unused path elements - uint32_t ep_size = sizeof(ep) - - (TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep.size()) * - sizeof(TARGETING::EntityPath::PathElement); - - ErrlUserDetailsCallout( - &ep, - ep_size, - HWAS::SRCI_PRIORITY_LOW, - HWAS::DELAYED_DECONFIG, - HWAS::GARD_Fatal).addToLog(errl); - deconfigCount++; - gardCount++; - - ErrlUserDetailsCallout( - HWAS::EPUB_PRC_FSI_PATH, - HWAS::SRCI_PRIORITY_HIGH).addToLog(errl); - - ErrlUserDetailsCallout( - &ep, - ep_size, - HWAS::TODCLK_TYPE, - HWAS::SRCI_PRIORITY_LOW).addToLog(errl); - - if (pExList.size() > 1) - { - TARGETING::EntityPath ep2; - ep2 = pExList[1]->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // size is total EntityPath size minus unused path elements - uint32_t ep2_size = sizeof(ep2) - - (TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep2.size()) * - sizeof(TARGETING::EntityPath::PathElement); - - ErrlUserDetailsCallout( - &ep, - ep_size, - &ep2, - ep2_size, - HWAS::A_BUS_TYPE, - HWAS::SRCI_PRIORITY_LOW).addToLog(errl); - } - - // commit the errorlog - errlCommit(errl, CXXTEST_COMP_ID); - -#if 0 // GARD records are created asynchronously, so can't really test this - // confirm there are the correct number of deconfig and gard records - gard_errl = HWAS::theDeconfigGard().getGardRecords( - NULL, l_gardRecords); - if (gard_errl) - { - TS_FAIL("testCallout: Error from getGardRecords"); - errlCommit(gard_errl,HWAS_COMP_ID); - } - else if (l_gardRecords.size() != gardCount) - { - TS_FAIL("testCallout: %d GARD Records, expected %d", - l_gardRecords.size(), gardCount); - } -#endif - - gard_errl = HWAS::theDeconfigGard()._getDeconfigureRecords(NULL, - l_deconfigRecords); - if (gard_errl) - { - TS_FAIL("testCallout: Error from _getDeconfigureRecords"); - errlCommit(gard_errl,HWAS_COMP_ID); - } - else if (l_deconfigRecords.size() != deconfigCount) - { - TS_FAIL("testCallout: %d Deconfigure Records, expected %d", - l_deconfigRecords.size(), deconfigCount); - } - - // delete these deconfigure and gard records - HWAS::theDeconfigGard().clearDeconfigureRecords(NULL); - gard_errl = HWAS::theDeconfigGard().clearGardRecords(NULL); - if (gard_errl) - { - errlCommit(gard_errl,HWAS_COMP_ID); - TS_FAIL("testCallout: Error from clearGardRecords"); - } -#endif - } - while(0); - - TS_TRACE( "testCallout done"); - - } // testCallout - }; #endif |

