From f1186fdef28f6e23a9bda17bbef1d0e217c0430d Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 18 May 2018 14:01:16 -0500 Subject: Update getChildTargetsForCDG to use CEN PORT/DIMM The port and dimm sockets come off of the centaur on cumulus. Update this function to look at the correct attributes. These attribute do not exist on Cumulus so the default will be to just return all dimms under the input target. This code change affected the test case so an update was required there as well (i.e. the fix for this defect). Change-Id: I102c40acc124100e90dd832aeed94716c0f18811 CQ:SW428864 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59073 Reviewed-by: Martin Gloff Tested-by: Jenkins Server Reviewed-by: Christian R. Geddes Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/fapi2/test/fapi2GetChildrenTest.H | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/usr/fapi2/test') diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H index 4f012812a..5d2fac45f 100644 --- a/src/usr/fapi2/test/fapi2GetChildrenTest.H +++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H @@ -911,6 +911,8 @@ void test_fapi2getChildTargetsForCDG() TARGETING::Target * l_cumulusProc = nullptr; TARGETING::Target * l_proc = nullptr; size_t l_expectedDimms = 0; + size_t l_expectedDimmsUnderPort0 = 0; + size_t l_expectedDimmsUnderPort1 = 0; do { FAPI_DBG("start of test_fapi2getChildTargetsForCDG()"); @@ -929,12 +931,16 @@ void test_fapi2getChildTargetsForCDG() { l_proc = l_nimbusProc; l_expectedDimms = 16; - + l_expectedDimmsUnderPort0 = l_expectedDimms; + l_expectedDimmsUnderPort1 = 0; } else if (l_cumulusProc != nullptr) { l_proc = l_cumulusProc; l_expectedDimms = 8; + l_expectedDimmsUnderPort0 = l_expectedDimms/2; + l_expectedDimmsUnderPort1 = l_expectedDimms/2; + } else //both are nullptr { @@ -973,10 +979,11 @@ void test_fapi2getChildTargetsForCDG() FAPI_INF("test_fapi2getChildTargetsForCDG: Dimms under proc 0x%.08X port 0 is %d", TARGETING::get_huid(l_proc),l_dimmList.size()); numTests++; - if(l_dimmList.size() != l_expectedDimms) + + if(l_dimmList.size() != l_expectedDimmsUnderPort0) { FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under port 0 not equal expected %d", - l_dimmList.size(),l_expectedDimms); + l_dimmList.size(),l_expectedDimmsUnderPort0); numFails++; } @@ -989,10 +996,11 @@ void test_fapi2getChildTargetsForCDG() FAPI_INF("test_fapi2getChildTargetsForCDG: Dimms under proc 0x%.08X port 1 is %d", TARGETING::get_huid(l_proc),l_dimmList.size()); numTests++; - if(l_dimmList.size() != 0) + + if(l_dimmList.size() != l_expectedDimmsUnderPort1) { FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under port 1 not equal expected %d", - l_dimmList.size(),0); + l_dimmList.size(),l_expectedDimmsUnderPort1); numFails++; } -- cgit v1.2.3