glibc/debug
Joseph Myers 2bf1804182 Include LOCPATH in default test environment.
Tests run using the default $(make-test-out) automatically get
GCONV_PATH and LC_ALL set, whether or not those environment variables
are actually needed for the individual test.  However, they do not get
LOCPATH set, meaning that a large number of tests have -ENV settings
just to set LOCPATH.

This patch moves LOCPATH into the default environment used for all
tests, on the principle that like GCONV_PATH any settings needed to
use files associated with the newly built library, rather than any old
installed files, are appropriate to use by default.

A further motivation is that various tests using .sh files also set
some combination of LC_ALL, GCONV_PATH and LOCPATH.  Preferably .sh
files should also use the default environment with any additions
required for the individual test.  Now, it was suggested in
<https://sourceware.org/ml/libc-alpha/2014-05/msg00715.html> that
various Makefile variables used in testing should be derived by
composing the -before-env and -after-env variables used when explicit
environment settings are required.  With such a change, it's also
natural for those variables to include the default settings (via some
intermediate makefile variable also used in make-test-out).

Because some .sh files only set variables that correspond to the
default settings, or a subset thereof, and this applies to more of the
.sh files once LOCPATH is in the default settings, doing so reduces
the size of a revised version of
<https://sourceware.org/ml/libc-alpha/2014-05/msg00596.html>: scripts
only needing the (expanded) default settings will not need to receive
the separate -before-env and -after-env variables, only the single
variable they do at present.  So moving LOCPATH into the default
settings can reduce churn caused by subsequent patches.

Tested x86_64 and x86.

	* Rules (make-test-out): Include
	LOCPATH=$(common-objpfx)localedata in default environment.
	* debug/Makefile (tst-chk1-ENV): Remove variable.
	(tst-chk2-ENV): Likewise.
	(tst-chk3-ENV): Likewise.
	(tst-chk4-ENV): Likewise.
	(tst-chk5-ENV): Likewise.
	(tst-chk6-ENV): Likewise.
	(tst-lfschk1-ENV): Likewise.
	(tst-lfschk2-ENV): Likewise.
	(tst-lfschk3-ENV): Likewise.
	(tst-lfschk4-ENV): Likewise.
	(tst-lfschk5-ENV): Likewise.
	(tst-lfschk6-ENV): Likewise.
	* iconvdata/Makefile (bug-iconv6-ENV): Likewise.
	(tst-iconv7-ENV): Likewise.
	* intl/Makefile (LOCPATH-ENV): Likewise.
	(tst-codeset-ENV): Likewise.
	(tst-gettext3-ENV): Likewise.
	(tst-gettext5-ENV): Likewise.
	* libio/Makefile (tst-widetext-ENV): Don't set LOCPATH.
	(tst-fopenloc-ENV): Likewise.
	(tst-fgetws-ENV): Remove variable.
	(tst-ungetwc1-ENV): Likewise.
	(tst-ungetwc2-ENV): Likewise.
	(bug-ungetwc2-ENV): Likewise.
	(tst-swscanf-ENV): Likewise.
	(bug-ftell-ENV): Likewise.
	(tst-fgetwc-ENV): Likewise.
	(tst-fseek-ENV): Likewise.
	(tst-ftell-partial-wide-ENV): Likewise.
	(tst-ftell-active-handler-ENV): Likewise.
	(tst-ftell-append-ENV): Likewise.
	* posix/Makefile (tst-fnmatch-ENV): Likewise.
	(tst-regexloc-ENV): Likewise.
	(bug-regex1-ENV): Likewise.
	(tst-regex-ENV): Likewise.
	(tst-regex2-ENV): Likewise.
	(bug-regex5-ENV): Likewise.
	(bug-regex6-ENV): Likewise.
	(bug-regex17-ENV): Likewise.
	(bug-regex18-ENV): Likewise.
	(bug-regex19-ENV): Likewise.
	(bug-regex20-ENV): Likewise.
	(bug-regex22-ENV): Likewise.
	(bug-regex23-ENV): Likewise.
	(bug-regex25-ENV): Likewise.
	(bug-regex26-ENV): Likewise.
	(bug-regex30-ENV): Likewise.
	(bug-regex32-ENV): Likewise.
	(bug-regex33-ENV): Likewise.
	(bug-regex34-ENV): Likewise.
	(bug-regex35-ENV): Likewise.
	(tst-rxspencer-ENV): Likewise.
	(tst-rxspencer-no-utf8-ENV): Likewise.
	* stdio-common/Makefile (tst-sprintf-ENV): Likewise.
	(tst-sscanf-ENV): Likewise.
	(tst-swprintf-ENV): Likewise.
	(tst-swscanf-ENV): Likewise.
	(test-vfprintf-ENV): Likewise.
	(scanf13-ENV): Likewise.
	(bug14-ENV): Likewise.
	(tst-grouping-ENV): Likewise.
	* stdlib/Makefile (tst-strtod-ENV): Likewise.
	(tst-strtod3-ENV): Likewise.
	(tst-strtod4-ENV): Likewise.
	(tst-strtod5-ENV): Likewise.
	(testmb2-ENV): Likewise./
	* string/Makefile (tst-strxfrm-ENV): Likewise.
	(tst-strxfrm2-ENV): Likewise.
	(bug-strcoll1-ENV): Likewise.
	(test-strcasecmp-ENV): Likewise.
	(test-strncasecmp-ENV): Likewise.
	* time/Makefile (tst-strptime-ENV): Likewise.
	(tst-ftime_l-ENV): Likewise.
	* wcsmbs/Makefile (tst-btowc-ENV): Likewise.
	(tst-mbrtowc-ENV): Likewise.
	(tst-wcrtomb-ENV): Likewise.
	(tst-mbrtowc2-ENV): Likewise.
	(tst-c16c32-1-ENV): Likewise.
	(tst-mbsnrtowcs-ENV): Likewise.

localedata/ChangeLog:
	* Makefile (TEST_MBWC_ENV): Remove variable.
	(tst_iswalnum-ENV): Likewise.
	(tst_iswalpha-ENV): Likewise.
	(tst_iswcntrl-ENV): Likewise.
	(tst_iswctype-ENV): Likewise.
	(tst_iswdigit-ENV): Likewise.
	(tst_iswgraph-ENV): Likewise.
	(tst_iswlower-ENV): Likewise.
	(tst_iswprint-ENV): Likewise.
	(tst_iswpunct-ENV): Likewise.
	(tst_iswspace-ENV): Likewise.
	(tst_iswupper-ENV): Likewise.
	(tst_iswxdigit-ENV): Likewise.
	(tst_mblen-ENV): Likewise.
	(tst_mbrlen-ENV): Likewise.
	(tst_mbrtowc-ENV): Likewise.
	(tst_mbsrtowcs-ENV): Likewise.
	(tst_mbstowcs-ENV): Likewise.
	(tst_mbtowc-ENV): Likewise.
	(tst_strcoll-ENV): Likewise.
	(tst_strfmon-ENV): Likewise.
	(tst_strxfrm-ENV): Likewise.
	(tst_swscanf-ENV): Likewise.
	(tst_towctrans-ENV): Likewise.
	(tst_towlower-ENV): Likewise.
	(tst_towupper-ENV): Likewise.
	(tst_wcrtomb-ENV): Likewise.
	(tst_wcscat-ENV): Likewise.
	(tst_wcschr-ENV): Likewise.
	(tst_wcscmp-ENV): Likewise.
	(tst_wcscoll-ENV): Likewise.
	(tst_wcscpy-ENV): Likewise.
	(tst_wcscspn-ENV): Likewise.
	(tst_wcslen-ENV): Likewise.
	(tst_wcsncat-ENV): Likewise.
	(tst_wcsncmp-ENV): Likewise.
	(tst_wcsncpy-ENV): Likewise.
	(tst_wcspbrk-ENV): Likewise.
	(tst_wcsrtombs-ENV): Likewise.
	(tst_wcsspn-ENV): Likewise.
	(tst_wcsstr-ENV): Likewise.
	(tst_wcstod-ENV): Likewise.
	(tst_wcstok-ENV): Likewise.
	(tst_wcstombs-ENV): Likewise.
	(tst_wcswidth-ENV): Likewise.
	(tst_wcsxfrm-ENV): Likewise.
	(tst_wctob-ENV): Likewise.
	(tst_wctomb-ENV): Likewise.
	(tst_wctrans-ENV): Likewise.
	(tst_wctype-ENV): Likewise.
	(tst_wcwidth-ENV): Likewise.
	(tst-digits-ENV): Likewise.
	(tst-mbswcs6-ENV): Likewise.
	(tst-xlocale1-ENV): Likewise.
	(tst-xlocale2-ENV): Likewise.
	(tst-strfmon1-ENV): Likewise.
	(tst-strptime-ENV): Likewise.
	(tst-setlocale-ENV): Don't set LOCPATH.
	(bug-iconv-trans-ENV): Remove variable.
	(tst-sscanf-ENV): Likewise.
	(tst-leaks-ENV): Don't set LOCPATH.
	(bug-setlocale1-ENV): Remove variable.
	(bug-setlocale1-static-ENV): Likewise.
	(tst-setlocale2-ENV): Likewise.
2014-06-04 23:37:25 +00:00
..
Depend * stdlib/bits/stdlib.h: New file. 2005-07-13 06:09:58 +00:00
Makefile Include LOCPATH in default test environment. 2014-06-04 23:37:25 +00:00
Versions Move getlogin_r_chk to login/ subdir. 2013-05-06 15:58:44 -07:00
asprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
backtrace-tst.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
backtrace.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
backtracesyms.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
backtracesymsfd.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
catchsegv.sh Update remaining copyright dates 2014-01-01 22:02:55 +10:00
chk_fail.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
confstr_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
execinfo.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fdelt_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fgets_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fgets_u_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fgetws_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fgetws_u_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fortify_fail.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fread_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
fread_u_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
fwprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getcwd_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getdomainname_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getgroups_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
gethostname_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gets_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getwd_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
longjmp_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mbsnrtowcs_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
mbsrtowcs_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
mbstowcs_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
memcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
memmove_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
mempcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
memset_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
noophooks.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
obprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pcprofile.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pcprofiledump.c Update remaining copyright dates 2014-01-01 22:02:55 +10:00
poll_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ppoll_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pread64_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
pread_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
printf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
read_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readlink_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readlinkat_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
readonly-area.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
realpath_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
recv_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
recvfrom_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
segfault.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
snprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stack_chk_fail.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stack_chk_fail_local.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
stpncpy_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcat_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strncat_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strncpy_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
swprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-stpcpy_chk-ifunc.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-stpcpy_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcpy_chk-ifunc.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcpy_chk.c tests: unify fortification handler logic 2014-02-08 06:58:43 -05:00
tst-backtrace.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-backtrace2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-backtrace3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-backtrace4.c tst-backtrace4: expand output even on failures 2014-02-08 07:01:38 -05:00
tst-backtrace5.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-backtrace6.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-chk1.c tests: unify fortification handler logic 2014-02-08 06:58:43 -05:00
tst-chk2.c 2004-10-15 Jakub Jelinek <jakub@redhat.com> 2004-10-18 04:17:19 +00:00
tst-chk3.c 2004-10-15 Jakub Jelinek <jakub@redhat.com> 2004-10-18 04:17:19 +00:00
tst-chk4.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-chk5.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-chk6.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-lfschk1.c * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t 2005-03-20 16:51:05 +00:00
tst-lfschk2.c * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t 2005-03-20 16:51:05 +00:00
tst-lfschk3.c * posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t 2005-03-20 16:51:05 +00:00
tst-lfschk4.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-lfschk5.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-lfschk6.cc * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+. 2007-09-15 02:38:04 +00:00
tst-longjmp_chk.c tests: unify fortification handler logic 2014-02-08 06:58:43 -05:00
tst-longjmp_chk2.c tst-longjmp_chk2: add comments/sanity check 2014-03-13 17:05:29 -04:00
tst-longjmp_chk3.c tst-longjmp_chk3: new test for checking sigaltstack edge cases 2014-02-08 06:59:13 -05:00
ttyname_r_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vasprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vdprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vfprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vfwprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vsnprintf_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
vsprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
vswprintf_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
vwprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
warning-nop.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcpcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcpncpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcrtomb_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcscat_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcscpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcsncat_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcsncpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcsnrtombs_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcsrtombs_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wcstombs_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wctomb_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wmemcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wmemmove_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wmempcpy_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wmemset_chk.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
wprintf_chk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xtrace.sh Update remaining copyright dates 2014-01-01 22:02:55 +10:00