PEL: Don't fix user specified action flags

Previously, the PEL object would never trust the action flags field
specified in the PEL registry and would always set some of the flags in
it itself based on a set of rules.

It turns out there are some cases where what the user needs doesn't
match the rules, so now only fix up the action flags if they weren't
specified in the registry and leave the flags alone if they were.

Most PELs in the registry should be able to leave out the action flags
field and let the PEL code set them.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I80263d779c842acac042023c468b7e979ec7158c
diff --git a/test/openpower-pels/pel_test.cpp b/test/openpower-pels/pel_test.cpp
index 6136733..0680185 100644
--- a/test/openpower-pels/pel_test.cpp
+++ b/test/openpower-pels/pel_test.cpp
@@ -204,6 +204,18 @@
     EXPECT_EQ(mtmsCount, 1);
     EXPECT_EQ(euhCount, 1);
     EXPECT_EQ(udCount, 2); // AD section and sysInfo section
+
+    {
+        // The same thing, but without the action flags specified
+        // in the registry, so the constructor should set them.
+        regEntry.actionFlags = std::nullopt;
+
+        PEL pel2{
+            regEntry, 42,   timestamp, phosphor::logging::Entry::Level::Error,
+            ad,       ffdc, dataIface};
+
+        EXPECT_EQ(pel2.userHeader().actionFlags(), 0xA800);
+    }
 }
 
 // Test that when the AdditionalData size is over 16KB that