All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Tobias Schaffner <tobias.schaffner@siemens.com>
Cc: xenomai@lists.linux.dev,  jan.kiszka@siemens.com
Subject: Re: [PATCH libevl] tests: skip sched-tp-overrun in virtual environments
Date: Thu, 09 Jul 2026 15:34:24 +0200	[thread overview]
Message-ID: <87bjcggucf.fsf@xenomai.org> (raw)
In-Reply-To: <20260709125851.173262-1-tobias.schaffner@siemens.com> (Tobias Schaffner's message of "Thu, 9 Jul 2026 14:58:51 +0200")

Tobias Schaffner <tobias.schaffner@siemens.com> writes:

> Do not try to relax sched-tp-overrun on virtualized environments
> but skip the whole test since the test relies on timing guarantees
> that are not reliable under virtualization and further relaxations
> do not make any sense.
>
> Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
> ---
>  tests/sched-tp-overrun.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/tests/sched-tp-overrun.c b/tests/sched-tp-overrun.c
> index 3bb6a21..a3ef27f 100644
> --- a/tests/sched-tp-overrun.c
> +++ b/tests/sched-tp-overrun.c
> @@ -128,16 +128,9 @@ static void *tp_thread(void *arg)
>  	 */
>  	__Texpr_assert(nf.event.val == part * 2);
>  
> -	/*
> -	 * Perform the following check on real hardware only, it is
> -	 * likely to be wrong in a virtualized environment for timing
> -	 * accuracy reason.
> -	 */
> -	if (!running_on_vm()) {
> -		/* Check that a single notification was sent. */
> -		__Fcall_assert(ret, evl_read_observable(tfd, &nf, 1));
> -		__Texpr_assert(ret == -EAGAIN);
> -	}
> +	/* Check that a single notification was sent. */
> +	__Fcall_assert(ret, evl_read_observable(tfd, &nf, 1));
> +	__Texpr_assert(ret == -EAGAIN);
>  
>  	return NULL;
>  }
> @@ -177,6 +170,15 @@ int main(int argc, char *argv[])
>  		return 1;
>  	}
>  
> +	/*
> +	 * Skip on virtualized environments since the test relies on
> +	 * timing guarantees that are not reliable under virtualization.
> +	 */
> +	if (running_on_vm()) {
> +		emit_info("unchecked (vm)");
> +		return EXIT_NO_STATUS;
> +	}
> +
>  	param.sched_priority = HIGH_PRIO;
>  	__Texpr_assert(pthread_setschedparam(pthread_self(),
>  				SCHED_FIFO, &param) == 0);

Merged, thanks.

-- 
Philippe.

      reply	other threads:[~2026-07-09 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 12:58 [PATCH libevl] tests: skip sched-tp-overrun in virtual environments Tobias Schaffner
2026-07-09 13:34 ` Philippe Gerum [this message]

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=87bjcggucf.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=jan.kiszka@siemens.com \
    --cc=tobias.schaffner@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /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.