From: Petr Vorel <pvorel@suse.cz>
To: linuxtestproject.agent@gmail.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] thermal: add new test group
Date: Fri, 15 May 2026 16:39:48 +0200 [thread overview]
Message-ID: <20260515143948.GA40164@pevik> (raw)
In-Reply-To: <20260514120004.4030-1-linuxtestproject.agent@gmail.com>
Hi Piotr,
> Hi Piotr,
> On 2026-05-14, Piotr Kubaj wrote:
> > thermal: add new test group
> > +static void run(void)
> > +{
> > + static bool first_zone = true;
> > + ...
> > + if (!first_zone) {
> > + tst_res(TINFO, "Cooling down for %d seconds", COOLDOWN);
> > + sleep(COOLDOWN);
> > + }
> > + first_zone = false;
> The `static` qualifier means `first_zone` is initialized only once, at
> program start. On the second iteration (`-i 2`), it will already be
> `false`, causing the first zone to incur an unnecessary 300-second
> cooldown. Drop `static` so it resets to `true` on every call.
AI is wrong, that was actually the point. IMHO this v20 is better than following
v21. I just wonder if 300 sec isn't too much.
Also, it can still fail if one runs test more times without iterations. But I'm
ok with this known issue.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
If I get Cyril's ack, I'll merge this version with minor formatting diff.
Kind regards,
Petr
diff --git testcases/kernel/thermal/thermal_interrupt_events.c testcases/kernel/thermal/thermal_interrupt_events.c
index b282180314..9d9d9d7e4c 100644
--- testcases/kernel/thermal/thermal_interrupt_events.c
+++ testcases/kernel/thermal/thermal_interrupt_events.c
@@ -201,7 +201,7 @@ static void run(void)
for (int i = 0; i < tz_counter; i++) {
if (x86_pkg_temp_tz[i]) {
if (!first_zone) {
- tst_res(TINFO, "Cooling down for %d seconds", COOLDOWN);
+ tst_res(TINFO, "Cooling down for %d sec", COOLDOWN);
sleep(COOLDOWN);
}
first_zone = false;
@@ -215,8 +215,8 @@ static void run(void)
for (int j = 0; j < nproc; j++) {
if (interrupt_later[j] > interrupt_init[j]) {
interrupt_increased = true;
- tst_res(TINFO, "CPU %d interrupt counter: %" PRIu64 " (previous: %" PRIu64 ")",
- j, interrupt_later[j], interrupt_init[j]);
+ tst_res(TINFO, "CPU %d interrupt counter: %" PRIu64 " => %" PRIu64,
+ j, interrupt_init[j], interrupt_later[j]);
}
}
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-05-15 14:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 9:36 [LTP] [PATCH v20] thermal: add new test group Piotr Kubaj
2026-05-14 12:00 ` [LTP] " linuxtestproject.agent
2026-05-15 14:39 ` Petr Vorel [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-14 13:34 [LTP] [PATCH v21] " Piotr Kubaj
2026-05-14 14:19 ` [LTP] " linuxtestproject.agent
2026-05-15 14:42 ` Petr Vorel
2026-05-06 11:24 [LTP] [PATCH v19] " Piotr Kubaj
2026-05-06 14:16 ` [LTP] " linuxtestproject.agent
2026-05-06 14:23 ` Andrea Cervesato via ltp
2026-04-30 8:42 [LTP] [PATCH v18] " Piotr Kubaj
2026-04-30 9:18 ` [LTP] " linuxtestproject.agent
2026-04-30 11:28 ` Kubaj, Piotr
2026-04-28 12:46 [LTP] [PATCH v17] " Piotr Kubaj
2026-04-28 14:41 ` [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=20260515143948.GA40164@pevik \
--to=pvorel@suse.cz \
--cc=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
/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