[libvirt] pointless time-consuming test 'virsh-all'

Eric Blake eblake at redhat.com
Thu Jun 7 14:37:52 UTC 2012


On 06/07/2012 06:31 AM, Martin Kletzander wrote:

>>>> $ time tools/virsh -c test:///default connect
>>>> error: Failed to connect to the hypervisor
>>>> error: Failed to connect socket to
>>>> '/run/user/eblake/libvirt/libvirt-sock': No such file or directory

>>
>> Odd.  Looks like I have some debugging to do, then (it might be related
>> to how I have my $HOME mounted).
>>
> 
> I'm compiling and testing the code with '--system' specified, so that
> might have something to do with it. I'll try some magic and in case you
> want me to try something, just ping me ;)

Are you running the test as root or as yourself?  Also, what does
'tools/virsh uri' print?  I think the problem here is that 'connect'
without arguments tries to connect to the default URI instead of
reconnecting to the -c test:///default URI; in my case, the default is
qemu:///session when run as myself, and that is the part that is
failing, because the socket is not being created in a timely manner.

Obviously, our testsuite should NOT be trying to connect to
qemu:///session, so the fix for this test would be to update it to call
'connect test:///default' instead of plain 'connect'.  That sort of
implies that we should have a lookup table of extra args to pass to any
given virsh command (I'm comparing this to the help-version test of
coreutils,
http://git.savannah.gnu.org/cgit/coreutils.git/tree/tests/misc/help-version,
which serves as a good example of how to run sanity checking on a long
list of programs where only a subset of the programs need special-case
handling for invocation with different than normal arguments).

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120607/1f0e883f/attachment-0001.sig>


More information about the libvir-list mailing list