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 v16] thermal: add new test group
Date: Mon, 27 Apr 2026 11:50:27 +0000 [thread overview]
Message-ID: <69ef4d84.5d0a0220.3bf6a8.26b0@mx.google.com> (raw)
In-Reply-To: <20260408132728.653586-2-piotr.kubaj@intel.com>
Hi Piotr,
> + interrupts[i] = strtoull(ptr, &endptr, 10);
> +
> + if (ptr == endptr)
> + tst_brk(TBROK, "CPU %d: interrupt not found", nproc);
> +
> + if (errno == ERANGE)
> + tst_brk(TBROK, "CPU %d: interrupt out of range", nproc);
`nproc` inside tst_brk() is wrong, we should use `i`, otherwise we see
a wrong error message.
> +static void run(void)
> +{
> + for (int i = 0; i < tz_counter; i++) {
> + if (x86_pkg_temp_tz[i]) {
> + read_interrupts(interrupt_init);
> + test_zone(i);
> + read_interrupts(interrupt_later);
> + for (int j = 0; j < nproc; j++) {
> + if (interrupt_later[j] < interrupt_init[j])
> + tst_res(TFAIL, "CPU %d interrupt counter: %" PRIu64 " (previous: %" PRIu64 ")",
> + j, interrupt_later[j], interrupt_init[j]);
> + }
> + if (temp <= temp_high)
> + tst_res(TFAIL, "Zone temperature is not rising as expected");
> + else
> + tst_res(TPASS, "x86 package thermal interrupt triggered");
The interrupt check only flags TFAIL when counters decrease (< ), but
never verifies they actually increased. If no new interrupts were
triggered (counters stay the same), the test still passes as long as
temperature rose. The condition should use <= to catch the "no increase"
case, and the TPASS should reflect that interrupts were verified, not
just temperature.
The rest LGTM.
--
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-04-27 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 13:27 [LTP] [PATCH v16] thermal: add new test group Piotr Kubaj
2026-04-16 7:22 ` Petr Vorel
2026-04-27 11:50 ` 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=69ef4d84.5d0a0220.3bf6a8.26b0@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox