summaryrefslogtreecommitdiffstats
path: root/test/openpower-pels/pel_manager_test.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-09-11 12:36:07 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-09-27 14:26:15 -0500
commitc8705e2bfcc7582fb7dc89ac1598489712c006f3 (patch)
treeee5feecbbd9379d23f9d5f17e51bd8ea721bbff6 /test/openpower-pels/pel_manager_test.cpp
parentb666433986470ba76ed7357ea026db39ad0b404b (diff)
downloadphosphor-logging-c8705e2bfcc7582fb7dc89ac1598489712c006f3.tar.gz
phosphor-logging-c8705e2bfcc7582fb7dc89ac1598489712c006f3.zip
PEL: Interface to collect system data
There are PEL fields that contain information that must be obtained from various places throughout the BMC, such as the machine type/model/SN from VPD, a few types of codes levels, etc. Create a DataInterface class that will provide the APIs for collecting this information. It has an abstract base class so that its functions can be mocked to return specific data in test cases. This commit provides APIs to read and present the machine type-model and machine serial number. These will be used in the FailingMTM and ExtendedUserHeader PEL sections. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iec41fea8d9510ba711475154f019bd59f0028d2e
Diffstat (limited to 'test/openpower-pels/pel_manager_test.cpp')
-rw-r--r--test/openpower-pels/pel_manager_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/openpower-pels/pel_manager_test.cpp b/test/openpower-pels/pel_manager_test.cpp
index 9d788c9..0a82141 100644
--- a/test/openpower-pels/pel_manager_test.cpp
+++ b/test/openpower-pels/pel_manager_test.cpp
@@ -27,8 +27,10 @@ TEST_F(ManagerTest, TestCreateWithPEL)
{
auto bus = sdbusplus::bus::new_default();
phosphor::logging::internal::Manager logManager(bus, "logging_path");
+ std::unique_ptr<DataInterfaceBase> dataIface =
+ std::make_unique<DataInterface>(bus);
- openpower::pels::Manager manager{logManager};
+ openpower::pels::Manager manager{logManager, std::move(dataIface)};
// Create a PEL, write it to a file, and pass that filename into
// the create function.
OpenPOWER on IntegriCloud