Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Piotr Kubaj <piotr.kubaj@intel.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] cpufreq.c: add new test for cpufreq sysfs interface validation
Date: Tue,  5 May 2026 17:53:35 +0000	[thread overview]
Message-ID: <20260505175335.4038-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260505110208.32207-2-piotr.kubaj@intel.com>

Hi Piotr,

On Tue, 5 May 2026 13:02:09 +0200, Piotr Kubaj wrote:
> cpufreq.c: add new test for cpufreq sysfs interface validation

> +/*\
> + * Runs various sanity checks for intel_pstate cpufreq sysfs interface.
> + * ...
> + */

The doc comment does not state why root is needed. Per ground-rules rule 4,
document the reason in the doc block — e.g. "Requires root to write to
/sys/devices/system/cpu/intel_pstate/ and per-CPU cpufreq sysfs attributes."

[...]

> +	SAFE_FILE_SCANF("/sys/devices/system/cpu/intel_pstate/no_turbo", "%d", &no_turbo);
> +	SAFE_FILE_SCANF("/sys/devices/system/cpu/intel_pstate/status", "%15s", intel_pstate_status);

CONFIG_X86_INTEL_PSTATE=y does not guarantee the driver is active at runtime
(acpi_cpufreq may take over, or the driver may be in "off" mode). If the
sysfs files are absent, SAFE_FILE_SCANF calls tst_brk(TBROK). Guard with
an existence check and use tst_brk(TCONF, "intel_pstate driver not active")
instead.

---
Note:

Our agent completed the review of the patch. 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

  reply	other threads:[~2026-05-05 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 11:02 [LTP] [PATCH v5] cpufreq.c: add new test for cpufreq sysfs interface validation Piotr Kubaj
2026-05-05 17:53 ` linuxtestproject.agent [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-07 11:11 [LTP] [PATCH v8] " Piotr Kubaj
2026-05-07 11:57 ` [LTP] " linuxtestproject.agent
2026-05-06 13:08 [LTP] [PATCH v7] " Piotr Kubaj
2026-05-06 14:17 ` [LTP] " linuxtestproject.agent
2026-05-06  9:10 [LTP] [PATCH v6] " Piotr Kubaj
2026-05-06 12:47 ` [LTP] " linuxtestproject.agent
2026-05-05  9:48 [LTP] [PATCH v4] " Piotr Kubaj
2026-05-05 10:53 ` [LTP] " linuxtestproject.agent
2026-05-04 10:08 [LTP] [PATCH v3] " Piotr Kubaj
2026-05-04 11:54 ` [LTP] " linuxtestproject.agent
2026-04-22 10:35 [LTP] [PATCH] " Piotr Kubaj
2026-04-22 11:11 ` [LTP] " linuxtestproject.agent

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=20260505175335.4038-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox