PEL: Update bmc & platform dump status in SRC section

With every PEL creation, the status of bmc and platform dumps -
Hardware and Hypervisor would be checked and status bits in SRC
section updated accordingly.

Change-Id: I3ec7626611cf330f2ce235a97ee3046c0d32b6ab
Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
diff --git a/test/openpower-pels/pel_test.cpp b/test/openpower-pels/pel_test.cpp
index 318a218..f980c9d 100644
--- a/test/openpower-pels/pel_test.cpp
+++ b/test/openpower-pels/pel_test.cpp
@@ -167,6 +167,11 @@
     NiceMock<MockDataInterface> dataIface;
     PelFFDC ffdc;
 
+    std::vector<std::string> dumpType{"bmc/entry", "resource/entry",
+                                      "system/entry"};
+    EXPECT_CALL(dataIface, checkDumpStatus(dumpType))
+        .WillRepeatedly(Return(std::vector<bool>{false, false, false}));
+
     PEL pel{regEntry, 42,   timestamp, phosphor::logging::Entry::Level::Error,
             ad,       ffdc, dataIface};
 
@@ -242,6 +247,11 @@
     AdditionalData ad{data};
     NiceMock<MockDataInterface> dataIface;
 
+    std::vector<std::string> dumpType{"bmc/entry", "resource/entry",
+                                      "system/entry"};
+    EXPECT_CALL(dataIface, checkDumpStatus(dumpType))
+        .WillOnce(Return(std::vector<bool>{false, false, false}));
+
     PEL pel{regEntry, 42,   timestamp, phosphor::logging::Entry::Level::Error,
             ad,       ffdc, dataIface};
 
@@ -762,6 +772,11 @@
     ffdc.emplace_back(std::move(getCustomFFDC(dir, customData)));
     ffdc.emplace_back(std::move(getCustomFFDC(dir, hugeCustomData)));
 
+    std::vector<std::string> dumpType{"bmc/entry", "resource/entry",
+                                      "system/entry"};
+    EXPECT_CALL(dataIface, checkDumpStatus(dumpType))
+        .WillOnce(Return(std::vector<bool>{false, false, false}));
+
     PEL pel{regEntry, 42,   timestamp, phosphor::logging::Entry::Level::Error,
             ad,       ffdc, dataIface};
 
@@ -849,6 +864,11 @@
         .WillOnce(DoAll(SetArgReferee<1>("1234567"), SetArgReferee<2>("CCCC"),
                         SetArgReferee<3>("123456789ABC")));
 
+    std::vector<std::string> dumpType{"bmc/entry", "resource/entry",
+                                      "system/entry"};
+    EXPECT_CALL(dataIface, checkDumpStatus(dumpType))
+        .WillRepeatedly(Return(std::vector<bool>{false, false, false}));
+
     auto dataPath = getPELReadOnlyDataPath();
     std::ofstream file{dataPath / "systemA_dev_callouts.json"};
     file << calloutJSON;
@@ -987,6 +1007,11 @@
         .WillOnce(DoAll(SetArgReferee<1>("1234567"), SetArgReferee<2>("CCCC"),
                         SetArgReferee<3>("123456789ABC")));
 
+    std::vector<std::string> dumpType{"bmc/entry", "resource/entry",
+                                      "system/entry"};
+    EXPECT_CALL(dataIface, checkDumpStatus(dumpType))
+        .WillOnce(Return(std::vector<bool>{false, false, false}));
+
     message::Entry regEntry;
     regEntry.name = "test";
     regEntry.subsystem = 5;