diff options
author | Zack Weinberg <zackw@panix.com> | 2020-07-27 11:37:53 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-08-04 13:05:49 -0400 |
commit | 2cb0ab81b975f0f69ca90c57e5a3b7ea5de26e5f (patch) | |
tree | 78af68b799f8316b46240164c2bebfcc3b0b9bca | |
parent | 50d06060f1ec58c957d65244a71d6d10070112cd (diff) | |
download | autoconf-2cb0ab81b975f0f69ca90c57e5a3b7ea5de26e5f.tar.gz |
Filter out _AST_FEATURES when comparing environment state. (#110283)
ksh93 uses an environment variable called _AST_FEATURES to communicate
with subshell instances of itself. Its value may change at any time
so AT_CHECK_ENV and AT_CONFIG_CMP should ignore it.
This was responsible for many spurious testsuite failures on
OpenIndiana. Problem reported by Bob Friesenhahn.
* tests/local.at (_AT_CHECK_ENV, AT_CONFIG_CMP): Add _AST_FEATURES to
list of variables set by shells to unstable values.
-rw-r--r-- | tests/local.at | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/local.at b/tests/local.at index 308eae32..4b2966b0 100644 --- a/tests/local.at +++ b/tests/local.at @@ -326,6 +326,7 @@ m4_define([AT_CHECK_CONFIGURE], # - AC_SUBST'ed variables # (FIXME: Generate a list of these automatically.) # - _|@|.[*#?$].|argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS +# |_AST_FEATURES # Some variables some shells use and change. # `.[*#?$].' catches `$#' etc. which are displayed like this: # | '!'=18186 @@ -375,7 +376,8 @@ if test -f state-env.before && test -f state-env.after; then [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC], [GREP|[EF]GREP|SED], [[_@]|.[*#?$].], - [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \ + [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM], + [SECONDS|_AST_FEATURES]))=' \ $act_file || test $? -eq 1 || echo failed >&2 ) 2>stderr-$act_file | @@ -401,12 +403,18 @@ fi # M4sh's shell name space. # - ^ac_, excluding ^ac_cv_ # Autoconf's private shell name space. -# - PPID [bash, zsh] -# - RANDOM [zsh] -# - SECONDS [zsh] -# - '$' [zsh] -# - argv [zsh] -# - ARGC [zsh] +# - Variables with unstable values in at least some shells: +# - OLDPWD [bash, zsh] +# - PPID [bash, zsh] +# - RANDOM [bash, zsh] +# - SECONDS [bash, zsh] +# - '$' [zsh] +# - argv [zsh] +# - ARGC [zsh] +# - BASH_ARGC [bash] +# - BASH_ARGV [bash] +# - LINENO [Posix] +# - _AST_FEATURES [ksh93] # # 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 @@ -435,6 +443,7 @@ do /^BASH_ARGC=/ d /^BASH_ARGV=/ d /^LINENO=/ d + /^_AST_FEATURES=/ d ' $act_file >at_config_vars-$act_file done AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl |