[PATCH 03/10] qemublocktest: Mark 'gluster' case in image creation test 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 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index f8e9b73c6a..7ffa445c37 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -455,6 +455,8 @@ struct testQemuImageCreateData {
     virJSONValue *schemaroot;
     virQEMUDriver *driver;
     virQEMUCaps *qemuCaps;
+
+    bool deprecated;
 };

 static const char *testQemuImageCreatePath = abs_srcdir "/qemublocktestdata/imagecreate/";
@@ -528,7 +530,7 @@ testQemuImageCreate(const void *opaque)
             return -1;

         if (testQEMUSchemaValidate(formatprops, data->schemaroot, data->schema,
-                                   false, &debug) < 0) {
+                                   data->deprecated, &debug) < 0) {
             g_autofree char *debugmsg = virBufferContentAndReset(&debug);
             VIR_TEST_VERBOSE("blockdev-create format json does not conform to QAPI schema");
             VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output:\n %s",
@@ -543,7 +545,7 @@ testQemuImageCreate(const void *opaque)
             return -1;

         if (testQEMUSchemaValidate(protocolprops, data->schemaroot, data->schema,
-                                   false, &debug) < 0) {
+                                   data->deprecated, &debug) < 0) {
             g_autofree char *debugmsg = virBufferContentAndReset(&debug);
             VIR_TEST_VERBOSE("blockdev-create protocol json does not conform to QAPI schema");
             VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output:\n %s",
@@ -1209,7 +1211,10 @@ mymain(void)
     TEST_IMAGE_CREATE("qcow2-backing-raw-slice", "raw-slice");
     TEST_IMAGE_CREATE("qcow2-backing-qcow2-slice", "qcow2-slice");

+    /* 'gluster' is deprecated as of qemu-9.2, once removed this tests can be dropped too */
+    imagecreatedata.deprecated = true;
     TEST_IMAGE_CREATE("network-gluster-qcow2", NULL);
+    imagecreatedata.deprecated = false;
     TEST_IMAGE_CREATE("network-rbd-qcow2", NULL);
     TEST_IMAGE_CREATE("network-ssh-qcow2", NULL);

-- 
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