
On Tue, Mar 24, 2015 at 15:31:09 +0100, Pavel Hrdina wrote:
Commit 2360fe5d updated formating of <domain> element but forget to
s/forget/forgot/
update qemucaps2xmldata xml files. In addition the test code was broken too. Update the xml files and return -1 if testCompareXMLToXML fails together with indentation fix.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- tests/qemucaps2xmldata/all_1.6.0-1.xml | 3 +-- tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml | 3 +-- tests/qemucaps2xmltest.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/tests/qemucaps2xmldata/all_1.6.0-1.xml b/tests/qemucaps2xmldata/all_1.6.0-1.xml index 425b22e..2489f49 100644 --- a/tests/qemucaps2xmldata/all_1.6.0-1.xml +++ b/tests/qemucaps2xmldata/all_1.6.0-1.xml @@ -12,8 +12,7 @@ <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-i386</emulator> - <domain type='qemu'> - </domain> + <domain type='qemu'/> <domain type='kvm'> <emulator>/usr/bin/qemu-system-i386</emulator> </domain> diff --git a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml index cd19814..281fab0 100644 --- a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml +++ b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml @@ -12,8 +12,7 @@ <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-system-i386</emulator> - <domain type='qemu'> - </domain> + <domain type='qemu'/> <domain type='kvm'> <emulator>/usr/bin/qemu-system-i386</emulator> </domain>
I'd split this patch at this point, as the hunks above fix a test data failure, while the hunks below fix a bug in the test code.
diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c index 3529acb..b3975b4 100644 --- a/tests/qemucaps2xmltest.c +++ b/tests/qemucaps2xmltest.c @@ -31,7 +31,7 @@ static int testCompareXMLToXML(const char *inxmldata, const char *outxmldata) { - int ret = 1; + int ret = -1;
if (STRNEQ(outxmldata, inxmldata)) { virtTestDifference(stderr, outxmldata, inxmldata); @@ -143,7 +143,7 @@ testQemuCapsXML(const void *opaque) char *capsXml = NULL; virCapsPtr capsProvided = NULL;
- if (virAsprintf(&xmlFile, "%s/qemucaps2xmldata/%s.xml", + if (virAsprintf(&xmlFile, "%s/qemucaps2xmldata/%s.xml", abs_srcdir, data->base) < 0) goto cleanup;
ACK as is. It's not worth splitting/respinning. Peter