From 3fd2cd1115cbcd7f98d6ba58b75685ff63e761fb Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 29 Aug 2025 15:10:36 +0200 Subject: [PATCH] scripts: qemu-replies-tool: Add stable dump of 'query-command-line-options' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit While 'query-command-line-options' is usually fairly stable (for comparing between two .replies files) it's simpler to compare it in the dumped variant. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- scripts/qemu-replies-tool.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/qemu-replies-tool.py b/scripts/qemu-replies-tool.py index 7cda1d57ad..e5a1b2fb3e 100755 --- a/scripts/qemu-replies-tool.py +++ b/scripts/qemu-replies-tool.py @@ -500,6 +500,19 @@ def dump_machine_types(conv, dumpprefix): print(dumpprefix + '(machine alias) ' + a) +def dump_command_line_options(c, dumpprefix): + optpar = [] + + for opt in c['rep']['return']: + for par in opt['parameters']: + optpar.append('%s %s' % (opt['option'], par['name'])) + + optpar.sort() + + for o in optpar: + print(dumpprefix + '(cl-opt) ' + o) + + def dump_other(conv, dumpprefix): for c in conv: if c['cmd']['execute'] == 'query-version': @@ -517,6 +530,9 @@ def dump_other(conv, dumpprefix): c['rep']['return']['present'], c['rep']['return']['enabled'])) + if c['cmd']['execute'] == 'query-command-line-options': + dump_command_line_options(c, dumpprefix) + def process_one(filename, args): try: -- 2.47.3