testutilsqemuschema: Add template checker for schema entries

We'll need to match that a certain part of the qemu schema hasn't grown
new properties unexpectedly. Add a helper which matches an 'object' QMP
schema entry against a template and reports errors if expected types
don't match or new entries are added.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Peter Krempa
2020-08-24 13:02:35 +02:00
parent 69980ab798
commit 63a25dd821
2 changed files with 120 additions and 0 deletions
+5
View File
@@ -37,6 +37,11 @@ testQEMUSchemaValidateCommand(const char *command,
bool allowRemoved,
virBufferPtr debug);
int
testQEMUSchemaEntryMatchTemplate(virJSONValuePtr schemaentry,
...);
virJSONValuePtr
testQEMUSchemaGetLatest(const char* arch);