diff options
author | Doug Gilbert <dgilbert@us.ibm.com> | 2014-03-06 14:31:57 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-03-20 14:47:01 -0500 |
commit | 6c6ededed27870f024c4e46fecfcdd2b477d30ee (patch) | |
tree | b33320cf16a12f30e5158733ff5ce92a7a7fe01d /src/usr/targeting/runtime/test/testtargeting.H | |
parent | c753ba81874b631e12d42ea70dafb7ffa9a2b253 (diff) | |
download | talos-hostboot-6c6ededed27870f024c4e46fecfcdd2b477d30ee.tar.gz talos-hostboot-6c6ededed27870f024c4e46fecfcdd2b477d30ee.zip |
HBRT fapi wakeup support
RTC: 98665
Change-Id: Ib9e9f8f3656989975cc08a29304ba7faa25c59e4
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9364
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/runtime/test/testtargeting.H')
-rw-r--r-- | src/usr/targeting/runtime/test/testtargeting.H | 72 |
1 files changed, 71 insertions, 1 deletions
diff --git a/src/usr/targeting/runtime/test/testtargeting.H b/src/usr/targeting/runtime/test/testtargeting.H index d68ade369..22d79df05 100644 --- a/src/usr/targeting/runtime/test/testtargeting.H +++ b/src/usr/targeting/runtime/test/testtargeting.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013 */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ /* */ /* p1 */ /* */ @@ -22,6 +22,11 @@ /* IBM_PROLOG_END_TAG */ #include <cxxtest/TestSuite.H> #include <targeting/common/commontargeting.H> +#include <runtime/rt_targeting.H> +#include <errl/errlentry.H> +#include <errl/errlmanager.H> +#include <targeting/common/trace.H> +#include <targeting/common/utilFilter.H> class TargetingTestSuite : public CxxTest::TestSuite { @@ -42,4 +47,69 @@ class TargetingTestSuite : public CxxTest::TestSuite (void)l_pTarget->getAttr<ATTR_PHYS_PATH>().dump(); } + + void testHBRT_targets() + { + using namespace TARGETING; + errlHndl_t err = NULL; + RT_TARG::rtChipId_t rt_chipid; + + TARGETING::TargetHandleList allTargets; + TARGETING::TargetHandleList targetList; + + getAllChips(targetList, TYPE_PROC); + + allTargets.insert(allTargets.end(), + targetList.begin(), + targetList.end()); + + targetList.clear(); + getAllChips(targetList,TYPE_MEMBUF); + + allTargets.insert(allTargets.end(), + targetList.begin(), + targetList.end()); + + targetList.clear(); + getAllChiplets(targetList, TYPE_EX); + + allTargets.insert(allTargets.end(), + targetList.begin(), + targetList.end()); + + + for(TargetHandleList::iterator pTarg = allTargets.begin(); + pTarg != allTargets.end(); ++pTarg) + { + err = RT_TARG::getRtTarget(*pTarg, rt_chipid); + if( err ) + { + TS_FAIL("getRtTarget returned error log"); + errlCommit( err, TARG_COMP_ID); + err = NULL; + break; + } + TRACDCOMP(g_trac_targeting,"chipId = %x",rt_chipid); + + TARGETING::Target * target = NULL; + + err = RT_TARG::getHbTarget(rt_chipid, target); + if(err) + { + TS_FAIL("getRtTarget_returned error log"); + errlCommit( err, TARG_COMP_ID); + err = NULL; + break; + } + + if(*pTarg != target) + { + TS_FAIL("testHBRT_targets failed for rt_chipID %x" + "target_in %p, target_out %p", + rt_chipid, + *pTarg, + target); + } + } + } }; |