[Top][All Lists]

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

Re: zsh variables

From: Eric Blake
Subject: Re: zsh variables
Date: Mon, 30 Mar 2009 22:18:36 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090302 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ralf Wildenhues on 3/30/2009 12:58 PM:

Hi Ralf,

> * Eric Blake wrote on Mon, Mar 30, 2009 at 07:09:34PM CEST:
>> Double-check that zsh is always in sh mode:
> This one is easy: apparently zsh doesn't unset the $argv array nor the
> $ARGC variable when it encounters `emulate sh'.  However, when sh is
> (symlinked to) zsh and started as sh, then it does not ever populate
> these variables, which may help explain why we haven't seen this before.
> One fix could be to just ignore those two variables in AT_CHECK_ENV.

Good idea.  I'm pushing this.  I'm also looking at a way to make
autoconf's testsuite much smaller, by factoring AT_CHECK_ENV and
AC_SAVE_STATE into reused contents rather than repeatedly emitting them.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -

>From e7399cdcce9ef10d80bd010376c706358adf6fe5 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 30 Mar 2009 13:28:02 -0600
Subject: [PATCH] Fix testsuite failures under zsh.

* tests/ (AT_CHECK_ENV): Exempt $argv and $ARGC, which are
set by zsh -c 'emulate sh'.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
 ChangeLog      |    5 +++++
 tests/ |    5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 43a2f56..ac19a64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-03-30  Eric Blake  <address@hidden>

+       Fix testsuite failures under zsh.
+       * tests/ (AT_CHECK_ENV): Exempt $argv and $ARGC, which are
+       set by zsh -c 'emulate sh'.
+       Reported by Ralf Wildenhues.
        For now, skip parallel tests under less-tested shells.
        * tests/ (AT_CHECK_AT): Add pre-test argument.
        (Tested programs, Startup error messages, AT_CHECK_AT_TITLE)
diff --git a/tests/ b/tests/
index dffeebf..fd451d1 100644
--- a/tests/
+++ b/tests/
@@ -295,7 +295,7 @@ m4_define([AT_CHECK_CONFIGURE],
 #   Set by AC_OUTPUT.
 # - AC_SUBST'ed variables
 #   (FIXME: Generate a list of these automatically.)
 #   Some variables some shells use and change.
 #   `.[*#?$].' catches `$#' etc. which are displayed like this:
 #      | '!'=18186
@@ -330,7 +330,8 @@ if test -f state-env.before && test -f state-env.after; then
-      address@hidden|.[*#?$].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
+      address@hidden|.[*#?$].],
      $act_file 2>/dev/null |
       # There may be variables spread on several lines; remove latter lines.
       $GREP '^m4_defn([m4_re_word])=' >clean-$act_file

reply via email to

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