[libvirt] [PATCH] Fix QEMU XML-2-ARGV graphics-spice-timeout test

The test used an emulator that is not supported in testutilsqemu.c. Swicth from qemu-kvm to kvm to fix this. --- This patch addresses the problem discussed here: https://www.redhat.com/archives/libvir-list/2011-May/msg01914.html .../qemuxml2argv-graphics-spice-timeout.args | 2 +- .../qemuxml2argv-graphics-spice-timeout.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args index bb414d6..d5226a7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ -/usr/bin/qemu-kvm -S -M pc-0.13 -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,\ +/usr/bin/kvm -S -M pc-0.13 -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,\ +est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,+ds \ -m 1024 -smp 2 -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml index aaa4469..6272f1b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml @@ -38,7 +38,7 @@ <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> - <emulator>/usr/bin/qemu-kvm</emulator> + <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/f14.img'/> -- 1.7.0.4

On 06/01/2011 10:13 AM, Matthias Bolte wrote:
The test used an emulator that is not supported in testutilsqemu.c. Swicth from qemu-kvm to kvm to fix this.
s/Swicth/Switch/
---
This patch addresses the problem discussed here: https://www.redhat.com/archives/libvir-list/2011-May/msg01914.html
.../qemuxml2argv-graphics-spice-timeout.args | 2 +- .../qemuxml2argv-graphics-spice-timeout.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Given the contents of tests/testutilsqemu.c, this works (that file provides both /usr/bin/qemu and /usr/bin/kvm definitions). A larger patch, but one which would prevent future issues of this sort, would be modifying that file to also provide a /usr/bin/qemu-kvm definition. In the interest of getting 0.9.2 ready, though, I favor the smaller patch for now. ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2011/6/1 Eric Blake <eblake@redhat.com>:
On 06/01/2011 10:13 AM, Matthias Bolte wrote:
The test used an emulator that is not supported in testutilsqemu.c. Swicth from qemu-kvm to kvm to fix this.
s/Swicth/Switch/
My typo rate is quite high recently.
---
This patch addresses the problem discussed here: https://www.redhat.com/archives/libvir-list/2011-May/msg01914.html
.../qemuxml2argv-graphics-spice-timeout.args | 2 +- .../qemuxml2argv-graphics-spice-timeout.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Given the contents of tests/testutilsqemu.c, this works (that file provides both /usr/bin/qemu and /usr/bin/kvm definitions). A larger patch, but one which would prevent future issues of this sort, would be modifying that file to also provide a /usr/bin/qemu-kvm definition.
In the interest of getting 0.9.2 ready, though, I favor the smaller patch for now.
ACK.
Thanks. pushed. Matthias

On 06/01/2011 10:13 AM, Matthias Bolte wrote:
The test used an emulator that is not supported in testutilsqemu.c. Swicth from qemu-kvm to kvm to fix this. ---
This patch addresses the problem discussed here: https://www.redhat.com/archives/libvir-list/2011-May/msg01914.html
Shoot, now I'm getting failures on Fedora 14: 55) QEMU XML-2-ARGV graphics-spice-timeout ... libvir: error : internal error Child process (LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/kvm -cpu ?) status unexpected: exit status 1 FAILED -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Alas, /usr/bin/kvm is also not directly supported by testutilsqemu.c. In fact, _any_ test that uses <cpu match=...> has to use our faked qemu.sh in order to properly answer the 'qemu -cpu ?' probe done during qemu command line building. * tests/qemuxml2argvdata/*graphics-spice-timeout*: Switch emulator, again. --- Tested on Fedora 14, RHEL 5.6, and RHEL 6.1. Additionally tested under gdb by putting a breakpoint on virCommandRunAsync - the only places that hit (this problematic test, and several other existing tests) are now all invoking './qemu.sh -cpu ?', and nothing else, so the testsuite is once again independent of what qemu is installed. Pushing this under the build-breaker rule. .../qemuxml2argv-graphics-spice-timeout.args | 2 +- .../qemuxml2argv-graphics-spice-timeout.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args index d5226a7..62ce46f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ -/usr/bin/kvm -S -M pc-0.13 -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,\ +./qemu.sh -S -M pc -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,\ +est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,+ds \ -m 1024 -smp 2 -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml index 6272f1b..4c0c57e 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml @@ -5,7 +5,7 @@ <currentMemory>1048576</currentMemory> <vcpu>2</vcpu> <os> - <type arch='x86_64' machine='pc-0.13'>hvm</type> + <type arch='i686' machine='pc'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> <bootmenu enable='yes'/> @@ -38,7 +38,7 @@ <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> - <emulator>/usr/bin/kvm</emulator> + <emulator>/./qemu.sh</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/f14.img'/> -- 1.7.4.4

On Wed, Jun 01, 2011 at 02:26:54PM -0600, Eric Blake wrote:
On 06/01/2011 10:13 AM, Matthias Bolte wrote:
The test used an emulator that is not supported in testutilsqemu.c. Swicth from qemu-kvm to kvm to fix this. ---
This patch addresses the problem discussed here: https://www.redhat.com/archives/libvir-list/2011-May/msg01914.html
Shoot, now I'm getting failures on Fedora 14:
55) QEMU XML-2-ARGV graphics-spice-timeout ... libvir: error : internal error Child process (LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/kvm -cpu ?) status unexpected: exit status 1 FAILED
That's because the graphics-spice-timeout XML has a full <cpu> model and flags present. This is irrelevant for this test, so just remove it and everything will be fine. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Matthias Bolte