From 6d4269eca01eb056c8ef1d39d5e82d16c8a67147 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Tue, 24 Mar 2015 15:22:16 +0100 Subject: [PATCH] qemucaps2xmltest: fix the test to correspond to new domain formatting Commit 2360fe5d updated formating of element but forgot to 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 --- 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 425b22eac7..2489f49b4f 100644 --- a/tests/qemucaps2xmldata/all_1.6.0-1.xml +++ b/tests/qemucaps2xmldata/all_1.6.0-1.xml @@ -12,8 +12,7 @@ 32 /usr/bin/qemu-system-i386 - - + /usr/bin/qemu-system-i386 diff --git a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml index cd19814ec4..281fab0756 100644 --- a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml +++ b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml @@ -12,8 +12,7 @@ 32 /usr/bin/qemu-system-i386 - - + /usr/bin/qemu-system-i386 diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c index 3529acb7da..b3975b4afe 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;