]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemublocktest: Mark 'gluster' case in image creation test as deprecated
authorPeter Krempa <pkrempa@redhat.com>
Thu, 10 Oct 2024 15:39:46 +0000 (17:39 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 16 Oct 2024 12:39:08 +0000 (14:39 +0200)
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@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
tests/qemublocktest.c

index f8e9b73c6a332aa33294a5712a0eaa9451778070..7ffa445c373298cf419690caa0e6c81527c5c98b 100644 (file)
@@ -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);