diff options
| author | Jacob Bachmeyer <jcb@gnu.org> | 2026-04-20 21:00:12 -0500 |
|---|---|---|
| committer | Jacob Bachmeyer <jcb@gnu.org> | 2026-04-20 21:00:12 -0500 |
| commit | 12ec17e7f192febdf4a316e5bffd1a5d4a9ea698 (patch) | |
| tree | c7f774644bcdb4acb75d4b1e370e38e76f55d333 | |
| parent | 90ffbb7db86494641f9578e953575befb8dadca6 (diff) | |
| download | dejagnu-master.tar.gz dejagnu-master.tar.bz2 dejagnu-master.zip | |
| -rw-r--r-- | ChangeLog | 9 | ||||
| -rw-r--r-- | NEWS | 6 | ||||
| -rw-r--r-- | runtest.exp | 29 |
3 files changed, 43 insertions, 1 deletions
@@ -1,3 +1,12 @@ +2026-04-20 Jacob Bachmeyer <jcb@gnu.org> + + * NEWS: Add item for using POSIX locale and unsetting user + customization environment variables. + + * runtest.exp: Add logic for erasing environment variables that + are used for user customization and therefore should not be + inherited into testsuites. + 2026-04-02 Jacob Bachmeyer <jcb@gnu.org> PR80674 @@ -1,5 +1,11 @@ -*- text -*- +Changes since 1.6.3: + + X. DejaGnu now always runs in the POSIX locale. Additionally, environment + variables such as CDPATH that are widely-known and intended for user + customization are unset during early initialization. + Changes since 1.6.2: 1. The internal proc 'is_remote' has been renamed to 'isremote' for diff --git a/runtest.exp b/runtest.exp index a10e275..f4e45ae 100644 --- a/runtest.exp +++ b/runtest.exp @@ -1,5 +1,5 @@ # runtest.exp -- Test framework driver -# Copyright (C) 1992-2019, 2020, 2022, 2023, 2024 +# Copyright (C) 1992-2019, 2020, 2022, 2023, 2024, 2026 # Free Software Foundation, Inc. # # This file is part of DejaGnu. @@ -111,6 +111,33 @@ set env(CCACHE_DISABLE) 1 unset -nocomplain env(CCACHE_NODISABLE) # +# Unset user-specific environment variables +# +# The first group are listed in the GNU Autoconf manual; the rest are from +# a list given by POSIX. +foreach enpat { + CDPATH CLICOLOR_FORCE ENV MAIL MAILPATH PS1 PS2 PS4 + FPATH GREP_OPTIONS IFS + + EDITOR FCEDIT LISTER MORE PAGER VISUAL + + CHARSET EXINIT PROCLANG HISTFILE HISTORY HISTSIZE LPDEST PRINTER + + MAILCHECK MBOX MSGVERB OPTARG OPTERR OPTIND PS3 +} { array unset env $enpat } +# ... and select POSIX locale +# +# The first group are the variables defined by POSIX; the second group are +# GNU extensions. +foreach locvar { + LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC + LC_TIME + + LANGUAGE LC_ADDRESS LC_IDENTIFICATION LC_MEASUREMENT LC_NAME LC_PAPER + LC_TELEPHONE +} { set env($locvar) C } + +# # some convenience abbreviations # set hex "0x\[0-9A-Fa-f\]+" |
