On 06/07/2012 04:37 PM, Eric Blake wrote: > 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' I'm running it as myself, but because I have qemu:///system set as default in libvirt.conf (and have the rights), it connects successfully. If I stop the daemon, however, it fails, but immediately: $ time tools/virsh -c test:///default connect error: Failed to connect to the hypervisor error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory real 0m0.045s user 0m0.021s sys 0m0.023s There is still no waiting. > 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 I'd suspect that 'virsh -c <uri> connect' connects to <uri> (maybe twice, but still the same URI). Maybe there could be a fix that the '-c' parameter sets the default uri, because 'virsh -c <uri> uri' prints out '<uri>' and also because it seems *very* unintuitive to me that 'virsh -c test:///default "connect; uri"' prints out something else than 'virsh -c test:///default uri'. > 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). And this looks good as well. Simple and suits it's purpose. Martin -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list