[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST] selecthost: Correctly set ->{Suite} for a nested host in selecthost()



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 <ian.campbell@xxxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.