Commit Graph

27465 Commits

Author SHA1 Message Date
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
Ondřej Bílka cd1fb60464 Fix typo in manual. 2014-06-05 01:13:04 +02:00
David S. Miller 902b71f9af Fixup ChangeLog and add missing NEWS entry for previous commits. 2014-06-03 16:14:06 -07:00
Guo Yixuan 196939fb0e New test for pthread_spin_lock (bug 16882)
* nptl/tst-spin4.c: New test.
	* nptl/Makefile (tests): Add tst-spin4.
2014-06-03 16:10:48 -07:00
Guo Yixuan b42eca7d39 Fixed pthread_spin_lock on sparc32/64 (bug 16882)
[BZ #16882]
	* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
	(pthread_spin_lock): Branch out of spin loop to proper location.
	* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
	(pthread_spin_lock): Likewise.
2014-06-03 16:10:48 -07:00
Andreas Schwab f9d2d03254 Fix invalid file descriptor reuse while sending DNS query (BZ #15946) 2014-06-03 18:03:39 +02:00
Richard Henderson 71840409ea aarch64: Remove nptl/vfork.S 2014-06-03 11:28:11 -04:00
Stefan Liebler cf7bfd28b7 S/390: Regenerate ULPs. 2014-06-03 17:27:13 +02:00
Richard Henderson 89b4bd6b60 aarch64: Consolidate NPTL/non versions of vfork
At the same time, incorporate the 0 -> 0x80000000 mapping
of the pid expected by raise.c.
2014-06-03 11:09:20 -04:00
Richard Henderson 111cc71489 aarch64: Consolidate NPTL/non versions of clone
At the same time, rely on non-clobbered registers across syscall
so that we eliminate the stack frame that we previously ignored
in the unwind info.
2014-06-03 11:04:04 -04:00
Marcus Shawcroft ccc3991113 [AArch64] Regenerate libm-test-ulps 2014-06-03 12:45:10 +00:00
Wilco 693096cc7b [AArch64] Switch from FE_TOWARDZERO to _FPU_FPCR_RM_MASK 2014-06-03 12:44:50 +00:00
Wilco 0b4366bc9b [AArch64] Cleanup declarations in math_private.h. 2014-06-03 12:44:49 +00:00
Konstantin Serebryany 8747cd034a Remove redundant nested function b64_from_24bit
Move multiple definitions of the nested function b64_from_24bit into a
single function __b64_from_24bit.
2014-06-03 16:39:08 +05:30
Roland McGrath d936d379eb SH: Consolidate NPTL/non versions of vfork 2014-06-02 14:29:19 -07:00
Siddhesh Poyarekar 9fa76613d0 Fix format specifier for n_mmaps 2014-06-02 23:38:32 +05:30
Wilco a88dadbed5 [AArch64] Remove ISB after FPCR write. 2014-06-02 12:44:21 +01:00
Wilco c95b301101 [AArch64] Rewrite feupdateenv (BZ 17009). 2014-06-02 12:36:34 +01:00
David S. Miller 6b4d7a909f Update Sparc ULPS.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2014-06-01 19:19:18 -07:00
David S. Miller 30f3d07cbb Fix excessive ULP for y1_upward (0x2p+0) in test-float and test-ifloat.
* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Force computations
	to occur in round to nearest mode when |x| >= 2.0
2014-05-31 20:05:00 -07:00
Richard Henderson f0712b543e aarch64: Remove PSEUDO_RET 2014-05-30 14:11:51 -04:00
Richard Henderson 74f31c1859 aarch64: Fix error return from __ioctl
Forgotten in ca3cfa40c1
where the error branch was moved from PSEUDO_RET.
2014-05-30 14:09:34 -04:00
Marko Myllynen 30477995dc Replace __int128 with __int128_t
* sysdeps/x86_64/link-defines.sym (BND_SIZE): Replace __int128
	with __int128_t.
2014-05-30 10:50:21 -07:00
Siddhesh Poyarekar 62a5881678 Fix formatting in malloc_info 2014-05-30 22:44:45 +05:30
Siddhesh Poyarekar 4d653a59ff Add mmap usage in malloc_info output
The current malloc_info xml output only has information about
allocations on the heap.  Display information about number of mappings
and total mmapped size to this to complete the picture.
2014-05-30 22:43:52 +05:30
Roland McGrath 5190c17f22 m68k: Convert fork.c to arch-fork.h 2014-05-30 18:44:55 +02:00
Ondřej Bílka 987c02692a Remove mi_arena nested function. 2014-05-30 13:25:43 +02:00
Ondřej Bílka 20c138997a revert commit fdfd175d46 2014-05-30 13:23:39 +02:00
Richard Henderson 1670e207c5 aarch64: Rely on syscalls preserving registers
In several cases we've had asm routines rely on syscalls not clobbering
call-clobbered registers, and that's now deemed ABI.  So take advantage
of this in the INLINE_SYSCALL path as well.

Shrinks libc.so by about 1k.
2014-05-29 12:53:27 -04:00
Richard Henderson 11a28aee60 aarch64: Use tpidr_el0 rather than __errno_location in librt 2014-05-29 12:41:08 -04:00
Richard Henderson a17e5ffb80 aarch64: Use tpidr_el0 rather than __read_tp in librt 2014-05-29 12:39:03 -04:00
Richard Henderson b5be459771 aarch64: Improve syscall-cancel stack frame
One push instead of N; use stp/ldp to halve the insns.
2014-05-29 12:37:24 -04:00
Richard Henderson 645d44abe3 aarch64: Pass regno parameter to SINGLE_THREAD_P
Use cbz instead of cmp+b.eq.
2014-05-29 12:33:06 -04:00
Richard Henderson a8b4f04ad7 aarch64: Share code in syscall-cancel.h
Fold nocancel and error handling paths.
2014-05-29 12:31:07 -04:00
Richard Henderson af4e8ef944 aarch64: Tabify sysdep-cancel.h 2014-05-29 12:28:59 -04:00
Eric Wong 26b0d2e1a1 Avoid stat/fstat in statvfs/fstatvfs (BZ #15132)
Delay the use of stat/fstat until stat data is required.  When the
kernel returns ST_VALID, stat data is not used by __internal_statvfs.
2014-05-29 09:41:29 +05:30
Roland McGrath 0d3b7a190c SH: Consolidate NPTL/non versions of clone 2014-05-28 17:23:19 -07:00
Roland McGrath 1efe2bd9dc tile: Convert fork.c to arch-fork.h 2014-05-28 14:23:16 -04:00
Roland McGrath 30b6629ede IA64: Convert fork.c to arch-fork.h 2014-05-27 15:43:45 -07:00
Roland McGrath a6bea3ca7b SH: Convert fork.c to arch-fork.h 2014-05-27 12:58:01 -07:00
Ondřej Bílka 3dfb9a5cbe Remove duplicate code in elf/dl-deps.c. 2014-05-27 16:56:39 +02:00
Andreas Schwab 774f928582 Remove second argument from TLS_INIT_TP macro 2014-05-27 14:48:46 +02:00
Will Newton 36ffe7398a ARM: Fix handling of concurrent TLS descriptor resolution
The current code for handling concurrent resolution says that the
ABI for _dl_tlsdesc_resolve_hold is the same as that of
_dl_tlsdesc_lazy_resolver. However _dl_tlsdesc_resolve_hold is
called from the trampoline directly rather than the lazy resolver
stub so, for example, r2 has not been pushed so does not needed
to be restored.

This fixes an intermittent failure in nptl/tst-tls3 when building
glibc for arm-linux-gnueabihf with -mtls-dialect=gnu2.

ChangeLog:

2014-05-27  Will Newton  <will.newton@linaro.org>

	[BZ #16990]
	* sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_resolve_hold): Save
	and restore r2 rather than just restoring.
2014-05-27 10:39:18 +01:00
Siddhesh Poyarekar 2482ae433a Fix offset computation for append+ mode on switching from read (BZ #16724)
The offset computation in write mode uses the fact that _IO_read_end
is kept in sync with the external file offset.  This however is not
true when O_APPEND is in effect since switching to write mode ought to
send the external file offset to the end of file without making the
necessary adjustment to _IO_read_end.

Hence in append mode, offset computation when writing should only
consider the effect of unflushed writes, i.e. from _IO_write_base to
_IO_write_ptr.

The wiki has a detailed document that describes the rationale for
offsets returned by ftell in various conditions:

https://sourceware.org/glibc/wiki/File%20offsets%20in%20a%20stdio%20stream%20and%20ftell
2014-05-27 13:54:19 +05:30
Adhemerval Zanella bab900166e Update powerpc-fpu ULPs. 2014-05-26 12:40:08 -05:00
Adhemerval Zanella c7a8d66787 PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files. 2014-05-26 11:45:14 -05:00
Adhemerval Zanella daee7851e2 PowerPC: Move NPTL ABI headers to sysdeps. 2014-05-26 11:41:47 -05:00
Adhemerval Zanella 50a4081954 PowerPC: Move powerpc64 timer_*.c out of nptl/ 2014-05-26 11:41:46 -05:00
Adhemerval Zanella 8464c2a110 PowerPC: Consolidate NPTL/non versions of clone 2014-05-26 11:41:46 -05:00
Adhemerval Zanella 3d1024e8d1 PowerPC: Consolidate NPTL/non versions of vfork 2014-05-26 11:41:28 -05:00