b47b7db4 | 16-Sep-2024 |
Michal Orzel <michalx.orzel@intel.com> |
Enable disabled unit tests
Enabling tests that were initially disabled, most probably because corresponding features had yet been in development.
Tested: Lines coverage increased: - src/report_mana
Enable disabled unit tests
Enabling tests that were initially disabled, most probably because corresponding features had yet been in development.
Tested: Lines coverage increased: - src/report_manager.cpp: 94.2% -> 97.5% - src/trigger_manager.cpp: 94.9% -> 99.0% - src/utils/dbus_path_utils.cpp: 94.6% -> 100.0%
Change-Id: Id729c7f2e7e188d878b7348c710a09a4ceb40fd4 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
95f77e62 | 16-Sep-2024 |
Michal Orzel <michalx.orzel@intel.com> |
Fix sanitizer issue
Resolve heap-use-after-free issue that started appearing after googletest update. According to docs, AddGlobalTestEnvironment takes ownerwhip of an Environment object passed ther
Fix sanitizer issue
Resolve heap-use-after-free issue that started appearing after googletest update. According to docs, AddGlobalTestEnvironment takes ownerwhip of an Environment object passed there and it's being destroyed at the end of RUN_ALL_TESTS function. [1] Therefore any further usage of that object will cause heap-use-after-free error.
Tested: CI build passed
[1] https://google.github.io/googletest/advanced.html#global-set-up-and-tear-down
Change-Id: I517a7693a5692c4561de6a5e5ee8ebaf9d8cdc2d Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
f535cad6 | 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: I956cf3cb1bbfc017c4d4dceb3195c1d0735b0605 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5e7cbf42 | 01-Aug-2024 |
Michal Orzel <michalx.orzel@intel.com> |
Verify reading parameters on update
Adds verification of ReadingParameter's metric count when property is being updated. This brings consistency with behavior upon adding a new report, where that sa
Verify reading parameters on update
Adds verification of ReadingParameter's metric count when property is being updated. This brings consistency with behavior upon adding a new report, where that same check is being made. Also adds a unit test for that check.
Tested: On platform, by updating report's ReadingParameter with object containing metric count exceeding one specified by `max-reading-parameters` project option. With this change applied, that operation failed, as expected.
Change-Id: I06c8e21178d6bd554b62886e0e4f8cd0589f0d09 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
4d1c2ce2 | 23-Jan-2023 |
Szymon Dompke <szymon.dompke@intel.com> |
Add security check for directory symlinks
Currently only files symlink are verified during file operations. This change is extending check to all directories in path.
Testing done: - UTs are passin
Add security check for directory symlinks
Currently only files symlink are verified during file operations. This change is extending check to all directories in path.
Testing done: - UTs are passing
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I1f30de94872d2a25597d3549224cd90aa8fab634
show more ...
|
8018a3ba | 26-Jun-2024 |
Michal Orzel <michalx.orzel@intel.com> |
Adjust LogToRedfish trigger action to DMTF standard
This patch modifies messages sent to Redfish event log to be compliant with message registry schema [1].
Tested: On platform, with corresponding
Adjust LogToRedfish trigger action to DMTF standard
This patch modifies messages sent to Redfish event log to be compliant with message registry schema [1].
Tested: On platform, with corresponding bmcweb patch [2]. Verified that messages appearing in Redfish event log are compliant with schema. UTs passed.
[1] https://redfish.dmtf.org/registries/Telemetry.1.0.0.json [2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/72315
Change-Id: Ide3d5a13e5be077806df6398c5f51da41f7a7922 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
b3e03d2d | 28-Jun-2024 |
Michal Orzel <michalx.orzel@intel.com> |
Address Valgrind issues in CI
Fixes "uninitialized values" errors reported by Valgrind. Problem occurred from lack of specializations of googletest's PrintTo functions for several custom types.
Tes
Address Valgrind issues in CI
Fixes "uninitialized values" errors reported by Valgrind. Problem occurred from lack of specializations of googletest's PrintTo functions for several custom types.
Tested: On local CI container. After applying this patch issues stopped appearing.
Change-Id: I98d9fd19724bee15add7b19422a9ddc2e4cbef09 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
4444a13c | 08-Dec-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: adjust nlohmann-json dependency
- Simplify nlohmann-json dependency in meson.build. - Use consistent dependency variable names (based on Meson style). - Align wrap file name with meson wrapdb
meson: adjust nlohmann-json dependency
- Simplify nlohmann-json dependency in meson.build. - Use consistent dependency variable names (based on Meson style). - Align wrap file name with meson wrapdb choice for the project.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2e893fd8c300b36a16d704f2002bb966a6e52ce4
show more ...
|
c7935fa1 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: I016cb74930cc475843c30bd604e739058effa504 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
cff70c14 | 27-Oct-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Removed FutureVersion from API
Instead of using FutureVersion API currently used version is updated. This change needs to be bumped together with [1]. API that utilized map of variants to be more fl
Removed FutureVersion from API
Instead of using FutureVersion API currently used version is updated. This change needs to be bumped together with [1]. API that utilized map of variants to be more flexible and backwards compatible was reverted. It was decided that straight forward API that is commonly used should be used instead.
Removed MetricId property from Metric. In telemetry it was implemented as a name for Metric, but it was supposed to work as described in [2]. Currently MetricId is not supported by telemetry service and property was removed.
Tested: - After chaging bmcweb to use new API old and new features are working as expected
[1]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/44270 [2]: https://redfish.dmtf.org/schemas/v1/MetricReportDefinition.v1_4_2.json
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I5930a466a370f268d68f575a4a3db5ee9655e574
show more ...
|
3a1c297a | 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: I1ac255c58971ac5cc4697b8bb1069067aad02d18 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
a06626d1 | 24-Nov-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Added security checks for symlinks
Added security checks which prevents service from interacting with symlinks. It is not possible to list/delete/read/write to symlinks.
Tested: Added unit tests wh
Added security checks for symlinks
Added security checks which prevents service from interacting with symlinks. It is not possible to list/delete/read/write to symlinks.
Tested: Added unit tests which confirm that: - Symlinks cannot be removed - Symlinks are not listed - Symlinks cannot be overwritten - Symlinks cannot be read
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I50d6d10dac81fd454e7e30520a7c47d5146be58c
show more ...
|
04529769 | 24-Nov-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
removed unused include
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I1cd4601a327c17f1bb5ada5b82600e1c886364f9 |
18e7101c | 02-Nov-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
simplified appendLimit implementation
AppendLimit is now set to max value by default. This simplifies the code while keeping most of the feature functionality. This change increases report version a
simplified appendLimit implementation
AppendLimit is now set to max value by default. This simplifies the code while keeping most of the feature functionality. This change increases report version and will cause older report to be deleted.
Tested: - AppendLimit is set by default to max value - Telemetry features are working as expected
Change-Id: I94c85393a9601c90c00776bf0bc814d85cbf006a Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
62c08e9b | 16-Sep-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Redesigned error handling
Current error handling send only error code, which is not enough to display detailed information. New error handling in additional to error code send property name. This al
Redesigned error handling
Current error handling send only error code, which is not enough to display detailed information. New error handling in additional to error code send property name. This allows to send meaningful messages back to used about errors.
Tested: - Old redfish code properly handles errors (reads only error_code) - Redfish version which read property name from error displays more detailed error information
Change-Id: I54caa20881ac3f3e38cb295a3aa95ddab491303f Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
892f7c81 | 12-Oct-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Fix sensor count not updating
When ReadingsParamaters are updated, sensor count may change. This action should resize buffer and update value of "AppendLimit" property in case it was not set by user
Fix sensor count not updating
When ReadingsParamaters are updated, sensor count may change. This action should resize buffer and update value of "AppendLimit" property in case it was not set by user.
Testing done: -UTs passing
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I96486a808a3cce83c09936262304d0a1f55b3fd7
show more ...
|
0253f6d3 | 15-Sep-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Persistency: store special double values
Json library handles infinity and NaN as null. During deserialization, we expect a double and those files were marked as invalid and removed. To prevent this
Persistency: store special double values
Json library handles infinity and NaN as null. During deserialization, we expect a double and those files were marked as invalid and removed. To prevent this behavior and preserve all double values, LabeledTuple 'to_json' and 'from_json' functions were improved to accommodate those special values by using string literals.
Testing done: - UTs added for double<=>json conversion. - UTs passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I9193df29cce1db28cda3c895d117d9f3bfca2c24
show more ...
|
bcf045a4 | 16-Sep-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Fix clang errors
- structs used in emplace_back now have defined constructor - removed dead code from ensure
Testing done: - CI tests are passing - UTs are passing
Signed-off-by: Szymon Dompke <sz
Fix clang errors
- structs used in emplace_back now have defined constructor - removed dead code from ensure
Testing done: - CI tests are passing - UTs are passing
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I3f56a3796e45d608c7a5d3da1f8c2d674d62f567
show more ...
|
a8182beb | 04-Jul-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
added Enabled to AddReportFutureVersion API
- New parameter added to API - Changed API to be more flexible in the future
Tested: - Unit tests are passing - Tested together with: https://gerrit.op
added Enabled to AddReportFutureVersion API
- New parameter added to API - Changed API to be more flexible in the future
Tested: - Unit tests are passing - Tested together with: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/49796/23 POST, PATCH, PUT for MetricReportDefinitions are working correctly
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: Ic988446d283a581dc6866418b1b27a989c3bc9a0
show more ...
|
39cc6ac9 | 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: I20ad4fc3a2c6d8cb342156bd3e8d05f3a22d3eb8
show more ...
|
32305f14 | 05-Jul-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Add length limit for user-defined values
Previously, the only limit for most user-defined values like id or name was the one enforced by dbus, which was fairly big. In order to save space used by pe
Add length limit for user-defined values
Previously, the only limit for most user-defined values like id or name was the one enforced by dbus, which was fairly big. In order to save space used by persistent data, new meson options were added, with length limit for those fields.
This directly impacts following dbus interfaces: - TriggerManager.AddTrigger: - Id - Name - Reports - Thresholds (only name of discrete threshold) - Trigger.Name - Trigger.Reports - Trigger.Thresholds (only name of discrete threshold) - ReportManager.AddReport(FutureVersion): - Id - Name - MetricParameters (metricId) - Report.Name - Report.ReadingParameters (metricId)
For Id fields we support 'prefixes', which also are limited, but those limit are separate. So if limit for prefix is set to 5 and limit for id/name is set to 5, following Ids are fine: - 12345/12345 - 12345 and following are not: - 123456/1234 - 1/123456
Testing done: - UTs are passing. - new limits are reflected when calling mentioned dbus interfaces.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I29291a1cc56a344d92fb65491c9186fdb90a8529
show more ...
|
1cdd7e4f | 08-Jun-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Use proper dbus path when possible.
Following methods and properties were updated to use full dbus path, instead of internal telemetry id: - TriggerManager.AddTrigger() - 'reportIds' arg - Trigger.R
Use proper dbus path when possible.
Following methods and properties were updated to use full dbus path, instead of internal telemetry id: - TriggerManager.AddTrigger() - 'reportIds' arg - Trigger.ReportIds - renamed to 'Reports' - Report.TriggerIds - renamed to 'Triggers'
Testing done: - UTs were updated and are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I78d812d38289fac575d25b48503cc8b9c6f736fe
show more ...
|
162b9761 | 07-Jun-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Fix numeric threshold
There was an issue when sensor value reach threshold set by the user. Example: given numeric threshold, set as increasing with value of 20.0, and following sensor updates: 20 -
Fix numeric threshold
There was an issue when sensor value reach threshold set by the user. Example: given numeric threshold, set as increasing with value of 20.0, and following sensor updates: 20 -> 30 -> 40, trigger action would not start, which is clearly a defect, as 30 is crossed.
Testing done: - numeric threshold now works with example given above. - UTs were updated and are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I955876e076f2286efd98d187cae775a7ab2f4e28
show more ...
|
973b4bb0 | 25-Apr-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
fixing Set on report properties
Setting valid value for property which is incorrect for current configuration will result in OK response, but will change ErrorMessages property. ErrorMessages will c
fixing Set on report properties
Setting valid value for property which is incorrect for current configuration will result in OK response, but will change ErrorMessages property. ErrorMessages will contain information about error type and property name.
Tested: - Change interval from 1000 to 0 for periodic report changes status from Enabled to Disabled. - Change interval from 0 to 1000 for periodic report changes status from Disabled to Enabled.
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I34add1ed0308b3da0850b1db6a67a217d11b6956
show more ...
|
b7b7e1b6 | 19-May-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Update Trigger Actions implementation
Dbus trigger action names were modified to reflect separation of Telemetry Service from Redfish: - LogToLogService is renamed to LogToJournal, - RedfishEvent wa
Update Trigger Actions implementation
Dbus trigger action names were modified to reflect separation of Telemetry Service from Redfish: - LogToLogService is renamed to LogToJournal, - RedfishEvent was renamed to LogToRedfishEventLog
Both of those logging actions, now also include trigger id and threshold name. Threshold naming logic: - For discrete triggers, it can be specified by user, if left empty it will be changed to "{Severity} condition". - Numeric triggers have no way of naming threshold, instead its type will be converted to string, example "UpperWarning" - Discrete OnChange threshold will always be named "OnChange"
Additionally, defect was found with timestamp attached to Trigger Logs: it was a steady_clock timestamp instead of system_clock. The function which was supposed to format it was also working incorrectly, and was improved to work with milliseconds. This change required major refactor of unit tests, especially for numeric threshold.
Testing done: - LogToJournal action is working properly, - LogToRedfishEventLog action is working properly, - UTs are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: Iae2490682f0e9e2a610b45fd8af5cc5e21e66f35
show more ...
|