[patch] testsuite/testing.sh: removes obvious bashisms
walter harms
WHarms at bfs.de
Fri May 2 12:16:24 UTC 2008
Cristian Ionescu-Idbohrn wrote:
t.
>
> The two major examples I gave are 'echo' and 'printf'.
>
> echo usage in the test-scripts:
>
> - the '-e' options is _not_ posix
> - use of the '-e' option may lead to several tests failing if the
> default shell (dash on several distributions) does not support it
> - I think the '-n' option should also be avoided
> - I'm _not_ saying busybox echo should not support the '-e' and '-n'
> options
> - and this is what I base my statements on:
> http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html
> - the above document talks about "XSI-conformant systems" and says
> "The following character sequences shall be recognized on
> XSI-conformant systems"; '\xHH' is not one of them, but '\OOO' is; the
> question is: can we always assume XSI-conformancy of all default
> shells on all distributions?
>
this is correct but be real this is a *testscript* you can simply add to the docu
"we expect that echo support <list of>". Making a script work with "posix only"
is a nice exercise but that would miss the point of this testscript.
Even if this script work with bash only i do not see any problem -- that you can not
test it on any not-bash-supported system is a problem but not for the system --
since the (busybox-) code should work there if test on a other box.
we have a lot of missing tests *that* is a problem.
look at autoconf code if you want to work around bug that the different type of
shell may have, not very pleasant reading.
just my 2 cent,
wh
More information about the busybox
mailing list