[LTP] rfim: add new test for verifying RFIM sysfs interface
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Thu Jun 18 18:40:32 CEST 2026
Hi Piotr,
On Thu, 18 Jun 2026, Piotr Kubaj wrote:
> rfim: add new test for verifying RFIM sysfs interface
> +#define RFIM_ROOT "/sys/bus/pci/devices/0000:00:04.0"
The PCI BDF is hardcoded here. The proc_thermal driver matches by
PCI device ID (PCI_DEVICE_ID_INTEL_*_THERMAL), not by slot. While
00:04.0 is the typical BDF on current Intel client SoCs, could this
be discovered dynamically instead -- e.g. by scanning
/sys/bus/pci/devices/*/driver for a proc_thermal link, or by looking
up the device via its class or vendor:device pair?
This would prevent a silent TCONF on any future platform where the
thermal device appears at a different BDF.
> +static void check_read_only(const char *path)
> +{
> + int fd = TST_EXP_FD(open(path, O_RDONLY));
> +
> + if (fd >= 0)
> + SAFE_CLOSE(fd);
LTP convention is to use "fd != -1" rather than "fd >= 0" for fd
validity checks. Same applies in check_read_write().
Verdict - Needs revision
---
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
More information about the ltp
mailing list