]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Do not write to testsuite log fd before initialization.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 8 Oct 2008 05:24:06 +0000 (07:24 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 8 Oct 2008 05:24:06 +0000 (07:24 +0200)
* lib/autotest/general.m4 (AS_MESSAGE_LOG_FD, AT_JOB_FIFO_FD):
Define fds only when initializing the log fd so early error
messages do not try to write to it.
* tests/autotest.at (Startup error messages): New test.
* NEWS: Document this 2.63 regression.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
lib/autotest/general.m4
tests/autotest.at

index f072ae4fb81d135a196d8d14216afc81e840c546..97f075487bbe220ac4baeb39e930ae747690ebdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-10-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Do not write to testsuite log fd before initialization.
+       * lib/autotest/general.m4 (AS_MESSAGE_LOG_FD, AT_JOB_FIFO_FD):
+       Define fds only when initializing the log fd so early error
+       messages do not try to write to it.
+       * tests/autotest.at (Startup error messages): New test.
+       * NEWS: Document this 2.63 regression.
+
 2008-10-07  Eric Blake  <ebb9@byu.net>
 
        Ensure _AS_CLEANUP is defined.
diff --git a/NEWS b/NEWS
index 01561274df9097fe3e98fb418a03fa2b1af5b21f..b1de684bcce6f0fdfb98039f48288f76619f8cf3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ GNU Autoconf NEWS - User visible changes.
 
 ** Autotest testsuites accept an option --jobs[=N] for parallel testing.
 
+** Autotest testsuites do not attempt to write startup error messages
+   to the log file before that is opened (regression introduced in 2.63).
+
 ** The following m4sugar macros are new:
    m4_default_quoted
 
index f1966cec807375745b4aa0f8b2929ba5002ea654..d19f9d9ccd7c45593467320ffb2a7250b4ce7ca0 100644 (file)
@@ -215,9 +215,6 @@ m4_define([AT_groups_all], [])
 m4_define([AT_help_all], [])
 m4_foreach([AT_name], [_AT_DEFINE_INIT_LIST], [m4_popdef(m4_defn([AT_name]))])
 m4_wrap([_AT_FINISH])
-dnl Define FDs.
-m4_define([AS_MESSAGE_LOG_FD], [5])
-m4_define([AT_JOB_FIFO_FD], [6])
 AS_INIT[]dnl
 m4_divert_push([DEFAULTS])dnl
 AT_COPYRIGHT(
@@ -892,8 +889,9 @@ PATH=$at_new_path
 export PATH
 
 # Setting up the FDs.
-# 5 is the log file.  Not to be overwritten if `-d'.
-dnl FDs are defined earlier in this file.
+m4_define([AS_MESSAGE_LOG_FD], [5])
+m4_define([AT_JOB_FIFO_FD], [6])
+[#] AS_MESSAGE_LOG_FD is the log file.  Not to be overwritten if `-d'.
 if $at_debug_p; then
   at_suite_log=/dev/null
 else
index 3547ee41cff0841f84f2153e5f877be6f7995cc9..4361d07555583d1fdef8440e4b4d7d325ac9b40d 100644 (file)
@@ -216,6 +216,14 @@ AT_TESTED([autoconf])
 autom4te --version
 ]])])
 
+AT_CHECK_AT([Startup error messages],
+[[AT_INIT([[suite]])
+AT_SETUP([only test])
+AT_CHECK([:])
+AT_CLEANUP
+]], [], [], [], [],
+[AT_CHECK([sed -n '/exec AS_MESSAGE_LOG_FD/q; />&AS_MESSAGE_LOG_FD/p' < micro-suite])])
+
 ## ----------------------------------------------------- ##
 ## Newlines and command substitutions in test commands.  ##
 ## ----------------------------------------------------- ##