9c2f94e1 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I7f6c667bb874e13d9ef86f901238e00fa56e7ced Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
7e792341 | 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: I8cff81085e79e92dfe2a694b4aa2de00b3d4717a 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: I8cff81085e79e92dfe2a694b4aa2de00b3d4717a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
cd1e72a8 | 10-Oct-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Fix local meson build
Provide all the missing dependencies for the local meson build.
Tested: "meson setup build && cd build && meson compile" finishes successfully.
Change-Id: If1d20df64610e47d2b
Fix local meson build
Provide all the missing dependencies for the local meson build.
Tested: "meson setup build && cd build && meson compile" finishes successfully.
Change-Id: If1d20df64610e47d2be813a8ffbe7602b6d00181 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
eab4f8c0 | 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: I9bb0aaa05541fe88ccabfaa5d00e3117e489ea8d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
c5fe26a6 | 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: I7801712fe34e10fec586d1e962afebd9ebcce46c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
2b31c988 | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: Ic8409eb3e05a90c64d1601429e8e5208dde01df9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
04267b4f | 04-Aug-2022 |
Matt Johnston <matt@codeconstruct.com.au> |
Add argument for errors.hpp to pdmgen.py, fix race
pdmgen.py is now given a "-e" argument to specify where to write errors.hpp.
Previously it was hardcoded to 'errors.hpp', this could hit a race wh
Add argument for errors.hpp to pdmgen.py, fix race
pdmgen.py is now given a "-e" argument to specify where to write errors.hpp.
Previously it was hardcoded to 'errors.hpp', this could hit a race where the src/test run of pdmgen.py could overwrite the actual errors.hpp with an empty file. That resulted in missing definitions with a compile error such as ...phosphor-dbus-monitor/1.0+gitAUTOINC+413a485715-r1/recipe-sysroot/usr/include/c++/12.1.0/type_traits:1447:38: error: invalid use of incomplete type 'struct sdbusplus::xyz::openbmc_project::Sensor::Threshold::Error::CriticalHigh'
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Change-Id: Ib982631e506ade18c587a3e6552e4109760758ef
show more ...
|
413a4857 | 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: I6a559082fed34ae62b648345ead793436d2d03f6
show more ...
|
ecef1191 | 06-Jul-2022 |
George Liu <liuxiwei@inspur.com> |
Fix cppcheck warnings
Warning message: mslverify/verify.cpp:30:5: style: Struct 'BusMeetsMSL < decltype ( arg . second ) :: value_type >' has a constructor with 1 argument that is not explicit. [noE
Fix cppcheck warnings
Warning message: mslverify/verify.cpp:30:5: style: Struct 'BusMeetsMSL < decltype ( arg . second ) :: value_type >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] BusMeetsMSL(const std::string& p) : path(p) ^ src/callback.hpp:222:5: warning: Member variable 'DeferrableCallback::ctx' is not initialized in the constructor. [uninitMemberVar] DeferrableCallback(const std::vector<size_t>& graphEntry, Conditional& cond, ^ src/elog.hpp:102:5: style: Class 'Elog' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] Elog(Args&&... arguments) : ^ src/propertywatch.hpp:133:5: style: Class 'PropertyWatchOfType' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] PropertyWatchOfType(const PropertyIndex& watchIndex, ^ src/event_manager.cpp:56:18: style: Local variable 'path' shadows outer variable [shadowVariable] fs::path path(eventQueue.back()->objectPath); ^ src/event_manager.cpp:44:10: note: Shadowed declaration auto path = "path="s + objectPath; ^ src/event_manager.cpp:56:18: note: Shadow variable fs::path path(eventQueue.back()->objectPath); ^ src/snmp_trap.hpp:65:10: style: The function 'operator()' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] void operator()(Context /* ctx */) ^ src/callback.hpp:41:18: note: Virtual function in base class virtual void operator()(Context /* ctx */) = 0; ^ src/snmp_trap.hpp:65:10: note: Function in derived class void operator()(Context /* ctx */) ^ src/snmp_trap.hpp:72:10: style: The function 'operator()' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride] void operator()(Context /* ctx */, sdbusplus::message::message& msg) ^ src/callback.hpp:50:18: note: Virtual function in base class virtual void operator()(Context /* ctx */, ^ src/snmp_trap.hpp:72:10: note: Function in derived class void operator()(Context /* ctx */, sdbusplus::message::message& msg) ^ src/snmp_trap.cpp:44:17: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm] message += " " + s; ^ src/test/pathgentest.cpp:118:21: style: Local variable 'meta' shadows outer variable [shadowVariable] const auto& meta = std::get<1>(pathMeta[i]).get(); ^ src/test/pathgentest.hpp:1:34: note: Shadowed declaration const std::array<std::string, 3> meta = { ^ src/test/pathgentest.cpp:118:21: note: Shadow variable const auto& meta = std::get<1>(pathMeta[i]).get(); ^ src/test/propertygentest.cpp:133:25: style: Local variable 'expectedMeta' shadows outer variable [shadowVariable] const auto& expectedMeta = std::get<1>(expectedGroups[i][j]).get(); ^ src/test/propertygentest.cpp:17:34: note: Shadowed declaration const std::array<std::string, 3> expectedMeta = { ^ src/test/propertygentest.cpp:133:25: note: Shadow variable const auto& expectedMeta = std::get<1>(expectedGroups[i][j]).get(); ^ src/test/propertywatchtest.cpp:263:21: style: Local variable 'interfaces' shadows outer variable [shadowVariable] const auto& interfaces = o.second; ^ src/test/propertywatchtest.cpp:18:34: note: Shadowed declaration const std::array<std::string, 2> interfaces = { ^ src/test/propertywatchtest.cpp:263:21: note: Shadow variable const auto& interfaces = o.second; ^ src/test/propertywatchtest.cpp:280:25: style: Local variable 'properties' shadows outer variable [shadowVariable] const auto& properties = i.second; ^ src/test/propertywatchtest.cpp:23:34: note: Shadowed declaration const std::array<std::string, 2> properties = { ^ src/test/propertywatchtest.cpp:280:25: note: Shadow variable const auto& properties = i.second; ^
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ica5d54cefe22fed961f01aa6288b4cf76a9db563
show more ...
|
48e0a197 | 21-Jun-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Remove compilation using autotools
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Iee8d9c4249daf9d0c403717f0f8feb674bb18721 |
7efd6f3c | 21-Jun-2022 |
George Liu <liuxiwei@inspur.com> |
meson: Add test meson build
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I38eba97894865909d793ed38330c47acb2f81a8e |
3fe976cc | 20-Jun-2022 |
George Liu <liuxiwei@inspur.com> |
Update clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I58738190d06bf216a13048d768aa4054d820d2e8 |
26dc0bcb | 16-Jun-2022 |
Patrick Williams <patrick@stwcx.xyz> |
remove std::experimental usage
All of the std::experimental usages in this repository have a well supported counterpart in std as of C++17. Switch to use them.
Signed-off-by: Patrick Williams <pat
remove std::experimental usage
All of the std::experimental usages in this repository have a well supported counterpart in std as of C++17. Switch to use them.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4cdf5cd27053ce85c7f70c215ee9456f96f79f42
show more ...
|
98d6462a | 24-May-2022 |
Lei YU <yulei.sh@bytedance.com> |
propertywatch: Add ignore_start_callback config
Add an optional `ignore_start_callback` config to indicate if the callback shall be ignored on start.
By default the callbacks in property watch are
propertywatch: Add ignore_start_callback config
Add an optional `ignore_start_callback` config to indicate if the callback shall be ignored on start.
By default the callbacks in property watch are called on start. There are cases where we do not want such behavior and only expect callbacks on property changes.
Add the `ignore_start_callback` so that we could config a watch to not trigger the start callback.
Tested: Verify the callback is not called if the watch config has `ignore_start_callback: true`
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I7e5887cc8b0d0775d9b3d689f1511250667aaa5b
show more ...
|
07c35131 | 21-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Add median condition generation test entries
A median condition generates the same way a count condition does, this adds entries to the condition generation test yaml to generate median condit
test: Add median condition generation test entries
A median condition generates the same way a count condition does, this adds entries to the condition generation test yaml to generate median conditions. These median condition generation tests have separate callbacks configured to be verified by the condition generation tests.
Tested: conditiongentest.hpp generates as expected `make check` passes conditiongentest
Change-Id: I7c51e320cfeacfa92a31d3fbc42f44c7e50b6183 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
bd31f39e | 21-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Fix condition generation callbacks size test
Change-Id: I634f25726e069dfe65fe6c99e1fd1072f70b33ec Signed-off-by: Matthew Barth <msbarth@us.ibm.com> |
9b50214b | 17-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Add property watch filter tests
Create test cases to perform operand filters to the property values used within the storage array and validate against the expected any_ns::any state. Filters r
test: Add property watch filter tests
Create test cases to perform operand filters to the property values used within the storage array and validate against the expected any_ns::any state. Filters reset the any object's state when a value is configured to be filtered.
*Note: Filters are `positive` state based meaning values that pass the filter check are kept and not reset.
Tested: Non-filtered test cases still pass Altering expected filtered results fail test case based on filters Final filtered test cases pass
Change-Id: I72038c1621f6b8e3de28c50880c7e84177ebe7e4 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
39c8215d | 17-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Functionalize test state validation check
Create a function that is used as a parameter to the test that performs the verification of the expected test results. This allows for different test
test: Functionalize test state validation check
Create a function that is used as a parameter to the test that performs the verification of the expected test results. This allows for different test state validation checks to be done against the values used in testing.
Tested: No change in testing results
Change-Id: Ie14a47d7872970549dabf5dadc2cfc60062558f2 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
5288136a | 17-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Rename "ExpectedValues" struct to "Values"
Additional tests will be added that utilize the same set of values and may have different expected results. So to reflect this, the "ExpectedValues"
test: Rename "ExpectedValues" struct to "Values"
Additional tests will be added that utilize the same set of values and may have different expected results. So to reflect this, the "ExpectedValues" struct is renamed as "Values" which will always be used to populate the storage array used in property watch testing.
Tested: No change in testing results
Change-Id: If07c10fdbf99d551fdac3475dc15df48954c2b24 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
efe0158c | 09-Sep-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Create Filters class to store filter functions
Enhanced the generated code to now store the filter functions within an array contained in a struct similar to other configured parameters. This allows
Create Filters class to store filter functions
Enhanced the generated code to now store the filter functions within an array contained in a struct similar to other configured parameters. This allows the generated property watches to use an index within that array to access a pointer to a Filters class containing a given set of filter functions. The set of filter functions would then be applied against all the properties being watched.
Tested: Generated code provides structure needed to access filter functions Filter functions filter property values that fail the filter(s)
Change-Id: I8f1f882704de521f2ab393530ad7ef096314975d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
ae786ef6 | 04-Sep-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add filters option to property watch class
Each property changed signal calls a defined callback, an optional set of filters can be defined to filter out property values not intended to be used with
Add filters option to property watch class
Each property changed signal calls a defined callback, an optional set of filters can be defined to filter out property values not intended to be used within the callback. These filters can be setup to eliminate property value(s) that should be ignored per property group and its configured callback.
ex.) Handle errant sensor values that could occur from a faulty device so these values do not cause unwanted results from a callback function.
Example config entry to throw out an ambient temperature less than 0C or greater than 100C:
- name: watch ambient temps description: > 'Filter the ambient temps, discarding any value that does not pass, then trigger the callback logic.' class: watch watch: property paths: ambient sensors properties: ambient temp callback: median temps filters: - op: '>=' bound: 0 - op: '<=' bound: 100000
Tested: Generate a single filter function against a group of properties Generate multiple filter functions against a group of properties Property values are cleared when it fails to pass a filter Property values that pass all filters are updated
Change-Id: Id5126263096b4787a40befdb14cf3514038df3ed Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
22bf9008 | 10-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add propertywatchtest unit tests to `make check`
Enable the propertywatchtest unit tests to be executed on a `make check`
Tested: propertywatchtest runs on a `make check`
Change-Id: I6b40c571f
Add propertywatchtest unit tests to `make check`
Enable the propertywatchtest unit tests to be executed on a `make check`
Tested: propertywatchtest runs on a `make check`
Change-Id: I6b40c571ffa5f3906ea1a694efd08bf63259a57a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
f79fc09b | 10-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Fixup propertywatchtest
The propertywatchtest unit test is not included within the makefile to be run on a `make check`. It was found that the propertywatchtest would fail when executed and needed u
Fixup propertywatchtest
The propertywatchtest unit test is not included within the makefile to be run on a `make check`. It was found that the propertywatchtest would fail when executed and needed updates to use the sdbusplus match helper functions.
Another needed update was to access the correct position within the storage tuple that was added under the following commit: abe43ab439bba463f4727a98ed0cc0c6a5e8251f
Tested: propertywatchtest executable successfully runs and passes its tests
Change-Id: Icacfe5a6d3d58fee4753d82796f03a82aaddd9fb Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
181a224f | 10-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add generated interfaceaddtest to .gitignore
Change-Id: I3f051b334efdd6bb3422f2c87bf1373e43e0ca7e Signed-off-by: Matthew Barth <msbarth@us.ibm.com> |
91e14a58 | 04-Sep-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add generated interfaceaddtest.hpp to .gitignore
Change-Id: I66311c9ce86c1304df89b237424a966e115c73f5 Signed-off-by: Matthew Barth <msbarth@us.ibm.com> |