Hello Patrick, Thanks for the bug report. * Patrick Welche wrote on Thu, Nov 08, 2007 at 03:55:13PM CET: > > Actually it is ./configure --help, which shouldn't try to write anything. [...] > ./torture.at:1056: ./configure --help=recursive | grep INNER > --- /dev/null 2007-11-03 15:07:29.000000000 +0000 > +++ /usr/src/local/autoconf/tests/testsuite.dir/at-stderr 2007-11-03 15:07:29. > 000000000 +0000 > @@ -0,0 +1,3 @@ > +./configure: cannot create configure.lineno: permission denied > +sed: stdout: Broken pipe > +configure: error: cannot create configure.lineno; rerun with a POSIX shell > stdout: > ./torture.at:1056: exit code was 1, expected 0 > 131. torture.at:996: 131. Configuring subdirectories (torture.at:996): FAILED (torture.at:1056) I broke that test, sorry. More precisely, I overlooked that while making the test stricter. The question is whether we should relax the test by ignoring failures that tell the user to "rerun with a POSIX shell", or whether we should relax _AS_LINENO_PREPARE to not create *.lineno if it cannot write. The latter seems rather ugly in that it requires us to somehow know when we were rerun already (presumably by some magic environment variable). So let's go for the former. It's a bit trickier than it seems at first. for example using AT_CHECK(..., [stderr]) fails when `.' is read-only, as the testsuite then can't generate the `stderr' file either. So I decided, knowing the Autotest internal detail that `stderr' is created only after the test, to go for the following game: turn the write bit back on inside the test, but after the configure command. OK to apply, even if it looks a bit ugly? Patrick, how come the `Deep package' test did not fail for you? Is that only because you used an older version? Could you try current HEAD with the patch? You can use something like make check TESTSUITEFLAGS='-k "Configuring subdirectories" -k "Deep Package"' to limit testing. For reference and general amusement, below, quoted, is the patch I used to simulate a LINENO-broken shell with a decent shell. Cheers, Ralf | diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 | index 7036c00..7095a6a 100644 | --- a/lib/m4sugar/m4sh.m4 | +++ b/lib/m4sugar/m4sh.m4 | @@ -888,7 +888,7 @@ fi | m4_define([_AS_LINENO_WORKS], | [ | as_lineno_1=$LINENO | - as_lineno_2=$LINENO | + as_lineno_2=$LINENo | test "x$as_lineno_1" != "x$as_lineno_2" && | test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2"]) | | @@ -918,16 +918,16 @@ _AS_LINENO_WORKS || { | # E. McMahon (1931-1989) for sed's syntax. :-) | sed -n ' | p | - /[[$]]LINENO/= | + /[[$]]LINEN[[oO]]/= | ' <$as_myself | | sed ' | - s/[[$]]LINENO.*/&-/ | + s/[[$]]LINEN[[oO]].*/&-/ | t lineno | b | :lineno | N | :loop | - s/[[$]]LINENO\([[^'$as_cr_alnum'_]].*\n\)\(.*\)/\2\1\2/ | + s/[[$]]LINEN[[oO]]\([[^'$as_cr_alnum'_]].*\n\)\(.*\)/\2\1\2/ | t loop | s/-\n.*// | ' >$as_me.lineno && 2007-11-08 Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> Ignore configure --help* errors due to LINENO-impaired shells. * tests/torture.at (Configuring subdirectories, Deep Package): In the --help* tests in read-only trees, make `.' temporarily writable again for the `stderr' file, and ignore errors due to the attempt to write configure.lineno. Report by Patrick Welche. diff --git a/tests/torture.at b/tests/torture.at index 354deee..63d6ef9 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -1059,7 +1059,9 @@ AT_CHECK([test -f inner/configure]) # Running the outer configure recursively should provide the innermost # help strings. chmod a-w inner/innermost inner . -AT_CHECK([./configure --help=recursive | grep INNER], 0, [ignore]) +AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep INNER], 0, + [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod u+w . inner inner/innermost # Running the outer configure should trigger the inner. @@ -1163,11 +1165,25 @@ AT_CHECK([test -f inner/innermost/config.hin]) # Running the outer configure recursively should provide the innermost # help strings. chmod a-w inner/innermost inner -AT_CHECK([./configure --help=recursive | grep " INNER "], 0, [ignore]) -AT_CHECK([./configure --help=recursive | grep " INNERMOST "], 0, [ignore]) -AT_CHECK([/bin/sh ./configure --help=recursive | grep " INNERMOST "], 0, [ignore]) -AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; /bin/sh configure --help=recursive | grep " INNERMOST "], 0, [ignore]) -AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; configure --help=recursive | grep " INNERMOST "], 0, [ignore]) +AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNER "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w . +AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w . +AT_CHECK([{ /bin/sh ./configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w . +AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { /bin/sh configure --help=recursive; chmod +w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w . +AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod u+w inner inner/innermost # Running the outer configure should trigger the inner. @@ -1179,14 +1195,25 @@ AT_CHECK([grep INNERMOST inner/innermost/config.h], 0, # The same, but from a builddir. AS_MKDIR_P([builddir]) chmod a-w builddir inner/innermost inner -AT_CHECK([cd builddir && ../configure --help=recursive | grep " INNER "], 0, [ignore]) -AT_CHECK([cd builddir && ../configure --help=recursive | grep " INNERMOST "], 0, [ignore]) -AT_CHECK([cd builddir && /bin/sh ../configure --help=recursive | grep " INNERMOST "], 0, [ignore]) +AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNER "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w builddir +AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w builddir +AT_CHECK([cd builddir && { /bin/sh ../configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) +chmod a-w builddir # Not all shells search $PATH for scripts. if (cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure --help) >/dev/null 2>&1; then AT_CHECK([cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure --help=recursive | grep " INNERMOST "], 0, [ignore]) fi -AT_CHECK([PATH=`pwd`$PATH_SEPARATOR$PATH; export PATH; cd builddir && configure --help=recursive | grep " INNERMOST "], 0, [ignore]) +AT_CHECK([PATH=`pwd`$PATH_SEPARATOR$PATH; export PATH; cd builddir && { configure --help=recursive; chmod u+w .; } | grep " INNERMOST "], + 0, [ignore], [stderr], + [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])]) chmod u+w builddir inner inner/innermost AT_CHECK([cd builddir && ../configure INNERMOST=build/tsomrenni], 0, [ignore]) AT_CHECK([grep INNERMOST builddir/inner/innermost/config.h], 0, _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf