summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/test
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2019-01-22 14:49:20 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-01-31 13:38:51 -0600
commit8293d83310c151bb61bdc04932aa041ca0cd2223 (patch)
tree1286e2dec1a286903aa904e98eb08604b226d1e6 /src/usr/hwas/test
parent23c66ccdeab039d1c1ca6def64d9e37bbf9c933f (diff)
downloadtalos-hostboot-8293d83310c151bb61bdc04932aa041ca0cd2223.tar.gz
talos-hostboot-8293d83310c151bb61bdc04932aa041ca0cd2223.zip
Fix deconfigure parent rollup policy
Change to specifically designate if a target is allowed to be deconfigured by child rollup and if it should rollup to its parent. Need to cover the case where there are two different types of children and only one is allowed to rollup to the parent. Also prevent the deconfigure rollup from happening to the parent. Change-Id: I514876a46e9c8180e1fc99a969e0ca4247fbf2d9 CQ:SW454562 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70759 Reviewed-by: Christian R. Geddes <crgeddes@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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/test')
-rw-r--r--src/usr/hwas/test/hwasGardTest.H44
1 files changed, 34 insertions, 10 deletions
diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H
index 0e644b9eb..b9eba88fb 100644
--- a/src/usr/hwas/test/hwasGardTest.H
+++ b/src/usr/hwas/test/hwasGardTest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -62,6 +62,30 @@ bool compareAffinityCXX(const TargetInfo t1, const TargetInfo t2)
class HwasGardTest: public CxxTest::TestSuite
{
public:
+ /**
+ * @brief Test which verifies all targets have a valid deconfig rule
+ */
+ void testParentDeconfigRules()
+ {
+ TS_TRACE(INFO_MRK "testParentDeconfigRules: Started");
+ HWAS_INF("testParentDeconfigRules: Started");
+
+ TARGETING::TargetIterator l_pTarget;
+ for( l_pTarget = TARGETING::targetService().begin();
+ l_pTarget != TARGETING::targetService().end();
+ ++l_pTarget
+ )
+ {
+ TARGETING::ATTR_PARENT_DECONFIG_RULES_type l_rules =
+ l_pTarget->getAttr<ATTR_PARENT_DECONFIG_RULES>();
+ if (l_rules.valid == 0)
+ {
+ TS_FAIL("testParentDeconfigRules: 0x%.8X target has invalid ATTR_PARENT_DECONFIG_RULES",
+ TARGETING::get_huid(*l_pTarget));
+ }
+ }
+ HWAS_INF("testParentDeconfigRules: Ended");
+ }
/**
* @brief Test creating and getting a Deconfigure Record for a
@@ -4871,7 +4895,7 @@ public:
l_targets.push_back(l_TargetInfo);
presentByAssoc(l_targets, l_targToDeconfig);
-
+
// MI only
l_ep[1].addLast(TYPE_MC, 0);
l_ep[1].addLast(TYPE_MI, 0);
@@ -4881,7 +4905,7 @@ public:
l_targets.push_back(l_TargetInfo);
presentByAssoc(l_targets, l_targToDeconfig);
-
+
// DMI only
l_ep[2].addLast(TYPE_MC, 0);
l_ep[2].addLast(TYPE_MI, 0);
@@ -4980,7 +5004,7 @@ public:
// Add MC Group 0
//l_targets[0].pThisTarget = NULL;
- l_targets[0].affinityPath.addLast(TYPE_MC, 0);
+ l_targets[0].affinityPath.addLast(TYPE_MC, 0);
l_ep[0] = l_targets[0].affinityPath; // SHOULD GET DECONFIGURED
l_targets[0].type = TYPE_MC;
@@ -5020,7 +5044,7 @@ public:
l_targets[4].affinityPath.addLast(TYPE_MI, 0);
l_ep[4] = l_targets[4].affinityPath;
l_targets[4].type = TYPE_MI;
-
+
// Add DMI Group 1
//l_targets[5].pThisTarget = NULL;
l_targets[5].affinityPath.addLast(TYPE_MC,1);
@@ -5154,7 +5178,7 @@ public:
l_targets[7].affinityPath.addLast(TYPE_MC, 0);
l_ep[7] = l_targets[7].affinityPath;
l_targets[7].type = TYPE_MC;
-
+
// Add MI
l_targets[8].pThisTarget = NULL;
l_targets[8].affinityPath.addLast(TYPE_MC, 0);
@@ -5214,14 +5238,14 @@ public:
l_targets[0].affinityPath.addLast(TYPE_MC, 0);
l_ep[0] = l_targets[0].affinityPath; // SHOULD BE DECONFIGURED
l_targets[0].type = TYPE_MC;
-
+
// Add MI Group 0
l_targets[1].pThisTarget = NULL;
l_targets[1].affinityPath.addLast(TYPE_MC, 0);
l_targets[1].affinityPath.addLast(TYPE_MI, 0);
l_ep[1] = l_targets[1].affinityPath; // SHOULD BE DECONFIGURED
l_targets[1].type = TYPE_MI;
-
+
// Add DMI Group 0
l_targets[2].pThisTarget = NULL;
l_targets[2].affinityPath.addLast(TYPE_MC, 0);
@@ -5472,7 +5496,7 @@ public:
l_targets[5].affinityPath.addLast(TYPE_MI, 0);
l_ep[5] = l_targets[5].affinityPath;
l_targets[5].type = TYPE_MI;
-
+
// Add MC Group 0
l_targets[6].pThisTarget = NULL;
l_targets[6].affinityPath.addLast(TYPE_MC, 0);
@@ -5630,7 +5654,7 @@ public:
l_targets[11].affinityPath.addLast(TYPE_MI, 0);
l_ep[11] = l_targets[11].affinityPath;
l_targets[11].type = TYPE_MI; // SHOULD BE DECONFIGURED
-
+
// Add MI 1
l_targets[12].pThisTarget = NULL;
l_targets[12].affinityPath.addLast(TYPE_MC, 0);
OpenPOWER on IntegriCloud