]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Address “autoconf: forbidden tokens, basic” testsuite failure
authorZack Weinberg <zack@owlfolio.org>
Thu, 21 Dec 2023 21:30:17 +0000 (16:30 -0500)
committerZack Weinberg <zack@owlfolio.org>
Thu, 21 Dec 2023 21:30:17 +0000 (16:30 -0500)
On file systems with coarse-grained timestamps, this test was broken by
<https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=713d9822bbfb2923115065efaefed34a0113f8a1>,
which changed autom4te's logic for deciding whether its output file is
newer than its cache file.  After that commit, if their modification
times are equal, the output is considered out of date.  Since both
files are created in quick succession, on file systems with coarse
timestamps (1 or 2s resolution), it is very easy for their
modification times to be equal.

As a stopgap for 2.72, in this test, force the generated configure
script’s mtime to be newer than the cache file.

* tests/tools.at (autoconf: forbidden tokens, basic): After the
  second AT_MTIME_DELAY, touch configure.

NEWS
tests/tools.at

diff --git a/NEWS b/NEWS
index 72a12671f8999ecd42052fabc4f8492bea2d7829..c3bfe3a879d577cf4c0407b27f15f63a44e278c0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -32,16 +32,11 @@ GNU Autoconf NEWS - User visible changes.
   for large files and/or timestamps after 2038 are *available*
   but not enabled by default.
 
+  This is the cause of the AC_SYS_LARGEFILE, AC_SYS_YEAR2038, and/or
+  AC_SYS_YEAR2038_RECOMMENDED testsuite failures on some systems.
   See <https://savannah.gnu.org/support/index.php?110983> for details
   and a workaround.
 
-*** “autoconf: forbidden tokens, basic” testsuite failure
-
-  We believe this is another subtle bug in autom4te’s handling of
-  timestamps that are very close together.  It only happens on some
-  operating systems and/or some file systems.  It can safely be ignored.
-  See <https://savannah.gnu.org/support/index.php?110986> for more detail.
-
 *** “Substitute and define special characters” testsuite failure
 
   We believe this to be a bug in some versions of NetBSD /bin/sh.
index 84109d6ce4c7383e2b2da25b59a8d94e803ecc36..7209ba9065b49758a9b67bd3f03894a086dd3a98 100644 (file)
@@ -474,11 +474,17 @@ configure.ac:5: error: possibly undefined macro: _AS@&t@_BAR
 configure.ac:6: error: possibly undefined macro: d@&t@nl
 ]])
 
+# On a file system with coarse timestamp resolution (1 or 2s),
+# configure and autom4te's cache files can easily have equal
+# timestamps, in which case autom4te will consider the cache
+# to be stale.  Ensure configure's timestamp is newer.
 AT_MTIME_DELAY
+touch configure
 
-# A second run (without --force) should succeed and yield only the
-# warnings about AC_INIT and AC_OUTPUT.
-AT_CHECK_M4([autoconf], 0, [],
+# Since warnings are replicated from the cache but "possibly undefined
+# macro" errors are not, a second run, without --force, should succeed
+# and should yield only the warnings about AC_INIT and AC_OUTPUT.
+AT_CHECK_M4([autoconf --verbose], 0, [],
 [[trailer.m4: warning: AC_INIT was never used
 trailer.m4: warning: AC_OUTPUT was never used
 ]])