From owner-freebsd-standards@FreeBSD.ORG Sun Feb 20 14:16:54 2011 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCB9A106566B for ; Sun, 20 Feb 2011 14:16:54 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3F88FC1B for ; Sun, 20 Feb 2011 14:16:54 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 59E4835934F; Sun, 20 Feb 2011 15:16:53 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 447A5170FB; Sun, 20 Feb 2011 15:16:53 +0100 (CET) Date: Sun, 20 Feb 2011 15:16:53 +0100 From: Jilles Tjoelker To: d@delphij.net Message-ID: <20110220141653.GB95092@stack.nl> References: <4D53064B.7090901@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D53064B.7090901@delphij.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-standards@freebsd.org Subject: Re: Should we imitate GNU test's insanity? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2011 14:16:54 -0000 On Wed, Feb 09, 2011 at 01:25:31PM -0800, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > On 02/09/11 12:46, Chris Rees wrote: > > I've found so many cases of autoconf failing when porting Linux apps > > over, for example scilab and musicpd due to the happiness of GNU test > > to accept a == b rather than a = b. > > Rather than making a bug report that'll be brushed off (as my bug > > report for GNU find was), would it be unthinkable for me to make a > > patch for our test to make == acceptable, to stop some wasted porters' > > time? > I don't think == is unacceptable extension to the POSIX standard based > on my reading. If there is no objection I'll commit the attached patch > on Friday. > Index: bin/test/test.c > =================================================================== > --- bin/test/test.c (revision 218497) > +++ bin/test/test.c (working copy) > @@ -140,6 +140,7 @@ > {"-L", FILSYM, UNOP}, > {"-S", FILSOCK,UNOP}, > {"=", STREQ, BINOP}, > + {"==", STREQ, BINOP}, > {"!=", STRNE, BINOP}, > {"<", STRLT, BINOP}, > {">", STRGT, BINOP}, Although I agree that this may be left undocumented, I think you should add a test to tools/regression/bin/test/regress.sh, given that you care enough to make this change. That I do not object to this change does not mean that this fairly useless (apart from compatibility) feature should be added to POSIX. -- Jilles Tjoelker