[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 3/4] cs-bisection-step: need_repro: Support $consider_parents



This flag tells need_repro to look at parent commits of the indicated
rtuple node, as well as the node itself.  We walk up the tree.  If
there are multiple parents, we stop; likewise if we find any rtuple
which doesn't have the expected results.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 cs-bisection-step | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/cs-bisection-step b/cs-bisection-step
index 90e0601a..bc6fb794 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -822,13 +822,31 @@ sub need_repro_sequence ($$) {
     }
 }
 
-sub need_repro ($$$) {
-    my ($st, $n, $what) = @_;
+sub need_repro ($$$;$) {
+    my ($st, $n, $what, $consider_parents) = @_;
 
     return 1 if conflicted_warning($n, $what);
 
     my $fl= $n->{Flights} || [];
     my $xinfo='';
+    if ($consider_parents) {
+        $fl = [ @$fl ];
+       my $nloop = $n;
+       my $iters = 0;
+       for (;;) {
+           last unless @{ $nloop->{Parents} } == 1;
+           $nloop = $nloop->{Parents}[0];
+           $iters++;
+           $xinfo = " (at ancestor ~$iters)";
+           my @others = grep { $_->{Result} ne $st } @{ $nloop->{Flights} };
+           if (@others) {
+               print STDERR
+ " For $what, parent search stopping at $nloop->{Rtuple}, results @others";
+           }
+           push @$fl, @{ $nloop->{Flights} };
+       }
+    }
+
     foreach my $f (sort { $a->{Flight} <=> $b->{Flight} } @$fl) {
         next unless $f->{Flight} > $repro_lastflight;
        if ($f->{Result} ne $st) {
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.