From: linuxtestproject.agent@gmail.com
To: Piotr Kubaj <piotr.kubaj@intel.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] rfim: add new test for verifying RFIM sysfs interface
Date: Tue, 16 Jun 2026 14:28:04 +0000 [thread overview]
Message-ID: <20260616142804.3943-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260616114204.5636-2-piotr.kubaj@intel.com>
Hi Piotr,
On Tue, 16 Jun 2026, Piotr Kubaj wrote:
> rfim: add new test for verifying RFIM sysfs interface
> /*\
> * Validate presence and permissions of RFIM attributes.
> * The test checks first validity of general RFIM attributes,
> * and then checks either DLVR or FIVR, depending on hardware.
> */
The test sets .needs_root = 1 but the doc comment does not explain
why root is required. Other tests in the same directory document
this (e.g. "The test needs root because reading /dev/cpu/N/msr
needs CAP_SYS_RAWIO / root."). Could a line be added explaining
that root is needed for write-access checks on sysfs attributes?
> } else if (!stat(RFIM_ROOT"/fivr", &stats)) {
> if (S_ISDIR(stats.st_mode))
> variant = RFIM_FIVR;
> else
> tst_brk(TBROK, "%s exists but is not a directory", RFIM_ROOT"/fivr");
> } else
> tst_brk(TCONF, "Neither %s nor %s exists", RFIM_ROOT"/dlvr", RFIM_ROOT"/fivr");
The first two branches of this if/else-if/else chain use braces but
the final else does not. Kernel coding style requires braces on all
branches when any branch needs them.
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-16 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 11:42 [LTP] [PATCH] rfim: add new test for verifying RFIM sysfs interface Piotr Kubaj
2026-06-16 14:28 ` linuxtestproject.agent [this message]
2026-06-16 14:45 ` Andrea Cervesato via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260616142804.3943-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=piotr.kubaj@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.