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

[Xen-devel] [OSSTEST PATCH 06/21] starvation: Teach archaeologists about starved job state



sg-report-flight is a bit awkward.  It thinks mostly about step
status, not job status.  So, when justifying, if we don't find a step,
and the job state is starved, we treat the step as starved.

If there are only starved steps, then we don't have evidence that this
is a regression, because the test wasn't run in the baseline.

If there are other steps we look at those instead.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/Executive.pm |  4 ++--
 sg-report-flight     | 11 +++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index b27b8d25..a9f9ac78 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -362,8 +362,8 @@ END
            Content => (join " | ", @content),
            ColourAttr => "bgcolor=\"$failcolour\"",
        };
-    } elsif ($status eq 'blocked') {
-        return $single->("blocked", $purple),
+    } elsif ($status eq 'blocked' or $status eq 'starved') {
+        return $single->($status, $purple),
     } elsif ($status eq 'queued') {
         return $single->("($status)", $grey_dark),
     } elsif ($status eq 'preparing') {
diff --git a/sg-report-flight b/sg-report-flight
index 2677c479..6c481f6f 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -160,6 +160,10 @@ sub findaflight ($$$$$) {
         return undef;
     }
 
+    my $jcheckq= db_prepare(<<END);
+        SELECT status FROM jobs WHERE flight=? AND job=?
+END
+
     my $checkq= db_prepare(<<END);
         SELECT status FROM steps WHERE flight=? AND job=? AND testid=?
                                    AND status!='skip'
@@ -317,6 +321,11 @@ END
         if (!defined $whynot && defined $job) {
             $checkq->execute($tflight, $job, $testid);
             ($chkst) = $checkq->fetchrow_array();
+           if (!defined $chkst) {
+               $jcheckq->execute($tflight, $job);
+               my ($jchkst) = $jcheckq->fetchrow_array();
+               $chkst = $jchkst if $jchkst eq 'starved';
+           }
         }
         $whynot= $sub->($tflight, $chkst) if !defined $whynot;
         if (!defined $whynot) {
@@ -861,6 +870,8 @@ END
                 my $tblocker = $st eq 'fail' ? 'regression' : $st;
                 my $tpriority = $j->{job} =~ m/^build/ ? 600 : 100;
                $rtup= [ $tpriority, $tblocker, "REGR. vs.", $chkflight ];
+           } elsif ($chkst eq 'starved') { # actually, the job was 'starved'
+               $rtup= [ 50, '', "starved in", $chkflight ];
            } else {
                $rtup= [ 170, '', "$chkst in", $chkflight ];
            }
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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