From 3fbfb13e7a846e98fa931b2bce373b5b2364a11b Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 21 Dec 2023 16:30:17 -0500 Subject: [PATCH] =?UTF-8?q?Address=20=E2=80=9Cautoconf:=20forbidden=20toke?= =?UTF-8?q?ns,=20basic=E2=80=9D=20testsuite=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On file systems with coarse-grained timestamps, this test was broken by , 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 | 9 ++------- tests/tools.at | 12 +++++++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 72a12671..c3bfe3a8 100644 --- 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 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 for more detail. - *** “Substitute and define special characters” testsuite failure We believe this to be a bug in some versions of NetBSD /bin/sh. diff --git a/tests/tools.at b/tests/tools.at index 84109d6c..7209ba90 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -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 ]])