Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rv/rvgen: make monitor arguments required in rvgen

Add required=True to the monitor subcommand arguments for class, spec,
and monitor_type in rvgen. These arguments are essential for monitor
generation and attempting to run without them would cause AttributeError
exceptions later in the code when the script tries to access them.

Making these arguments explicitly required provides clearer error
messages to users at parse time rather than cryptic exceptions during
execution. This improves the user experience by catching missing
arguments early with helpful usage information.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20260223162407.147003-15-wander@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>

authored by

Wander Lairson Costa and committed by
Gabriele Monaco
d7ee9623 1b615bb0

+4 -3
+4 -3
tools/verification/rvgen/__main__.py
··· 29 29 monitor_parser.add_argument('-n', "--model_name", dest="model_name") 30 30 monitor_parser.add_argument("-p", "--parent", dest="parent", 31 31 required=False, help="Create a monitor nested to parent") 32 - monitor_parser.add_argument('-c', "--class", dest="monitor_class", 32 + monitor_parser.add_argument('-c', "--class", dest="monitor_class", required=True, 33 33 help="Monitor class, either \"da\", \"ha\" or \"ltl\"") 34 - monitor_parser.add_argument('-s', "--spec", dest="spec", help="Monitor specification file") 35 - monitor_parser.add_argument('-t', "--monitor_type", dest="monitor_type", 34 + monitor_parser.add_argument('-s', "--spec", dest="spec", required=True, 35 + help="Monitor specification file") 36 + monitor_parser.add_argument('-t', "--monitor_type", dest="monitor_type", required=True, 36 37 help=f"Available options: {', '.join(Monitor.monitor_types.keys())}") 37 38 38 39 container_parser = subparsers.add_parser("container")