diff options
author | Mike Jones <mjjones@us.ibm.com> | 2011-11-17 12:40:13 -0600 |
---|---|---|
committer | MIKE J. JONES <mjjones@us.ibm.com> | 2011-11-22 13:06:40 -0600 |
commit | d4c1403e772f0f8364d34bca3da8dbca5e9b7f08 (patch) | |
tree | 0f396ec22cb4e5381093ad8168ec313fcb11eb9c /src/usr/hwas/test/hwasGardTest.H | |
parent | ec713997f4b43ebfbea50c37330198208cf5a471 (diff) | |
download | talos-hostboot-d4c1403e772f0f8364d34bca3da8dbca5e9b7f08.tar.gz talos-hostboot-d4c1403e772f0f8364d34bca3da8dbca5e9b7f08.zip |
HWAS: Deconfigure Targets with GARD Records
Change-Id: I4131019c1f14d5038ace45c7e692994f135348ac
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/501
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/test/hwasGardTest.H')
-rw-r--r-- | src/usr/hwas/test/hwasGardTest.H | 99 |
1 files changed, 20 insertions, 79 deletions
diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H index d863072b3..4a73dc7ec 100644 --- a/src/usr/hwas/test/hwasGardTest.H +++ b/src/usr/hwas/test/hwasGardTest.H @@ -126,13 +126,6 @@ public: TARGETING::EntityPath l_id = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // Create an error log to pass to the deconfigureTarget function, this - // will never be committed. - errlHndl_t l_pNewErr = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_DECONFIG_GARD, - HWAS::RC_TARGET_NOT_DECONFIGURABLE); - do { // Get any existing Deconfigure Record for the chip @@ -155,9 +148,8 @@ public: TARGETING::HwasState l_origState = l_pTarget->getAttr<TARGETING::ATTR_HWAS_STATE>(); - // Deconfigure the chip - l_pErr = HWAS::theDeconfigGard().deconfigureTarget(*l_pTarget, - l_pNewErr); + // Deconfigure the chip. Production code will pass a valid PLID + l_pErr = HWAS::theDeconfigGard().deconfigureTarget(*l_pTarget, 0); if (l_pErr) { @@ -221,9 +213,6 @@ public: } while (0); - delete l_pNewErr; - l_pNewErr = NULL; - if (l_pErr) { errlCommit(l_pErr,HWAS_COMP_ID); @@ -246,13 +235,6 @@ public: TARGETING::EntityPath l_id = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // Create an error log to pass to the deconfigureTarget function, this - // will never be committed. - errlHndl_t l_pNewErr = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_DECONFIG_GARD, - HWAS::RC_TARGET_NOT_DECONFIGURABLE); - do { // Get any existing Deconfigure Record for the chip @@ -275,9 +257,8 @@ public: TARGETING::HwasState l_origState = l_pTarget->getAttr<TARGETING::ATTR_HWAS_STATE>(); - // Deconfigure the chip - l_pErr = HWAS::theDeconfigGard().deconfigureTarget(*l_pTarget, - l_pNewErr); + // Deconfigure the chip. Production code will pass a valid PLID + l_pErr = HWAS::theDeconfigGard().deconfigureTarget(*l_pTarget, 0); if (l_pErr) { @@ -286,8 +267,7 @@ public: } // Deconfigure the chip again - l_pErr = HWAS::theDeconfigGard().deconfigureTarget(*l_pTarget, - l_pNewErr); + l_pErr = HWAS::theDeconfigGard().deconfigureTarget(*l_pTarget, 0); if (l_pErr) { @@ -333,9 +313,6 @@ public: } while (0); - delete l_pNewErr; - l_pNewErr = NULL; - if (l_pErr) { errlCommit(l_pErr,HWAS_COMP_ID); @@ -446,13 +423,6 @@ public: TARGETING::EntityPath l_id = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // Create an error log to pass to the createGardRecord function, this - // will never be committed. - errlHndl_t l_pNewErr = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_DECONFIG_GARD, - HWAS::RC_TARGET_NOT_DECONFIGURABLE); - do { // Get any existing GARD Records for the chip @@ -471,9 +441,10 @@ public: break; } - // Create a GARD Record for the chip + // Create a GARD Record for the chip. Production code will pass a + // valid PLID l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE); if (l_pErr) @@ -537,9 +508,6 @@ public: } while (0); - delete l_pNewErr; - l_pNewErr = NULL; - if (l_pErr) { errlCommit(l_pErr,HWAS_COMP_ID); @@ -562,13 +530,6 @@ public: TARGETING::EntityPath l_id = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // Create an error log to pass to the createGardRecord function, this - // will never be committed. - errlHndl_t l_pNewErr = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_DECONFIG_GARD, - HWAS::RC_TARGET_NOT_DECONFIGURABLE); - do { // Get any existing GARD Records for the chip @@ -587,9 +548,10 @@ public: break; } - // Create a GARD Record for the chip + // Create a GARD Record for the chip. Production code will pass a + // valid PLID l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE); if (l_pErr) @@ -600,7 +562,7 @@ public: // Create another GARD Record for the chip l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_FATAL); if (l_pErr) @@ -656,9 +618,6 @@ public: } while (0); - delete l_pNewErr; - l_pNewErr = NULL; - if (l_pErr) { errlCommit(l_pErr,HWAS_COMP_ID); @@ -680,13 +639,6 @@ public: TARGETING::targetService().masterProcChipTargetHandle(l_pTarget); TARGETING::EntityPath l_id = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - - // Create an error log to pass to the createGardRecord function, this - // will never be committed. - errlHndl_t l_pNewErr = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_DECONFIG_GARD, - HWAS::RC_TARGET_NOT_DECONFIGURABLE); do { @@ -706,9 +658,10 @@ public: break; } - // Create a GARD Record for the chip + // Create a GARD Record for the chip. Production code will pass a + // valid PLID l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE); if (l_pErr) @@ -719,7 +672,7 @@ public: // Create another GARD Record for the chip l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_FATAL); if (l_pErr) @@ -804,9 +757,6 @@ public: } while (0); - delete l_pNewErr; - l_pNewErr = NULL; - if (l_pErr) { errlCommit(l_pErr,HWAS_COMP_ID); @@ -829,13 +779,6 @@ public: TARGETING::EntityPath l_id = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>(); - // Create an error log to pass to the createGardRecord function, this - // will never be committed. - errlHndl_t l_pNewErr = new ERRORLOG::ErrlEntry( - ERRORLOG::ERRL_SEV_UNRECOVERABLE, - HWAS::MOD_DECONFIG_GARD, - HWAS::RC_TARGET_NOT_DECONFIGURABLE); - do { // Get all existing GARD Records @@ -854,9 +797,10 @@ public: break; } - // Create a GARD Record for the chip + // Create a GARD Record for the chip. Production code will pass a + // valid PLID l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_PREDICTIVE); if (l_pErr) @@ -867,7 +811,7 @@ public: // Create another GARD Record for the chip l_pErr = HWAS::theDeconfigGard(). - createGardRecord(*l_pTarget, l_pNewErr, + createGardRecord(*l_pTarget, 0, HWAS::DeconfigGard::GARD_SEVERITY_FATAL); if (l_pErr) @@ -907,9 +851,6 @@ public: } while (0); - delete l_pNewErr; - l_pNewErr = NULL; - if (l_pErr) { errlCommit(l_pErr,HWAS_COMP_ID); |