From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 12/26] selecthost: Minor cleanups Date: Fri, 25 Sep 2015 20:15:08 +0100 Message-ID: <1443208522-24905-4-git-send-email-ian.jackson@eu.citrix.com> References: <1443181028-22705-1-git-send-email-ian.jackson@eu.citrix.com> <1443208522-24905-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfYTY-0001fQ-TB for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 19:16:09 +0000 In-Reply-To: <1443208522-24905-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 --- 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 168aa9c..8f0122c 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -804,6 +804,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 + # + # uis which means use that host (and all + # its flags and properties from the configuration and database) + my $name; if ($ident =~ m/=/) { $ident= $`; @@ -911,7 +925,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