From: Ian Campbell Subject: [PATCH OSSTEST] selecthost: Correctly set ->{Suite} for a nested host in selecthost() Date: Mon, 23 Nov 2015 11:59:33 +0000 Message-ID: <1448279973-26525-1-git-send-email-ian.campbell@citrix.com> References: <1448275201.4973.36.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448275201.4973.36.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Since $child comes initially from selectguest() (and is then tailored to look more like a host) it never has a ->{Suite} set. Since $c{DebianSuite} and $c{DebianGuestSuite} differ and it is unclear that we would want to apply $c{DebianGuestSuite} as a default in this context fix this up in selecthost() (using the parent's suite as the default) rather than causing selectguest() to always set ->{Suite}. Tested in some adhoc invocations of the relevant test scripts. This was exposed by the switch to DebianSuite==Jessie. ts-xen-install for a nested L1 failed to conditionally install the Jessie libarary libnl-route-3-200. Signed-off-by: Ian Campbell --- Osstest/TestSupport.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index d1f7d36..0b61fda 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -876,6 +876,11 @@ sub selecthost ($) { $child->{Info} = [ "in", $parent->{Name}, @{ $parent->{Info} } ]; $child->{NestingLevel} = $parent->{NestingLevel}+1; + if (defined $job) { + $child->{Suite} = get_runvar_default("${name}_suite",$job, + $parent->{Suite}); + } + $child->{Power} = 'guest'; power_cycle_host_setup($child); -- 2.6.1