]> xenbits.xensource.com Git - libvirt.git/commitdiff
testQEMUSchemaValidateObjectMember: validate QMP object member deprecation
authorPeter Krempa <pkrempa@redhat.com>
Mon, 22 May 2023 10:49:17 +0000 (12:49 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Jun 2023 11:20:13 +0000 (13:20 +0200)
The QMP schema validator wasn't adapted to consider features of 'object'
members and thus we didn't catch the deprecation of 'device' in
'block_set_io_throttle'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/testutilsqemuschema.c

index d431e7b3fc1d3974147be54206802ce751cab92b..f7b2e122bd2e6913561ded78f1728d96b70cca79 100644 (file)
@@ -187,6 +187,10 @@ testQEMUSchemaValidateObjectMember(const char *key,
         return -1;
     }
 
+    /* validate that the member is not deprecated */
+    if ((rc = testQEMUSchemaValidateDeprecated(keymember, key, data->ctxt)) < 0)
+        return rc;
+
     /* lookup schema entry for keytype */
     if (!(keytype = virJSONValueObjectGetString(keymember, "type")) ||
         !(keyschema = virHashLookup(data->ctxt->schema, keytype))) {