peltool: Print the Words6To9 'Description' field
Include the 'Description' field from the Words6To9 registry entry when printing
SRC error details.
Changed from this:
"Error Details": {
"Message": "There was a failure when reading a sensor device",
"CALLOUT_ERRNO": "0x5"
}
to this:
"Error Details": {
"Message": "There was a failure when reading a sensor device",
"CALLOUT_ERRNO": [
"0x5",
"errno of the failure"
]
}
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Icc107b0516062eb891f14f3ff3f3cffd316c6d77
diff --git a/test/openpower-pels/registry_test.cpp b/test/openpower-pels/registry_test.cpp
index 08eefc4..2b5e482 100644
--- a/test/openpower-pels/registry_test.cpp
+++ b/test/openpower-pels/registry_test.cpp
@@ -76,13 +76,13 @@
{
"6":
{
- "description": "Failing unit number",
+ "Description": "Failing unit number",
"AdditionalDataPropSource": "PS_NUM"
},
"7":
{
- "description": "bad voltage",
+ "Description": "bad voltage",
"AdditionalDataPropSource": "VOLTAGE"
}
}
@@ -180,11 +180,11 @@
auto word = (*hexwords).find(6);
EXPECT_NE(word, (*hexwords).end());
- EXPECT_EQ(word->second, "PS_NUM");
+ EXPECT_EQ(std::get<0>(word->second), "PS_NUM");
word = (*hexwords).find(7);
EXPECT_NE(word, (*hexwords).end());
- EXPECT_EQ(word->second, "VOLTAGE");
+ EXPECT_EQ(std::get<0>(word->second), "VOLTAGE");
auto& sid = entry->src.symptomID;
EXPECT_TRUE(sid);
@@ -296,6 +296,7 @@
{
"8":
{
+ "Description": "TEST",
"AdditionalDataPropSource": "TEST"
}
}
@@ -311,6 +312,7 @@
{
"R":
{
+ "Description": "TEST",
"AdditionalDataPropSource": "TEST"
}
}