render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From 0d41c52b4ccd749e2c2c33bfe20c2f01d319a962 Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <0d41c52b4ccd749e2c2c33bfe20c2f01d319a962@dist-git>
d76c62
From: Peter Krempa <pkrempa@redhat.com>
d76c62
Date: Tue, 24 Mar 2020 16:26:02 +0100
d76c62
Subject: [PATCH] qemublocktest: Test backing store strings
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
With -blockdev libvirt provides the string which is recorded  as
d76c62
'backing store' property of an image to qemu. Add testing for
d76c62
qemuBlockGetBackingStoreString which generates these strings as there's
d76c62
logic which determines which format to use.
d76c62
d76c62
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
d76c62
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
d76c62
(cherry picked from commit 5f3b4a37275a4079949bb3428149ab310c6c4e2e)
d76c62
d76c62
 Conflicts: tests/qemublocktest.c: virBufferTrim changes not backported
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1804617
d76c62
Message-Id: <398610db4cddda5d1ec6dc3b67b2d4c68afbf32c.1585063415.git.pkrempa@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
---
d76c62
 tests/qemublocktest.c                         |  20 ++-
d76c62
 .../xml2json/block-raw-noopts-srconly.json    |  13 +-
d76c62
 .../block-raw-reservations-srconly.json       |  13 +-
d76c62
 .../xml2json/dir-fat-cache-srconly.json       |  15 +-
d76c62
 .../xml2json/dir-fat-floppy-srconly.json      |  15 +-
d76c62
 .../xml2json/dir-fat-readonly-srconly.json    |  15 +-
d76c62
 ...ile-backing_basic-aio_threads-srconly.json |  68 +++++----
d76c62
 ...acking_basic-cache-directsync-srconly.json |  68 +++++----
d76c62
 ...file-backing_basic-cache-none-srconly.json |  68 +++++----
d76c62
 ...le-backing_basic-cache-unsafe-srconly.json |  68 +++++----
d76c62
 ...backing_basic-cache-writeback-srconly.json |  68 +++++----
d76c62
 ...king_basic-cache-writethrough-srconly.json |  68 +++++----
d76c62
 .../file-backing_basic-detect-srconly.json    |  68 +++++----
d76c62
 .../file-backing_basic-noopts-srconly.json    |  52 ++++---
d76c62
 ...le-backing_basic-unmap-detect-srconly.json |  68 +++++----
d76c62
 ...le-backing_basic-unmap-ignore-srconly.json |  68 +++++----
d76c62
 .../file-backing_basic-unmap-srconly.json     |  68 +++++----
d76c62
 .../xml2json/file-bochs-noopts-srconly.json   |  13 +-
d76c62
 .../xml2json/file-cloop-noopts-srconly.json   |  13 +-
d76c62
 .../xml2json/file-dmg-noopts-srconly.json     |  13 +-
d76c62
 .../xml2json/file-ploop-noopts-srconly.json   |  13 +-
d76c62
 ...cow2-backing-chain-encryption-srconly.json |  26 ++--
d76c62
 ...le-qcow2-backing-chain-noopts-srconly.json | 130 ++++++++++++------
d76c62
 ...w2-backing-chain-unterminated-srconly.json |  26 ++--
d76c62
 .../xml2json/file-raw-aio_native-srconly.json |  13 +-
d76c62
 .../xml2json/file-raw-luks-srconly.json       |  13 +-
d76c62
 .../xml2json/file-raw-noopts-srconly.json     |  13 +-
d76c62
 .../xml2json/file-vdi-noopts-srconly.json     |  13 +-
d76c62
 .../xml2json/file-vhd-noopts-srconly.json     |  13 +-
d76c62
 .../xml2json/file-vpc-noopts-srconly.json     |  13 +-
d76c62
 .../xml2json/network-nbd-tls-srconly.json     |  19 ++-
d76c62
 ...w2-backing-chain-cache-unsafe-srconly.json |  68 ++++++---
d76c62
 ...backing-chain-encryption_auth-srconly.json |  68 ++++++---
d76c62
 .../xml2json/nvme-raw-noopts-srconly.json     |  19 ++-
d76c62
 34 files changed, 876 insertions(+), 433 deletions(-)
d76c62
d76c62
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
d76c62
index c009db7996..cf56c8a983 100644
d76c62
--- a/tests/qemublocktest.c
d76c62
+++ b/tests/qemublocktest.c
d76c62
@@ -184,6 +184,7 @@ struct testQemuDiskXMLToJSONImageData {
d76c62
     virJSONValuePtr formatprops;
d76c62
     virJSONValuePtr storageprops;
d76c62
     virJSONValuePtr storagepropssrc;
d76c62
+    char *backingstore;
d76c62
 };
d76c62
 
d76c62
 
d76c62
@@ -210,6 +211,7 @@ testQemuDiskXMLToPropsClear(struct testQemuDiskXMLToJSONData *data)
d76c62
         virJSONValueFree(data->images[i].formatprops);
d76c62
         virJSONValueFree(data->images[i].storageprops);
d76c62
         virJSONValueFree(data->images[i].storagepropssrc);
d76c62
+        g_free(data->images[i].backingstore);
d76c62
     }
d76c62
     data->nimages = 0;
d76c62
     VIR_FREE(data->images);
d76c62
@@ -287,6 +289,7 @@ testQemuDiskXMLToProps(const void *opaque)
d76c62
     }
d76c62
 
d76c62
     for (n = disk->src; virStorageSourceIsBacking(n); n = n->backingStore) {
d76c62
+        g_autofree char *backingstore = NULL;
d76c62
 
d76c62
         if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
d76c62
             return -1;
d76c62
@@ -298,7 +301,8 @@ testQemuDiskXMLToProps(const void *opaque)
d76c62
 
d76c62
         if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n, n->backingStore)) ||
d76c62
             !(storageSrcOnlyProps = qemuBlockStorageSourceGetBackendProps(n, false, true, true)) ||
d76c62
-            !(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false, true))) {
d76c62
+            !(storageProps = qemuBlockStorageSourceGetBackendProps(n, false, false, true)) ||
d76c62
+            !(backingstore = qemuBlockGetBackingStoreString(n, true))) {
d76c62
             if (!data->fail) {
d76c62
                 VIR_TEST_VERBOSE("failed to generate qemu blockdev props");
d76c62
                 return -1;
d76c62
@@ -314,6 +318,7 @@ testQemuDiskXMLToProps(const void *opaque)
d76c62
         data->images[data->nimages].formatprops = g_steal_pointer(&formatProps);
d76c62
         data->images[data->nimages].storageprops = g_steal_pointer(&storageProps);
d76c62
         data->images[data->nimages].storagepropssrc = g_steal_pointer(&storageSrcOnlyProps);
d76c62
+        data->images[data->nimages].backingstore = g_steal_pointer(&backingstore);
d76c62
 
d76c62
         data->nimages++;
d76c62
     }
d76c62
@@ -425,10 +430,21 @@ testQemuDiskXMLToPropsValidateFileSrcOnly(const void *opaque)
d76c62
     for (i = 0; i < data->nimages; i++) {
d76c62
         g_autofree char *jsonstr = NULL;
d76c62
 
d76c62
+        virBufferAddLit(&buf, "(\n");
d76c62
+        virBufferAdjustIndent(&buf, 2);
d76c62
+        virBufferAddLit(&buf, "source only properties:\n");
d76c62
+
d76c62
         if (!(jsonstr = virJSONValueToString(data->images[i].storagepropssrc, true)))
d76c62
             return -1;
d76c62
 
d76c62
-        virBufferAdd(&buf, jsonstr, -1);
d76c62
+        virBufferAddStr(&buf, jsonstr);
d76c62
+
d76c62
+        virBufferAddLit(&buf, "backing store string:\n");
d76c62
+        virBufferAddStr(&buf, data->images[i].backingstore);
d76c62
+
d76c62
+        virBufferTrim(&buf, "\n", -1);
d76c62
+        virBufferAdjustIndent(&buf, -2);
d76c62
+        virBufferAddLit(&buf, "\n)\n");
d76c62
     }
d76c62
 
d76c62
     actual = virBufferContentAndReset(&buf;;
d76c62
diff --git a/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json b/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
d76c62
index 72f9067353..07f7390433 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/block-raw-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "host_device",
d76c62
-  "filename": "/dev/blah"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "host_device",
d76c62
+    "filename": "/dev/blah"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /dev/blah
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json b/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
d76c62
index 72f9067353..07f7390433 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/block-raw-reservations-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "host_device",
d76c62
-  "filename": "/dev/blah"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "host_device",
d76c62
+    "filename": "/dev/blah"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /dev/blah
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json b/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
d76c62
index 6ec4f78d7b..8bc58fa033 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/dir-fat-cache-srconly.json
d76c62
@@ -1,5 +1,10 @@
d76c62
-{
d76c62
-  "driver": "vvfat",
d76c62
-  "dir": "/var/somefiles",
d76c62
-  "floppy": false
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "vvfat",
d76c62
+    "dir": "/var/somefiles",
d76c62
+    "floppy": false
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/somefiles
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json b/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
d76c62
index 6b0388bc18..043b796435 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/dir-fat-floppy-srconly.json
d76c62
@@ -1,5 +1,10 @@
d76c62
-{
d76c62
-  "driver": "vvfat",
d76c62
-  "dir": "/var/somefiles",
d76c62
-  "floppy": true
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "vvfat",
d76c62
+    "dir": "/var/somefiles",
d76c62
+    "floppy": true
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/somefiles
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json b/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
d76c62
index 6ec4f78d7b..8bc58fa033 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/dir-fat-readonly-srconly.json
d76c62
@@ -1,5 +1,10 @@
d76c62
-{
d76c62
-  "driver": "vvfat",
d76c62
-  "dir": "/var/somefiles",
d76c62
-  "floppy": false
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "vvfat",
d76c62
+    "dir": "/var/somefiles",
d76c62
+    "floppy": false
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/somefiles
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-none-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-detect-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
d76c62
index dbdf6e563b..35a8c3af37 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-noopts-srconly.json
d76c62
@@ -1,16 +1,36 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/c"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/c"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
d76c62
index ea490b0034..65a3773b97 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-srconly.json
d76c62
@@ -1,24 +1,44 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "gluster",
d76c62
-  "volume": "images",
d76c62
-  "path": "c",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "type": "inet",
d76c62
-      "host": "test.org",
d76c62
-      "port": "24007"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/d"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "gluster",
d76c62
+    "volume": "images",
d76c62
+    "path": "c",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "type": "inet",
d76c62
+        "host": "test.org",
d76c62
+        "port": "24007"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  gluster://test.org:24007/images/c
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/d"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/d
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-bochs-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-cloop-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-dmg-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-ploop-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
d76c62
index 316dbc9df2..29644f8c0f 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption-srconly.json
d76c62
@@ -1,8 +1,18 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/a"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/b"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/a"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/a
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/b"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/b
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
d76c62
index d998acc194..7691609577 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts-srconly.json
d76c62
@@ -1,40 +1,90 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483615252"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483605924"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483605920"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483546244"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483545901"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483545313"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1483536402"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.qcow2"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1507297895
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1484071872
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483615252"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483615252
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483605924"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483605924
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483605920"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483605920
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483546244"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483546244
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483545901"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483545901
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483545313"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483545313
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1483536402"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1483536402
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.qcow2"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.qcow2
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
d76c62
index e0bce3bcd2..f2fd81184b 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated-srconly.json
d76c62
@@ -1,8 +1,18 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
d76c62
-}
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1507297895"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1507297895
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/rhel7.3.1484071872"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/rhel7.3.1484071872
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json b/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-raw-aio_native-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json b/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
d76c62
index 6d7088211f..c065e3fab0 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-raw-luks-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/luks.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/luks.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/luks.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
d76c62
index bb3e8af9eb..a2b32b09e0 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-raw-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/var/lib/libvirt/images/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/var/lib/libvirt/images/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /var/lib/libvirt/images/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-vdi-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-vhd-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json b/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
d76c62
index c50fa903f5..58dd7e1c34 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/file-vpc-noopts-srconly.json
d76c62
@@ -1,4 +1,9 @@
d76c62
-{
d76c62
-  "driver": "file",
d76c62
-  "filename": "/path/to/i.img"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "file",
d76c62
+    "filename": "/path/to/i.img"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  /path/to/i.img
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json b/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
d76c62
index 455f4e5140..606e68713a 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/network-nbd-tls-srconly.json
d76c62
@@ -1,8 +1,13 @@
d76c62
-{
d76c62
-  "driver": "nbd",
d76c62
-  "server": {
d76c62
-    "type": "inet",
d76c62
-    "host": "host1.example.com",
d76c62
-    "port": "10809"
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "nbd",
d76c62
+    "server": {
d76c62
+      "type": "inet",
d76c62
+      "host": "host1.example.com",
d76c62
+      "port": "10809"
d76c62
+    }
d76c62
   }
d76c62
-}
d76c62
+  backing store string:
d76c62
+  nbd://host1.example.com:10809
d76c62
+)
d76c62
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
d76c62
index 69ca9caf88..2d7eeb3bca 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe-srconly.json
d76c62
@@ -1,22 +1,46 @@
d76c62
-{
d76c62
-  "driver": "rbd",
d76c62
-  "pool": "rbdpool",
d76c62
-  "image": "rbdimg",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "host": "host1.example.com",
d76c62
-      "port": "0"
d76c62
-    },
d76c62
-    {
d76c62
-      "host": "host2.example.com",
d76c62
-      "port": "0"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "iscsi",
d76c62
-  "portal": "example.org:3260",
d76c62
-  "target": "iscsitarget",
d76c62
-  "lun": 1,
d76c62
-  "transport": "tcp"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "rbd",
d76c62
+    "pool": "rbdpool",
d76c62
+    "image": "rbdimg",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "host": "host1.example.com",
d76c62
+        "port": "0"
d76c62
+      },
d76c62
+      {
d76c62
+        "host": "host2.example.com",
d76c62
+        "port": "0"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  json:{
d76c62
+    "driver": "rbd",
d76c62
+    "pool": "rbdpool",
d76c62
+    "image": "rbdimg",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "host": "host1.example.com",
d76c62
+        "port": "0"
d76c62
+      },
d76c62
+      {
d76c62
+        "host": "host2.example.com",
d76c62
+        "port": "0"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "iscsi",
d76c62
+    "portal": "example.org:3260",
d76c62
+    "target": "iscsitarget",
d76c62
+    "lun": 1,
d76c62
+    "transport": "tcp"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  iscsi://example.org:3260/iscsitarget/1
d76c62
+)
d76c62
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
d76c62
index 6298329812..5679318fbe 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth-srconly.json
d76c62
@@ -1,22 +1,46 @@
d76c62
-{
d76c62
-  "driver": "rbd",
d76c62
-  "pool": "rbdpool",
d76c62
-  "image": "rbdimg",
d76c62
-  "server": [
d76c62
-    {
d76c62
-      "host": "host1.example.com",
d76c62
-      "port": "0"
d76c62
-    },
d76c62
-    {
d76c62
-      "host": "host2.example.com",
d76c62
-      "port": "0"
d76c62
-    }
d76c62
-  ]
d76c62
-}
d76c62
-{
d76c62
-  "driver": "iscsi",
d76c62
-  "portal": "example.org:3260",
d76c62
-  "target": "iqn.2016-09.com.example:iscsitarget",
d76c62
-  "lun": 1,
d76c62
-  "transport": "tcp"
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "rbd",
d76c62
+    "pool": "rbdpool",
d76c62
+    "image": "rbdimg",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "host": "host1.example.com",
d76c62
+        "port": "0"
d76c62
+      },
d76c62
+      {
d76c62
+        "host": "host2.example.com",
d76c62
+        "port": "0"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  json:{
d76c62
+    "driver": "rbd",
d76c62
+    "pool": "rbdpool",
d76c62
+    "image": "rbdimg",
d76c62
+    "server": [
d76c62
+      {
d76c62
+        "host": "host1.example.com",
d76c62
+        "port": "0"
d76c62
+      },
d76c62
+      {
d76c62
+        "host": "host2.example.com",
d76c62
+        "port": "0"
d76c62
+      }
d76c62
+    ]
d76c62
+  }
d76c62
+)
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "iscsi",
d76c62
+    "portal": "example.org:3260",
d76c62
+    "target": "iqn.2016-09.com.example:iscsitarget",
d76c62
+    "lun": 1,
d76c62
+    "transport": "tcp"
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  iscsi://example.org:3260/iqn.2016-09.com.example%3Aiscsitarget/1
d76c62
+)
d76c62
diff --git a/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json b/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json
d76c62
index ed55c08cbf..970e1bb8af 100644
d76c62
--- a/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json
d76c62
+++ b/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json
d76c62
@@ -1,5 +1,14 @@
d76c62
-{
d76c62
-  "driver": "nvme",
d76c62
-  "device": "0000:01:00.0",
d76c62
-  "namespace": 1
d76c62
-}
d76c62
+(
d76c62
+  source only properties:
d76c62
+  {
d76c62
+    "driver": "nvme",
d76c62
+    "device": "0000:01:00.0",
d76c62
+    "namespace": 1
d76c62
+  }
d76c62
+  backing store string:
d76c62
+  json:{
d76c62
+    "driver": "nvme",
d76c62
+    "device": "0000:01:00.0",
d76c62
+    "namespace": 1
d76c62
+  }
d76c62
+)
d76c62
-- 
d76c62
2.26.0
d76c62