All of lore.kernel.org
 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] high_freq_hwp_cap_cppc.c: new test for testing acpi_cppc/highest_perf
Date: Wed, 10 Jun 2026 13:27:36 +0000	[thread overview]
Message-ID: <20260610132737.4073-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260610111808.110308-3-piotr.kubaj@intel.com>

Hi Piotr,

On Wed, 10 Jun 2026 13:18:10 +0200, Piotr Kubaj wrote:
> high_freq_hwp_cap_cppc.c: new test for testing acpi_cppc/highest_perf

> +static void run(void)
> +{
> +	bool status = true;
> +	char path[PATH_MAX];
> +
> +	for (int i = 0; i < nproc; i++) {

The static `mismatch` array is zeroed once by SAFE_CALLOC in setup(),
but run() only ever sets elements to 1 and never resets them. When the
test is invoked with `-i N`, stale entries from a previous iteration
survive into the next one.

For example, if CPU 2 mismatches on iteration 1 but matches on
iteration 2, the summary loop still prints "cpu2: MISMATCH" while the
verdict says TPASS. Adding a memset at the top of run() would fix it:

    memset(mismatch, 0, nproc * sizeof(int));

> +		if (msr_highest_perf != sysfs_highest_perf) {
> +			tst_res(TINFO, "cpu%d: sysfs=%llu MSR=%llu",
> +				i, sysfs_highest_perf, msr_highest_perf);
> +			mismatch[i] = 1;
> +			status = false;
> +		}

Per-CPU mismatches are reported with TINFO and the actual TFAIL is
deferred to the end of run() via the `status` flag. LTP convention is
to report results directly where they are determined. Could the
mismatch be reported as TFAIL inline (dropping the `status` flag and
the `mismatch` array), with TPASS emitted at the end only when no
mismatch was found?

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

  reply	other threads:[~2026-06-10 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 11:18 [LTP] [PATCH v15] high_freq_hwp_cap_cppc.c: new test for testing acpi_cppc/highest_perf Piotr Kubaj
2026-06-10 13:27 ` linuxtestproject.agent [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-10 13:30 [LTP] [PATCH v16] " Piotr Kubaj
2026-06-10 13:43 ` [LTP] " linuxtestproject.agent
2026-06-10 18:20   ` Kubaj, Piotr

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=20260610132737.4073-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.