From: Ian Jackson Subject: [OSSTEST PATCH 03/24] selecthost: Minor cleanups Date: Fri, 13 Nov 2015 12:03:31 +0000 Message-ID: <1447416232-12699-4-git-send-email-ian.jackson@eu.citrix.com> References: <1447416232-12699-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZxD5Q-0001QO-NH for xen-devel@lists.xenproject.org; Fri, 13 Nov 2015 12:04:12 +0000 In-Reply-To: <1447416232-12699-1-git-send-email-ian.jackson@eu.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: xen-devel@lists.xenproject.org Cc: Robert Ho , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Document the syntax for $ident. Log the ident as well as the selected hostname. Signed-off-by: Ian Jackson Tested-by: Robert Ho Acked-by: Ian Campbell --- v17: Fix typo in doc message. v14: New patch --- Osstest/TestSupport.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index aa41952..8c3612c 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -810,6 +810,20 @@ sub power_state ($$) { sub selecthost ($) { my ($ident) = @_; # must be run outside transaction + + # $ident is + # + # can be , typically "host" or "xxx_host" + # which means look up the runvar $r{$ident} which + # contains + # OR + # can be = + # which means ignore except for logging purposes etc. + # and use + # + # is which means use that host (and all + # its flags and properties from the configuration and database) + my $name; if ($ident =~ m/=/) { $ident= $`; @@ -917,7 +931,7 @@ sub selecthost ($) { $mjobdb->host_check_allocated($ho); - logm("host: selected $ho->{Name} ". + logm("host $ho->{Ident}: selected $ho->{Name} ". (defined $ho->{Ether} ? $ho->{Ether} : ''). " $ho->{Ip}". (!$ho->{Shared} ? '' : -- 1.7.10.4