rfim: add new test for verifying RFIM sysfs interface
PATCH 1/1 rfim: add new test for verifying RFIM sysfs interface
Validate presence and permissions of the RFIM attributes exposed by the Intel processor_thermal driver under the proc_thermal PCI device.
The kernel creates the dvfs, fivr and dlvr attribute groups independently, each gated on its own per-device feature bit, so the test detects which of the three groups the hardware presents and checks only those. This covers platforms that expose both FIVR and DLVR (e.g. Meteor Lake) as well as those with FIVR but no DVFS (e.g. Tiger Lake).
Read-only attributes (mode 0444) must accept O_RDONLY and reject a write open with EACCES; read-write attributes (mode 0644) must accept O_RDWR. The open() itself is what exercises access, since sysfs can refuse it in kernfs even when the mode bits would allow it.
The test works only on Intel platforms with RFIM and needs root for the read-write attributes, whose write bit is owner-only.
---
Correct comment according to bot review.
runtest/power_management_tests | 1 + testcases/kernel/power_management/.gitignore | 1 + testcases/kernel/power_management/rfim01.c | 151 +++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 testcases/kernel/power_management/rfim01.c
runtest/power_management_tests +1 -0
@@ -1,5 +1,6 @@ #POWER_MANAGEMENT high_freq_hwp_cap_cppc high_freq_hwp_cap_cppc +rfim01 rfim01 runpwtests03 runpwtests03.sh runpwtests04 runpwtests04.sh runpwtests06 runpwtests06.sh
testcases/kernel/power_management/.gitignore +1 -0
@@ -1 +1,2 @@ high_freq_hwp_cap_cppc +rfim01
testcases/kernel/power_management/rfim01.c new file +151 -0
151 lines not on this page · raw message
Signature · 13 lines
2.47.3 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited. -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Piotr,
Quoted 1 line · Piotr Kubaj
rfim: add new test for verifying RFIM sysfs interface
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp