[PATCH 1/2] testutilsqemuschema: Rename and document 'testQEMUSchemaValidateDeprecated'

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

 



Upcoming patch will add more features we care to check. Rename the
function to 'testQEMUSchemaValidateFeatures'.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/testutilsqemuschema.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c
index f7b2e122bd..bb3d6b3141 100644
--- a/tests/testutilsqemuschema.c
+++ b/tests/testutilsqemuschema.c
@@ -29,8 +29,12 @@ struct testQEMUSchemaValidateCtxt {
 };


+/**
+ * Validate that the schema member doesn't have some significant features:
+ * - 'deprecated' - schema member is deprecated
+ */
 static int
-testQEMUSchemaValidateDeprecated(virJSONValue *root,
+testQEMUSchemaValidateFeatures(virJSONValue *root,
                                  const char *name,
                                  struct testQEMUSchemaValidateCtxt *ctxt)
 {
@@ -187,8 +191,8 @@ testQEMUSchemaValidateObjectMember(const char *key,
         return -1;
     }

-    /* validate that the member is not deprecated */
-    if ((rc = testQEMUSchemaValidateDeprecated(keymember, key, data->ctxt)) < 0)
+    /* validate that the member doesn't have some of the significant features */
+    if ((rc = testQEMUSchemaValidateFeatures(keymember, key, data->ctxt)) < 0)
         return rc;

     /* lookup schema entry for keytype */
@@ -387,8 +391,8 @@ testQEMUSchemaValidateEnum(virJSONValue *obj,
             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)
+                /* the new 'members' array allows us to check features */
+                if ((rc = testQEMUSchemaValidateFeatures(member, objstr, ctxt)) < 0)
                     return rc;

                 virBufferAsprintf(ctxt->debug, "'%s' OK", NULLSTR(objstr));
@@ -526,7 +530,7 @@ testQEMUSchemaValidateRecurse(virJSONValue *obj,
     const char *t = virJSONValueObjectGetString(root, "meta-type");
     int rc;

-    if ((rc = testQEMUSchemaValidateDeprecated(root, n, ctxt)) < 0)
+    if ((rc = testQEMUSchemaValidateFeatures(root, n, ctxt)) < 0)
         return rc;

     if (STREQ_NULLABLE(t, "builtin")) {
@@ -626,7 +630,7 @@ testQEMUSchemaValidateCommand(const char *command,
         return -1;
     }

-    if ((rc = testQEMUSchemaValidateDeprecated(schemarootcommand, command, &ctxt)) < 0)
+    if ((rc = testQEMUSchemaValidateFeatures(schemarootcommand, command, &ctxt)) < 0)
         return rc;

     if (!arguments)
-- 
2.46.0




[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