diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2018-04-16 17:52:29 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-04-19 17:52:33 -0400 |
commit | 2154ad02364923d5b158825729d6e630ec7cc529 (patch) | |
tree | 7f7c5dc9b411ea75086a96828ca0a358553f52c1 /src/usr | |
parent | 47d4e4119f6a196dd61c1b93237d3ff4af7f0cd3 (diff) | |
download | talos-hostboot-2154ad02364923d5b158825729d6e630ec7cc529.tar.gz talos-hostboot-2154ad02364923d5b158825729d6e630ec7cc529.zip |
Create new HWP Invoker macro that returns the RC
Allow the RC of a HWP to be returned along with the associated
error log. This allows logic to be based on the specific RC if
needed.
Change-Id: I90a78ace2cc4263265940764dffd0691dd56e2f5
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57302
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/fapi2/test/rcTest.C | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/usr/fapi2/test/rcTest.C b/src/usr/fapi2/test/rcTest.C index 353eebbdf..4893aef95 100755 --- a/src/usr/fapi2/test/rcTest.C +++ b/src/usr/fapi2/test/rcTest.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2017 */ +/* Contributors Listed Below - COPYRIGHT 2011,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -1750,6 +1750,21 @@ uint32_t rcTestReturnCodeAttrErrls() TS_FAIL("No error from p9_registerFfdc_fail !!"); numFails++; } + + numTests++; + fapi2::ReturnCode l_rc; + FAPI_INVOKE_HWP_RC(l_errl, l_rc, p9_registerFfdc_fail, fapi2_procTarget); + if( (l_errl != NULL) && (l_rc == (fapi2::ReturnCode)fapi2::RC_TEST_ERROR_A) ) + { + FAPI_INF("p9_registerFfdc_fail returned correct RC"); + delete l_errl; + l_errl = NULL; + } + else + { + TS_FAIL("Wrong RC from p9_registerFfdc_fail !!"); + numFails++; + } } while (0); FAPI_INF("rcTestReturnCodeAttrErrls Test Complete. %d/%d fails", |