summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/test
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2017-09-06 11:59:01 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-09-06 11:26:21 -0500
commitbb6dc0455116376808c3bc090ceb58d80c9d7a90 (patch)
tree4afc2393a47b58a2b84f975f303677c22c6c08ac /src/usr/fapi2/test
parentfd77849e3981e7a6e463d35c748ecb53b6a5dd81 (diff)
downloadblackbird-hostboot-bb6dc0455116376808c3bc090ceb58d80c9d7a90.tar.gz
blackbird-hostboot-bb6dc0455116376808c3bc090ceb58d80c9d7a90.zip
Add prototype for releasing platform data pointer storage function
Change-Id: I94dbc2125a2c8e0a75f35df067f14c4ca01463d0 CQ:SW401034 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/45718 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/45727 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/test')
-rw-r--r--src/usr/fapi2/test/fapi2CreatePlatLogTest.H28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/usr/fapi2/test/fapi2CreatePlatLogTest.H b/src/usr/fapi2/test/fapi2CreatePlatLogTest.H
index 3cccd74c1..99d71354c 100644
--- a/src/usr/fapi2/test/fapi2CreatePlatLogTest.H
+++ b/src/usr/fapi2/test/fapi2CreatePlatLogTest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -59,6 +59,7 @@ public:
l_rc.forgetData();
+ l_rc = fapi2::FAPI2_RC_INVALID_ATTR_GET;
l_sev = fapi2::FAPI2_ERRL_SEV_PREDICTIVE;
createPlatLog(l_rc, l_sev);
l_errl = reinterpret_cast<errlHndl_t>(l_rc.getPlatDataPtr());
@@ -76,13 +77,15 @@ public:
l_rc.forgetData();
+ l_rc = fapi2::FAPI2_RC_INVALID_ATTR_GET;
l_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE;
createPlatLog(l_rc, l_sev);
+ l_errl = reinterpret_cast<errlHndl_t>(l_rc.getPlatDataPtr());
if(l_errl->sev() != ERRORLOG::ERRL_SEV_UNRECOVERABLE)
{
TS_FAIL("testCreatePlatLogCreatorFapi2: incorrect errl severity. "
"Expected: %x Actual: %x",
- ERRORLOG::ERRL_SEV_PREDICTIVE,
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
l_errl->sev());
}
@@ -123,7 +126,17 @@ public:
TRACDCOMP(g_trac_runtime, "testCreatePlatLogCreatorPlat: ERRL_SEV_RECOVERED passed");
}
+ l_rc = fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
l_sev = fapi2::FAPI2_ERRL_SEV_PREDICTIVE;
+ // Allocate a fake error log since PLAT code path expects a non-null ptr
+ l_errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_FIRST_MODULE_ID,
+ fapi2::RC_HWP_GENERATED_ERROR,
+ ERRORLOG::ERRL_TEST_REASON_CODE);
+
+ l_rc.setPlatDataPtr(reinterpret_cast<void *>(l_errl));
+
createPlatLog(l_rc, l_sev);
l_errl = reinterpret_cast<errlHndl_t>(l_rc.getPlatDataPtr());
if(l_errl->sev() != ERRORLOG::ERRL_SEV_PREDICTIVE)
@@ -138,7 +151,16 @@ public:
TRACDCOMP(g_trac_runtime, "testCreatePlatLogCreatorPlat: ERRL_SEV_PREDICTIVE passed");
}
+ l_rc = fapi2::FAPI2_RC_PLAT_ERR_SEE_DATA;
l_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE;
+ l_errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_FIRST_MODULE_ID,
+ fapi2::RC_HWP_GENERATED_ERROR,
+ ERRORLOG::ERRL_TEST_REASON_CODE);
+
+ l_rc.setPlatDataPtr(reinterpret_cast<void *>(l_errl));
+
createPlatLog(l_rc, l_sev);
l_errl = reinterpret_cast<errlHndl_t>(l_rc.getPlatDataPtr());
if(l_errl->sev() != ERRORLOG::ERRL_SEV_UNRECOVERABLE)
@@ -179,6 +201,7 @@ public:
}
l_rc.forgetData();
+ l_rc = 0x00000001; // Fake return code wit creator == HWP
l_sev = fapi2::FAPI2_ERRL_SEV_PREDICTIVE;
createPlatLog(l_rc, l_sev);
l_errl = reinterpret_cast<errlHndl_t>(l_rc.getPlatDataPtr());
@@ -195,6 +218,7 @@ public:
}
l_rc.forgetData();
+ l_rc = 0x00000001; // Fake return code wit creator == HWP
l_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE;
createPlatLog(l_rc, l_sev);
l_errl = reinterpret_cast<errlHndl_t>(l_rc.getPlatDataPtr());
OpenPOWER on IntegriCloud