All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Alessandro Carminati <acarmina@redhat.com>
Cc: ltp@lists.linux.it,
	Alessandro Carminati <alessandro.carminati@gmail.com>,
	Martin Doucha <martin.doucha@suse.com>
Subject: Re: [LTP] [RFC] sched/starvation: Add disclaimer for virtualized/emulated environments
Date: Mon, 20 Jan 2025 15:24:47 +0100	[thread overview]
Message-ID: <20250120142447.GA812655@pevik> (raw)
In-Reply-To: <20250120102831.63646-1-acarmina@redhat.com>

Hi Alessandro,

> This patch adds a disclaimer message to the starvation test case, warning
> users against running the test in virtualized or emulated environments.
> The test produces expected results only on bare-metal systems and is prone
> to failure when executed in non-bare-metal setups.

> While detecting virtualization or emulation is possible in some cases,
> the methods are unreliable.
> Rather than attempting to prevent the test from running in such
> environments, this patch provides a warning to inform users of the
> limitations.

> Change:
> - Added a TINFO message to notify users that the test should be run
>   on bare-metal systems for meaningful results.

> Signed-off-by: Alessandro Carminati <acarmina@redhat.com>
> ---
>  testcases/kernel/sched/cfs-scheduler/starvation.c | 3 +++
>  1 file changed, 3 insertions(+)

> diff --git a/testcases/kernel/sched/cfs-scheduler/starvation.c b/testcases/kernel/sched/cfs-scheduler/starvation.c
> index c620c9c3e..b779a5f0a 100644
> --- a/testcases/kernel/sched/cfs-scheduler/starvation.c
> +++ b/testcases/kernel/sched/cfs-scheduler/starvation.c
> @@ -115,6 +115,9 @@ static void setup(void)
>  	if (tst_has_slow_kconfig())
>  		tst_brk(TCONF, "Skip test due to slow kernel configuration");

> +	tst_res(TINFO, "This test is designed to run on bare-metal systems. "
> +		"Running it in a virtualized or emulated environment may produce unreliable results.");

We should at least wrap it with tst_is_virt(), make it shorter and add WARNING:

	if (tst_is_virt(VIRT_ANY))
		tst_res(TINFO, "WARNING: Running on a virtualized or emulated environment may produce unreliable results");

But OTOH I haven't seen any problem with it on various SLES versions nor in
openSUSE Tumbleweed (which uses latest mainline kernel). Therefore I would not
put TCONF, but just TINFO as you suggested (other tests which use tst_is_virt()
detection usually do TCONF).

Any idea what can cause instability on virtualized environments? Which kernel
options could be affected? ATM test is disabled due slow kernel config detection
on SLES/Tumbleweed (non-RT, tested on qemu) where it's working and this is not 
enough to detect unstable results on the kernels you test.

I also send a patch to remove CONFIG_LATENCYTOP as option causing slow kernel.

Kind regards,
Petr

> +
>  	tst_set_runtime(timeout);
>  }

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

  reply	other threads:[~2025-01-20 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 10:28 [LTP] [RFC] sched/starvation: Add disclaimer for virtualized/emulated environments Alessandro Carminati
2025-01-20 14:24 ` Petr Vorel [this message]
2025-01-22  8:52   ` Alessandro Carminati
2025-01-27 15:35     ` Petr Vorel
2025-01-28  9:50       ` Alessandro Carminati

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=20250120142447.GA812655@pevik \
    --to=pvorel@suse.cz \
    --cc=acarmina@redhat.com \
    --cc=alessandro.carminati@gmail.com \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.