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