From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs
Date: Thu, 6 Oct 2016 13:14:25 +0100 [thread overview]
Message-ID: <1475756065-5242-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1475756065-5242-1-git-send-email-ian.jackson@eu.citrix.com>
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@eu.citrix.com>
---
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@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-10-06 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 12:14 [OSSTEST PATCH 1/3] ms-planner: Ignore freely-shareable resources Ian Jackson
2016-10-06 12:14 ` [OSSTEST PATCH 2/3] ms-planner: Improve an error message Ian Jackson
2016-10-06 12:14 ` Ian Jackson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475756065-5242-3-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).