summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/test
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-07-18 13:23:54 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-07-21 11:40:53 -0400
commit2db396365b7d86474564e5896a5524806a7fe6a2 (patch)
tree0bd692bd9cf9185129af402d5eed56679a22f97f /src/usr/errl/test
parent152aabbb036689a3fca32422cad11455a2ee04b2 (diff)
downloadblackbird-hostboot-2db396365b7d86474564e5896a5524806a7fe6a2.tar.gz
blackbird-hostboot-2db396365b7d86474564e5896a5524806a7fe6a2.zip
Avoid callouts, deconfigs, and gards for all non-visible errors
Fixed the deferred deconfig path that was still applying callouts for info logs Simplified where the check is for regular deconfigs Change-Id: I49ff4b0fe4ee81c28fde594c15bfd8f38bea1afc Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43289 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@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> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/errl/test')
-rw-r--r--src/usr/errl/test/errltest.H77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 8ca85d69a..4fa789b53 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -40,6 +40,7 @@
#include <errl/errludtarget.H>
#include <targeting/common/target.H>
+#include <targeting/namedtarget.H>
#include <targeting/common/iterators/rangefilter.H>
#include <targeting/common/predicates/predicates.H>
#include <hwas/common/hwasCallout.H>
@@ -1098,6 +1099,82 @@ public:
}
}
+
+ /**
+ * @brief Guarantee non-visible logs do not post callouts
+ */
+ void testErrl_hidecallouts(void)
+ {
+ // Find a non-master core that is currently functional
+ TARGETING::TargetHandleList l_cores;
+ TARGETING::getAllChiplets( l_cores, TARGETING::TYPE_CORE, true );
+ TARGETING::Target* l_victim = nullptr;
+ const TARGETING::Target* l_master = TARGETING::getMasterCore();
+ for( auto c : l_cores )
+ {
+ if( c != l_master )
+ {
+ l_victim = c;
+ break;
+ }
+ }
+ if( l_victim == nullptr )
+ {
+ TS_FAIL( "Could not find a non-master core" );
+ return;
+ }
+
+ // Create an informational log
+ errlHndl_t l_err = nullptr;
+ l_err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
+ 0x494E464F, //INFO
+ 0 );
+ // Add a callout with deconfig and gard
+ l_err->addHwCallout( l_victim,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal );
+ // Commit the log
+ errlCommit(l_err,CXXTEST_COMP_ID);
+
+ // Verify that the target wasn't actually deconfigured
+ TARGETING::ATTR_HWAS_STATE_type l_state =
+ l_victim->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ if( !l_state.functional )
+ {
+ TS_FAIL( "Info log incorrectly caused deconfig" );
+ }
+
+
+ // Create a recovered log
+ l_err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_RECOVERED,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
+ 0x52454300, //REC
+ 0 );
+ // Add a callout with deconfig and gard
+ l_err->addHwCallout( l_victim,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal );
+ // Commit the log
+ errlCommit(l_err,CXXTEST_COMP_ID);
+
+ // Verify that the target wasn't actually deconfigured
+ l_state =
+ l_victim->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ if( !l_state.functional )
+ {
+ TS_FAIL( "Recovered log incorrectly caused deconfig" );
+ }
+ }
+
+
+
};
}
OpenPOWER on IntegriCloud