From: Peter Krempa Date: Fri, 17 Sep 2021 14:38:11 +0000 (+0200) Subject: testQEMUSchemaValidateEnum: Validate deprecated members X-Git-Tag: v7.10.0-rc1~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc54647fb0165166435d85c3df203e75ba11b0ab;p=thirdparty%2Flibvirt.git testQEMUSchemaValidateEnum: Validate deprecated members Starting from QEMU-6.2 enum members can be deprecated. Add support to the validator. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c index aaa0fdaea9..4a0fb8d944 100644 --- a/tests/testutilsqemuschema.c +++ b/tests/testutilsqemuschema.c @@ -381,6 +381,12 @@ testQEMUSchemaValidateEnum(virJSONValue *obj, virJSONValue *member = virJSONValueArrayGet(members, i); if (STREQ_NULLABLE(objstr, virJSONValueObjectGetString(member, "name"))) { + int rc; + + /* the new 'members' array allows us to check deprecations */ + if ((rc = testQEMUSchemaValidateDeprecated(member, objstr, ctxt)) < 0) + return rc; + virBufferAsprintf(ctxt->debug, "'%s' OK", NULLSTR(objstr)); return 0; }