PEL: Store system boot state in user data section
For every incoming pel data interface watches the dbus property
that includes the latest boot progress/state value. This value would be
captured and stored in user data section of pel.
Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: Ie48e7ee9fdd965af672f4bd563f8c9fc3bfacc43
diff --git a/test/openpower-pels/pel_test.cpp b/test/openpower-pels/pel_test.cpp
index f980c9d..322d0ca 100644
--- a/test/openpower-pels/pel_test.cpp
+++ b/test/openpower-pels/pel_test.cpp
@@ -413,6 +413,8 @@
EXPECT_CALL(dataIface, getBMCState()).WillOnce(Return("State.Ready"));
EXPECT_CALL(dataIface, getChassisState()).WillOnce(Return("State.On"));
EXPECT_CALL(dataIface, getHostState()).WillOnce(Return("State.Off"));
+ EXPECT_CALL(dataIface, getBootState())
+ .WillOnce(Return("State.SystemInitComplete"));
EXPECT_CALL(dataIface, getSystemIMKeyword())
.WillOnce(Return(std::vector<uint8_t>{0, 1, 0x55, 0xAA}));
@@ -453,6 +455,9 @@
state = json["HostState"].get<std::string>();
EXPECT_EQ(state, "Off");
+ state = json["BootState"].get<std::string>();
+ EXPECT_EQ(state, "SystemInitComplete");
+
auto keyword = json["System IM"].get<std::string>();
EXPECT_EQ(keyword, "000155AA");
}