4ab59214 | 04-Sep-2024 |
Tim Lee <timlee660101@gmail.com> |
bmc-state-manager: revise BMC reboot cause
According new design from below commit: https://gerrit.openbmc.org/c/openbmc/docs/+/73678
We need to revise `RebootCause` value as below:
`WDIOF_EXTERN1`
bmc-state-manager: revise BMC reboot cause
According new design from below commit: https://gerrit.openbmc.org/c/openbmc/docs/+/73678
We need to revise `RebootCause` value as below:
`WDIOF_EXTERN1` => `RebootCause::Software` `WDIOF_CARDRESET` => `RebootCause::Watchdog`
Tested: busctl get-property xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 xyz.openbmc_project.State.BMC \ LastRebootCause
When unplug/plug in BMC power cable then return as below: s "xyz.openbmc_project.State.BMC.BMCResetCause.POR"
When executing reboot command then return as below: s "xyz.openbmc_project.State.BMC.BMCResetCause.Software"
When kernel panic watchdog be triggered then return as below: s "xyz.openbmc_project.State.BMC.BMCResetCause.Watchdog"
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: Iba7dfe6822d5f2f595c19e77aa559bb3b0a9d69c
show more ...
|
08148283 | 08-Oct-2024 |
Andrew Geissler <geissonator@yahoo.com> |
phosphor-set-chassis-transition: ensure only run once
If a user were to power their system on, and then off, and then off again, they will see their CurrentPowerState set to TransitioningToOff.
Alt
phosphor-set-chassis-transition: ensure only run once
If a user were to power their system on, and then off, and then off again, they will see their CurrentPowerState set to TransitioningToOff.
Although it's a bit of an unusual use case, it's fairly common in the lab/dev environment when users want to quickly ensure their system is in a powered off or on state (without first looking at its current state).
Similar to what is in the host transition services, ensure we only run the chassis transition services once per power on or off.
Tested: - Ensured multiple power off requests will not leave CurrentPowerState in TransitioningToOff state
Change-Id: I4040072ed0b42f37c9488994b0f7a5975a2bb7c9 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
2eb6029c | 13-Aug-2024 |
Amithash Prasasd <amithash@meta.com> |
Fix getManagedObjects on ObjectManager returning no objects
Currently, when calling getManagedObjects ``` busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedeskto
Fix getManagedObjects on ObjectManager returning no objects
Currently, when calling getManagedObjects ``` busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedesktop.DBus.ObjectManager \ GetManagedObjects ``` we end up getting no objects `a{oa{sa{sv}}} 0`. This is incorrect and we technically should return the managed objects. Looking further at the spec: ``` All returned object paths are children of the object path implementing this interface, i.e. their object paths start with the ObjectManager's object path plus '/'. ``` This implies that the the path owned by the object manager should not be the hostX sub-entries but `/xyz/openbmc_project/state`
Tested by building a harma image and in qemu calling introspect on each of the object paths and ensuring that we get the correct responses ``` busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state/chassis0 ``` Also tested that we get the correct managed object ``` busctl call xyz.openbmc_project.State.Host /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects busctl call xyz.openbmc_project.State.BMC /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects busctl call xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects ```
Change-Id: I525c8719c326cfbbe568c4f1f7fe95e3aa13c660 Signed-off-by: Amithash Prasad <amithash@meta.com>
show more ...
|
f566c964 | 22-Jul-2024 |
Amithash Prasasd <amithash@meta.com> |
Switch to Use phosphor-dbus-interface defined constants
We are redefining a lot of the constants which are already defined in the phosphor-dbus-interface auto-generated headers. This change switches
Switch to Use phosphor-dbus-interface defined constants
We are redefining a lot of the constants which are already defined in the phosphor-dbus-interface auto-generated headers. This change switches the code to use those instead of allowing compile time definition of those.
Allowing for compile time definition would probably break clients who are not aware of the new paths anyway.
Tested by build a harma image and loading in qemu to test the added interfaces are unchanged. ``` busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state/chassis0 ```
Change-Id: Ib4c77d2789c13f509b75a2b1837ea454e53e8ae9 Signed-off-by: Amithash Prasasd <amithash@meta.com>
show more ...
|
1b2c3c03 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ic16d6d63213bbdd91fcb8f5aa986b66865efda2f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
b27eef54 | 22-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add few cppcoreguidelines check
These checks cover a wide range of best practices and recommendations aimed at improving the safety, readability, maintainability, and performance of our
clang-tidy: Add few cppcoreguidelines check
These checks cover a wide range of best practices and recommendations aimed at improving the safety, readability, maintainability, and performance of our C++ codebase according to the C++ Core Guidelines.
Change-Id: I6bf6dda6095c95ea782bf5759b83272081cad150 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
a1c0e5c7 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers
clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made static because the functions don’t use this. This check also triggers readability-static-accessed-through -instance check as we are trying to access a static member function through an instance.
Change-Id: I887b514a8478abedc24d5495d057b9d3e7dc9bdf Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
b594ac12 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-braces-around-statements check
This checks that bodies of if statements and loops (for, do while, and while) are inside braces.
Change-Id: Ia5924cc4e9dca98cc29bbaa509
clang-tidy: Enable readability-braces-around-statements check
This checks that bodies of if statements and loops (for, do while, and while) are inside braces.
Change-Id: Ia5924cc4e9dca98cc29bbaa50923e3269db22089 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
695888de | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and std::string::data().
Change-Id: I43e747b95eb042650668da7dd57a8d4b8463426a S
clang-tidy: Enable readability-redundant-string-cstr check
This check finds unnecessary calls to std::string::c_str() and std::string::data().
Change-Id: I43e747b95eb042650668da7dd57a8d4b8463426a Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
319eda48 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use of const auto * instead of auto for variables that are pointers or iterators. Th
clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use of const auto * instead of auto for variables that are pointers or iterators. This helps clarify the const-ness of the pointed-to object or container elements.
Change-Id: I5fa46006aa5669834ebb144d32014f8882e563e3 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
44bbf11d | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-simplify-boolean-expr check
This checks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Ch
clang-tidy: Enable readability-simplify-boolean-expr check
This checks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Change-Id: I4ad7ec4ddfa4cfe9a0cf0d569d3d81c478c1776a Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
480d430e | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between built-in types and booleans. the following conversion types are checked: - i
clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between built-in types and booleans. the following conversion types are checked: - integer expression/literal to boolean - floating expression/literal to boolean - pointer/pointer to member/nullptr/NULL to boolean - boolean expression/literal to integer - boolean expression/literal to floating
Change-Id: Ifb5d5f402342a2d3cca8378c6549ede3e56e3f38 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
d7a15cb1 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability checks on repo
The readability-* checks in Clang-Tidy focus on improving code readability by enforcing guidelines and suggesting improvements that can enhance the clar
clang-tidy: Enable readability checks on repo
The readability-* checks in Clang-Tidy focus on improving code readability by enforcing guidelines and suggesting improvements that can enhance the clarity and maintainability of C++ code. This enables readability-const-return-type check.
Change-Id: I4737f07188f6a173678dbe0192914dd5df0dd338 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
abfd9d38 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add performance checks
The checks are valuable for improving the runtime efficiency and resource utilization of your programs.
Change-Id: I5bacb8a421d5432fabb47a859dc13e9e1c0c563c Signe
clang-tidy: Add performance checks
The checks are valuable for improving the runtime efficiency and resource utilization of your programs.
Change-Id: I5bacb8a421d5432fabb47a859dc13e9e1c0c563c Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
836ccb33 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable clang-analyzer-deadcode.DeadStores check
This checks for values stored to variables that are never read afterwards. The change is made to avoid flagging this error when a unique_p
clang-tidy: Enable clang-analyzer-deadcode.DeadStores check
This checks for values stored to variables that are never read afterwards. The change is made to avoid flagging this error when a unique_ptr is used rather make it a stack variable. The clang-tidy don't like the unused unique_ptr specifically rather than the unused class instance.
Change-Id: I1c5a6b4032de75b7c8586467425f6fdacace5f31 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
f15b9544 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants (e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Change-Id: I8b1dc27f62e8825538d8f
clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants (e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Change-Id: I8b1dc27f62e8825538d8f276c0f99375a1a5d158 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
44acab71 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-use-override check
This check adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Change
clang-tidy: Enable modernize-use-override check
This check adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Change-Id: I156fc5796ed1cf451491e446c211172f62316ecc Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
437f0b27 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by calling the push_back, push, or push_front methods with an explicitly-constructed temporar
clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by calling the push_back, push, or push_front methods with an explicitly-constructed temporary of the container element type. In this case, the corresponding emplace equivalent methods result in less verbose and potentially more efficient code.
Change-Id: I1e7ae19ef1400c83717b2df48f3314ba4e96423e Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
66a93fc8 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-raw-string-literal check
This check selectively replaces string literals containing escaped characters with raw string literals.
Change-Id: I76fd4cde664f10390e368170441
clang-tidy: Enable modernize-raw-string-literal check
This check selectively replaces string literals containing escaped characters with raw string literals.
Change-Id: I76fd4cde664f10390e36817044153d62380278bf Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
7c2eb72e | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases.
This check replaces C standard library headers w
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases.
This check replaces C standard library headers with their C++ alternatives and removes redundant ones.
The commit removes the header file as I don't see any usage of it the code.
Change-Id: Idb119ca3bdfa183713087b10e1dd2b524718abcb Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
2397289e | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add some modernize checks
This commit adds some modernize tidy checks to enable usage of modern way of using c++ styles.
Change-Id: I64186a43a53d5895436b4de5072d75c61346ead2 Signed-off-
clang-tidy: Add some modernize checks
This commit adds some modernize tidy checks to enable usage of modern way of using c++ styles.
Change-Id: I64186a43a53d5895436b4de5072d75c61346ead2 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
e2bc9c2d | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add clang-analyzer checks
Change-Id: Ie2264b4a5455dcf1d7d8c7f3f2ab2040c98734c7 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
a36b807d | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add cert checks
This check corresponds to the CERT C++ Coding Standard rule.
Change-Id: Ic1bab0425b7b2599a356a93936c36174fc552252 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@
clang-tidy: Add cert checks
This check corresponds to the CERT C++ Coding Standard rule.
Change-Id: Ic1bab0425b7b2599a356a93936c36174fc552252 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
31584d20 | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable bugprone-forward-declaration-namespace check
This checks if an unused forward declaration is in a wrong namespace. The check inspects all unused forward declarations and checks if
clang-tidy: Enable bugprone-forward-declaration-namespace check
This checks if an unused forward declaration is in a wrong namespace. The check inspects all unused forward declarations and checks if there is any declaration/definition with the same name existing, which could indicate that the forward declaration is in a potentially wrong namespace.
Change-Id: Ie75495d7b054245d6328e7f946775d72220cbe1e Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
6d60e9be | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
Add clang-tidy to phosphor-state-manager
This commit enables clang-tidy and adds few tidy checks.
Change-Id: I9964abf2ffdd09150fb456c6e0a9d43be327c880 Signed-off-by: Pavithra Barithaya <pavithrabar
Add clang-tidy to phosphor-state-manager
This commit enables clang-tidy and adds few tidy checks.
Change-Id: I9964abf2ffdd09150fb456c6e0a9d43be327c880 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|