From: Matthias Bolte Date: Tue, 9 Nov 2010 22:38:12 +0000 (+0100) Subject: xencapstest: Don't fail when Xen is installed X-Git-Tag: v0.8.6~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2e9e907429a5e95727e3bc119783dedf7d5ebbd;p=thirdparty%2Flibvirt.git xencapstest: Don't fail when Xen is installed xencapstest calls xenHypervisorMakeCapabilitiesInternal with conn == NULL which calls xenDaemonNodeGetTopology with conn == NULL when a recent enough Xen was detected (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA). But xenDaemonNodeGetTopology insists in having conn != NULL and fails, because it expects to be able to talk to an actual xend. We cannot do that in a 'make check' test. Therefore, only call the xend subdriver function when conn isn't NULL. Reported by Andy Howell and Jim Fehlig. --- diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index c35b6d844f..aad6143276 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2246,7 +2246,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, goto no_memory; - if (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA) { + if (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA && conn != NULL) { if (xenDaemonNodeGetTopology(conn, caps) != 0) { virCapabilitiesFree(caps); return NULL;