From f783dd434a077305ea5d1edb0d928f233736aadf Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 26 Aug 2020 15:15:34 -0400 Subject: =?UTF-8?q?Add=20=E2=80=98START=5FTIME=E2=80=99=20and=20=E2=80=98T?= =?UTF-8?q?oD=E2=80=99=20to=20shell=20variable=20filter=20list.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NetBSD sh has invented more magic shell variables with values related to the current time: ‘START_TIME’ and ‘ToD’. Like ‘SECONDS’, these can cause spurious testsuite failures and should be filtered out when checking for undesirable changes to the environment. * tests/local.at (_AT_CHECK_ENV, AT_CONFIG_CMP): Add shell variables START_TIME and ToD to filter list. --- tests/local.at | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/local.at b/tests/local.at index 0fe1c343..a875b5e0 100644 --- a/tests/local.at +++ b/tests/local.at @@ -326,7 +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 +# |START_TIME|ToD|_AST_FEATURES # Some variables some shells use and change. # `.[*#?$].' catches `$#' etc. which are displayed like this: # | '!'=18186 @@ -377,7 +377,7 @@ if test -f state-env.before && test -f state-env.after; then [GREP|[EF]GREP|SED], [[_@]|.[*#?$].], [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM], - [SECONDS|_AST_FEATURES]))=' \ + [SECONDS|START_TIME|ToD|_AST_FEATURES]))=' \ $act_file || test $? -eq 1 || echo failed >&2 ) 2>stderr-$act_file | @@ -408,6 +408,8 @@ fi # - PPID [bash, zsh] # - RANDOM [bash, zsh] # - SECONDS [bash, zsh] +# - START_TIME [NetBSD sh] +# - ToD [NetBSD sh] # - '$' [zsh] # - argv [zsh] # - ARGC [zsh] @@ -437,6 +439,8 @@ do /^PPID=/ d /^RANDOM=/ d /^SECONDS=/ d + /^START_TIME=/ d + /^ToD=/ d /'\'\\\$\''=/ d /^argv=/ d /^ARGC=/ d -- cgit v1.2.1