Update DSTL_FIR callouts in the event of failure to analyze an OCMB

Change-Id: I40c17703ad032aa98f02b43d9cb321b7fc86fea3
Signed-off-by: Caleb Palmer <cnpalmer@us.ibm.com>
diff --git a/test/test-root-cause-filter.cpp b/test/test-root-cause-filter.cpp
index a870d8f..71d7bf2 100644
--- a/test/test-root-cause-filter.cpp
+++ b/test/test-root-cause-filter.cpp
@@ -26,10 +26,17 @@
 static const auto rdfFir =
     static_cast<libhei::NodeId_t>(libhei::hash<libhei::NodeId_t>("RDFFIR"));
 
+static const auto mc_dstl_fir = static_cast<libhei::NodeId_t>(
+    libhei::hash<libhei::NodeId_t>("MC_DSTL_FIR"));
+
 TEST(RootCauseFilter, Filter1)
 {
     pdbg_targets_init(nullptr);
 
+    RasDataParser rasData{};
+
+    // Test 1: Test a checkstop with a UE root cause on an OCMB
+
     // Checkstop signature on the proc
     auto proc0 = util::pdbg::getTrgt("/proc0");
     libhei::Chip procChip0{proc0, P10_20};
@@ -38,6 +45,10 @@
     libhei::Signature checkstopSig{procChip0, eqCoreFir, 0, 14,
                                    libhei::ATTN_TYPE_CHECKSTOP};
 
+    // MC_DSTL_FIR[1]: AFU initiated Recoverable Attn on Subchannel A
+    libhei::Signature reAttnSig{procChip0, mc_dstl_fir, 0, 1,
+                                libhei::ATTN_TYPE_RECOVERABLE};
+
     // Root cause signature on the ocmb
     auto ocmb0 =
         util::pdbg::getTrgt("proc0/pib/perv12/mc0/mi0/mcc0/omi0/ocmb0");
@@ -50,12 +61,55 @@
     // Add the signatures to the isolation data
     libhei::IsolationData isoData{};
     isoData.addSignature(checkstopSig);
+    isoData.addSignature(reAttnSig);
     isoData.addSignature(ueSig);
 
-    RasDataParser rasData{};
     libhei::Signature rootCause;
     bool attnFound = filterRootCause(AnalysisType::SYSTEM_CHECKSTOP, isoData,
                                      rootCause, rasData);
     EXPECT_TRUE(attnFound);
     EXPECT_EQ(ueSig.toUint32(), rootCause.toUint32());
+
+    // Test 2: Test a checkstop with an unknown RE attn on an OCMB
+
+    // Add the signatures to the isolation data
+    isoData.flush();
+    isoData.addSignature(checkstopSig);
+    isoData.addSignature(reAttnSig);
+
+    attnFound = filterRootCause(AnalysisType::SYSTEM_CHECKSTOP, isoData,
+                                rootCause, rasData);
+    EXPECT_TRUE(attnFound);
+    EXPECT_EQ(reAttnSig.toUint32(), rootCause.toUint32());
+
+    // Test 3: Test a checkstop with an unknown UCS attn on an OCMB
+
+    // MC_DSTL_FIR[0]: AFU initiated Checkstop on Subchannel A
+    libhei::Signature ucsAttnSig{procChip0, mc_dstl_fir, 0, 0,
+                                 libhei::ATTN_TYPE_UNIT_CS};
+
+    isoData.flush();
+    isoData.addSignature(checkstopSig);
+    isoData.addSignature(ucsAttnSig);
+
+    attnFound = filterRootCause(AnalysisType::SYSTEM_CHECKSTOP, isoData,
+                                rootCause, rasData);
+    EXPECT_TRUE(attnFound);
+    EXPECT_EQ(ucsAttnSig.toUint32(), rootCause.toUint32());
+
+    // Test 4: Test a checkstop with a non-root cause recoverable from an OCMB
+
+    // RDFFIR[42]: SCOM recoverable register parity error
+    libhei::Signature reSig{ocmbChip0, rdfFir, 0, 42,
+                            libhei::ATTN_TYPE_RECOVERABLE};
+
+    isoData.flush();
+    isoData.addSignature(checkstopSig);
+    isoData.addSignature(reAttnSig);
+    isoData.addSignature(reSig);
+
+    attnFound = filterRootCause(AnalysisType::SYSTEM_CHECKSTOP, isoData,
+                                rootCause, rasData);
+    EXPECT_TRUE(attnFound);
+    EXPECT_EQ(checkstopSig.toUint32(), rootCause.toUint32());
 }