[PATCH v2 8/8] testQEMUSchemaValidateEnum: Validate deprecated members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Starting from QEMU-6.2 enum members can be deprecated. Add support to
the validator.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/testutilsqemuschema.c | 6 ++++++
 1 file changed, 6 insertions(+)

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;
             }
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux