commit | 690f4d5e3e68f8fe85a8048654095c276383ebfd | [log] [tgz] |
---|---|---|
author | Lei YU <yulei.sh@bytedance.com> | Wed Apr 28 19:05:24 2021 +0800 |
committer | Lei YU <yulei.sh@bytedance.com> | Mon May 10 05:14:01 2021 +0000 |
tree | 6b3c0bf77718eccda93a72d7917306cff8bc2eca | |
parent | 758e3af98f90f0526aee315bac8c6dc9d8c1bd0c [diff] |
sel: Fix assertion in custom SEL parser The code was using assert() to make sure the custom SEL's additional data exists. The assumption was wrong because there could be log entries with additional data that does not contain the metadata defined in xyz/openbmc_project/Logging/SEL.metadata.yaml. E.g. ipmid: ../git/selutility.cpp:107: void ipmi::sel::internal::constructOEMSEL(uint8_t, std::chrono::milliseconds, const additionalDataMap&, ipmi::sel::GetSELEntryResponse&): Assertion `dataIter != m.end()' failed. The behavior is changed to: * Check if the additional data contains the SEL.metadata; * If yes, parse it as custom SEL; * If no, parse it as before, and throw if there is no associated inventory sensor, which is the logic before the custom SEL is introduced. Tested: Verify `ipmitool sel list` shows all the entries and does not assert when the logging entries without SEL.metadata exists. Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Icc3df27ade4fdc40cf4fe73d3716e7270a97a5f1
To build this package, do the following steps:
1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make
To clean the repository run ./bootstrap.sh clean
.