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

[Xen-devel] [OSSTEST PATCH 14/25] reporting: sg-report-flight should ignore missing jobs



The function findaflight should not, when the caller specifies a job,
find a flight which does not contain that job at all.

One effect of allowing it to find such flights is that it might find a
bisection flight and try to use it as a basis for claiming a
regression, or as a justification for something not being a
regression, and then complain that all the missing steps in the
bisection flight are `blocked'.

This can be seen in the report for 58627:
 test-amd64-i386-xl-qemuu-winxpsp3  6 xen-boot fail blocked in 56366-bisect

After this patch, a report generated for 58627 no longer mentions
56366 at all.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 sg-report-flight |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/sg-report-flight b/sg-report-flight
index d3c0166..6481521 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -178,10 +178,23 @@ END
         return undef;
     }
 
+    my @flightsq_params;
+    my $flightsq_jobcond='TRUE';
+    if (defined $job) {
+       push @flightsq_params, $job;
+       $flightsq_jobcond = <<END;
+                  EXISTS (SELECT 1
+                           FROM jobs
+                          WHERE jobs.flight = flights.flight
+                            AND jobs.job = ?)
+END
+    }
+
     my $flightsq= <<END;
       SELECT * FROM (
         SELECT flight, blessing FROM flights
             WHERE $branches_cond_q
+              AND $flightsq_jobcond
               AND $blessingscond
             ORDER BY flight DESC
             LIMIT 1000
@@ -189,7 +202,7 @@ END
       ORDER BY blessing ASC, flight DESC
 END
     $flightsq= db_prepare($flightsq);
-    $flightsq->execute(@blessings);
+    $flightsq->execute(@flightsq_params, @blessings);
 
     my $buildflightsq= db_prepare(<<END);
         SELECT val FROM runvars
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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