Fix zsh-related testsuite failures

View: New views
3 Messages — Rating Filter:   Alert me  

Fix zsh-related testsuite failures

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm seeing three failures on i386-unknown-freebsd6.4 due to $SHELL being
zsh.  Two are fixed with the patch below, OK?

I haven't analyzed test 92 yet, but I have an unusual setup in that zsh
is my $SHELL but is not in PATH, which I have trimmed so that few GNU
tools are found.

Thanks,
Ralf

92. m4sh.at:1272: testing ...
+ cat
+ set +x
../../autoconf/tests/m4sh.at:1286: autom4te --language=m4sh script.as -o script
+ autom4te '--language=m4sh' script.as -o script
+ set +x
../../autoconf/tests/m4sh.at:1287: $CONFIG_SHELL ./script
+ ./script
stdout:
hello from parent
SHELL=/usr/local/bin/zsh
+ set +x
../../autoconf/tests/m4sh.at:1288: grep 'SHELL=.' stdout
+ grep 'SHELL=.' stdout
stdout:
SHELL=/usr/local/bin/zsh
+ sed s/parent/child/
+ set +x
../../autoconf/tests/m4sh.at:1290: ./child
+ ./child
+ SHELL=/bogus
+ export SHELL
+ cp stdout expout
+ mv child child.bak
+ set +x
../../autoconf/tests/m4sh.at:1295: $CONFIG_SHELL ./script
+ ./script
--- expout      2009-10-31 15:30:52.011100121 +0000
+++ /home/rwild/ac/build-i386-unknown-freebsd6.4/tests/testsuite.dir/at-groups/92/stdout        2009-10-31 15:30:52.224787682 +0000
@@ -1,2 +1,2 @@
 hello from parent
-SHELL=/usr/local/bin/zsh
+SHELL=/bin/sh
92. m4sh.at:1272:  FAILED (m4sh.at:1295)


#                             -*- compilation -*-
355. acprograms.at:13: testing ...
[...]
../../autoconf/tests/acprograms.at:13: $at_diff "at_config_vars-state-env.r1" "at_config_vars-state-env.r2"
--- /dev/null   2009-10-31 02:48:05.636200830 +0000
+++ /home/rwild/ac/build-i386-unknown-freebsd6.4/tests/testsuite.dir/at-groups/355/stdout       2009-10-31 02:48:06.060610721 +0000
@@ -0,0 +1,11 @@
+--- at_config_vars-state-env.r1        2009-10-31 02:48:06.034876350 +0000
++++ at_config_vars-state-env.r2        2009-10-31 02:48:06.044170767 +0000
+@@ -82,7 +82,7 @@
+ ac_cv_env_target_alias_set=''
+ ac_cv_env_target_alias_value=''
+ ac_cv_prog_AWK=nawk
+-argv=(dummy nawk)
++argv=(dummy gawk)
+ bindir='${exec_prefix}/bin'
+ cache_file=config.cache
+ cross_compiling=no
../../autoconf/tests/acprograms.at:13: exit code was 1, expected 0


#                             -*- compilation -*-
364. acprograms.at:22: testing ...
[...]
../../autoconf/tests/acprograms.at:22: $at_diff "at_config_vars-state-env.r1" "a
t_config_vars-state-env.r2"
--- /dev/null   2009-10-31 02:50:15.619076063 +0000
+++ /home/rwild/ac/build-i386-unknown-freebsd6.4/tests/testsuite.dir/at-groups/3
64/stdout       2009-10-31 02:50:16.831991916 +0000
@@ -0,0 +1,17 @@
+--- at_config_vars-state-env.r1        2009-10-31 02:50:16.791436509 +0000
++++ at_config_vars-state-env.r2        2009-10-31 02:50:16.803745233 +0000
+@@ -1,4 +1,4 @@
+-ARGC=2
++ARGC=3
+ BLOCKSIZE=K
+ COLUMNS=80
+ CONFIG_SHELL=/usr/local/bin/zsh


commit 6ed1f188616693bc12c08bd26652da2a09db3c80
Author: Ralf Wildenhues <Ralf.Wildenhues@...>
Date:   Sat Oct 31 16:39:44 2009 +0100

    Fix testsuite failures with SHELL=zsh.
   
    * tests/statesave.m4 (AC_STATE_SAVE): Ignore argv and ARGC when
    comparing configure variables.
   
    Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@...>

diff --git a/ChangeLog b/ChangeLog
index 31b805a..e29e53b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-31  Ralf Wildenhues  <Ralf.Wildenhues@...>
+
+ Fix testsuite failures with SHELL=zsh.
+ * tests/statesave.m4 (AC_STATE_SAVE): Ignore argv and ARGC when
+ comparing configure variables.
+
 2009-10-31  Eric Blake  <ebb9@...>
 
  Fix cross-manual link to gcc.
diff --git a/tests/local.at b/tests/local.at
index 53c1d6f..37ed3ea 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -336,6 +336,8 @@ fi
 # - RANDOM [zsh]
 # - SECONDS [zsh]
 # - '$' [zsh]
+# - argv [zsh]
+# - ARGC [zsh]
 #
 # Furthermore, it is okay for a non-cache variable initialized to empty in one
 # run to be unset in another run.  This happens when, for example, cache update
@@ -358,6 +360,8 @@ do
  /^RANDOM=/ d
  /^SECONDS=/ d
  /'\'\\\$\''=/ d
+ /^argv=/ d
+ /^ARGC=/ d
  ' $act_file >at_config_vars-$act_file
 done
 AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl



Re: Fix zsh-related testsuite failures

by Eric Blake :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 10/31/2009 9:40 AM:
> I'm seeing three failures on i386-unknown-freebsd6.4 due to $SHELL being
> zsh.  Two are fixed with the patch below, OK?

Yes, please apply.

> stdout:
> SHELL=/usr/local/bin/zsh
> + sed s/parent/child/
> + set +x
> ../../autoconf/tests/m4sh.at:1290: ./child
> + ./child
> + SHELL=/bogus
> + export SHELL
> + cp stdout expout
> + mv child child.bak
> + set +x
> ../../autoconf/tests/m4sh.at:1295: $CONFIG_SHELL ./script
> + ./script

So SHELL was zsh, but CONFIG_SHELL was unset; later, when we play with
SHELL, we lose out on the fact that it used to be zsh, and our setting of
/bogus means the parent script is run with the wrong shell.  I'm not sure
if that is a bug in the testsuite or in m4sh.

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

Eric Blake             ebb9@...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrwK+sACgkQ84KuGfSFAYCt2QCg2bzkXizqgYDrsqljYOeoU1ub
oXYAoJuzThav7Etq5MhORF72/J1H71uI
=JNO+
-----END PGP SIGNATURE-----



Re: Fix zsh-related testsuite failures

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Eric Blake wrote on Tue, Nov 03, 2009 at 02:11:07PM CET:
> According to Ralf Wildenhues on 10/31/2009 9:40 AM:
> > I'm seeing three failures on i386-unknown-freebsd6.4 due to $SHELL being
> > zsh.  Two are fixed with the patch below, OK?
>
> Yes, please apply.

Thanks, done.

> > stdout:
> > SHELL=/usr/local/bin/zsh
> > + sed s/parent/child/
> > + set +x
> > ../../autoconf/tests/m4sh.at:1290: ./child
> > + ./child
> > + SHELL=/bogus
> > + export SHELL
> > + cp stdout expout
> > + mv child child.bak
> > + set +x
> > ../../autoconf/tests/m4sh.at:1295: $CONFIG_SHELL ./script
> > + ./script
>
> So SHELL was zsh, but CONFIG_SHELL was unset; later, when we play with
> SHELL, we lose out on the fact that it used to be zsh, and our setting of
> /bogus means the parent script is run with the wrong shell.  I'm not sure
> if that is a bug in the testsuite or in m4sh.

Probably a bug in the testsuite.  We currently document that
  $some_whell ./script

should only be used in conjunction with adding
  CONFIG_SHELL=$some_shell

to the environment of ./script.

Note that adding
  export CONFIG_SHELL

to atlocal is the right solution only iff all m4sh (and thus configure)
script invocation inside the testsuite really use $CONFIG_SHELL to start
the script.  Sigh.

Cheers,
Ralf