[PATCH 02/11] tests: qemublock: Add testing of pure disk source specification JSON generator

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

 



Add testing of the host specification part so that we can be sure that
no image/host specific data will be present.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemublocktest.c                         | 69 ++++++++++++++++++-
 .../xml2json/block-raw-noopts-srconly.json    |  4 ++
 .../block-raw-reservations-srconly.json       |  4 ++
 .../xml2json/dir-fat-cache-srconly.json       |  5 ++
 .../xml2json/dir-fat-floppy-srconly.json      |  5 ++
 .../xml2json/dir-fat-readonly-srconly.json    |  5 ++
 ...ile-backing_basic-aio_threads-srconly.json | 24 +++++++
 ...acking_basic-cache-directsync-srconly.json | 24 +++++++
 ...file-backing_basic-cache-none-srconly.json | 24 +++++++
 ...le-backing_basic-cache-unsafe-srconly.json | 24 +++++++
 ...backing_basic-cache-writeback-srconly.json | 24 +++++++
 ...king_basic-cache-writethrough-srconly.json | 24 +++++++
 .../file-backing_basic-detect-srconly.json    | 24 +++++++
 .../file-backing_basic-noopts-srconly.json    | 16 +++++
 ...le-backing_basic-unmap-detect-srconly.json | 24 +++++++
 ...le-backing_basic-unmap-ignore-srconly.json | 24 +++++++
 .../file-backing_basic-unmap-srconly.json     | 24 +++++++
 .../xml2json/file-bochs-noopts-srconly.json   |  4 ++
 .../xml2json/file-cloop-noopts-srconly.json   |  4 ++
 .../xml2json/file-dmg-noopts-srconly.json     |  4 ++
 .../xml2json/file-ploop-noopts-srconly.json   |  4 ++
 ...cow2-backing-chain-encryption-srconly.json |  8 +++
 ...le-qcow2-backing-chain-noopts-srconly.json | 40 +++++++++++
 ...w2-backing-chain-unterminated-srconly.json |  8 +++
 .../xml2json/file-raw-aio_native-srconly.json |  4 ++
 .../xml2json/file-raw-luks-srconly.json       |  4 ++
 .../xml2json/file-raw-noopts-srconly.json     |  4 ++
 .../xml2json/file-vdi-noopts-srconly.json     |  4 ++
 .../xml2json/file-vhd-noopts-srconly.json     |  4 ++
 .../xml2json/file-vpc-noopts-srconly.json     |  4 ++
 .../xml2json/network-nbd-tls-srconly.json     |  8 +++
 ...w2-backing-chain-cache-unsafe-srconly.json | 22 ++++++
 ...backing-chain-encryption_auth-srconly.json | 22 ++++++
 33 files changed, 495 insertions(+), 1 deletion(-)
 create mode 100644 tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json
 create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json

diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index 29ce27021f..161615f7f0 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -115,6 +115,9 @@ struct testQemuDiskXMLToJSONData {
     virJSONValuePtr *props;
     size_t nprops;

+    virJSONValuePtr *propssrc;
+    size_t npropssrc;
+
     virQEMUCapsPtr qemuCaps;
 };

@@ -127,8 +130,13 @@ testQemuDiskXMLToPropsClear(struct testQemuDiskXMLToJSONData *data)
     for (i = 0; i < data->nprops; i++)
         virJSONValueFree(data->props[i]);

+    for (i = 0; i < data->npropssrc; i++)
+        virJSONValueFree(data->propssrc[i]);
+
     data->nprops = 0;
     VIR_FREE(data->props);
+    data->npropssrc = 0;
+    VIR_FREE(data->propssrc);
 }


@@ -180,6 +188,7 @@ testQemuDiskXMLToProps(const void *opaque)
     virStorageSourcePtr n;
     virJSONValuePtr formatProps = NULL;
     virJSONValuePtr storageProps = NULL;
+    VIR_AUTOPTR(virJSONValue) storageSrcOnlyProps = NULL;
     char *xmlpath = NULL;
     char *xmlstr = NULL;
     int ret = -1;
@@ -213,6 +222,7 @@ testQemuDiskXMLToProps(const void *opaque)
             goto cleanup;

         if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n)) ||
+            !(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, false, true)) ||
             !(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false))) {
             if (!data->fail) {
                 VIR_TEST_VERBOSE("failed to generate qemu blockdev props\n");
@@ -224,7 +234,8 @@ testQemuDiskXMLToProps(const void *opaque)
         }

         if (VIR_APPEND_ELEMENT(data->props, data->nprops, formatProps) < 0 ||
-            VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < 0)
+            VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < 0 ||
+            VIR_APPEND_ELEMENT(data->propssrc, data->npropssrc, storageSrcOnlyProps) < 0)
             goto cleanup;
     }

@@ -268,6 +279,23 @@ testQemuDiskXMLToPropsValidateSchema(const void *opaque)

         virBufferFreeAndReset(&debug);
     }
+
+    for (i = 0; i < data->npropssrc; i++) {
+        if (testQEMUSchemaValidate(data->propssrc[i], data->schemaroot,
+                                   data->schema, &debug) < 0) {
+            debugmsg = virBufferContentAndReset(&debug);
+            propsstr = virJSONValueToString(data->propssrc[i], true);
+            VIR_TEST_VERBOSE("json does not conform to QAPI schema");
+            VIR_TEST_DEBUG("json:\n%s\ndoes not match schema. Debug output:\n %s",
+                           propsstr, NULLSTR(debugmsg));
+            VIR_FREE(debugmsg);
+            VIR_FREE(propsstr);
+            ret = -1;
+        }
+
+        virBufferFreeAndReset(&debug);
+    }
+
     return ret;
 }

@@ -313,6 +341,40 @@ testQemuDiskXMLToPropsValidateFile(const void *opaque)
 }


+static int
+testQemuDiskXMLToPropsValidateFileSrcOnly(const void *opaque)
+{
+    struct testQemuDiskXMLToJSONData *data = (void *) opaque;
+    virBuffer buf = VIR_BUFFER_INITIALIZER;
+    VIR_AUTOFREE(char *) jsonpath = NULL;
+    VIR_AUTOFREE(char *) actual = NULL;
+    size_t i;
+
+    if (data->fail)
+        return EXIT_AM_SKIP;
+
+    if (virAsprintf(&jsonpath, "%s%s-srconly.json",
+                    testQemuDiskXMLToJSONPath, data->name) < 0)
+        return -1;
+
+    for (i = 0; i < data->npropssrc; i++) {
+        VIR_AUTOFREE(char *) jsonstr = NULL;
+
+        if (!(jsonstr = virJSONValueToString(data->propssrc[i], true)))
+            return -1;
+
+        virBufferAdd(&buf, jsonstr, -1);
+    }
+
+    if (virBufferCheckError(&buf) < 0)
+        return -1;
+
+    actual = virBufferContentAndReset(&buf);
+
+    return virTestCompareToFile(actual, jsonpath);
+}
+
+
 static int
 mymain(void)
 {
@@ -411,6 +473,8 @@ mymain(void)
         diskxmljsondata.name = nme; \
         diskxmljsondata.props = NULL; \
         diskxmljsondata.nprops = 0; \
+        diskxmljsondata.propssrc = NULL; \
+        diskxmljsondata.npropssrc = 0; \
         diskxmljsondata.fail = fl; \
         if (virTestRun("disk xml to props " nme, testQemuDiskXMLToProps, \
                        &diskxmljsondata) < 0) \
@@ -421,6 +485,9 @@ mymain(void)
         if (virTestRun("disk xml to props validate file " nme, \
                        testQemuDiskXMLToPropsValidateFile,  &diskxmljsondata) < 0) \
             ret = -1; \
+        if (virTestRun("disk xml to props source only validate file " nme, \
+                       testQemuDiskXMLToPropsValidateFileSrcOnly,  &diskxmljsondata) < 0) \
+            ret = -1; \
         testQemuDiskXMLToPropsClear(&diskxmljsondata); \
     } while (0)

diff --git a/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json b/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
new file mode 100644
index 0000000000..72f9067353
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "host_device",
+  "filename": "/dev/blah"
+}
diff --git a/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json b/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
new file mode 100644
index 0000000000..72f9067353
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "host_device",
+  "filename": "/dev/blah"
+}
diff --git a/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json b/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
new file mode 100644
index 0000000000..6ec4f78d7b
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
@@ -0,0 +1,5 @@
+{
+  "driver": "vvfat",
+  "dir": "/var/somefiles",
+  "floppy": false
+}
diff --git a/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json b/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
new file mode 100644
index 0000000000..6b0388bc18
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
@@ -0,0 +1,5 @@
+{
+  "driver": "vvfat",
+  "dir": "/var/somefiles",
+  "floppy": true
+}
diff --git a/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json b/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
new file mode 100644
index 0000000000..6ec4f78d7b
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
@@ -0,0 +1,5 @@
+{
+  "driver": "vvfat",
+  "dir": "/var/somefiles",
+  "floppy": false
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
new file mode 100644
index 0000000000..dbdf6e563b
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
@@ -0,0 +1,16 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/c"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
new file mode 100644
index 0000000000..ea490b0034
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
@@ -0,0 +1,24 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
+{
+  "driver": "gluster",
+  "volume": "images",
+  "path": "c",
+  "server": [
+    {
+      "type": "inet",
+      "host": "test.org",
+      "port": "24007"
+    }
+  ]
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/d"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
new file mode 100644
index 0000000000..316dbc9df2
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
@@ -0,0 +1,8 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/a"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/b"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
new file mode 100644
index 0000000000..d998acc194
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
@@ -0,0 +1,40 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483615252"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483605924"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483605920"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483546244"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483545901"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483545313"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1483536402"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.qcow2"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
new file mode 100644
index 0000000000..e0bce3bcd2
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
@@ -0,0 +1,8 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
+}
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json b/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json b/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
new file mode 100644
index 0000000000..6d7088211f
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/luks.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
new file mode 100644
index 0000000000..bb3e8af9eb
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/var/lib/libvirt/images/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
new file mode 100644
index 0000000000..c50fa903f5
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
@@ -0,0 +1,4 @@
+{
+  "driver": "file",
+  "filename": "/path/to/i.img"
+}
diff --git a/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json b/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
new file mode 100644
index 0000000000..455f4e5140
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
@@ -0,0 +1,8 @@
+{
+  "driver": "nbd",
+  "server": {
+    "type": "inet",
+    "host": "host1.example.com",
+    "port": "10809"
+  }
+}
diff --git a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json
new file mode 100644
index 0000000000..69ca9caf88
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json
@@ -0,0 +1,22 @@
+{
+  "driver": "rbd",
+  "pool": "rbdpool",
+  "image": "rbdimg",
+  "server": [
+    {
+      "host": "host1.example.com",
+      "port": "0"
+    },
+    {
+      "host": "host2.example.com",
+      "port": "0"
+    }
+  ]
+}
+{
+  "driver": "iscsi",
+  "portal": "example.org:3260",
+  "target": "iscsitarget",
+  "lun": 1,
+  "transport": "tcp"
+}
diff --git a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json
new file mode 100644
index 0000000000..6298329812
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json
@@ -0,0 +1,22 @@
+{
+  "driver": "rbd",
+  "pool": "rbdpool",
+  "image": "rbdimg",
+  "server": [
+    {
+      "host": "host1.example.com",
+      "port": "0"
+    },
+    {
+      "host": "host2.example.com",
+      "port": "0"
+    }
+  ]
+}
+{
+  "driver": "iscsi",
+  "portal": "example.org:3260",
+  "target": "iqn.2016-09.com.example:iscsitarget",
+  "lun": 1,
+  "transport": "tcp"
+}
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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