On Fri, Feb 18, 2000 at 04:44:29PM +0100, Akim Demaille wrote:
>
> | On Fri, Feb 18, 2000 at 03:39:59PM +0100, Akim Demaille wrote:
> | >
> | > Could you change tests/tools.m4 from
> | >
> | > # A script in charge of testing `/bin/sh -n'.
> | > AT_DATA(syntax.sh,
> | > [[set -e
> | > (/bin/sh -n endless.sh) &
> | > cpid=$!
> | > sleep 2 && kill $cpid >/dev/null 2>&1
> | > ]])
With buggy shell, syntax.sh return expected value 0 and 1 otherwise.
This part works fine.
> | if /bin/sh ./syntax.sh; then
> | AT_CHECK([/bin/sh -n ../autoconf], 0)
> | AT_CHECK([/bin/sh -n ../autoreconf], 0)
> | AT_CHECK([/bin/sh -n ../autoupdate], 0)
> | AT_CHECK([/bin/sh -n ../autoreconf], 0)
> | AT_CHECK([/bin/sh -n ../ifnames], 0)
> | fi
The problem is that a `0' return value is equivalent to `true' and `1'
if interpreted as `false'.
njoly@medusa [~/Softs]> true
njoly@medusa [~/Softs]> echo $?
0
njoly@medusa [~/Softs]> false
njoly@medusa [~/Softs]> echo $?
1
We need to reverse this test or syntax.sh return values to have correct
behaviour.
--
Nicolas Joly
Informatique Scientifique
Institut Pasteur, Paris.