render / rpms / libvirt

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