From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH RFC OSSTEST v1 02/12] target_var: Support fallback to all_(guest|host)_$vn Date: Fri, 8 Jan 2016 14:29:49 +0000 Message-ID: <1452263399-14094-2-git-send-email-ian.campbell@citrix.com> References: <1452263368.29416.39.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1452263368.29416.39.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 Having to set {ident}_foo for all idents used in a job (e.g host vs src_host+dst_host) in make-flight would be a little fiddly. Instead follow the lead of all_hostflags and consult all_host_$vn. I have no immediate use for all_guest_$vn, but support it for consistency. Signed-off-by: Ian Campbell --- Osstest/TestSupport.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index a43feec..baff4f8 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2091,7 +2091,10 @@ sub target_var_prefix ($) { sub target_var ($$) { my ($ho,$vn) = @_; - return $r{ target_var_prefix($ho). $vn }; + my $pfx = target_var_prefix($ho); + my $allthing = exists $ho->{Guest} ? "guest" : "host"; + return $r{ $pfx. $vn } // + $r{ "all_${allthing}_${vn}" }; } sub target_kernkind_check ($) { -- 2.6.1