[PATCH 18/18] testQEMUSchemaValidateObjectMember: validate QMP object member deprecation

Peter Krempa posted 18 patches 1 year, 4 months ago
[PATCH 18/18] testQEMUSchemaValidateObjectMember: validate QMP object member deprecation
Posted by Peter Krempa 1 year, 4 months ago
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>
---
 tests/testutilsqemuschema.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c
index d431e7b3fc..f7b2e122bd 100644
--- a/tests/testutilsqemuschema.c
+++ b/tests/testutilsqemuschema.c
@@ -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))) {
-- 
2.40.1
Re: [PATCH 18/18] testQEMUSchemaValidateObjectMember: validate QMP object member deprecation
Posted by Ján Tomko 1 year, 4 months ago
On a Thursday in 2023, Peter Krempa wrote:
>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>
>---
> tests/testutilsqemuschema.c | 4 ++++
> 1 file changed, 4 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano