From: Philippe Gerum <rpm@xenomai.org>
To: Tobias Schaffner <tobias.schaffner@siemens.com>
Cc: xenomai@lists.linux.dev, jan.kiszka@siemens.com
Subject: Re: [libevl][PATCH 2/4] evl-test: Measure worst case latencies
Date: Thu, 13 Jun 2024 16:09:06 +0200 [thread overview]
Message-ID: <87o785q67c.fsf@xenomai.org> (raw)
In-Reply-To: <20240613134557.4013044-3-tobias.schaffner@siemens.com>
Tobias Schaffner <tobias.schaffner@siemens.com> writes:
> Run latmus for 30 seconds after running the unittests to measure the
> worst case latencies.
>
> Allow to run with -u to solely run unittests.
>
> Drop getopt to simplify argument parsing in the process.
Reading the code, I'm not sure this simplifies anything. What is the
actual upside of dropping getopt?
>
> Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
> ---
> utils/evl-test | 55 ++++++++++++++++++++++++--------------------------
> 1 file changed, 26 insertions(+), 29 deletions(-)
>
> diff --git a/utils/evl-test b/utils/evl-test
> index bc7440f..5c1c3da 100644
> --- a/utils/evl-test
> +++ b/utils/evl-test
> @@ -7,44 +7,37 @@ if test \! -d $EVL_TESTDIR; then
> fi
>
> usage() {
> - echo >&2 "usage: $(basename $1) [-l][-L][-k][-h] [test-list]"
> + echo >&2 "usage: $(basename $1) [-l][-L][-k][-h][-u] [test-list]"
> }
>
> -args=$(getopt -n $(basename $0) 'h@klL' "$@")
> -if [ $? -ne 0 ]; then
> - usage $0
> - exit 1
> -fi
> -
> -help=false
> keep_going=false
> do_list=false
> full_path=false
> +unittests_only=false
Unit testing should be on by default, with a full-mode switch including
latmus, because this is the original way for running unattended
tests. Since latmus won't trigger any error on unacceptable latency,
there is no upside to have it on unless we really want to attend the
test, looking at its output.
>
> -set -- $args
> -for opt
> -do
> -case "$opt" in
> - -k) keep_going=true;
> - shift;;
> - -h) help=true;
> - shift;;
> - -l) do_list=true;
> - shift;;
> - -L) full_path=true;
> - do_list=true;
> - shift;;
> - -@) echo "run the EVL tests"
> - exit 0;;
> - --) shift; break;;
> +while :; do
> + case "$1" in
> + -k) keep_going=true
> + shift;;
> + -l) do_list=true
> + shift;;
> + -L) full_path=true
> + do_list=true
> + shift;;
> + -u) unittests_only=true
> + shift;;
> + -@) echo "run the EVL tests"
> + exit 0;;
> + --) shift
> + break;;
> + "") break;;
> + -h) usage $0
> + exit 0;;
> + *) usage $0
> + exit 1;;
> esac
> done
>
> -if test x$help = xtrue; then
> - usage $0
> - exit 0
> -fi
> -
> test_list=
> for t in "$@"; do
> test_list="$test_list $(eval echo $EVL_TESTDIR/$t)"
> @@ -89,4 +82,8 @@ for t in $test_list; do
> fi
> done
>
> +if test x$unittests_only = xfalse; then
> + latmus -T 30
> +fi
> +
> exit 0
--
Philippe.
next prev parent reply other threads:[~2024-06-13 14:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 13:45 [libevl][PATCH 0/4] evl-test: align with xeno-test Tobias Schaffner
2024-06-13 13:45 ` [libevl][PATCH 1/4] Copy dohell from Xenomai 3 Tobias Schaffner
2024-06-13 14:23 ` Philippe Gerum
2024-06-13 15:32 ` Jan Kiszka
2024-06-13 15:55 ` Philippe Gerum
2025-09-02 9:51 ` Jorge Ramirez-Ortiz, Gmail
2024-06-13 13:45 ` [libevl][PATCH 2/4] evl-test: Measure worst case latencies Tobias Schaffner
2024-06-13 14:09 ` Philippe Gerum [this message]
2024-06-13 13:45 ` [libevl][PATCH 3/4] evl-test: Start evl-test with load by default Tobias Schaffner
2024-06-13 14:16 ` Philippe Gerum
2024-06-13 15:30 ` Jan Kiszka
2024-06-13 16:09 ` Philippe Gerum
2024-11-01 17:00 ` Jorge Ramirez-Ortiz, Gmail
2024-11-18 7:48 ` Jan Kiszka
2024-11-18 8:26 ` Philippe Gerum
2025-09-01 18:46 ` Tobias Schaffner
2024-06-13 17:27 ` Philippe Gerum
2024-06-14 7:29 ` Jorge Ramirez-Ortiz, Gmail
2024-07-10 7:18 ` Tobias Schaffner
2024-10-24 20:00 ` Schaffner, Tobias
2024-10-27 19:13 ` Jorge Ramirez-Ortiz, Gmail
2024-11-01 16:55 ` Jorge Ramirez-Ortiz, Gmail
2024-11-01 17:15 ` Philippe Gerum
2024-11-01 18:13 ` Jorge Ramirez-Ortiz, Gmail
2025-09-03 5:29 ` Jan Kiszka
2025-09-03 8:12 ` Jorge Ramirez-Ortiz, Gmail
2025-09-03 8:20 ` Florian Bezdeka
2025-09-03 8:45 ` Jorge Ramirez-Ortiz, Gmail
2025-09-03 9:12 ` Florian Bezdeka
2024-06-13 13:45 ` [libevl][PATCH 4/4] evl-test: Add hectic for real-time stress Tobias Schaffner
2024-06-13 14:26 ` Philippe Gerum
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=87o785q67c.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.