PEL: Pass FFDC files into PEL

In the case where an OpenBMC event log was created with the
'createWithFFDCFiles' D-Bus method, there needs to be UserData PEL
sections created with the contents of these files.

This commit passes these files into the PEL constructor, which then does
the creating.  If any of this would cause the PEL size to go over 16KB,
then that section will be trimmed so it fits in the 16KB, and no more
additional sections will be added.

The function that actually reads the FFDC file and creates the UserData
section is stubbed out and will be implemented in a future commit.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id27802c91326381a4b80fbe78ab62471cefe0286
diff --git a/test/openpower-pels/pel_test.cpp b/test/openpower-pels/pel_test.cpp
index ea1842d..c5a1571 100644
--- a/test/openpower-pels/pel_test.cpp
+++ b/test/openpower-pels/pel_test.cpp
@@ -26,6 +26,7 @@
 
 namespace fs = std::filesystem;
 using namespace openpower::pels;
+using ::testing::NiceMock;
 using ::testing::Return;
 
 class PELTest : public CleanLogID
@@ -139,10 +140,11 @@
 
     std::vector<std::string> data{"KEY1=VALUE1"};
     AdditionalData ad{data};
-    MockDataInterface dataIface;
+    NiceMock<MockDataInterface> dataIface;
+    PelFFDC ffdc;
 
-    PEL pel{regEntry, 42, timestamp, phosphor::logging::Entry::Level::Error, ad,
-            dataIface};
+    PEL pel{regEntry, 42,   timestamp, phosphor::logging::Entry::Level::Error,
+            ad,       ffdc, dataIface};
 
     EXPECT_TRUE(pel.valid());
     EXPECT_EQ(pel.privateHeader().obmcLogID(), 42);
@@ -193,6 +195,7 @@
     regEntry.actionFlags = 0xC000;
     regEntry.src.type = 0xBD;
     regEntry.src.reasonCode = 0x1234;
+    PelFFDC ffdc;
 
     // Over the 16KB max PEL size
     std::string bigAD{"KEY1="};
@@ -200,10 +203,10 @@
 
     std::vector<std::string> data{bigAD};
     AdditionalData ad{data};
-    MockDataInterface dataIface;
+    NiceMock<MockDataInterface> dataIface;
 
-    PEL pel{regEntry, 42, timestamp, phosphor::logging::Entry::Level::Error, ad,
-            dataIface};
+    PEL pel{regEntry, 42,   timestamp, phosphor::logging::Entry::Level::Error,
+            ad,       ffdc, dataIface};
 
     EXPECT_TRUE(pel.valid());
     EXPECT_EQ(pel.size(), 16384);