#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
3d6d3182 |
| 31-Aug-2018 |
Patrick Venture <venture@google.com> |
update .clang-format
Added the header inclusion order to the .clang-format file generated these changes.
Change-Id: I4f51a20f469de431ee6a5ba78e3f4da39c980fab Signed-off-by: Patrick Venture <venture
update .clang-format
Added the header inclusion order to the .clang-format file generated these changes.
Change-Id: I4f51a20f469de431ee6a5ba78e3f4da39c980fab Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
ac803959 |
| 31-Aug-2018 |
Patrick Venture <venture@google.com> |
clang-format-6.0 bump fixes
The bump to use clang-format-6.0 now reports these issues.
Change-Id: I174c882727eaa9adf472599443a2f8ef637e2f0a Signed-off-by: Patrick Venture <venture@google.com>
|
#
d1eac88d |
| 29-Mar-2018 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Enable clang-format
Fix up errors and enable clang-format during CI builds.
Change-Id: I4176b81f8b85a287af9354165e09ff66aeb9fb29 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
#
abe43ab4 |
| 19-Feb-2018 |
Matt Spinler <spinler@us.ibm.com> |
Extend storage array to contain additional data
This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra
Extend storage array to contain additional data
This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra field for use by anything that needs it.
For example, the storage is currently used to store property values, and a future change to the CountCondition class will now also store the result of the comparisons done between the property values and another value specified in the rule YAML. Then, a callback will be able to see the result of whether each property passed the check.
Tested: Build and run unit tests
Change-Id: I58f32c9f4068b15a02b1ff7f28871161cafebddb Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
13fd8722 |
| 15-May-2017 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Add testcases for property watches
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I9e9266901414c71a34d9686f2a45bc4764602d53
|