From owner-freebsd-current Sun Jan 5 11:17:26 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADE9A37B401 for ; Sun, 5 Jan 2003 11:17:24 -0800 (PST) Received: from mail.gmx.net (mail.gmx.net [213.165.65.60]) by mx1.FreeBSD.org (Postfix) with SMTP id 8616B43ED8 for ; Sun, 5 Jan 2003 11:17:23 -0800 (PST) (envelope-from Gerhard.Sittig@gmx.net) Received: (qmail 22833 invoked by uid 0); 5 Jan 2003 19:17:22 -0000 Received: from p5091014e.dip0.t-ipconnect.de (HELO mail.gsinet.sittig.org) (80.145.1.78) by mail.gmx.net (mp003-rz3) with SMTP; 5 Jan 2003 19:17:22 -0000 Received: (qmail 99653 invoked from network); 5 Jan 2003 15:34:35 -0000 Received: from shell.gsinet.sittig.org (192.168.11.153) by mail.gsinet.sittig.org with SMTP; 5 Jan 2003 15:34:35 -0000 Received: (from sittig@localhost) by shell.gsinet.sittig.org (8.11.3/8.11.3) id h05FYZ099649 for current@FreeBSD.ORG; Sun, 5 Jan 2003 16:34:35 +0100 (CET) (envelope-from sittig) Date: Sun, 5 Jan 2003 16:34:35 +0100 From: Gerhard Sittig To: current@FreeBSD.ORG Subject: Re: alpha tinderbox failure Message-ID: <20030105163435.V4807@shell.gsinet.sittig.org> Mail-Followup-To: current@FreeBSD.ORG References: <2994.1041712055@critter.freebsd.dk> <20030105175202.N14167-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030105175202.N14167-100000@gamplex.bde.org>; from bde@zeta.org.au on Sun, Jan 05, 2003 at 06:00:26PM +1100 Organization: System Defenestrators Inc. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jan 05, 2003 at 18:00 +1100, Bruce Evans wrote: > > On Sat, 4 Jan 2003 phk@FreeBSD.ORG wrote: > > > In message <20030104201357.D27142A8A5@canning.wemm.org>, Peter Wemm writes: > > >> No, it isn't the regression tests. It is this here in the start of stage 4: > > >> > > >> ===> usr.bin/vi > > >> *** Error code 1 (ignored) > > >> *** Error code 1 (ignored) > > >> ===> usr.bin/vis > > >> > > >> As soon as 'whereintheworld' sees an 'error code', it starts dumping that > > >> entire block to the end. If you care to find and fix the build in vi, that > > >> would solve it. > > > > I think it would be more profitable to teach "whereintheworld" about > > the "(ignored)" string, wouldn't it ? > > No; it would be more profitable to teach programmers to not ignore errors. Amen! :] Although the above case is special from what I learnt in another message in this thread (I managed to delete it after seeing it so I cannot quote it here). ISTR that the non zero exit status comes from a tool with the following convention: 0 is "absolutely OK", 1 is "not perfect but still plausible enough to get accepted most of the time", and 2 is "a real error, never OK". So the exit code of 1 is more of a warning than an error. Ignoring _any_ non zero exit status in the Makefile is an error. The rule should instead accept success and warning messages as success while bailing out on the errors. This can be done with shell syntax as I have seen in some small test: $ sh -c 'exit 0'; [ $? -le 1 ] $ echo $? 0 $ sh -c 'exit 1'; [ $? -le 1 ] $ echo $? 0 $ sh -c 'exit 2'; [ $? -le 1 ] $ echo $? 1 $ sh -c 'exit 3'; [ $? -le 1 ] $ echo $? 1 This means: adding the "[ $? -le 1 ]" test to the Makefile rule and *not* ignoring the command's (sequence's) exit status will prevent the acceptable warning from stopping the build while real errors do break the build as one would expect from make(1). And the mentioned tool (sorry, I don't remember its name) is still able to warn those who are interested (release builders?). virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message