Both tests pass a disk source definition which didn't go through the preparation steps and thus contains only the target information that were originally present, thus we should be using the QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY flag. For the same reason QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY used in 'testJSONtoJSON' doesn't make sense. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/qemublocktest.c | 4 ++-- tests/qemublocktestdata/jsontojson/curl-libguestfs-out.json | 5 ++--- .../jsontojson/ssh-passthrough-libguestfs-out.json | 4 +--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index addd646071..ce76150200 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -59,7 +59,7 @@ testBackingXMLjsonXML(const void *args) g_autoptr(virStorageSource) xmlsrc = NULL; g_autoptr(virStorageSource) jsonsrc = NULL; g_auto(virBuffer) debug = VIR_BUFFER_INITIALIZER; - unsigned int backendpropsflags = 0; + unsigned int backendpropsflags = QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY; if (data->legacy) backendpropsflags |= QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_LEGACY; @@ -157,7 +157,7 @@ testJSONtoJSON(const void *args) } if (!(jsonsrcout = qemuBlockStorageSourceGetBackendProps(src, - QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_AUTO_READONLY))) { + QEMU_BLOCK_STORAGE_SOURCE_BACKEND_PROPS_TARGET_ONLY))) { fprintf(stderr, "failed to format disk source json\n"); return -1; } diff --git a/tests/qemublocktestdata/jsontojson/curl-libguestfs-out.json b/tests/qemublocktestdata/jsontojson/curl-libguestfs-out.json index e130c7bd3c..8cfacb5bc8 100644 --- a/tests/qemublocktestdata/jsontojson/curl-libguestfs-out.json +++ b/tests/qemublocktestdata/jsontojson/curl-libguestfs-out.json @@ -2,8 +2,7 @@ "driver": "https", "url": "https://test.host:443/whatever.img", "sslverify": false, + "cookie": "some_cookie=\"some_value_or_whatever\"", "timeout": 2000, - "readahead": 65536, - "auto-read-only": true, - "discard": "unmap" + "readahead": 65536 } diff --git a/tests/qemublocktestdata/jsontojson/ssh-passthrough-libguestfs-out.json b/tests/qemublocktestdata/jsontojson/ssh-passthrough-libguestfs-out.json index 1f6032deb4..7855917e2e 100644 --- a/tests/qemublocktestdata/jsontojson/ssh-passthrough-libguestfs-out.json +++ b/tests/qemublocktestdata/jsontojson/ssh-passthrough-libguestfs-out.json @@ -8,7 +8,5 @@ "user": "testuser", "host-key-check": { "mode": "none" - }, - "auto-read-only": true, - "discard": "unmap" + } } -- 2.41.0