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

[Xen-devel] [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs



If no steps in a job are executed, there can be a failure with a
synthetic step row, containing a stepno of ''.  This causes a perl
warning when compared with <=>:
  Argument "" isn't numeric in numeric comparison (<=>) at ./sg-report-flight 
line 774.

Fix this by replacing falseish values with 0.

Bug introduced in 0e09a8b00ec6 "sg-report-flight: Report earlier,
earlier step failures".

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 sg-report-flight | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sg-report-flight b/sg-report-flight
index dbb17be..c66525b 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -774,7 +774,7 @@ END
 
     @failures= sort {
        $a->{DurationEstimate} <=> $b->{DurationEstimate}
-       or $a->{Step}{stepno} <=> $b->{Step}{stepno}
+       or ($a->{Step}{stepno} || 0) <=> ($b->{Step}{stepno} || 0)
        # stepno is sequential only within each job, so strictly
        # speaking this is not really a valid comparison: we will
        # usually be comparing failed steps in different jobs.  But
-- 
2.1.4


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

 


Rackspace

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