Skip to content

Commit

Permalink
Enable FAPI Cumulus test cases
Browse files Browse the repository at this point in the history
  - Only run MCBIST/MCS/MCA testcases on Nimbus procs
  - Add MC/MI/DMI testcases on Cumulus procs

Change-Id: Ica5783c2694ef549e81ad8eb484cc62bdc499de0
RTC: 178802
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54396
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@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>
  • Loading branch information
wghoffa authored and dcrowell77 committed Mar 29, 2018
1 parent 90eaed6 commit a17b84a
Show file tree
Hide file tree
Showing 9 changed files with 943 additions and 416 deletions.
391 changes: 296 additions & 95 deletions src/usr/fapi2/test/fapi2GetChildrenTest.H

Large diffs are not rendered by default.

435 changes: 253 additions & 182 deletions src/usr/fapi2/test/fapi2GetParentTest.H

Large diffs are not rendered by default.

40 changes: 21 additions & 19 deletions src/usr/fapi2/test/fapi2HwAccessTest.H
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void test_fapi2HwAccess()
{
int numTests = 0;
int numFails = 0;
errlHndl_t l_errl = NULL;
errlHndl_t l_errl = nullptr;
do
{
// Create a vector of TARGETING::Target pointers
Expand All @@ -75,8 +75,9 @@ void test_fapi2HwAccess()
// Get a list of all of the proc chips
TARGETING::getAllChips(l_chipList, TARGETING::TYPE_PROC, false);

TARGETING::Target * l_nimbusProc = NULL;
TARGETING::Target * l_cumulusProc = NULL;
TARGETING::Target * l_nimbusProc = nullptr;
TARGETING::Target * l_cumulusProc = nullptr;
TARGETING::Target * l_proc = nullptr;

//Take the first NIMBUS proc and use it
for(uint32_t i = 0; i < l_chipList.size(); i++)
Expand All @@ -96,26 +97,27 @@ void test_fapi2HwAccess()
}

numTests++;
if(l_cumulusProc)
if (l_nimbusProc != nullptr)
{
// @todo RTC 178802 Enable test cases turned off during bring up
// This test needs to be updated for Cumulus
break;
l_proc = l_nimbusProc;
}
else if (l_cumulusProc != nullptr)
{
l_proc = l_cumulusProc;
}
if(l_nimbusProc == NULL)
else //both are nullptr
{
// Send an errorlog because we cannot find any NIMBUS procs.
TS_FAIL("FAPI2_GETPARENT:: could not find Nimbus proc, skipping tests");
TS_FAIL("FAPI2_fapi2HwAccess:: could not find any procs, skipping tests");
numFails++;
break;
}

Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(
l_nimbusProc);
l_proc);

numTests++;
FAPI_INVOKE_HWP(l_errl, p9_scomtest_getscom_fail, fapi2_procTarget);
if(l_errl != NULL)
if(l_errl != nullptr)
{
delete l_errl; // delete expected error log
}
Expand All @@ -126,7 +128,7 @@ void test_fapi2HwAccess()
}
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_scomtest_putscom_fail, fapi2_procTarget);
if(l_errl != NULL)
if(l_errl != nullptr)
{
delete l_errl; // delete expected error log
}
Expand All @@ -137,7 +139,7 @@ void test_fapi2HwAccess()
}
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_cfamtest_putcfam_fail, fapi2_procTarget);
if(l_errl != NULL)
if(l_errl != nullptr)
{
delete l_errl; // delete expected error log
}
Expand All @@ -148,7 +150,7 @@ void test_fapi2HwAccess()
}
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_cfamtest_getcfam_fail, fapi2_procTarget);
if(l_errl != NULL)
if(l_errl != nullptr)
{
delete l_errl; // delete expected error log
}
Expand Down Expand Up @@ -202,7 +204,7 @@ void test_fapi2HwAccess()

numTests++;
FAPI_INVOKE_HWP(l_errl, p9_ringtest_getring_fail, fapi2_procTarget);
if(l_errl != NULL)
if(l_errl != nullptr)
{
delete l_errl; // delete expected error log
}
Expand Down Expand Up @@ -241,7 +243,7 @@ void test_fapi2HwAccess()
#if 0 // TODO-RTC:151428 - need simics support for these to pass
numTests++;
FAPI_INVOKE_HWP(l_errl, p9_ringtest_modring_fail, fapi2_procTarget);
if(l_errl != NULL)
if(l_errl != nullptr)
{
delete l_errl; // delete expected error log
}
Expand Down Expand Up @@ -283,7 +285,7 @@ void test_piberrmask()
FAPI_INF("Entering test_piberrmask...");
FAPI_INF("Ensure that getPIBErrorMask return 0 initially");

errlHndl_t l_errl = NULL;
errlHndl_t l_errl = nullptr;

do
{
Expand Down Expand Up @@ -352,7 +354,7 @@ void test_getsetopmode()
}

//Call FAPI_INVOKE on an empty function to test if it resets the opMode
errlHndl_t l_errl = NULL;
errlHndl_t l_errl = nullptr;
FAPI_INVOKE_HWP(l_errl,empty_function);
if( l_errl )
{
Expand Down

0 comments on commit a17b84a

Please sign in to comment.