kselftest: Add test to report device log errors
Get series with b4
b4 am [email protected] change-id 20240421-dev-err-log-selftest-28f5b8fc7cd0Versions newest first
- v2 Latest3 patches 8 repliesIn review
- v13 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Rebased onto next-20240703
- Link to v1: https://lore.kernel.org/r/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | kselftest: devices: Move discoverable devices test to subdirectorytools/ tools/ tools/ +3 more | +2 | 0 replies | |
| 2/3 | kselftest: Move ksft helper module to common directorytools/ tools/ tools/ +1 more | +8 | 0 replies | |
| 3/3 | kselftest: devices: Add test to detect device error logstools/ tools/ tools/ | +89 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Greg Kroah-Hartman | Shuah Khan |
|---|---|---|
| Series | A-b | A-b |
| 1/3 | ||
| 2/3 | ||
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] kselftest: Add test to report device log errors
Log errors are the most widely used mechanism for reporting issues in the kernel. When an error is logged using the device helpers, eg dev_err(), it gets metadata attached that identifies the subsystem and device where the message is coming from. This series makes use of that metadata in a new test to report which devices logged errors.
The first two patches move a test and a helper script to keep things organized before this new test is added in the third patch.
It is expected that there might be many false-positive error messages throughout the drivers code which will be reported by this test. By having this test in the first place and working through the results we can address those occurrences by adjusting the loglevel of the messages that turn out to not be real errors that require the user's attention. It will also motivate additional error messages to be introduced in the code to detect real errors where they turn out to be missing, since it will be possible to detect said issues automatically.
As an example, below you can see the test result for mt8192-asurada-spherion. The single standing issue has been investigated and will be addressed in an EC firmware update [1]:
TAP version 13
1..1
power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report model_name' property: -6 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report energy_full_design' property: -6 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report time_to_empty_now' property: -5
not ok 1 +power_supply:sbs-8-000b
Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0
[1] https://lore.kernel.org/all/cf4d8131-4b63-4c7a-9f27-5a0847c656c4@notapiano
---
Changes in v2:
- Rebased onto next-20240703
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Nícolas F. R. A. Prado (3):
kselftest: devices: Move discoverable devices test to subdirectory
kselftest: Move ksft helper module to common directory
kselftest: devices: Add test to detect device error logs
tools/testing/selftests/Makefile | 4 +-
tools/testing/selftests/devices/Makefile | 4 -
.../testing/selftests/devices/error_logs/Makefile | 3 +
.../devices/error_logs/test_device_error_logs.py | 85 ++++++++++++++++++++++
tools/testing/selftests/devices/probe/Makefile | 4 +
.../{ => probe}/boards/Dell Inc.,XPS 13 9300.yaml | 0
.../{ => probe}/boards/google,spherion.yaml | 0
.../{ => probe}/test_discoverable_devices.py | 7 +-
.../selftests/{devices => kselftest}/ksft.py | 0
9 files changed, 101 insertions(+), 6 deletions(-)---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240421-dev-err-log-selftest-28f5b8fc7cd0
Best regards,
Signature · 1 line
Nícolas F. R. A. Prado <[email protected]>