From patchwork Thu Oct 6 12:14:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9364669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 148176077E for ; Thu, 6 Oct 2016 12:16:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0787428F8B for ; Thu, 6 Oct 2016 12:16:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFF7D28F90; Thu, 6 Oct 2016 12:16:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 839E528F8B for ; Thu, 6 Oct 2016 12:16:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs7Zf-0007Ry-8s; Thu, 06 Oct 2016 12:14:55 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs7Zd-0007Qv-MC for xen-devel@lists.xenproject.org; Thu, 06 Oct 2016 12:14:53 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 92/A8-09561-D3046F75; Thu, 06 Oct 2016 12:14:53 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeJIrShJLcpLzFFi42JxWrrBXtfS4Vu 4wclGeYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNaP54DG2gpkcFTtf72VuYHzN1sXIySEh4C8x 5+YkMJtNQFeiactfIJuDQ0RAReL2XgMQk1kgVGLHC0uQCmGBRImWV5uZQGwWoIo/G/Ywg5TwC nhILPuvBTFQTuL88Z/MIDangKfErO41rCC2EFDJrR2rmUDKhQTUJOaujwcJ8woISpyc+YQFxG YWkJA4+OIFM8QYbonbp6cyT2Dkm4WkbBaSsgWMTKsYNYpTi8pSi3SNTPWSijLTM0pyEzNzdA0 NTPVyU4uLE9NTcxKTivWS83M3MQKDqZ6BgXEH4652v0OMkhxMSqK865m+hQvxJeWnVGYkFmfE F5XmpBYfYpTh4FCS4L1hB5QTLEpNT61Iy8wBhjVMWoKDR0mEN8oeKM1bXJCYW5yZDpE6xagoJ c77GaRPACSRUZoH1waLpUuMslLCvIwMDAxCPAWpRbmZJajyrxjFORiVhHnrQabwZOaVwE1/Bb SYCWhx/tIvIItLEhFSUg2M/Q9/+N5dJvt9sffLo3euPyq7Lvh3e3dl4S/Nw+oO5od+nVqxdlm InKWlQdCMpWUppZOfNkilLqyX/CRwtdd+8bTzMzWX/XDfuWN2wsu9B/La+5e+e/UsffGq8v07 a9av+vPvvY5Jkd8ij+Ros+g7qSW/eyfu0FCbbp61vkLdNFNnKcMe/0lN95VYijMSDbWYi4oTA YW0g7agAgAA X-Env-Sender: prvs=0807beae1=Ian.Jackson@citrix.com X-Msg-Ref: server-16.tower-206.messagelabs.com!1475756086!47642867!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3751 invoked from network); 6 Oct 2016 12:14:49 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 6 Oct 2016 12:14:49 -0000 X-IronPort-AV: E=Sophos;i="5.31,453,1473120000"; d="scan'208";a="391054233" From: Ian Jackson To: Date: Thu, 6 Oct 2016 13:14:25 +0100 Message-ID: <1475756065-5242-3-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475756065-5242-1-git-send-email-ian.jackson@eu.citrix.com> References: <1475756065-5242-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 3/3] sg-report-flight: Avoid some warnings when reporting unexecuted jobs X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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