[PATCH 2/2] testutilsqemuschema: Support 'unstable' feature in QMP schema validator

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

 



The 'unstable' feature is present on any schema member which was not yet
finalized in qemu. Use it to refuse such fields/commands in qemu as they
are possibly subject to change.

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

diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c
index bb3d6b3141..6ee83c3ba7 100644
--- a/tests/testutilsqemuschema.c
+++ b/tests/testutilsqemuschema.c
@@ -32,6 +32,7 @@ struct testQEMUSchemaValidateCtxt {
 /**
  * Validate that the schema member doesn't have some significant features:
  * - 'deprecated' - schema member is deprecated
+ * - 'unstable' - schema member is considered unstable
  */
 static int
 testQEMUSchemaValidateFeatures(virJSONValue *root,
@@ -57,6 +58,11 @@ testQEMUSchemaValidateFeatures(virJSONValue *root,
             return -2;
         }

+        if (STREQ(curstr, "unstable")) {
+            virBufferAsprintf(ctxt->debug, "ERROR: '%s' is unstable", name);
+            return -1;
+        }
+
         if (STREQ(curstr, "deprecated")) {
             if (ctxt->allowDeprecated) {
                 virBufferAsprintf(ctxt->debug, "WARNING: '%s' is deprecated", name);
-- 
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