Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Feb 2011 15:16:53 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        d@delphij.net
Cc:        freebsd-standards@freebsd.org
Subject:   Re: Should we imitate GNU test's insanity?
Message-ID:  <20110220141653.GB95092@stack.nl>
In-Reply-To: <4D53064B.7090901@delphij.net>
References:  <AANLkTi=mNb=u0UA1zHYTdiVxdJc=3-VPtWxvc7tu4R4H@mail.gmail.com> <4D53064B.7090901@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110220141653.GB95092>