[LTP] [PATCH v5] rfim: add new test for verifying RFIM sysfs interface
Andrea Cervesato
andrea.cervesato@suse.com
Thu Jul 30 13:46:44 CEST 2026
Hi Piotr,
sorry for the delay.
> +/*\
> + * Validate presence and permissions of RFIM attributes.
> + * The kernel exposes the dvfs, fivr and dlvr attribute groups
> + * independently, gated on per-device feature bits, so the test checks
> + * whichever of the three groups the hardware presents.
> + *
> + * Permissions are verified by opening each node: read-only attributes
> + * must accept O_RDONLY and reject a write open, while read-write ones
> + * must accept O_RDWR. For sysfs nodes the mode bits alone are not
> + * authoritative - the kernel can still refuse the open in the file's
> + * own syscall handler - so open() is what actually exercises access.
Pleae use :manpage:`open(2)` and `O_RDONLY` and `O_RDWR`.
> + *
> + * The test requires root because the read-write RFIM attributes are
> + * root-owned and created mode 0644, so only the owner holds the write
> + * bit. An unprivileged user could read them but would get EACCES when
> + * opening them O_RDWR, which the read-write check would misreport as a
Same here for EACCESS and O_RDWR.
In this way we will have a certain consistency inside LTP documentation.
The rest looks ok.
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list