Re: [PATCH v1] cyclictest: Generate optstring dynamically from long_options

Costa Shulyupin
2026-01-13T10:01:11Z

On Tue, 13 Jan 2026 at 10:13, Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
> GNU ARGP might be easier to parse and maintain in the long run
> especially if 20 other options are added.
> https://www.gnu.org/software/libc/manual/html_node/Argp-Example-4.html

It looks impossible to port to ARGP without CLI change: cyclictest has
options with optional arguments (e.g., -a can mean 'use all CPUs' or
-a 0,2,4 means 'use specific CPUs'). ARGP handles these differently
than getopt_long.

Costa