]> git.hungrycats.org Git - linux/commit
verification/rvgen: Fix options shared among commands
authorGabriele Monaco <gmonaco@redhat.com>
Thu, 14 May 2026 15:20:47 +0000 (17:20 +0200)
committerGabriele Monaco <gmonaco@redhat.com>
Thu, 4 Jun 2026 14:44:25 +0000 (16:44 +0200)
commit5f845ad706c0b394ae274e9a930044f78bef782e
tree9a575ad27133a41317894e17a25ea0b4483f6a2f
parent85339442de941e4d7ff5d53f51ae1413905e45ec
verification/rvgen: Fix options shared among commands

After rvgen was refactored to use subparsers, the common options (-a and
-D) were left in the main parser. This meant that they needed to be
called /before/ the subcommand and using them without subcommand was
allowed. This is not the original intent.

  rvgen -D "some description" container -n name

Define the options as parent in the subparsers to allow them to be used
from both subcommands together with other options.

  rvgen container -n name -D "some description"

Fixes: 5270a0e3041c ("verification/dot2k: Replace is_container() hack with subparsers")
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20260514152055.229162-7-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
tools/verification/rvgen/__main__.py