From: Ian Jackson Subject: [OSSTEST PATCH 1/3] cs-bisection-step: Break out report_conflict Date: Thu, 7 May 2015 00:45:49 +0100 Message-ID: <1430955951-23976-2-git-send-email-ian.jackson@eu.citrix.com> References: <1430955951-23976-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 1Yq90m-0000Ng-IW for xen-devel@lists.xenproject.org; Wed, 06 May 2015 23:45:56 +0000 In-Reply-To: <1430955951-23976-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: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org We are going to want to reuse this. Also, explicitly return 0 (for false) from conflicted_warning when it doesn't apply. No resulting functional change. Signed-off-by: Ian Jackson --- cs-bisection-step | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/cs-bisection-step b/cs-bisection-step index c9c8bb6..14f3638 100755 --- a/cs-bisection-step +++ b/cs-bisection-step @@ -714,24 +714,31 @@ sub do_choose_this ($) { $choose->{Target}= 1; } -sub conflicted_warning ($$) { - my ($n, $what) = @_; - if ($n->{Conflicted}) { - my $show_rtuple= $n->{Rtuple}; - foreach my $flight (@{ $n->{Flights} }) { - $show_rtuple .= "\n flight $flight->{Flight}". - " (blessed $flight->{Blessing}) result $flight->{Result}"; - } - summary_report(<{Rtuple}; + foreach my $flight (@{ $n->{Flights} }) { + $show_rtuple .= "\n flight $flight->{Flight}". + " (blessed $flight->{Blessing}) result $flight->{Result}"; + } + summary_report(<{Target}= 1; - return 1; + $n->{Target}= 1; + return 1; +} + +sub conflicted_warning ($$) { + my ($n, $what) = @_; + if ($n->{Conflicted}) { + return report_conflict($n, $what, 'Inconsistent test results') } + return 0; } our $repro_lastflight; -- 1.7.10.4