platform-mc: Support CPER Event handler
Handle CPER event(0x07) which is defined in `Table 11 - PLDM Event
Type` and section `16.17 eventData format for CPEREvent` in DSP0248
v1.3.0.
The code supports:
1. Handle the PLDM event which has eventClass as CPEREvent (0x07).
2. Store the CPER data in PLDM CPER event to file at `/var/cper/`.
3. Call `CreateDump` method of `xyz.openbmc_project.Dump.Manager` D-Bus
service to create dump fault log.
4. The user can find the dump fault logs in Redfish FaultLog entries
thru URL `/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries`. Each
CPER entry includes the URL to download the created CPER data file
`/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/<id>/attachment`.
5. The user can use `cper-parser` in `libcper` to parse the CPER data in
the attached file.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I85c53933183178c6b5acdfc12c805e8a4cf1ca2a
diff --git a/platform-mc/test/platform_manager_test.cpp b/platform-mc/test/platform_manager_test.cpp
index 0d66a0b..09f94e5 100644
--- a/platform-mc/test/platform_manager_test.cpp
+++ b/platform-mc/test/platform_manager_test.cpp
@@ -187,7 +187,7 @@
EXPECT_EQ(true, terminus->initialized);
EXPECT_EQ(2, terminus->pdrs.size());
EXPECT_EQ(1, terminus->numericSensors.size());
- EXPECT_EQ("S0", terminus->getTerminusName());
+ EXPECT_EQ("S0", terminus->getTerminusName().value());
}
TEST_F(PlatformManagerTest, parseTerminusNameTest)
@@ -345,7 +345,7 @@
stdexec::sync_wait(platformManager.initTerminus());
EXPECT_EQ(true, terminus->initialized);
EXPECT_EQ(2, terminus->pdrs.size());
- EXPECT_EQ("S0", terminus->getTerminusName());
+ EXPECT_EQ("S0", terminus->getTerminusName().value());
}
TEST_F(PlatformManagerTest, initTerminusDontSupportGetPDRTest)