Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
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 v19] thermal: add new test group
Date: Tue, 12 May 2026 11:56:47 +0200	[thread overview]
Message-ID: <agL5X898iY6MXK75@yuki.lan> (raw)
In-Reply-To: <20260506112420.67516-2-piotr.kubaj@intel.com>

Hi!
> +static void setup(void)
> +{
> +	char line[8192];
> +
> +	nproc = tst_ncpus();
> +	tst_set_runtime(nproc * TEST_RUNTIME);

The last thing that I do not think is correct is this part. We are
setting the runtime here based on the number of CPUs and not based on
the number of actuall test iterations.

I guess that we need to:

  Turn the x86_pkg_temp_tz_found into a counter and collect the number
  of thermal zones found and set the runtime at the end of the setup
  with the counter instead.

And at the same time the TEST_RUNTIME appears to be significantly
smaller than the actual runtime.

  The upper bound for the runtime is a sum of all possible iterations,
  if we simplify it a bit it would be roughly ((RUNTIME+SLEEPTIME) *
  (SLEEPTIME/2))

  As we are doing SLEEPTIME iterations with SLEEPTIME and RUNTIME
  getting smaller in each of them so it will average out to SLEEPTIME/2
  iterations with full (RUNTIME+SLEEPTIME)

  So I guess that we need:

  #define TEST_RUNTIME ((RUNTIME+SLEEPTIME) * (SLEEPTIME/2))


The rest looks good to me.

With the runtime calculation fixed:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

  parent reply	other threads:[~2026-05-12  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 11:24 [LTP] [PATCH v19] thermal: add new test group Piotr Kubaj
2026-05-06 14:16 ` [LTP] " linuxtestproject.agent
2026-05-06 14:23   ` Andrea Cervesato via ltp
2026-05-11  7:51 ` [LTP] [PATCH v19] " Petr Vorel
2026-05-12  9:56 ` Cyril Hrubis [this message]
2026-05-13 10:54   ` Petr Vorel
2026-05-13 12:06     ` Cyril Hrubis

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=agL5X898iY6MXK75@yuki.lan \
    --to=chrubis@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