From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 1/4] guest_find_domid: Set Vcpus correctly. Date: Fri, 3 Jul 2015 09:52:30 +0100 Message-ID: <1435913550.9447.15.camel@citrix.com> References: <1435857067-10704-1-git-send-email-ian.jackson@eu.citrix.com> <1435857067-10704-2-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZAwi6-0000WL-ML for xen-devel@lists.xenproject.org; Fri, 03 Jul 2015 08:52:38 +0000 In-Reply-To: <1435857067-10704-2-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: Ian Jackson Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-07-02 at 18:11 +0100, Ian Jackson wrote: > The regexp was wrong, resulting in the last digit of the memory being > mistaken for the number of vcpus (!) > > The only consumer of this is ts-logs-capture. > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell Perhaps at some point in the future once xm is off the test radar we could consider using xl list --format=json (nb, I didn't check the concrete syntax) and using that. > --- > Osstest/TestSupport.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm > index b5994a4..66dc218 100644 > --- a/Osstest/TestSupport.pm > +++ b/Osstest/TestSupport.pm > @@ -1918,7 +1918,7 @@ sub guest_find_domid ($$) { > return if defined $gho->{Domid}; > my $list= target_cmd_output_root($ho, > common_toolstack($ho)." list $gho->{Name}"); > - $list =~ m/^(?!Name\s)(\S+)\s+(\d+)\s+(\d+)+(\d+)\s.*$/m > + $list =~ m/^(?!Name\s)(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s.*$/m > or die "domain list: $list"; > $1 eq $gho->{Name} or die "domain list name $1 expected $gho->{Name}"; > $gho->{MemUsed}= $3;