scripts: Add 'qemu-replies-tool' script for testing and modifying data for qemucapabilitiestest

The tool in the current shape functionally replaces
tests/qemucapabilitiesnumbering.c

It validates that the output '.replies' files conform to how we generate
them from qemu and also allows programmatic modification of the
'.replies' files if re-generation is not feasible any more.

The main advantage is that JSON objects are parsed into native python
types and thus the programatic modification is much more convenient.

The tool will be later extended to also do validation that we properly
handle the whole of QMP schema as well as help in reviewing the
differences in the .replies file after qemu updates.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Peter Krempa committed 2024-02-01 10:39:40 +01:00
1 parent ff7e50e20a
commit 2866c1a457
3 files changed
+253

No files matched your search

+1
View File
@@ -31,6 +31,7 @@ scripts = [
'meson-timestamp.py',
'mock-noinline.py',
'prohibit-duplicate-header.py',
'qemu-replies-tool.py',
]
foreach name : scripts