From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH] ts-logs-capture: Actually do hard host reboot sometimes Date: Thu, 1 Oct 2015 12:27:20 +0100 Message-ID: <1443698840.11707.19.camel@citrix.com> References: <1443698061-11382-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 1Zhc1F-00007c-7o for xen-devel@lists.xenproject.org; Thu, 01 Oct 2015 11:27:25 +0000 In-Reply-To: <1443698061-11382-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: Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-10-01 at 12:14 +0100, Ian Jackson wrote: > The logic in try_fetch_logs for setting $ok was wrong. $ok would be > set if we reached the end of any outer (pattern) loop iteration. If > the host is actually dead all the pattern expansions would fail, but > some of the patterns are literals and do not need expansion. The > inner (logfile) loop would say `next' if the logfile fetch failed, but > that just goes onto the next logfile. So this code would always set > $ok. > > Instead, set $ok to 1 when we successfuly fetch any logfile or > successfully expanded any pattern (even if it didn't match any files). > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell