Re: [PATCH libevl] latmus: allow to disable max latency abort with -A 0
Philippe Gerum <[email protected]> Mon, 13 Jul 2026 14:27:23 +0200
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
Tobias Schaffner <[email protected]> writes: > Accept -A 0 to explicitly disable the abort, matching the existing > default-disabled semantics. This makes it easier to always pass -A > in CI with a single sane default. > > Signed-off-by: Tobias Schaffner <[email protected]> > --- > latmus/latmus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/latmus/latmus.c b/latmus/latmus.c > index 772cd9f..1bf1f95 100644 > --- a/latmus/latmus.c > +++ b/latmus/latmus.c > @@ -571,7 +571,7 @@ static void usage(void) > fprintf(stderr, "-r --reset reset core timer gravity to factory default\n"); > fprintf(stderr, "-b --background run in the background (daemon mode)\n"); > fprintf(stderr, "-K --keep-going keep going on unexpected switch to in-band mode\n"); > - fprintf(stderr, "-A --max-abort=<us> abort if maximum latency exceeds threshold\n"); > + fprintf(stderr, "-A --max-abort=<us> abort if maximum latency exceeds threshold, 0 = disabled [=0]\n"); > fprintf(stderr, "-T --timeout=<t>[dhms] stop measurement after <t> [d(ays)|h(ours)|m(inutes)|s(econds)]\n"); > fprintf(stderr, "-v --verbose[=level] set verbosity level [=1]\n"); > fprintf(stderr, "-q --quiet quiet mode (i.e. --verbose=0)\n"); > @@ -669,7 +669,7 @@ int main(int argc, char *const argv[]) > break; > case 'A': > abort_threshold = atoi(optarg) * 1000; /* ns */ > - if (abort_threshold <= 0) > + if (abort_threshold < 0) > error(1, EINVAL, "invalid timeout"); > break; > case 'T': Merged, thanks. -- Philippe.