]> xenbits.xensource.com Git - libvirt.git/commitdiff
xencapstest: Don't fail when Xen is installed
authorMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 9 Nov 2010 22:38:12 +0000 (23:38 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 9 Nov 2010 23:06:49 +0000 (00:06 +0100)
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.

src/xen/xen_hypervisor.c

index c35b6d844fe514c311f01bd0d2f2462569680de3..aad61432766a4c572cc6b7936807bf479a72c8cf 100644 (file)
@@ -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;