#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
7e969cb9 |
| 23-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the new namespace names.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9f67e74a02616d8ea2241c18758308f2b669672d
show more ...
|
#
0c2432d9 |
| 23-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sched-host-tran: add missing header
There was an assumption that an sdbus++ header file was implicitly included, but the generated files are changing. Explicitly add that header.
Signed-off-by: Pa
sched-host-tran: add missing header
There was an assumption that an sdbus++ header file was implicitly included, but the generated files are changing. Explicitly add that header.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I29019097a6e4c37e5db1315478274af4fd645845
show more ...
|
#
9e5cd389 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I2612058799afbcd10f98bd32d2e191b0be7e437b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
bd28f025 |
| 22-Nov-2022 |
William A. Kennington III <wak@google.com> |
treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064 Signed-off-by: William A. Ke
treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
f053e6fe |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I41103c892db258a85640aa1442acd9a295c8a847
show more ...
|
#
211d972d |
| 07-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sched-host-tran: support multi-host
The State.Host objects are now templated, so the ScheduledHostTransition similarly needs to be templated.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Cha
sched-host-tran: support multi-host
The State.Host objects are now templated, so the ScheduledHostTransition similarly needs to be templated.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I60751dbe5fff5e3c0c2c7a19515524cf5f6bc8f7
show more ...
|
#
76070747 |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5cfac1360e8c769889b33bef98cfd44778018a44
show more ...
|
#
8ffdb269 |
| 20-Sep-2021 |
Andrew Geissler <geissonator@yahoo.com> |
lg2: convert state-manager This converts the rest of phosphor-state-manager over to the lg2 interface. Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I387
lg2: convert state-manager This converts the rest of phosphor-state-manager over to the lg2 interface. Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I3878ec950b6a2b1ada93544cc021cecf14edfb46
show more ...
|
#
e426b589 |
| 28-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
clang-format: update to latest from docs repo This is from openbmc/docs/style/cpp/.clang-format Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I5b80bb56845170
clang-format: update to latest from docs repo This is from openbmc/docs/style/cpp/.clang-format Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I5b80bb568451706afb6d268b41e1a5357a2ca6db
show more ...
|
#
1dbbef42 |
| 08-Mar-2020 |
Carol Wang <wangkair@cn.ibm.com> |
sched-host-tran: store/restore the value of scheduled time and requested transition Store/restore the value of scheduled time and requested transition, in case BMC is rebooted. After
sched-host-tran: store/restore the value of scheduled time and requested transition Store/restore the value of scheduled time and requested transition, in case BMC is rebooted. After BMC is back, go on the host transition process based on the stored values. Tested: 1. Get current time # date Tue Mar 10 08:16:40 UTC 2020 2. Set scheduled time 08:25:00 # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1583828700 3. Reboot BMC 4. Check sheduled time # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1583828700 5. Do host transition after the scheduled time is reached. 6. Check the scheduled time again # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 0 Change-Id: I3bbae19a49e2fe84bf4e297e6daaa0461cbf2cb8 Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
show more ...
|
#
ef7abe19 |
| 25-Feb-2020 |
Carol Wang <wangkair@cn.ibm.com> |
sched-host-tran: handle with BMC time changing Handle with different processes when BMC time is changed after scheduled time is set. Tested: Case1: BMC time is changed to be
sched-host-tran: handle with BMC time changing Handle with different processes when BMC time is changed after scheduled time is set. Tested: Case1: BMC time is changed to be later than current time but still earlier than scheduled time 1. Get current time # date Tue Feb 25 07:07:44 UTC 2020 # date +%s 1582614271 2. Schedule time, do host transition after at 07:20:00 around # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582615256 3. Change BMC time to 07:19:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582615136000000 # date Tue Feb 25 07:19:20 UTC 2020 # date +%s 1582615187 4. Host transition is done after 1 minute around, instead of waiting 13 mins around. Case2: BMC time is changed after scheduled time is reached Following Case1, the scheduled time is reached already, 1. Change BMC time to 07:10:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582614600000000 2. APP shows "The function Scheduled Host Transition is disabled", because the scheduled time is reached already and the scheduled time has been set to 0 after host transition is triggered. Case3: BMC time is changed to be bigger than scheduled time before scheduled time is reached 1. Set scheduled time 07:08:00 around # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582787314 2. Change BMC time to 07:10:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582787434000000 3. It will do host transition as requested. Case4: BMC time is changed to be earlier than current time 1. Set scheduled time 07:10:00 around # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582787434 2. Change BMC time to 07:08:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582787314000000 3. App will wait 2 minutes more to do host transition. Change-Id: I23228be944d1b2f71161317228c8b16d7f5ca4eb Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
show more ...
|
#
6a5db3d3 |
| 20-Feb-2020 |
Carol Wang <wangkair@cn.ibm.com> |
sched-host-tran: implement host transition process Set the scheduled time and host transition to trigger power on/off. Tested: 1. Check the state first $ curl -k -H "X-Auth
sched-host-tran: implement host transition process Set the scheduled time and host transition to trigger power on/off. Tested: 1. Check the state first $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/state/host0 { "data": { "AttemptsLeft": 3, "BootProgress": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified", "CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Off", "OperatingSystemState": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive", "RequestedHostTransition": "xyz.openbmc_project.State.Host.Transition.Off", "RequestedTransition": "xyz.openbmc_project.State.Host.Transition.On", "ScheduledTime": 0 }, "message": "200 OK", "status": "ok" } 2. Set a time in future # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582184830 # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582184830 3. Check the state again after scheduled time Jan 15 06:38:20 WS-Seq-FW-2 phosphor-host-state-manager[442]: Host State transaction request $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/state/host0 { "data": { "AttemptsLeft": 3, "BootProgress": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified", "CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Running", "OperatingSystemState": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive", "RequestedHostTransition": "xyz.openbmc_project.State.Host.Transition.On", "RequestedTransition": "xyz.openbmc_project.State.Host.Transition.On", "ScheduledTime": 0 }, "message": "200 OK", "status": "ok" } 4. Set quested transition to off # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition \ s "xyz.openbmc_project.State.Host.Transition.Off" # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582250580 $ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/state/host0 { "data": { "AttemptsLeft": 3, "BootProgress": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified", "CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Off", "OperatingSystemState": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive", "RequestedHostTransition": "xyz.openbmc_project.State.Host.Transition.Off" "RequestedTransition": "xyz.openbmc_project.State.Host.Transition.Off", "ScheduledTime": 0 }, "message": "200 OK", "status": "ok" } Change-Id: Ib9f3a3984005d9187a9b98603ec1598d8992869e Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
show more ...
|
#
4ca6f3f4 |
| 19-Feb-2020 |
Carol Wang <wangkair@cn.ibm.com> |
sched-host-tran: handle with the scheduled time Add the basic process to handle with the scheduled time Tested: 1. Scheduled time is 0 # busctl set-property xyz.openbmc_pr
sched-host-tran: handle with the scheduled time Add the basic process to handle with the scheduled time Tested: 1. Scheduled time is 0 # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1 ------ Feb 19 08:09:47 witherspoon phosphor-scheduled-host-transition[28263]: \ The function Scheduled Host Transition is disabled. 2. Scheduled time is the past # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582100042 ------ Failed to set property ScheduledTime on interface xyz.openbmc_project.State.\ ScheduledHostTransition: Scheduled time is in the past Feb 19 08:14:42 witherspoon phosphor-scheduled-host-transition[28263]: \ Scheduled time is earlier than current time. Fail to do host transition. Feb 19 08:14:42 witherspoon phosphor-scheduled-host-transition[28263]: \ Scheduled time is in the past Change-Id: I0b6a98dcb6d0e70336bf42fc88a633abf3e64633 Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
show more ...
|
#
71230efd |
| 18-Feb-2020 |
Carol Wang <wangkair@cn.ibm.com> |
sched-host-tran: add base interfaces for Scheduled Host Transition Implement interfaces to get/set scheduledTime and requestedTransition. Tested: 1. Check scheduledTime # b
sched-host-tran: add base interfaces for Scheduled Host Transition Implement interfaces to get/set scheduledTime and requestedTransition. Tested: 1. Check scheduledTime # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 0 # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1 # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1 2. Check requestedTransition # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition s "xyz.openbmc_project.State.Host.Transition.On" # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition \ s "xyz.openbmc_project.State.Host.Transition.Off" # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition s "xyz.openbmc_project.State.Host.Transition.Off" Change-Id: Ie7da8034d37c1069db043772f35982ca821826ae Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
show more ...
|