From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Piotr Kubaj" <piotr.kubaj@intel.com>
Cc: daniel.niestepski@intel.com, tomasz.ossowski@intel.com,
helena.anna.dubel@intel.com, rafael.j.wysocki@intel.com,
ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v10] high_freq_hwp_cap_cppc.c: new test
Date: Wed, 06 May 2026 12:38:02 +0000 [thread overview]
Message-ID: <69fb362b.050a0220.144360.d768@mx.google.com> (raw)
In-Reply-To: <20260505095451.26212-2-piotr.kubaj@intel.com>
Hi Piotr,
> + SAFE_PREAD(1, fd, &msr_highest_perf, sizeof(msr_highest_perf), MSR_HWP_CAPABILITIES);
> + SAFE_CLOSE(fd);
> + fd = -1;
This is not needed because it's done by SAFE_CLOSE() already.
> + msr_highest_perf &= HIGHEST_PERF_MASK;
> + tst_res(TDEBUG, "%s: %llu", path, msr_highest_perf);
> +
> + if (msr_highest_perf != sysfs_highest_perf) {
> + tst_res(TINFO, "cpu%d: sysfs=%llu MSR=%llu",
> + i, sysfs_highest_perf, msr_highest_perf);
> + status = false;
After this we should return, otherwise we keep cycling and next status
value might change again. I would just add here the TFAIL and return at
this point, so status variable goes away.
Unless, we want to track _all_ CPUs and then (at the end) print the
result. In this case, you need an array of int, assiging 1 in case of
error and 0 in case of success.
And the ending check, after the loop, will print the status of all
CPUs.
I'm not a driver expert, but I guess having an ending result printing
all results for all CPUs in case of mismatch is the best choice.
Kind regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-05-06 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 9:54 [LTP] [PATCH v10] high_freq_hwp_cap_cppc.c: new test Piotr Kubaj
2026-05-05 17:54 ` [LTP] " linuxtestproject.agent
2026-05-06 12:38 ` Andrea Cervesato via ltp [this message]
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=69fb362b.050a0220.144360.d768@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=daniel.niestepski@intel.com \
--cc=helena.anna.dubel@intel.com \
--cc=piotr.kubaj@intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=tomasz.ossowski@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.