[PATCH 02/10] qemublocktest: Mark gluster cases in XML->json->XML tests as deprecated

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

 



The gluster protocol backend will be deprecated as of qemu-9.2. Allow it
for now in the QMP schema validator and mark them to be dropped once
gluster is removed.

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

diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index 60ac929e68..f8e9b73c6a 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -39,7 +39,7 @@ VIR_LOG_INIT("tests.storagetest");
 struct testBackingXMLjsonXMLdata {
     int type;
     const char *xml;
-    bool legacy;
+    bool deprecated;
     GHashTable *schema;
     virJSONValue *schemaroot;
 };
@@ -80,7 +80,7 @@ testBackingXMLjsonXML(const void *args)
     }

     if (testQEMUSchemaValidate(backendprops, data->schemaroot,
-                               data->schema, false, &debug) < 0) {
+                               data->schema, data->deprecated, &debug) < 0) {
         g_autofree char *debugmsg = virBufferContentAndReset(&debug);
         g_autofree char *debugprops = virJSONValueToString(backendprops, true);

@@ -1053,6 +1053,8 @@ mymain(void)
                          "  <readahead size='1024'/>\n"
                          "  <timeout seconds='1337'/>\n"
                          "</source>\n");
+    /* 'gluster' is deprecated as of qemu-9.2, once removed this tests can be dropped too */
+    xmljsonxmldata.deprecated = true;
     TEST_JSON_FORMAT_NET("<source protocol='gluster' name='vol/file'>\n"
                          "  <host name='example.com' port='24007'/>\n"
                          "</source>\n");
@@ -1061,6 +1063,7 @@ mymain(void)
                          "  <host transport='unix' socket='/path/socket'/>\n"
                          "  <host name='example.com' port='24007'/>\n"
                          "</source>\n");
+    xmljsonxmldata.deprecated = false;
     TEST_JSON_FORMAT_NET("<source protocol='nbd'>\n"
                          "  <host transport='unix' socket='/path/to/socket'/>\n"
                          "</source>\n");
-- 
2.46.2




[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