Should we imitate GNU test's insanity?
Jilles Tjoelker
jilles at stack.nl
Sun Feb 20 14:16:54 UTC 2011
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
More information about the freebsd-standards
mailing list