|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 1/3] cs-bisection-step: Break out report_conflict
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 <ian.jackson@xxxxxxxxxxxxx>
---
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(<<END, <<END, 16);
+sub report_conflict ($$$) {
+ my ($n, $what, $desc) = @_;
+ # always returns 1 for the convenience of its callers
+ my $show_rtuple= $n->{Rtuple};
+ foreach my $flight (@{ $n->{Flights} }) {
+ $show_rtuple .= "\n flight $flight->{Flight}".
+ " (blessed $flight->{Blessing}) result $flight->{Result}";
+ }
+ summary_report(<<END, <<END, 16);
Not reproducible - supposed $what
END
Could not reproduce problem, or could not reproduce basis pass.
-Inconsistent test results at this revision (supposed $what):
+$desc; at this revision (supposed $what):
$show_rtuple
END
- $n->{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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |