[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU Autoconf 2.59c] testsuite: 75 78 89 102 failed
From: |
Ralf Wildenhues |
Subject: |
Re: [GNU Autoconf 2.59c] testsuite: 75 78 89 102 failed |
Date: |
Tue, 18 Apr 2006 19:24:09 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Dalibor,
* Dalibor Topic wrote on Mon, Apr 17, 2006 at 09:18:13PM CEST:
>
> I've ran the autoconf 2.59c test suite on HP's testdrive NetBSD 3.0 box,
You beat me by a few hours there. :-)
> and there were a few test failures. It seems to use ksh as the shell for
> configure.
Thanks for the bug reports. They are all due to one failure, but the
exposure is a bit tricky:
> Failed tests:
> GNU Autoconf 2.59c test suite test groups:
>
> NUM: FILE-NAME:LINE TEST-GROUP-NAME
> KEYWORDS
>
> 75: torture.at:85 AC_ARG_VAR
> 78: torture.at:234 Missing templates
> 89: torture.at:709 Signal handling
> 102: c.at:59 Broken/missing compilers
> # -*- compilation -*-
> 75. torture.at:85: testing ...
> ./torture.at:95:
> if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
> exit 0
> else
> exit 77
> fi
>
> ./torture.at:108: autoconf --force
> ./torture.at:108: /bin/sh -n configure
> ./torture.at:111: top_srcdir=$abs_top_srcdir ./configure --config-cache -q
> stdout:
> precious:
> ./torture.at:111: cat file
> ./torture.at:111: ./config.status --recheck
> stdout:
> running CONFIG_SHELL=/bin/ksh /bin/ksh ./configure --config-cache
> --no-create --no-recursion
> configure: loading cache config.cache
> precious:
> configure: creating ./config.status
> ./torture.at:111: ./config.status
> stdout:
> config.status: creating file
> ./torture.at:111: cat file
> ./torture.at:111: top_srcdir=$abs_top_srcdir ./configure --config-cache
> stderr:
> configure: error: `precious' was not set in the previous run
> configure: error: changes in the environment can compromise the build
> configure: error: run `make distclean' and/or `rm config.cache' and start over
> stdout:
> configure: loading cache config.cache
> ./torture.at:111: exit code was 0, expected 1
*snip*
> 75. torture.at:85: 75. AC_ARG_VAR (torture.at:85): FAILED (torture.at:111)
Rerunning the test with
make check TESTSUITEFLAGS='-v -d -x 75'
shows that it fails after exporting precious='apple of my eye'.
Setting that manually and rerunning
./configure -C
inside the directory tests/testsuite.dir/075 does not expose the error.
Only when also setting this:
CONFIG_SHELL=/bin/ksh; export CONFIG_SHELL
the error is exposed. So in fact then we are using /bin/sh because,
since the `testsuite' startup already exported CONFIG_SHELL, the
configure script will not try to restart itself.
This exposes the following bug (info Autoconf "Limitations of Builtins"):
| The shell in FreeBSD 4.0 has the following bug: `$?' is reset to 0
| by empty lines if the code is inside `trap'.
|
| $ trap 'false
|
| echo $?' 0
| $ exit
| 0
|
| Fortunately, this bug only affects `trap'.
which is fixed by the patch below. OK to apply?
All other failures should be fixed with this patch as well. However,
one underlying issue -- that the testsuite already exports CONFIG_SHELL
and thus may skew testsuite results -- may need to be revisited as well
eventually. (I'd like to avoid to do that now, if possible, but am open
to suggestions here. Ideally, we should do we both with the skewy
setting of CONFIG_SHELL and without, given that users are equally likely
to screw this up. ;-)
Cheers,
Ralf
* lib/autoconf/general.m4 (_AC_INIT_PREPARE): Remove the leading
newline from the `trap' code to finish `config.log'; the NetBSD
/bin/sh resets the exit status after an empty command, as
documented in doc/autoconf.texi.
Reported by Dalibor Topic <address@hidden>.
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.908
diff -u -r1.908 general.m4
--- lib/autoconf/general.m4 17 Apr 2006 06:10:51 -0000 1.908
+++ lib/autoconf/general.m4 18 Apr 2006 17:16:47 -0000
@@ -1200,8 +1200,8 @@
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
-trap '
- exit_status=$?
+# WARNING: Do not start the trap code with a newline.
+trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
- Re: [GNU Autoconf 2.59c] testsuite: 75 78 89 102 failed,
Ralf Wildenhues <=