]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemucaps2xmltest: fix the test to correspond to new domain formatting
authorPavel Hrdina <phrdina@redhat.com>
Tue, 24 Mar 2015 14:22:16 +0000 (15:22 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 24 Mar 2015 15:44:08 +0000 (16:44 +0100)
Commit 2360fe5d updated formating of <domain> 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 <phrdina@redhat.com>
tests/qemucaps2xmldata/all_1.6.0-1.xml
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
tests/qemucaps2xmltest.c

index 425b22eac7a1e1b2bfd34549f11fd9ecade00be0..2489f49b4f79ccdc9beb20963308230395e2bab8 100644 (file)
@@ -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>
index cd19814ec4c2126f35fb95a8ce3b64d9b5e088a8..281fab0756e64309bf13946e1258359bd81b7b94 100644 (file)
@@ -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>
index 3529acb7dad64a8cf30aade50447025d1e7d9657..b3975b4afee360bb52fe93ba991e35526283cf7a 100644 (file)
@@ -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;