summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2019-08-20 08:28:07 -0500
committerZane C Shelley <zshelle@us.ibm.com>2019-08-22 15:10:16 -0500
commitea5da88b0188b84b8097d977e5841d3113af8354 (patch)
treeea96c13c9e1d35a002be06c994dd49ac0bfa0d56 /src/usr
parent6d14af625c19ba9b9e8783627a8ec2670839738a (diff)
downloadtalos-hostboot-ea5da88b0188b84b8097d977e5841d3113af8354.tar.gz
talos-hostboot-ea5da88b0188b84b8097d977e5841d3113af8354.zip
MDIA: Update mdiatestmba.H test case
Change-Id: I47d4612fa063cd43e3d49e4cc47e466620add3c9 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/82514 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: Benjamen G Tyner <ben.tyner@ibm.com> Reviewed-by: Zane C Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/diag/mdia/test/mdiatestmba.H113
1 files changed, 67 insertions, 46 deletions
diff --git a/src/usr/diag/mdia/test/mdiatestmba.H b/src/usr/diag/mdia/test/mdiatestmba.H
index bca85c11d..97360c80a 100644
--- a/src/usr/diag/mdia/test/mdiatestmba.H
+++ b/src/usr/diag/mdia/test/mdiatestmba.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -47,33 +47,43 @@ class MdiaMbaTest : public CxxTest::TestSuite
using namespace MDIA;
using namespace TARGETING;
- TS_TRACE(ENTER_MRK "testGetDiagnosticMode");
+ TS_TRACE( ENTER_MRK "testGetDiagnosticMode" );
- TargetHandleList mbaList;
- getAllChiplets(mbaList, TYPE_MBA);
+ TargetHandleList list;
+ fapi2::TargetType type = getMdiaTargetType();
+ if ( fapi2::TARGET_TYPE_MBA_CHIPLET == type )
+ {
+ TARGETING::getAllChiplets( list, TYPE_MBA );
+ }
+ else if ( fapi2::TARGET_TYPE_MCBIST == type )
+ {
+ TARGETING::getAllChiplets( list, TYPE_MCBIST );
+ }
+ else if ( fapi2::TARGET_TYPE_OCMB_CHIP == type )
+ {
+ TARGETING::getAllChiplets( list, TYPE_OCMB_CHIP );
+ }
- if( !mbaList.empty() )
+ if( !list.empty() )
{
DiagMode mode;
Globals globals;
- TargetHandle_t mba = mbaList[0];
+ TargetHandle_t trgt = list[0];
- errlHndl_t err = getDiagnosticMode(
- globals, mba, mode);
+ errlHndl_t err = getDiagnosticMode( globals, trgt, mode );
if(err)
{
- TS_FAIL("getDiagnosticMode failed "
- "unexpectedly");
+ TS_FAIL( "getDiagnosticMode failed unexpectedly" );
}
if(mode != ONE_PATTERN)
{
- TS_FAIL("mode != ONE_PATTERN");
+ TS_FAIL( "mode != ONE_PATTERN" );
}
}
- TS_TRACE(EXIT_MRK "testGetDiagnosticMode");
+ TS_TRACE( EXIT_MRK "testGetDiagnosticMode" );
}
void testGetWorkFlow(void)
@@ -81,63 +91,74 @@ class MdiaMbaTest : public CxxTest::TestSuite
using namespace MDIA;
using namespace TARGETING;
- TS_TRACE(ENTER_MRK "testGetWorkFlow");
+ TS_TRACE( ENTER_MRK "testGetWorkFlow" );
Globals globals;
- TargetHandle_t mba = 0;
+ TargetHandle_t trgt = 0;
DiagMode mode;
errlHndl_t err = NULL;
- TargetHandleList mbaList;
- getAllChiplets(mbaList, TYPE_MBA);
- if( !mbaList.empty() )
+ TargetHandleList list;
+ fapi2::TargetType type = getMdiaTargetType();
+ if ( fapi2::TARGET_TYPE_MBA_CHIPLET == type )
{
- mba = mbaList[0];
- err = getDiagnosticMode(
- globals, mba, mode);
+ TARGETING::getAllChiplets( list, TYPE_MBA );
+ }
+ else if ( fapi2::TARGET_TYPE_MCBIST == type )
+ {
+ TARGETING::getAllChiplets( list, TYPE_MCBIST );
+ }
+ else if ( fapi2::TARGET_TYPE_OCMB_CHIP == type )
+ {
+ TARGETING::getAllChiplets( list, TYPE_OCMB_CHIP );
+ }
- if(err)
+ if( !list.empty() )
+ {
+ trgt = list[0];
+ err = getDiagnosticMode( globals, trgt, mode );
+
+ if( err )
{
- TS_FAIL("getDiagnosticMode "
- "failed unexpectedly");
+ TS_FAIL( "getDiagnosticMode failed unexpectedly" );
}
- if(mode != ONE_PATTERN)
+ if( mode != ONE_PATTERN )
{
- TS_FAIL("mode != ONE_PATTERN");
+ TS_FAIL( "mode != ONE_PATTERN" );
}
- }
- WorkFlow wf, expected;
+ WorkFlow wf, expected;
- expected.push_back(RESTORE_DRAM_REPAIRS);
- expected.push_back(START_PATTERN_0);
- expected.push_back(START_SCRUB);
- expected.push_back(CLEAR_HW_CHANGED_STATE);
+ expected.push_back( RESTORE_DRAM_REPAIRS );
+ expected.push_back( START_PATTERN_0 );
+ expected.push_back( START_SCRUB );
+ expected.push_back( CLEAR_HW_CHANGED_STATE );
- err = getWorkFlow(mode, wf, globals);
+ err = getWorkFlow( mode, wf, globals );
- if(err)
- {
- TS_FAIL("getWorkFlow failed unexpectedly");
- }
+ if( err )
+ {
+ TS_FAIL( "getWorkFlow failed unexpectedly" );
+ }
- if(wf.size() != expected.size())
- {
- TS_FAIL("incorrect workflow size for init only mode");
- }
+ if( wf.size() != expected.size() )
+ {
+ TS_FAIL( "incorrect workflow size for init only mode" );
+ }
- int64_t index = wf.size();
+ int64_t index = wf.size();
- while(index-- != 0)
- {
- if(wf[index] != expected[index])
+ while( index-- != 0 )
{
- TS_FAIL("workflow entry incorrect or out of order");
+ if( wf[index] != expected[index] )
+ {
+ TS_FAIL( "workflow entry incorrect or out of order" );
+ }
}
}
- TS_TRACE(EXIT_MRK "testGetWorkFlow");
+ TS_TRACE( EXIT_MRK "testGetWorkFlow" );
}
};
#endif
OpenPOWER on IntegriCloud