On Thu, May 10, 2018 at 18:44:18 +0200, Ján Tomko wrote:
Jansson formats empty arrays differently.
---
.../xml2json/file-backing_basic-aio_threads.json | 9 +++-----
.../file-backing_basic-cache-directsync.json | 9 +++-----
.../xml2json/file-backing_basic-cache-none.json | 9 +++-----
.../xml2json/file-backing_basic-cache-unsafe.json | 9 +++-----
.../file-backing_basic-cache-writeback.json | 9 +++-----
.../file-backing_basic-cache-writethrough.json | 9 +++-----
.../xml2json/file-backing_basic-detect.json | 9 +++-----
.../xml2json/file-backing_basic-noopts.json | 9 +++-----
.../xml2json/file-backing_basic-unmap-detect.json | 9 +++-----
.../xml2json/file-backing_basic-unmap-ignore.json | 9 +++-----
.../xml2json/file-backing_basic-unmap.json | 9 +++-----
.../file-qcow2-backing-chain-encryption.json | 3 +--
.../xml2json/file-qcow2-backing-chain-noopts.json | 27 ++++++++--------------
.../file-qcow2-backing-chain-unterminated.json | 3 +--
.../network-qcow2-backing-chain-cache-unsafe.json | 3 +--
...etwork-qcow2-backing-chain-encryption_auth.json | 3 +--
All of the below should be fixed by adding an explicit newline to the
code which formats the string. The output files are not valid JSON, but
a concatenation of json objects.
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index eae1ca8ee3..4bed82b4f5 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -301,6 +301,7 @@ testQemuDiskXMLToPropsValidateFile(const void *opaque)
goto cleanup;
virBufferAdd(&buf, jsonstr, -1);
+ virBufferAddLit(&buf, "\n");
VIR_FREE(jsonstr);
}