Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > ebe084c140192657f9094e135a84202c > files > 165

libvirt-0.8.2-29.el5.src.rpm

From 45ce45f314e7cbeadc5bf253259eeeb2456c20cb Mon Sep 17 00:00:00 2001
Message-Id: <45ce45f314e7cbeadc5bf253259eeeb2456c20cb.1302077893.git.jdenemar@redhat.com>
From: Matthias Bolte <matthias.bolte@googlemail.com>
Date: Tue, 9 Nov 2010 23:38:12 +0100
Subject: [PATCH] xencapstest: Don't fail when Xen is installed

https://bugzilla.redhat.com/show_bug.cgi?id=690459

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.
(cherry picked from commit c2e9e907429a5e95727e3bc119783dedf7d5ebbd)
---
 src/xen/xen_hypervisor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index d73bc2d..1260036 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2264,7 +2264,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;
-- 
1.7.4.1