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