[libvirt] [PATCH] Fix 'make check' after commit 04197350

I broke 'make check' with commit 04197350 by unconditionally emitting 'hap=' in xen xm driver. Only emit 'hap=' if xendConfigVersion >= 3. I've tested sending 'hap=' to a Xen 3.2 machine without support for hap setting and verified that xend silently drops the unrecognized setting. --- src/xen/xm_internal.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index ec618aa..bfb6698 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -2413,10 +2413,11 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn, (1 << VIR_DOMAIN_FEATURE_APIC)) ? 1 : 0) < 0) goto no_memory; - if (xenXMConfigSetInt(conf, "hap", - (def->features & - (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0) - goto no_memory; + if (priv->xendConfigVersion >= 3) + if (xenXMConfigSetInt(conf, "hap", + (def->features & + (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0) + goto no_memory; if (def->clock.offset == VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME) { if (def->clock.data.timezone) { -- 1.7.3.1

On 01/14/2011 11:29 AM, Jim Fehlig wrote:
I broke 'make check' with commit 04197350 by unconditionally emitting 'hap=' in xen xm driver. Only emit 'hap=' if xendConfigVersion >= 3. I've tested sending 'hap=' to a Xen 3.2 machine without support for hap setting and verified that xend silently drops the unrecognized setting. --- src/xen/xm_internal.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
ACK; fixes 'make check' for me, and nicer than having to tweak ever version-2 .xm file in the test directory to add the new hap = 0 line. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Eric Blake wrote:
On 01/14/2011 11:29 AM, Jim Fehlig wrote:
I broke 'make check' with commit 04197350 by unconditionally emitting 'hap=' in xen xm driver. Only emit 'hap=' if xendConfigVersion >= 3. I've tested sending 'hap=' to a Xen 3.2 machine without support for hap setting and verified that xend silently drops the unrecognized setting. --- src/xen/xm_internal.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
ACK; fixes 'make check' for me, and nicer than having to tweak ever version-2 .xm file in the test directory to add the new hap = 0 line.
Thank; pushed now. Apologies for not noticing the make check failure beforehand. Regards, Jim
participants (2)
-
Eric Blake
-
Jim Fehlig