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

Sebastian Andrzej Siewior
2026-01-13T11:14:52Z

On 2026-01-13 12:00:29 [+0200], Costa Shulyupin wrote:
> 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.

I see. It looked nice and I assumed it supports the same features. But
if optional arguments to options are not supported then it is probably
not doable.

> Costa
Sebastian