public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: "Kubaj, Piotr" <piotr.kubaj@intel.com>
Cc: "Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
	"Ossowski, Tomasz" <tomasz.ossowski@intel.com>,
	"Dubel, Helena Anna" <helena.anna.dubel@intel.com>,
	"Niestepski, Daniel" <daniel.niestepski@intel.com>,
	"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v3] thermal: add new test group
Date: Fri, 23 Jan 2026 19:28:22 +0100	[thread overview]
Message-ID: <20260123182822.GA367190@pevik> (raw)
In-Reply-To: <eefc58e780c7c80539d993b27b614c16cbae21c6.camel@intel.com>

Hi Piotr,

> > > Then it
> > > + * decreases the threshold for sending a thermal interrupt to just
> > > above
> > > + * the current temperature and runs a workload on the CPU.

> > First, why test needs to run for 30 sec and then sleep for 10 sec?
Maybe the most important of my questions / points.

> Here the point is to use a decreasing timeout. The test starts with 10s
> cooldown to make sure that even pre-production CPU's, which might have
> their thermal protections disabled, cool down properly. Once sleep time
> reaches 0, the conclusion is that either there was not enough workload
> or somehow interrupts are not triggered after all.

Why 30 sec and then sleep for 10 sec? Is it really needed to do it this way?
Aren't these times depending on the tested machine? Some of them will fail due
time not running enough, other will waste time (if they get interrupt e.g. in 10
sec). The usual approach would be to have the timeout safe enough for any type
of hardware but proactively check the temperature and stop testing once it's
done.

...
> > > +			int temp;
> > > +
> > > +			snprintf(path, PATH_LEN,
> > > "/sys/class/thermal/thermal_zone%d/", i);
> > > +			strncpy(temp_path, path, PATH_LEN);
> > > +			strncat(temp_path, "temp", 4);
> > > +			tst_res(TDEBUG, "Testing %s", temp_path);
> > nit: I'd put this as TINFO to get at least some debug info without -
> > D.

> > > +			SAFE_FILE_SCANF(temp_path, "%d", &temp);
> > All SAFE_*() macros quit testing, therefore the following check is
> > not needed.
> It's necessary because if the temperature is below 0, there's most
> likely some kernel or sensor issue.

I'm sorry, I was wrong here. I mixed up vfscanf() return value from LTP
function, but you check the scanned value.

Kind regards,
Petr

> > > +			if (temp < 0) {
> > > +				tst_brk(TBROK, "Unexpected zone
> > > temperature value %d", temp);
> > > +				status = 0;
> > > +			}
> > > +			tst_res(TDEBUG, "Current temperature for
> > > %s: %d", path, temp);

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-01-23 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 13:41 [LTP] [PATCH v3] thermal: add new test group Piotr Kubaj
2026-01-22 14:07 ` Petr Vorel
2026-01-23 13:12   ` Kubaj, Piotr
2026-01-23 18:28     ` Petr Vorel [this message]
2026-01-29 21:40       ` Wysocki, Rafael J
2026-01-29 23:24         ` Petr Vorel
2026-02-03 14:38           ` Wysocki, Rafael J
  -- strict thread matches above, loose matches on Subject: below --
2025-11-19 11:45 Piotr Kubaj
2025-11-20 16:30 ` Petr Vorel

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=20260123182822.GA367190@pevik \
    --to=pvorel@suse.cz \
    --cc=daniel.niestepski@intel.com \
    --cc=helena.anna.dubel@intel.com \
    --cc=ltp@lists.linux.it \
    --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