Skip to contentSkip to conversation

sg-report-flight: Do not try to print nonexistent FirstTip info

PATCH New Ian Jackson 1 participant 2 messages Apr 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sg-report-flight: Do not try to print nonexistent FirstTip info

The use of $info->{FirstTip}{flight} autovivifies $info->{FirstTip}. Defend $pinfo against the use of an autovivified empty hashref.

---
 sg-report-flight |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sg-report-flight +1 -1
index 7d2bc66..5b8f67a 100755
@@ -586,7 +586,7 @@ sub print_pushgate_summary () {
 	my $f = $info->{$flightkey};
 	my $count = $info->{$countkey};
 	bodyprintf "%-20s", $what;
-	if ($f) {
+	if ($f && %$f) {
 	    bodyprintf(" %6d  %s %4d days",
 		   $f->{flight},
 		   show_abs_time($f->{started}),
Signature · 7 lines
1.7.10.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

PATCH 2/2 sg-report-flight: Do not report many non-regressions as allowable

In bd648aea2ebe
sg-report-flight: report allowable regressions separately in summary
whether the regression was allowable was put in $allow, but this was erroneously not used.

In 4a210cda9cc8
sg-report-flight: fix allowable failure logic not to reuse $allow for two purposes (!)
that use of the variable, which was never used, was removed.

However, what ought to happen, is that $failv->{Allow} would be set to 1 if the entry matched an allow pattern, and only if it was a blocker. That makes the logic in "report ... separately" correct.

---
 sg-report-flight |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sg-report-flight +1 -1
index 5b8f67a..5e362b9 100755
@@ -888,6 +888,7 @@ END
             print DEBUG " allow $item?";
             foreach my $allowpat (@allows) {
                 next unless $item =~ m/$allowpat/;
+                $failv->{Allow}= 1;
                 $blocker='';
                 print DEBUG " allowed";
                 last;
@@ -895,7 +896,6 @@ END
             print DEBUG "\n";
         }
 	$failv->{Blocker}= $blocker;
-        $failv->{Allow}= 1;
 	$failv->{SummaryCore}= $rtups[0][2];
 	$failv->{SummaryRefFlight}= $rtups[0][3];
 	$failv->{Summary}= $failv->{SummaryCore};
Signature · 7 lines
1.7.10.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel