0a7476
From 479f1a10b13e3029ea71003bdd8d1158711816d8 Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <479f1a10b13e3029ea71003bdd8d1158711816d8@dist-git>
0a7476
From: Andrea Bolognani <abologna@redhat.com>
0a7476
Date: Fri, 5 Apr 2019 10:57:38 +0200
0a7476
Subject: [PATCH] tests: Reuse qemucapabilities data for qemucaps2xml
0a7476
0a7476
While qemucaps2xml has a meager two test cases to its name, we
0a7476
have plenty of data from qemucapabilities which is taken from
0a7476
actual QEMU binaries, covers pretty much all supported QEMU
0a7476
versions and architectures and is even in the right format already!
0a7476
0a7476
Rewrite qemucaps2xml so that it uses qemucapabilities data as
0a7476
input. Right now we have a single test case, but we're going to
0a7476
add a lot more next.
0a7476
0a7476
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
0a7476
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
(cherry picked from commit 562990849a9de255b5fefa39be3f301b1bddfa6e)
0a7476
0a7476
https://bugzilla.redhat.com/show_bug.cgi?id=1628469
0a7476
0a7476
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
0a7476
Message-Id: <20190405085744.8179-2-abologna@redhat.com>
0a7476
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
---
0a7476
 tests/qemucaps2xmldata/all_1.6.0-1.caps       | 129 ------------------
0a7476
 .../nodisksnapshot_1.6.0-1.caps               | 128 -----------------
0a7476
 .../nodisksnapshot_1.6.0-1.xml                |  32 -----
0a7476
 .../caps_1.6.0.x86_64.xml}                    |  12 +-
0a7476
 tests/qemucaps2xmltest.c                      |  33 +++--
0a7476
 5 files changed, 23 insertions(+), 311 deletions(-)
0a7476
 delete mode 100644 tests/qemucaps2xmldata/all_1.6.0-1.caps
0a7476
 delete mode 100644 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
0a7476
 delete mode 100644 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
0a7476
 rename tests/{qemucaps2xmldata/all_1.6.0-1.xml => qemucaps2xmloutdata/caps_1.6.0.x86_64.xml} (67%)
0a7476
0a7476
diff --git a/tests/qemucaps2xmldata/all_1.6.0-1.caps b/tests/qemucaps2xmldata/all_1.6.0-1.caps
0a7476
deleted file mode 100644
0a7476
index d39d0bebbf..0000000000
0a7476
--- a/tests/qemucaps2xmldata/all_1.6.0-1.caps
0a7476
+++ /dev/null
0a7476
@@ -1,129 +0,0 @@
0a7476
-  <qemuCaps>
0a7476
-    <flag name='mem-path'/>
0a7476
-    <flag name='drive-serial'/>
0a7476
-    <flag name='chardev'/>
0a7476
-    <flag name='enable-kvm'/>
0a7476
-    <flag name='monitor-json'/>
0a7476
-    <flag name='balloon'/>
0a7476
-    <flag name='device'/>
0a7476
-    <flag name='sdl'/>
0a7476
-    <flag name='smp-topology'/>
0a7476
-    <flag name='netdev'/>
0a7476
-    <flag name='rtc'/>
0a7476
-    <flag name='vhost-net'/>
0a7476
-    <flag name='no-hpet'/>
0a7476
-    <flag name='no-kvm-pit'/>
0a7476
-    <flag name='pci-configfd'/>
0a7476
-    <flag name='nodefconfig'/>
0a7476
-    <flag name='boot-menu'/>
0a7476
-    <flag name='fsdev'/>
0a7476
-    <flag name='name-process'/>
0a7476
-    <flag name='drive-readonly'/>
0a7476
-    <flag name='smbios-type'/>
0a7476
-    <flag name='vga-qxl'/>
0a7476
-    <flag name='spice'/>
0a7476
-    <flag name='vga-none'/>
0a7476
-    <flag name='boot-index'/>
0a7476
-    <flag name='hda-duplex'/>
0a7476
-    <flag name='drive-aio'/>
0a7476
-    <flag name='pci-multibus'/>
0a7476
-    <flag name='pci-bootindex'/>
0a7476
-    <flag name='ccid-emulated'/>
0a7476
-    <flag name='ccid-passthru'/>
0a7476
-    <flag name='chardev-spicevmc'/>
0a7476
-    <flag name='virtio-tx-alg'/>
0a7476
-    <flag name='device-qxl-vga'/>
0a7476
-    <flag name='pci-multifunction'/>
0a7476
-    <flag name='virtio-blk-pci.ioeventfd'/>
0a7476
-    <flag name='sga'/>
0a7476
-    <flag name='virtio-blk-pci.event_idx'/>
0a7476
-    <flag name='virtio-net-pci.event_idx'/>
0a7476
-    <flag name='cache-directsync'/>
0a7476
-    <flag name='piix3-usb-uhci'/>
0a7476
-    <flag name='piix4-usb-uhci'/>
0a7476
-    <flag name='usb-ehci'/>
0a7476
-    <flag name='ich9-usb-ehci1'/>
0a7476
-    <flag name='vt82c686b-usb-uhci'/>
0a7476
-    <flag name='pci-ohci'/>
0a7476
-    <flag name='usb-hub'/>
0a7476
-    <flag name='no-shutdown'/>
0a7476
-    <flag name='cache-unsafe'/>
0a7476
-    <flag name='rombar'/>
0a7476
-    <flag name='ich9-ahci'/>
0a7476
-    <flag name='no-acpi'/>
0a7476
-    <flag name='fsdev-readonly'/>
0a7476
-    <flag name='virtio-blk-pci.scsi'/>
0a7476
-    <flag name='blk-sg-io'/>
0a7476
-    <flag name='drive-copy-on-read'/>
0a7476
-    <flag name='cpu-host'/>
0a7476
-    <flag name='fsdev-writeout'/>
0a7476
-    <flag name='drive-iotune'/>
0a7476
-    <flag name='system_wakeup'/>
0a7476
-    <flag name='scsi-disk.channel'/>
0a7476
-    <flag name='scsi-block'/>
0a7476
-    <flag name='transaction'/>
0a7476
-    <flag name='block-job-async'/>
0a7476
-    <flag name='scsi-cd'/>
0a7476
-    <flag name='ide-cd'/>
0a7476
-    <flag name='no-user-config'/>
0a7476
-    <flag name='hda-micro'/>
0a7476
-    <flag name='dump-guest-memory'/>
0a7476
-    <flag name='nec-usb-xhci'/>
0a7476
-    <flag name='balloon-event'/>
0a7476
-    <flag name='bridge'/>
0a7476
-    <flag name='lsi'/>
0a7476
-    <flag name='virtio-scsi-pci'/>
0a7476
-    <flag name='blockio'/>
0a7476
-    <flag name='disable-s3'/>
0a7476
-    <flag name='disable-s4'/>
0a7476
-    <flag name='ide-drive.wwn'/>
0a7476
-    <flag name='scsi-disk.wwn'/>
0a7476
-    <flag name='seccomp-sandbox'/>
0a7476
-    <flag name='dump-guest-core'/>
0a7476
-    <flag name='seamless-migration'/>
0a7476
-    <flag name='block-commit'/>
0a7476
-    <flag name='vnc'/>
0a7476
-    <flag name='drive-mirror'/>
0a7476
-    <flag name='usb-host.bootindex'/>
0a7476
-    <flag name='blockdev-snapshot-sync'/>
0a7476
-    <flag name='qxl'/>
0a7476
-    <flag name='VGA'/>
0a7476
-    <flag name='cirrus-vga'/>
0a7476
-    <flag name='vmware-svga'/>
0a7476
-    <flag name='device-video-primary'/>
0a7476
-    <flag name='usb-serial'/>
0a7476
-    <flag name='usb-net'/>
0a7476
-    <flag name='add-fd'/>
0a7476
-    <flag name='nbd-server'/>
0a7476
-    <flag name='virtio-rng'/>
0a7476
-    <flag name='rng-random'/>
0a7476
-    <flag name='rng-egd'/>
0a7476
-    <flag name='dtb'/>
0a7476
-    <flag name='megasas'/>
0a7476
-    <flag name='ipv6-migration'/>
0a7476
-    <flag name='machine-opt'/>
0a7476
-    <flag name='machine-usb-opt'/>
0a7476
-    <flag name='pci-bridge'/>
0a7476
-    <flag name='vfio-pci'/>
0a7476
-    <flag name='vfio-pci.bootindex'/>
0a7476
-    <flag name='scsi-generic'/>
0a7476
-    <flag name='scsi-generic.bootindex'/>
0a7476
-    <flag name='mem-merge'/>
0a7476
-    <flag name='vnc-websocket'/>
0a7476
-    <flag name='mlock'/>
0a7476
-    <flag name='vnc-share-policy'/>
0a7476
-    <flag name='device-del-event'/>
0a7476
-    <flag name='dmi-to-pci-bridge'/>
0a7476
-    <flag name='i440fx-pci-hole64-size'/>
0a7476
-    <flag name='q35-pci-hole64-size'/>
0a7476
-    <flag name='usb-storage'/>
0a7476
-    <flag name='usb-storage.removable'/>
0a7476
-    <flag name='virtio-mmio'/>
0a7476
-    <flag name='ich9-intel-hda'/>
0a7476
-    <flag name='kvm-pit-lost-tick-policy'/>
0a7476
-    <flag name='boot-strict'/>
0a7476
-    <flag name='pvpanic'/>
0a7476
-    <flag name='reboot-timeout'/>
0a7476
-    <flag name='enable-fips'/>
0a7476
-    <flag name='name-guest'/>
0a7476
-  </qemuCaps>
0a7476
diff --git a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
0a7476
deleted file mode 100644
0a7476
index 5a0372c917..0000000000
0a7476
--- a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
0a7476
+++ /dev/null
0a7476
@@ -1,128 +0,0 @@
0a7476
-  <qemuCaps>
0a7476
-    <flag name='mem-path'/>
0a7476
-    <flag name='drive-serial'/>
0a7476
-    <flag name='chardev'/>
0a7476
-    <flag name='enable-kvm'/>
0a7476
-    <flag name='monitor-json'/>
0a7476
-    <flag name='balloon'/>
0a7476
-    <flag name='device'/>
0a7476
-    <flag name='sdl'/>
0a7476
-    <flag name='smp-topology'/>
0a7476
-    <flag name='netdev'/>
0a7476
-    <flag name='rtc'/>
0a7476
-    <flag name='vhost-net'/>
0a7476
-    <flag name='no-hpet'/>
0a7476
-    <flag name='no-kvm-pit'/>
0a7476
-    <flag name='pci-configfd'/>
0a7476
-    <flag name='nodefconfig'/>
0a7476
-    <flag name='boot-menu'/>
0a7476
-    <flag name='fsdev'/>
0a7476
-    <flag name='name-process'/>
0a7476
-    <flag name='drive-readonly'/>
0a7476
-    <flag name='smbios-type'/>
0a7476
-    <flag name='vga-qxl'/>
0a7476
-    <flag name='spice'/>
0a7476
-    <flag name='vga-none'/>
0a7476
-    <flag name='boot-index'/>
0a7476
-    <flag name='hda-duplex'/>
0a7476
-    <flag name='drive-aio'/>
0a7476
-    <flag name='pci-multibus'/>
0a7476
-    <flag name='pci-bootindex'/>
0a7476
-    <flag name='ccid-emulated'/>
0a7476
-    <flag name='ccid-passthru'/>
0a7476
-    <flag name='chardev-spicevmc'/>
0a7476
-    <flag name='virtio-tx-alg'/>
0a7476
-    <flag name='device-qxl-vga'/>
0a7476
-    <flag name='pci-multifunction'/>
0a7476
-    <flag name='virtio-blk-pci.ioeventfd'/>
0a7476
-    <flag name='sga'/>
0a7476
-    <flag name='virtio-blk-pci.event_idx'/>
0a7476
-    <flag name='virtio-net-pci.event_idx'/>
0a7476
-    <flag name='cache-directsync'/>
0a7476
-    <flag name='piix3-usb-uhci'/>
0a7476
-    <flag name='piix4-usb-uhci'/>
0a7476
-    <flag name='usb-ehci'/>
0a7476
-    <flag name='ich9-usb-ehci1'/>
0a7476
-    <flag name='vt82c686b-usb-uhci'/>
0a7476
-    <flag name='pci-ohci'/>
0a7476
-    <flag name='usb-hub'/>
0a7476
-    <flag name='no-shutdown'/>
0a7476
-    <flag name='cache-unsafe'/>
0a7476
-    <flag name='rombar'/>
0a7476
-    <flag name='ich9-ahci'/>
0a7476
-    <flag name='no-acpi'/>
0a7476
-    <flag name='fsdev-readonly'/>
0a7476
-    <flag name='virtio-blk-pci.scsi'/>
0a7476
-    <flag name='blk-sg-io'/>
0a7476
-    <flag name='drive-copy-on-read'/>
0a7476
-    <flag name='cpu-host'/>
0a7476
-    <flag name='fsdev-writeout'/>
0a7476
-    <flag name='drive-iotune'/>
0a7476
-    <flag name='system_wakeup'/>
0a7476
-    <flag name='scsi-disk.channel'/>
0a7476
-    <flag name='scsi-block'/>
0a7476
-    <flag name='transaction'/>
0a7476
-    <flag name='block-job-async'/>
0a7476
-    <flag name='scsi-cd'/>
0a7476
-    <flag name='ide-cd'/>
0a7476
-    <flag name='no-user-config'/>
0a7476
-    <flag name='hda-micro'/>
0a7476
-    <flag name='dump-guest-memory'/>
0a7476
-    <flag name='nec-usb-xhci'/>
0a7476
-    <flag name='balloon-event'/>
0a7476
-    <flag name='bridge'/>
0a7476
-    <flag name='lsi'/>
0a7476
-    <flag name='virtio-scsi-pci'/>
0a7476
-    <flag name='blockio'/>
0a7476
-    <flag name='disable-s3'/>
0a7476
-    <flag name='disable-s4'/>
0a7476
-    <flag name='ide-drive.wwn'/>
0a7476
-    <flag name='scsi-disk.wwn'/>
0a7476
-    <flag name='seccomp-sandbox'/>
0a7476
-    <flag name='dump-guest-core'/>
0a7476
-    <flag name='seamless-migration'/>
0a7476
-    <flag name='block-commit'/>
0a7476
-    <flag name='vnc'/>
0a7476
-    <flag name='drive-mirror'/>
0a7476
-    <flag name='usb-host.bootindex'/>
0a7476
-    <flag name='qxl'/>
0a7476
-    <flag name='VGA'/>
0a7476
-    <flag name='cirrus-vga'/>
0a7476
-    <flag name='vmware-svga'/>
0a7476
-    <flag name='device-video-primary'/>
0a7476
-    <flag name='usb-serial'/>
0a7476
-    <flag name='usb-net'/>
0a7476
-    <flag name='add-fd'/>
0a7476
-    <flag name='nbd-server'/>
0a7476
-    <flag name='virtio-rng'/>
0a7476
-    <flag name='rng-random'/>
0a7476
-    <flag name='rng-egd'/>
0a7476
-    <flag name='dtb'/>
0a7476
-    <flag name='megasas'/>
0a7476
-    <flag name='ipv6-migration'/>
0a7476
-    <flag name='machine-opt'/>
0a7476
-    <flag name='machine-usb-opt'/>
0a7476
-    <flag name='pci-bridge'/>
0a7476
-    <flag name='vfio-pci'/>
0a7476
-    <flag name='vfio-pci.bootindex'/>
0a7476
-    <flag name='scsi-generic'/>
0a7476
-    <flag name='scsi-generic.bootindex'/>
0a7476
-    <flag name='mem-merge'/>
0a7476
-    <flag name='vnc-websocket'/>
0a7476
-    <flag name='mlock'/>
0a7476
-    <flag name='vnc-share-policy'/>
0a7476
-    <flag name='device-del-event'/>
0a7476
-    <flag name='dmi-to-pci-bridge'/>
0a7476
-    <flag name='i440fx-pci-hole64-size'/>
0a7476
-    <flag name='q35-pci-hole64-size'/>
0a7476
-    <flag name='usb-storage'/>
0a7476
-    <flag name='usb-storage.removable'/>
0a7476
-    <flag name='virtio-mmio'/>
0a7476
-    <flag name='ich9-intel-hda'/>
0a7476
-    <flag name='kvm-pit-lost-tick-policy'/>
0a7476
-    <flag name='boot-strict'/>
0a7476
-    <flag name='pvpanic'/>
0a7476
-    <flag name='reboot-timeout'/>
0a7476
-    <flag name='enable-fips'/>
0a7476
-    <flag name='name-guest'/>
0a7476
-  </qemuCaps>
0a7476
diff --git a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
0a7476
deleted file mode 100644
0a7476
index 981344e6fd..0000000000
0a7476
--- a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
0a7476
+++ /dev/null
0a7476
@@ -1,32 +0,0 @@
0a7476
-<capabilities>
0a7476
-
0a7476
-  <host>
0a7476
-    <cpu>
0a7476
-      <arch>i686</arch>
0a7476
-    </cpu>
0a7476
-    <power_management/>
0a7476
-    <iommu support='no'/>
0a7476
-  </host>
0a7476
-
0a7476
-  <guest>
0a7476
-    <os_type>hvm</os_type>
0a7476
-    <arch name='i686'>
0a7476
-      <wordsize>32</wordsize>
0a7476
-      <emulator>/usr/bin/qemu-system-i386</emulator>
0a7476
-      <domain type='qemu'/>
0a7476
-      <domain type='kvm'>
0a7476
-        <emulator>/usr/bin/qemu-system-i386</emulator>
0a7476
-      </domain>
0a7476
-    </arch>
0a7476
-    <features>
0a7476
-      <cpuselection/>
0a7476
-      <deviceboot/>
0a7476
-      <disksnapshot default='off' toggle='no'/>
0a7476
-      <acpi default='on' toggle='yes'/>
0a7476
-      <apic default='on' toggle='no'/>
0a7476
-      <pae/>
0a7476
-      <nonpae/>
0a7476
-    </features>
0a7476
-  </guest>
0a7476
-
0a7476
-</capabilities>
0a7476
diff --git a/tests/qemucaps2xmldata/all_1.6.0-1.xml b/tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml
0a7476
similarity index 67%
0a7476
rename from tests/qemucaps2xmldata/all_1.6.0-1.xml
0a7476
rename to tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml
0a7476
index efe86b9a12..b58f54fefd 100644
0a7476
--- a/tests/qemucaps2xmldata/all_1.6.0-1.xml
0a7476
+++ b/tests/qemucaps2xmloutdata/caps_1.6.0.x86_64.xml
0a7476
@@ -2,7 +2,7 @@
0a7476
 
0a7476
   <host>
0a7476
     <cpu>
0a7476
-      <arch>i686</arch>
0a7476
+      <arch>x86_64</arch>
0a7476
     </cpu>
0a7476
     <power_management/>
0a7476
     <iommu support='no'/>
0a7476
@@ -10,12 +10,12 @@
0a7476
 
0a7476
   <guest>
0a7476
     <os_type>hvm</os_type>
0a7476
-    <arch name='i686'>
0a7476
-      <wordsize>32</wordsize>
0a7476
-      <emulator>/usr/bin/qemu-system-i386</emulator>
0a7476
+    <arch name='x86_64'>
0a7476
+      <wordsize>64</wordsize>
0a7476
+      <emulator>/usr/bin/qemu-system-x86_64</emulator>
0a7476
       <domain type='qemu'/>
0a7476
       <domain type='kvm'>
0a7476
-        <emulator>/usr/bin/qemu-system-i386</emulator>
0a7476
+        <emulator>/usr/bin/qemu-system-x86_64</emulator>
0a7476
       </domain>
0a7476
     </arch>
0a7476
     <features>
0a7476
@@ -24,8 +24,6 @@
0a7476
       <disksnapshot default='on' toggle='no'/>
0a7476
       <acpi default='on' toggle='yes'/>
0a7476
       <apic default='on' toggle='no'/>
0a7476
-      <pae/>
0a7476
-      <nonpae/>
0a7476
     </features>
0a7476
   </guest>
0a7476
 
0a7476
diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c
0a7476
index 5b9152b04d..65dd97c0a4 100644
0a7476
--- a/tests/qemucaps2xmltest.c
0a7476
+++ b/tests/qemucaps2xmltest.c
0a7476
@@ -32,7 +32,7 @@ typedef struct _testQemuData testQemuData;
0a7476
 typedef testQemuData *testQemuDataPtr;
0a7476
 struct _testQemuData {
0a7476
     const char *base;
0a7476
-    virArch guestarch;
0a7476
+    const char *archName;
0a7476
 };
0a7476
 
0a7476
 static virQEMUCapsPtr
0a7476
@@ -87,23 +87,28 @@ testGetCaps(char *capsData, const testQemuData *data)
0a7476
 {
0a7476
     virQEMUCapsPtr qemuCaps = NULL;
0a7476
     virCapsPtr caps = NULL;
0a7476
+    virArch arch = virArchFromString(data->archName);
0a7476
+    char *binary = NULL;
0a7476
+
0a7476
+    if (virAsprintf(&binary, "/usr/bin/qemu-system-%s", data->archName) < 0)
0a7476
+        goto error;
0a7476
 
0a7476
     if ((qemuCaps = testQemuGetCaps(capsData)) == NULL) {
0a7476
         fprintf(stderr, "failed to parse qemu capabilities flags");
0a7476
         goto error;
0a7476
     }
0a7476
 
0a7476
-    if ((caps = virCapabilitiesNew(data->guestarch, false, false)) == NULL) {
0a7476
+    if ((caps = virCapabilitiesNew(arch, false, false)) == NULL) {
0a7476
         fprintf(stderr, "failed to create the fake capabilities");
0a7476
         goto error;
0a7476
     }
0a7476
 
0a7476
     if (virQEMUCapsInitGuestFromBinary(caps,
0a7476
-                                       "/usr/bin/qemu-system-i386",
0a7476
+                                       binary,
0a7476
                                        qemuCaps,
0a7476
                                        NULL,
0a7476
                                        NULL,
0a7476
-                                       data->guestarch) < 0) {
0a7476
+                                       arch) < 0) {
0a7476
         fprintf(stderr, "failed to create the capabilities from qemu");
0a7476
         goto error;
0a7476
     }
0a7476
@@ -114,6 +119,7 @@ testGetCaps(char *capsData, const testQemuData *data)
0a7476
  error:
0a7476
     virObjectUnref(qemuCaps);
0a7476
     virObjectUnref(caps);
0a7476
+    VIR_FREE(binary);
0a7476
     return NULL;
0a7476
 }
0a7476
 
0a7476
@@ -127,12 +133,12 @@ testQemuCapsXML(const void *opaque)
0a7476
     char *capsXml = NULL;
0a7476
     virCapsPtr capsProvided = NULL;
0a7476
 
0a7476
-    if (virAsprintf(&xmlFile, "%s/qemucaps2xmldata/%s.xml",
0a7476
-                    abs_srcdir, data->base) < 0)
0a7476
+    if (virAsprintf(&xmlFile, "%s/qemucaps2xmloutdata/%s.%s.xml",
0a7476
+                    abs_srcdir, data->base, data->archName) < 0)
0a7476
         goto cleanup;
0a7476
 
0a7476
-    if (virAsprintf(&capsFile, "%s/qemucaps2xmldata/%s.caps",
0a7476
-                    abs_srcdir, data->base) < 0)
0a7476
+    if (virAsprintf(&capsFile, "%s/qemucapabilitiesdata/%s.%s.xml",
0a7476
+                    abs_srcdir, data->base, data->archName) < 0)
0a7476
         goto cleanup;
0a7476
 
0a7476
     if (virTestLoadFile(capsFile, &capsData) < 0)
0a7476
@@ -175,16 +181,13 @@ mymain(void)
0a7476
 
0a7476
     virEventRegisterDefaultImpl();
0a7476
 
0a7476
-#define DO_TEST_FULL(name, guest) \
0a7476
+#define DO_TEST(arch, name) \
0a7476
+    data.archName = arch; \
0a7476
     data.base = name; \
0a7476
-    data.guestarch = guest; \
0a7476
-    if (virTestRun(name, testQemuCapsXML, &data) < 0) \
0a7476
+    if (virTestRun(name "(" arch ")", testQemuCapsXML, &data) < 0) \
0a7476
         ret = -1
0a7476
 
0a7476
-#define DO_TEST(name) DO_TEST_FULL(name, VIR_ARCH_I686)
0a7476
-
0a7476
-    DO_TEST("all_1.6.0-1");
0a7476
-    DO_TEST("nodisksnapshot_1.6.0-1");
0a7476
+    DO_TEST("x86_64", "caps_1.6.0");
0a7476
 
0a7476
     return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
0a7476
 }
0a7476
-- 
0a7476
2.21.0
0a7476