| 4bec95da | 17-Nov-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Misc pel_manager_test improvements
Simplify 2 things in pel_manager_test.cpp: 1. Add a 'Using Level' statement for the error log severity so the namespace doesn't have to be used in each ins
PEL: Misc pel_manager_test improvements
Simplify 2 things in pel_manager_test.cpp: 1. Add a 'Using Level' statement for the error log severity so the namespace doesn't have to be used in each instance. 2. Use std::bind_front so std::placeholders doesn't need to be used for the function args.
Change-Id: Id02a0d052f9c5e0979ad0199b01a82e2119c9b45 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| c7474999 | 28-Oct-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Removed unused header
Change-Id: I9fdacd6a504595fc8a573ed623268f993823bb52 Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
| 40fb5493 | 28-Oct-2025 |
Alexander Hansen <alexander.hansen@9elements.com> |
Copyright: Move to SPDX-License-Identifier
Original copyright holders have been preserved, this patch moves the copyright notice to the compact SPDX notation.
Change-Id: I197e79ed3f9b09e293e02bda82
Copyright: Move to SPDX-License-Identifier
Original copyright holders have been preserved, this patch moves the copyright notice to the compact SPDX notation.
Change-Id: I197e79ed3f9b09e293e02bda820fa4c52d9a88e8 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| d438c096 | 24-Oct-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL:test: Fix deprecated warnings with new gmock
The new version of gmock was complaining that the use of Invoke() for a callable was deprecated, so remove it.
``` ../subprojects/googletest/googlem
PEL:test: Fix deprecated warnings with new gmock
The new version of gmock was complaining that the use of Invoke() for a callable was deprecated, so remove it.
``` ../subprojects/googletest/googlemock/include/gmock/gmock-actions.h:2059:41: note: declared here 2059 | typename std::decay<FunctionImpl>::type Invoke(FunctionImpl&& function_impl) { | ^~~~~~ ../test/openpower-pels/host_notifier_test.cpp:489:31: error: ‘typename std::decay<_Tp>::type testing::Invoke(FunctionImpl&&) [with FunctionImpl = HostNotifierTest_TestCannotStartCmd_Test::TestBody()::<lambda(uint32_t, uint32_t)>&; typename std::decay<_Tp>::type = HostNotifierTest_TestCannotStartCmd_Test::TestBody()::<lambda(uint32_t, uint32_t)>]’ is deprecated: Actions can now be implicitly constructed from callables. No need to create wrapper objects using Invoke(). [-Werror=deprecated-declarations] 489 | .WillRepeatedly(Invoke(sendSuccess)); ```
Change-Id: Id698baa8eefbe7e2b632bf8e5e750df69e088312 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| 9e1e27c0 | 24-Oct-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL:test: Workaround new compiler issue
For reasons I'm not sure of, the compiler is now failing on a vector.resize() complaining about an array out of bounds with the errors shown below.
Change th
PEL:test: Workaround new compiler issue
For reasons I'm not sure of, the compiler is now failing on a vector.resize() complaining about an array out of bounds with the errors shown below.
Change the testcase to just initially create the vector to be 71 bytes instead of 72 and then resizing to 71.
This appears to only fail with a gcc 15.2 installed locally for standalone builds, and not with the one in CI.
``` [120/184] Compiling C++ object test/openpower-pels/test-openpower-pels-src.p/src_test.cpp.o FAILED: test/openpower-pels/test-openpower-pels-src.p/src_test.cpp.o ... inlined from ‘virtual void SRCTest_TestGetProgressCode_Test::TestBody()’ at ../test/openpower-pels/src_test.cpp:1609:19:
/usr/include/c++/15/bits/stl_construct.h:133:7: error: array subscript 72 is outside array bounds of ‘unsigned char [72]’ [-Werror=array-bounds=] 133 | ::new(static_cast<void*>(__p)) _Tp(std::forward<_Args>(__args)...); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/15/bits/c++allocator.h:33, from /usr/include/c++/15/bits/allocator.h:46, from /usr/include/c++/15/bits/alloc_traits.h:39, from /usr/include/c++/15/ext/alloc_traits.h:36, from /usr/include/c++/15/bits/hashtable_policy.h:39, from /usr/include/c++/15/bits/hashtable.h:37, from /usr/include/c++/15/bits/unordered_map.h:33, from /usr/include/c++/15/unordered_map:43, from /usr/include/c++/15/functional:65, from ../subprojects/nlohmann_json/single_include/nlohmann/json.hpp:23: In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = unsigned char]’, inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = unsigned char]’ at /usr/include/c++/15/bits/allocator.h:203:40, inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_Up> >::allocate(allocator_type&, size_type) [with _Tp = unsigned char]’ at /usr/include/c++/15/bits/alloc_traits.h:614:28, inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]’ at /usr/include/c++/15/bits/stl_vector.h:387:33, inlined from ‘constexpr void std::vector<_Tp, _Alloc>::_M_range_initialize_n(_Iterator, _Sentinel, size_type) [with _Iterator = const unsigned char*; _Sentinel = const unsigned char*; _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]’ at /usr/include/c++/15/bits/stl_vector.h:1985:23, inlined from ‘constexpr std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]’ at /usr/include/c++/15/bits/stl_vector.h:712:23, inlined from ‘virtual void SRCTest_TestGetProgressCode_Test::TestBody()’ at ../test/openpower-pels/src_test.cpp:1608:62: /usr/include/c++/15/bits/new_allocator.h:151:73: note: at offset 72 into object of size 72 allocated by ‘operator new’ 151 | return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp))); | ^ ```
Change-Id: I5f6e4b2b1137138ad7954ce6ab709cf318b05a5b Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| 897c8ec0 | 23-Oct-2025 |
James Athappilly <jamesatha@meta.com> |
Fix compile-time race conditions
When building this, some small percentage of builds would fail and it seemed like there was a race condition that was the culprit.
This creates a new static library
Fix compile-time race conditions
When building this, some small percentage of builds would fail and it seemed like there was a race condition that was the culprit.
This creates a new static library for log manager so multiple things don't rebuild it. Additionally, we explicitly depend on generated headers to ensure things that rely on it build after those files are created. I have run over 200 builds and there have been no errors.
Change-Id: I4a1fd7270d081a464d1f9ea2482d84e1331fb9a5 Signed-off-by: James Athappilly <jamesatha@gmail.com>
show more ...
|
| 8a09b982 | 09-May-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Removed unused includes
The clangd LSP indicates when includes aren't used directly.
Tested: Unit tests pass.
Change-Id: I8290fe59abd1cef4fada27aeb5adb2c45c289abb Signed-off-by: Matt Spinler
PEL: Removed unused includes
The clangd LSP indicates when includes aren't used directly.
Tested: Unit tests pass.
Change-Id: I8290fe59abd1cef4fada27aeb5adb2c45c289abb Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| f904caf4 | 09-May-2025 |
Matt Spinler <spinler@us.ibm.com> |
clang-tidy: Remove unnecessary std::move calls
Change-Id: Ic5a26cfa7c2cb1f993ea4e8ccb30c4a093a75f42 Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
| 931cafee | 22-Apr-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Fixes for State.Boot.Raw Value updates
The first entry in the std::tuple of the Value property, which is used to hold the 8 character SRC refcode, changed from a uint64_t to a std::vector<uint8
PEL: Fixes for State.Boot.Raw Value updates
The first entry in the std::tuple of the Value property, which is used to hold the 8 character SRC refcode, changed from a uint64_t to a std::vector<uint8_t>. Make the necessary updates.
Tested:
Create a PEL with a severity value of 0x51 = critical system termination. It has the refcode sent to this Value property:
``` $ busctl get-property xyz.openbmc_project.State.Boot.Raw \ /xyz/openbmc_project/state/boot/raw0 \ xyz.openbmc_project.State.Boot.Raw Value (ayay) 8 49 49 48 48 50 54 48 50 ^^ this is the correct 8 byte 11002602 refcode
and the rest is the 72 byte progress SRC: 72 2 9 0 9 0 0 0 188 0 0 0 85 46 45 0 16 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 49 49 48 48 50 54 48 50 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 ```
And now create another PEL, and this progress SRC should be in the hex words: ``` "Reference Code": "BD8D3601", "Hex Word 2": "00000055", "Hex Word 3": "2E2D0010", "Hex Word 4": "11002602", <------------------- "Hex Word 5": "00000000", "Hex Word 6": "00000000", "Hex Word 7": "00000000", "Hex Word 8": "00000000", "Hex Word 9": "00000000", ```
Change-Id: I8050eaf3e372b724fa41dc358633d4b3d29fc782 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| b015dcbe | 19-Mar-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Remove callout data file after testcases
Delete the temporary /tmp/phalPELCalloutsJson.* files used by some testcases after they are done with it.
Tested: No longer see files like '/tmp/phalPE
PEL: Remove callout data file after testcases
Delete the temporary /tmp/phalPELCalloutsJson.* files used by some testcases after they are done with it.
Tested: No longer see files like '/tmp/phalPELCalloutsJson.MbM31h' when unit tests are complete.
Change-Id: Iff2efac1391da7e5c22727a39b8a8b4d98816da5 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| 7b92372d | 19-Mar-2025 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Still create callout without full loc code
When PELs are created early during a power on reset, the service that expands location codes may not be online yet. Previously, callouts just wouldn'
PEL: Still create callout without full loc code
When PELs are created early during a power on reset, the service that expands location codes may not be online yet. Previously, callouts just wouldn't be created if a location code couldn't be expanded.
Fix that so that a callout is still created with the unexpanded location code, as that is still better than nothing. In those cases, the CC/PN/FN fields would also be empty since those are obtained by finding the FRU inventory path from the location code.
Also create a similar callout in the case where the call to get the inventory path from a location code fails.
This applies for callouts created via: - The PEL message registry - The device path lookup tables - JSON FFDC files
Tested: New unit tests that cover these paths pass.
On a system, after stopping vpd-manager.service, will get callouts like: ``` "Callout Section": { "Callout Count": "4", "Callouts": [{ "FRU Type": "Normal Hardware FRU", "Priority": "Mandatory, replace all with this type as a unit", "Location Code": "P0-C5", "Part Number": "", "CCIN": "", "Serial Number": "" }, { "FRU Type": "Normal Hardware FRU", "Priority": "Mandatory, replace all with this type as a unit", "Location Code": "E0", "Part Number": "", "CCIN": "", "Serial Number": "" }, { "FRU Type": "Normal Hardware FRU", "Priority": "Lowest priority replacement", "Location Code": "P0", "Part Number": "", "CCIN": "", "Serial Number": "" }, { "FRU Type": "Normal Hardware FRU", "Priority": "Lowest priority replacement", "Location Code": "P0-T4", "Part Number": "", "CCIN": "", "Serial Number": "" }] } ```
Change-Id: Ia7e94f9d4848f78ba0b00023438c4db4135fed75 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
| 109b4a5c | 20-Mar-2025 |
Patrick Williams <patrick@stwcx.xyz> |
entry: remove AdditionalData2
The 'AdditionalData2' property was a temporary addition to ease the transition from an array to a dictionary for the additional data. All users have been migrated to us
entry: remove AdditionalData2
The 'AdditionalData2' property was a temporary addition to ease the transition from an array to a dictionary for the additional data. All users have been migrated to use the dictionary style and from the 'AdditionalData' property, so the '2' property can be removed.
Tested: Loaded an existing log database and observed dbus objects are created successfully and with the 'AdditionalData2' field missing. Created a new event with `log-create` CLI and observed new entry is created successfully in dbus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ica3a9e5730eca8a7cf7755b769189347220e1639
show more ...
|
| 5383d760 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I874e2c57075988db53dad8e365c0bf1ac204f81b Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 25291157 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Iac96affe709a51dd865117d006cb033cf5c624b1 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Iac96affe709a51dd865117d006cb033cf5c624b1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 1f2bb81d | 30-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`)
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`. Switch all uses of `not disabled` to `allowed`.
Change-Id: Icc698b95d762197d496ec9f228a12d7fe48beef0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| ea6d9c45 | 11-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
entry: switch AdditionalData to dict
Clients have been switched to use AddtionalData2, which is a dictionary. Move AdditionalData also to a dictionary so we can stage a removal of AdditionalData2.
entry: switch AdditionalData to dict
Clients have been switched to use AddtionalData2, which is a dictionary. Move AdditionalData also to a dictionary so we can stage a removal of AdditionalData2.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7cc9591895f219471ac098387f72a35c18e6c750
show more ...
|
| e5940634 | 22-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
extension: use map in create extension
Adjust the Create extension to use a map for metadata instead of vector.
Tested: Unit tests updated and passing.
Signed-off-by: Patrick Williams <patrick@stw
extension: use map in create extension
Adjust the Create extension to use a map for metadata instead of vector.
Tested: Unit tests updated and passing.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9bd62b8dcc8b18a61958ed64de98b52a48333637
show more ...
|
| ea21d995 | 22-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
entry: use map for metadata in ctor
Transition the entry constructor to use the `map<string,string>` rather than the `vector<string>`.
Tested: UTs pass and daemon still creates logs.
Signed-off-by
entry: use map for metadata in ctor
Transition the entry constructor to use the `map<string,string>` rather than the `vector<string>`.
Tested: UTs pass and daemon still creates logs.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Icf3ead163cc99a1498734d33335fb6da52e6c98c
show more ...
|
| 5402fa68 | 22-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
entry: use AdditionalData2 for serialization
Prefer the `map<std::string, std::string>` for serialization of metadata over the `vector<std::string>` format. Add backwards compatible parsing of the
entry: use AdditionalData2 for serialization
Prefer the `map<std::string, std::string>` for serialization of metadata over the `vector<std::string>` format. Add backwards compatible parsing of the `vector<std::string>` format.
Tested: Loaded a "version 5" entry. Created a new entry and verified it was "version 6" in the binary dump. Reloading the daemon restores both version 5 and 6 objects.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I39b8a4099ad61161d52c3784d6325df7da031011
show more ...
|
| e7e741ea | 21-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
entry: add AdditionalData2
Support metadata as dict property "AdditionalData2".
Tested: Created a new event and ensured property is created. Reloaded the daemon with an old event and ensured prope
entry: add AdditionalData2
Support metadata as dict property "AdditionalData2".
Tested: Created a new event and ensured property is created. Reloaded the daemon with an old event and ensured property exists and is populated.
``` .AdditionalData2 property a{ss} 8 "READING_VALUE" "98.6" "SENSOR_NAME" "Inlet Temperature" "THRESHOLD_VALUE" "40.0" "UNITS" "xyz.openbmc_project.Sensor.Value.Unit.DegreesC" "_CODE_FILE" "../log_create_main.cpp" "_CODE_FUNC" "int generate_event(const std::string&, const nlohmann::json_abi_v3_11_2::json&)" "_CODE_LINE" "34" "_PID" "2239596" emits-change writable ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4f96370b9fb07664192e4fe09308cab170176213
show more ...
|
| 6eb96bf7 | 05-Nov-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: add support for journal-only method
The design document for the new event system references an option to log events to the journal rather than to dbus[1] using the 'OPENBMC_MESSAGE_ID'
lg2: commit: add support for journal-only method
The design document for the new event system references an option to log events to the journal rather than to dbus[1] using the 'OPENBMC_MESSAGE_ID' identifier. Add support and test cases for this as a meson option.
[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md#phosphor-logging
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6cb94453c6cc95a9ccbbbc11859b70ef12d375fd
show more ...
|
| 247fed60 | 31-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: extract source location information and add to event
sdbusplus will add PID and std::source_location information, from the event origination point, to the event. Extract this and add i
lg2: commit: extract source location information and add to event
sdbusplus will add PID and std::source_location information, from the event origination point, to the event. Extract this and add it to the event.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6364ba0f74231fca2815c770bc3e56c2780d199e
show more ...
|
| f0af358f | 10-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: add methods for new sdbusplus events
Add implementations and test cases for the `lg2::commit` functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25a87fd65738e4d
lg2: commit: add methods for new sdbusplus events
Add implementations and test cases for the `lg2::commit` functions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25a87fd65738e4debbe98f3473709f77d51777e9
show more ...
|
| e001cd79 | 07-Oct-2024 |
Patrick Williams <patrick@stwcx.xyz> |
lg2: commit: add stubs to support new sdbusplus events
Create empty stubs for the commit functions from the new event log design[1].
[1]: https://github.com/openbmc/docs/blob/master/designs/event-l
lg2: commit: add stubs to support new sdbusplus events
Create empty stubs for the commit functions from the new event log design[1].
[1]: https://github.com/openbmc/docs/blob/master/designs/event-logging.md
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8c0232858f41b875e78d5e41f17c065ca727429d
show more ...
|
| 083c7049 | 14-Oct-2024 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Remove dump status bits from PELs
Stop filling in the bits in the PEL that say there are un-offloaded dumps. These require calls to the dump daemon that can be slow and even time out if the du
PEL: Remove dump status bits from PELs
Stop filling in the bits in the PEL that say there are un-offloaded dumps. These require calls to the dump daemon that can be slow and even time out if the dump daemon is busy.
These aren't parsed out in the peltool output anyway, and there are other ways to determine if there are dumps - someone could just look at the dump D-Bus directly.
This isn't a direct revert of the commit that introduced it because of all the merge conflicts trying to do a revert entailed.
Tested: Can still create PELs.
Change-Id: I975f06ebf3638b39315fdea49393d1941a6f5216 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|