History log of /openbmc/telemetry/tests/src/test_sensor.cpp (Results 1 – 12 of 12)
Revision Date Author Comments
# f7ea2997 27-Jan-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

added support for onChange report

Report is now notified when metric changes and updates reading values.

Tested:
- Added new unit tests
- OnChange report updates Readings when metric values cha

added support for onChange report

Report is now notified when metric changes and updates reading values.

Tested:
- Added new unit tests
- OnChange report updates Readings when metric values changes

Change-Id: I3be9ef7aa0486cb15bac627aa1de5cc632613b3b
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# 94f71c51 10-Dec-2021 Szymon Dompke <szymon.dompke@intel.com>

Trigger: make dbus properties writable

This change allows to modify 'Sensors', 'ReportNames' and 'Thresholds'
dbus properties of Trigger interface. They are required by Redfish to
implement PATCH fu

Trigger: make dbus properties writable

This change allows to modify 'Sensors', 'ReportNames' and 'Thresholds'
dbus properties of Trigger interface. They are required by Redfish to
implement PATCH functionality for Trigger schema.

Some backend changes were required to enable this functionality, and as
such few improvements were made for existing code:
- NumericThreshold and DiscreteThreshold now have common implementation
where it was possible.
- Internal sensor info structure for Trigger is now the same as the one
used for Report. This resulted in breaking compatibility with previous
Trigger persistency data.
- Added getInfo / getParams methods for Sensor and Threshold interfaces.
They are used by Trigger dbus getters and persistency mechanism now,
instead of storing this data in Trigger object.

Testing done:
- Unit tests were expanded and are passing
- dbus setters for Sensors and Thresholds are working and modifications
are reflected by calling appropriate getters.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I7a14c15a30d78ce872342b5f938aba43c77be9c0

show more ...


# fbeb5bf4 03-Jan-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

fixed clang-tidy errors

fixed clang compilation error and few clang-tidy issues

Tested:
- Code compiles, all unit tests are passing
- Number of reported clang-tidy issues decreased

Change-Id: Ie3f

fixed clang-tidy errors

fixed clang compilation error and few clang-tidy issues

Tested:
- Code compiles, all unit tests are passing
- Number of reported clang-tidy issues decreased

Change-Id: Ie3f88db6e2dffb26ec6c56dbdc1ce5bad288dccd
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# 51f0fd50 28-Dec-2021 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Fixed issue with wrong timestamp

Telemetry service used steady_clock for generating timestamps, but it
produced incorrect time. This change makes telemetry service use
steady_clock for intervals and

Fixed issue with wrong timestamp

Telemetry service used steady_clock for generating timestamps, but it
produced incorrect time. This change makes telemetry service use
steady_clock for intervals and system_clock for timestamps.

Changed readings timestamp to display current timestamp instead of a
time when reading was received.

Tested:
- correct timestamp is visible on dbus
- other telemetry service features are still working

Change-Id: Ic49f45640532cfffaeff5e0bd5591e6d99e5def5
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# b8cc78dd 29-Nov-2021 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Api changes in AddReportFuture version

Added support for CollectionFunction, CollectionDuration,
CollectionTimeScope, ReportUpdates, AppendLimit.

New API separates Id and Name, user can decide to p

Api changes in AddReportFuture version

Added support for CollectionFunction, CollectionDuration,
CollectionTimeScope, ReportUpdates, AppendLimit.

New API separates Id and Name, user can decide to pass only Name
to auto generate Id or pass Id which needs to be unique.

Tested:
- No functional changes to old API, everything works as before
- All use cases can be replaced with new API to achieve same results
- New features which require new API work as expected

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I647efab36d90a548754f89968223e162a087481e

show more ...


# 7e098e93 16-Sep-2021 Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>

Added support for Enabled property

Enabled property is added so that user can select via dbus interface if
Readings are updated and signal on Readings update is emitted, moreover
Metric calculation

Added support for Enabled property

Enabled property is added so that user can select via dbus interface if
Readings are updated and signal on Readings update is emitted, moreover
Metric calculation on received sensor data is active only when Enabled
is set to true

Tested:
- New unit tests were created, ran all new and previous UTs, all passed
- Tested under QEMU by adding reports for single and multiple sensors,
changing Enabled property and emitting signal of value change for
sensors added into the report, checking if Readings is accordingly
updated or not updated
- Verified persistency, if Enabled property is successfully stored and
restored after Telemetry service restart and also checked if after the
restart dependencies of Enabled (Readings, Metric calculation) are
properly initiated

Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
Change-Id: I29cf13693a48d15cb16d2ad6707f483f67f4879b

show more ...


# d2238194 02-Dec-2020 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Review fixes for 'Created metric class'

- Changed metric to_json to dumpConfiguration returning LabeledTuple
- LabeledTuple can be created and assigned directly to json
- LabeledTuple can be readed

Review fixes for 'Created metric class'

- Changed metric to_json to dumpConfiguration returning LabeledTuple
- LabeledTuple can be created and assigned directly to json
- LabeledTuple can be readed from json using json.get<LabeledTuple>
- Added PrintTo for LabeledMetricParams, LabeledSensorParams
- Added helper method expectMake to ReportFactoryMock
- sensorPaths are serialized to tuple<service, path> instead of single
field with service and path separated via ':'
- Changed configuration version from 1 to 2

Change-Id: I7c45fb584687172f88fd549a93329264793b0b8e
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# 5ade2b1d 16-Nov-2020 Wludzik, Jozef <jozef.wludzik@intel.com>

Remove retry "GetProperty" on fail

Removed retry "GetProperty" on fail when sensor is not present.
Monitoring PropertiesChanged signal is enough to get the latest
value from sensor when it is added

Remove retry "GetProperty" on fail

Removed retry "GetProperty" on fail when sensor is not present.
Monitoring PropertiesChanged signal is enough to get the latest
value from sensor when it is added to dbus environment. Added
test that check if newly added properties to dbus environment
send PropertiesChanged signal.

Tested: - All unit tests passed

Change-Id: Ibe92b23dd062a6d48b0b6d5bc0dc2198bcfa7a5e
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>

show more ...


# 6ccfcbf5 04-Nov-2020 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Created metric class

Metric collects updates from sensor. Report displays metric readings
depending on reportingType.

Tested:
- Added new units tests for Metric class
- All other unit tests are

Created metric class

Metric collects updates from sensor. Report displays metric readings
depending on reportingType.

Tested:
- Added new units tests for Metric class
- All other unit tests are passing

Change-Id: I19f4831fab163a4f9540cef7bb23e903ae90fddf
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# e2362796 27-Oct-2020 Wludzik, Jozef <jozef.wludzik@intel.com>

Implement Report persistency

Now Report properties are stored in non-volatile memory. It allows
to restore Report after system restart. Persistency of a report is
controlled by Persistency property

Implement Report persistency

Now Report properties are stored in non-volatile memory. It allows
to restore Report after system restart. Persistency of a report is
controlled by Persistency property in Report interface.

Tested:
- Passed unit tests
- Verified that report is stored in /var/lib/telemetry dir
- Verified that report is restored from storage after telemetry
service start

Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Change-Id: Iccfe21603eecffc4e174a4403f699b03de320db9

show more ...


# 0e29f439 17-Nov-2020 Wludzik, Jozef <jozef.wludzik@intel.com>

Fix CI job

Decreased meson version to 0.54.3 to enable CI jobs.
Fixed Invoke arguments in unit tests.

Change-Id: I75cdce3ebb2bffd7732db30b2f718a3728c277c8
Signed-off-by: Wludzik, Jozef <jozef.wludz

Fix CI job

Decreased meson version to 0.54.3 to enable CI jobs.
Fixed Invoke arguments in unit tests.

Change-Id: I75cdce3ebb2bffd7732db30b2f718a3728c277c8
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>

show more ...


# b5645947 29-Sep-2020 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Implemented sensor class

Sensor class was introduced, it monitors
xyz.openbmc_project.Sensor.Value, for change and notifies all
listeners.

Tested:
- Unit tested with service stub that provides db

Implemented sensor class

Sensor class was introduced, it monitors
xyz.openbmc_project.Sensor.Value, for change and notifies all
listeners.

Tested:
- Unit tested with service stub that provides dbus interface
xyz.openbmc_project.Sensor.Value
- All changes are delivered to listeners
- All other unit tests are passing

Change-Id: I8c9d58cc986c1fe2a4d2386815d559814016efa6
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...