public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
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 v13] thermal: add new test group
Date: Tue, 24 Mar 2026 13:05:42 +0000	[thread overview]
Message-ID: <69c28c27.050a0220.1f29e8.ce4b@mx.google.com> (raw)
In-Reply-To: <20260323140851.197426-2-piotr.kubaj@intel.com>

Hi Piotr,

> +				ptr = endptr;
> +				tst_res(TDEBUG, "interrupts[%d]: %ld", i, interrupts[i]);

`interrupts` is uint64_t*, so we should use %ul instead.

> +static void run(void)
> +{
> +	for (int i = 0; i < tz_counter; i++) {
> +		if (x86_pkg_temp_tz[i])
> +			test_zone(i);
> +	}
> +	read_interrupts(interrupt_later, nproc);
> +
> +	for (int i = 0; i < nproc; i++) {
> +		if (interrupt_later[i] < interrupt_init[i])
> +			tst_res(TFAIL, "CPU %d interrupt counter: %ld (previous: %ld)",
> +				i, interrupt_later[i], interrupt_init[i]);

We always consider TFAIL when counter decreases, but we never consider when
it increases. Is there a reason for that?

> +	}
> +
> +	if (temp <= temp_high)
> +		tst_res(TFAIL, "Zone temperature is not rising as expected");
> +	else
> +		tst_res(TPASS, "x86 package thermal interrupt triggered");
> +}

I also have other questions in here. Why are we considering only the
last zone temperature? Is there a reason for it, or we should save all
temperature for all zones and eventually verify temperature increased
specifically for each one of them?

Because in a single socket system (I guess) we have one single
temperature for all the zones, but on i.e. dual socket server, this
test would verify that only the last zone has increased temperature
above the higher level. And this is wrong, according to the goal of
this test. We want to verify that kernel is correctly working for all 
systems, correctly increasing the thermal counter for each thermal
zone. If this is correct, `temp` and `temp_high` should be an array,
where each item is associated to a zone, and it should be processed
only at the end for TPASS/TFAIL.


Kind Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

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

  reply	other threads:[~2026-03-24 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 14:08 [LTP] [PATCH v13] thermal: add new test group Piotr Kubaj
2026-03-24 13:05 ` Andrea Cervesato via ltp [this message]
2026-03-25 10:55   ` Kubaj, Piotr

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=69c28c27.050a0220.1f29e8.ce4b@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