[LTP] high_freq_hwp_cap_cppc.c: new test for testing acpi_cppc/highest_perf
Kubaj, Piotr
piotr.kubaj@intel.com
Wed Jun 10 20:20:10 CEST 2026
2026-06-10 (水) の 13:43 +0000 に linuxtestproject.agent@gmail.com
さんは書きました:
> Hi Piotr,
>
> On Wed, Jun 10, 2026 at 03:30:49PM +0200, Piotr Kubaj wrote:
> > high_freq_hwp_cap_cppc.c: new test for testing
> > acpi_cppc/highest_perf
>
> > +// .needs_cpu_vendor = "GenuineIntel",
>
> This field does not exist in the LTP framework. Is this leftover from
> an earlier prototype? Commented-out code should not be committed.
>
> If the intent is to restrict to Intel, the existing CPUID HWP check
> in setup() already serves that purpose since HWP is Intel-specific.
The field is to be uncommented once the patch for its addition is
pushed.
>
> > +static void run(void)
> > +{
> > + bool status = true;
>
> > + bool match = msr_highest_perf ==
> > sysfs_highest_perf;
> > +
> > + if (!match) {
> > + tst_res(TINFO, "cpu%d: sysfs=%llu
> > MSR=%llu",
> > + i, sysfs_highest_perf,
> > msr_highest_perf);
> > + status = false;
> > + }
> > +
> > + tst_res(TINFO, "cpu%d: %s", i, match ? "OK" :
> > "MISMATCH");
> > + }
> > +
> > + if (status)
> > + tst_res(TPASS, "Sysfs and MSR values are equal");
> > + else
> > + tst_res(TFAIL, "Highest performance values differ
> > between sysfs and MSR");
>
> Results should be reported directly where the outcome is determined,
> not accumulated in a flag and reported at the end. Per-CPU mismatches
> are logged as TINFO, meaning they won't appear as test failures in
> result summaries.
>
> Could this report TFAIL directly for each mismatched CPU and TPASS
> once at the end if all matched? Something like:
>
> if (msr_highest_perf != sysfs_highest_perf) {
> tst_res(TFAIL, "cpu%d: sysfs=%llu MSR=%llu",
> i, sysfs_highest_perf, msr_highest_perf);
> status = false;
> }
>
> ...
>
> if (status)
> tst_res(TPASS, "...");
>
> That way each failing CPU is a proper TFAIL, and the redundant
> second TINFO on line 99 can be dropped as well.
That way of reporting was suggested before.
>
> 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
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
More information about the ltp
mailing list