[libvirt] [PATCH v2] tests: Add more complex domain scheme test data

Daniel P. Berrange berrange at redhat.com
Tue May 31 17:55:29 UTC 2011


On Tue, May 31, 2011 at 11:28:39AM -0600, Eric Blake wrote:
> On 05/31/2011 08:59 AM, Michal Privoznik wrote:
> > ---
> > diff to v1:
> > -move from tests/domainschemadata/ to tests/qemuxml2argvdata/
> > -add .args
> > 
> > +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
> > @@ -0,0 +1,14 @@
> > +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
> > +/usr/bin/qemu-kvm
> 
> > +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml
> > @@ -0,0 +1,86 @@
> > +<domain type='qemu'>
> 
> > +  <devices>
> > +    <emulator>/usr/bin/qemu-kvm</emulator>
> 
> Phooey - this test is now failing on a RHEL 6.1 machine:
> 
> 54) QEMU XML-2-ARGV graphics-spice-timeout
> ... libvir: QEMU error : Cannot find QEMU binary /usr/bin/qemu-kvm: No
> such file or directory
> FAILED
> 
> This is the first test in qemuxml2argvdata that insists on
> /usr/bin/qemu-kvm instead of /usr/bin/qemu.
> 
> I was about to push the "obvious" fix of s/qemu-kvm/qemu/, but that just
> papers over the real bug, which is that our testsuite depends on what is
> installed on the test machine.  We need to figure out the root cause and
> make the test work even when the <emulator> tag requested by the tag
> does not exist on the machine running the test.

The existing tests don't depend on the host OS install. We setup
capabilities data in testutilsqemu.c for them. The problem is
that this test file used a binary that isn't in the capabilities
data we provide to tests, so we fallback to trying to extract
the data for it.

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 :|




More information about the libvir-list mailing list