autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.63b autotest vs. bison testsuite


From: Eric Blake
Subject: Re: 2.63b autotest vs. bison testsuite
Date: Mon, 6 Apr 2009 18:16:28 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> Ouch.  Two bugs here.  First, autoconf 2.63b botches the testsuite if the 
> AT_CHECK consists of [#] and $ in the same test - it underquotes the user's 
#, 
> such that the rest of the line is treated as an m4 comment.  I'm still 
working 
> on how to patch this one, but suspect it was introduced at 
> http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=abe172

Well, that patch was indeed the cause of a regression.  However, bison was 
lucky that it was not using a shell comment, which is broken even in 2.63.  
Here's the patch I'm considering which fixes not only the regression, but also 
the original bug in handling shell comments, although I'm not sure if my 
wording in NEWS is the best.


From: Eric Blake <address@hidden>
Date: Mon, 6 Apr 2009 12:13:02 -0600
Subject: [PATCH] Handle shell comments in AT_CHECK.

* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Avoid creating
m4 comment via underquotation.  Regression introduced 2008-11-20.
* tests/autotest.at (Shell comment in command): New test.
* NEWS: Document the fix.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog               |    8 ++++++++
 NEWS                    |    7 +++++++
 lib/autotest/general.m4 |    2 +-
 tests/autotest.at       |    6 ++++++
 4 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4167163..d24732c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-06  Eric Blake  <address@hidden>
+
+       Handle shell comments in AT_CHECK.
+       * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Avoid creating
+       m4 comment via underquotation.  Regression introduced 2008-11-20.
+       * tests/autotest.at (Shell comment in command): New test.
+       * NEWS: Document the fix.
+
 2009-03-02  Eric Blake  <address@hidden>

        Silence AC_CACHE_VAL if not part of AC_MSG sequence.
diff --git a/NEWS b/NEWS
index 23110ac..e91fc39 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
 GNU Autoconf NEWS - User visible changes.

+* Major changes in Autoconf 2.64 (2009-??-??) [stable]
+  Released by Eric Blake, based on git versions 2.63b.*.
+
+** Ensure AT_CHECK can support commands that include a # given with
+   proper m4 quoting.  For shell comments, this is a new feature; for
+   non-shell comments, this fixes a regression introduced in 2.63b.
+
 * Major changes in Autoconf 2.63b (2009-03-31) [beta]
   Released by Eric Blake, based on git versions 2.63.*.

diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 7705854..11a067c 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -1997,7 +1997,7 @@ at_fn_check_prepare_notrace],
 dnl We know at build time that tracing COMMANDS is always safe.
 [[at_fn_check_prepare_trace],]dnl
 dnl COMMANDS may contain parameter expansions; expand them at runtime.
-[[at_fn_check_prepare_dynamic "AS_ESCAPE([$1], [`\"])"])[]]dnl
+[[at_fn_check_prepare_dynamic "AS_ESCAPE([[$1]], [`\"])"])[]]dnl
 [_m4_popdef([at_reason])])


diff --git a/tests/autotest.at b/tests/autotest.at
index a49ea1b..c5a8b58 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -322,6 +322,12 @@ bar
   [AT_NO_CMDSUBST])


+AT_CHECK_AT_TEST([Shell comment in command],
+  [my_echo=echo
+   AT_CHECK([$my_echo one [#] two], [], [one
+])])
+
+
 ## ------------------------- ##
 ## ${...} in test commands.  ##
 ## ------------------------- ##
-- 
1.6.1.2







reply via email to

[Prev in Thread] Current Thread [Next in Thread]