Commit Graph

1244 Commits

Author SHA1 Message Date
Joseph Myers 7f98f1806a Split up rules for tests using mtrace and something else.
Most glibc tests that use mtrace to verify that there were no memory
leaks from the glibc facilities used in a given test depend on the
.out file of the previous test so that the mtrace test runs mtrace and
nothing else.

Two, however, have a single target combining mtrace with something
else.  In the case of libio/tst-fopenloc.check, the test both compares
the output with an expected baseline and runs mtrace.  In the case of
posix/tst-rxspencer-mem, the test is run (with different command line
from the main run) and then mtrace is run, from the same makefile
target.

This patch splits both of these tests up to use separate makefile
targets for each thing tested; in the tst-rxspencer case, a file
tst-rxspencer-no-utf8.c is created that just includes tst-rxspencer.c,
as is usual for tests where the same code gets tested in different
compile-time or runtime configurations.

Adding $(evaluate-test) to test commands, as in
<https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html>, will no
longer need to insert && between multiple commands, as all tests will
either have just a single command or already use &&.

Tested x86_64.

	* libio/Makefile ($(objpfx)tst-fopenloc.check): Split into
	separate $(objpfx)tst-fopenloc-cmp.out and
	$(objpfx)tst-fopenloc-mem.out targets.
	(tests): Update dependencies.
	* posix/Makefile (tests variable): Add tst-rxspencer-no-utf8.
	(generated): Change tst-rxspencer-mem and tst-rxspencer.mtrace to
	tst-rxspencer-no-utf8-mem and tst-rxspencer-no-utf8.mtrace.
	(tst-rxspencer-no-utf8-ARGS): New variable.
	(tst-rxspencer-no-utf8-ENV): Likewise.
	(tests target): Depend on $(objpfx)tst-rxspencer-no-utf8-mem
	instead of $(objpfx)tst-rxspencer-mem.
	($(objpfx)tst-rxspencer-mem): Change target to
	$(objpfx)tst-rxspencer-no-utf8-mem.  Depend on
	$(objpfx)tst-rxspencer-no-utf8.out instead of running test program.
	* posix/tst-rxspencer-no-utf8.c: New file.
2014-02-14 13:45:14 +00:00
Joseph Myers ed9a38e21b Clean up trivially redundant __USE_MISC conditionals.
This patch cleans up cases of __USE_MISC that are trivially redundant
after the recent substitution of __USE_MISC for __USE_BSD and
__USE_SVID: either in constructs such as "defined __USE_MISC ||
defined __USE_MISC", or else (in the bits/mman.h case) a conditional
on __USE_MISC nested inside another __USE_MISC conditional.  (The
cleanups remaining after this patch are still quite large, but it
seems a reasonable piece to separate out.)

Tested x86_64.

	* bits/mman.h [__USE_MISC]: Remove redundant conditionals.
	* ctype/ctype.h [__USE_MISC]: Likewise.
	* dirent/dirent.h [__USE_MISC]: Likewise.
	* grp/grp.h [__USE_MISC]: Likewise.
	* io/fcntl.h [__USE_MISC]: Likewise.
	* io/sys/stat.h [__USE_MISC]: Likewise.
	* libio/stdio.h [__USE_MISC]: Likewise.
	* posix/unistd.h [__USE_MISC]: Likewise.
	* pwd/pwd.h [__USE_MISC]: Likewise.
	* stdlib.h [__USE_MISC]: Likewise.
	* string/bits/string2.h [__USE_MISC]: Likewise.
	* string/string.h [__USE_MISC]: Likewise.
	* time/time.h [__USE_MISC]: Likewise.
2014-02-13 22:07:53 +00:00
Joseph Myers 498afc54df Combine __USE_BSD and __USE_SVID into __USE_MISC.
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.

The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros.  Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name.  This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch.  (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)

Tested x86_64.

	* include/features.h (__USE_BSD): Remove macro definitions.
	(__USE_SVID): Likewise.
	(_BSD_SOURCE): Likewise.
	(_SVID_SOURCE): Likewise.
	[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
	from definition of _DEFAULT_SOURCE.
	[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
	[_DEFAULT_SOURCE].
	* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
	* bits/mman.h [__USE_BSD]: Likewise.
	* bits/termios.h [__USE_BSD]: Likewise.
	* bits/waitstatus.h [__USE_BSD]: Likewise.
	* ctype/ctype.h [__USE_SVID]: Likewise.
	* dirent/dirent.h [__USE_BSD]: Likewise.
	* grp/grp.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* inet/netinet/igmp.h [__USE_BSD]: Likewise.
	* io/fcntl.h [__USE_BSD]: Likewise.
	* io/ftw.h [__USE_BSD]: Likewise.
	* io/sys/stat.h [__USE_BSD]: Likewise.
	* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
	* libio/bits/stdio2.h [__USE_BSD]: Likewise.
	* libio/stdio.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* math/math.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
	* misc/bits/syslog.h [__USE_BSD]: Likewise.
	* misc/search.h [__USE_SVID]: Likewise.
	* misc/sys/mman.h [__USE_BSD]: Likewise.
	* misc/sys/syslog.h [__USE_BSD]: Likewise.
	* misc/sys/uio.h [__USE_BSD]: Likewise.
	* posix/bits/unistd.h [__USE_BSD]: Likewise.
	* posix/glob.h [__USE_BSD]: Likewise.
	* posix/regex.h [__USE_BSD]: Likewise.
	* posix/sys/types.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* posix/sys/utsname.h [__USE_SVID]: Likewise.
	* posix/sys/wait.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* posix/unistd.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* pwd/pwd.h [__USE_SVID]: Likewise.
	* resolv/netdb.h [__USE_BSD]: Likewise.
	* setjmp/setjmp.h [__USE_BSD]: Likewise.
	* signal/signal.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* socket/sys/socket.h [__USE_BSD]: Likewise.
	* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
	* stdlib/stdlib.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* string/bits/string2.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* string/bits/string3.h [__USE_BSD]: Likewise.
	* string/endian.h [__USE_BSD]: Likewise.
	* string/string.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* string/strings.h [__USE_BSD]: Likewise.
	* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
	* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
	* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
	* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
	* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
	* termios/termios.h [__USE_BSD]: Likewise.
	* time/sys/time.h [__USE_BSD]: Likewise.
	* time/time.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.

	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
	condition to [__USE_MISC].
2014-02-12 23:41:01 +00:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Allan McRae 88726d48af Update remaining copyright dates
Update copyright years that are not handled by scripts/update-copyright.
2014-01-01 22:02:55 +10:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 7011c2622f Remove __FAVOR_BSD. 2013-12-17 18:05:57 +00:00
Meador Inge 84ae135d32 Use __glibc_block in public headers.
As detailed in PR11157, the use of '__block' is known to interfere
with keywords in some environments, such as the Clang -fblocks extension.
Recently a similar issue was raised concerning the use of '__unused'
and a '__glibc' prefix was proposed to create a glibc implementation
namespace for these sorts of issues [1].  This patches takes that
approach.

[1] https://sourceware.org/ml/libc-alpha/2012-02/msg00047.html
[2] http://lists.debian.org/debian-glibc/2013/11/msg00020.html
2013-11-21 16:57:37 -05:00
Ondřej Bílka a471e96a53 When glob pattern contains a trailing slash match only directories. Fixes bug 10278. 2013-10-20 10:03:19 +02:00
Eric Blake e833b53fe6 glob: silence -Wattribute warnings
Colin Watson reported that some versions of gcc warn about
attribute leaf used on a static function, since it has no
effect on anything but external functions.

* posix/glob.c (next_brace_sub, prefix_array, collated_compare):
Use __THROWNL rather than __THROW on static functions.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-10-01 13:50:29 -06:00
Roland McGrath a58ad3f801 Fix raciness in waitid test. 2013-06-13 15:09:29 -07:00
Joseph Myers 60d2f8f3c7 Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
Joseph Myers 2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Ondrej Bilka 44a988afd8 Fix executable mode. 2013-06-06 02:15:33 +02:00
Joseph Myers 9c84384cc1 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
Siddhesh Poyarekar d180203e97 Increase test case timeout 2013-06-04 11:23:54 +05:30
Dmitry V. Levin 47c22455d4 Test getaddrinfo return value
This helps testing for regression of BZ#15339.  Creation of network
isolated environments is a privileged operation and therefore is not
included to the test.
2013-05-21 17:21:05 +00:00
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Roland McGrath 8fb16a04e6 Move getlogin, getlogin_r, setlogin to login/ subdir. 2013-05-06 15:10:09 -07:00
Paul Pluzhnikov 3e6bd4b198 Set LC_ALL=C before sed. 2013-03-08 20:31:23 -08:00
Siddhesh Poyarekar adbb8027be Remove PIPE_BUF Linux-specific code
Fixes BZ #12723

The variable pipe buffer size does nothing to the value of PIPE_BUF,
since the number of bytes that are atomically written is still
PIPE_BUF on Linux.
2013-03-07 12:15:08 +05:30
Paul Eggert b7688c42e7 Bring back definition of __attribute__ for non-gcc and older gcc
gnulib copies this file over and needs it.
2013-02-26 14:17:12 +05:30
Siddhesh Poyarekar 53a5c423fb Fix some build warnings 2013-02-26 10:40:19 +05:30
Andreas Jaeger f238fd190b Sort Versions files 2013-02-17 16:34:04 +01:00
Andreas Schwab a445af0bc7 Fix buffer overrun in regexp matcher 2013-02-12 09:30:34 +01:00
Andreas Schwab 7e2f0d2d77 Fix handling of collating symbols in regexps 2013-02-12 09:25:34 +01:00
Roland McGrath f1d70dad53 Remove lots of inline keywords. 2013-02-07 14:44:18 -08:00
Andreas Schwab ab087e0aa4 Avoid busy loop in wordexp when substituted command closed its stdout 2013-01-21 10:40:04 +01:00
Joseph Myers 6a57d93130 Remove __GLIBC_HAVE_LONG_LONG. 2013-01-11 21:13:25 +00:00
H.J. Lu 740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
H.J. Lu 4cf8f2098f Support run tst-exec and tst-spawn directly 2013-01-10 14:14:55 -08:00
Roland McGrath ad98e30c90 Force getconf.speclist to be generated in the others pass. 2013-01-09 16:05:32 -08:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
David S. Miller 0549fbba96 Update copyright years.
* catgets/gencat.c: Update copyright year.
	* csu/version.c: Likewise.
	* debug/catchsegv.sh: Likewise.
	* debug/pcprofiledump.c: Likewise.
	* debug/xtrace.sh: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/pldd.c: Likewise.
	* elf/sotruss.ksh: Likewise.
	* elf/sprof.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* login/programs/pt_chown.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/memusagestat.c: Likewise.
	* malloc/mtrace.pl: Likewise.
	* nscd/nscd.c: Likewise.
	* nss/getent.c: Likewise.
	* nss/makedb.c: Likewise.
	* posix/getconf.c: Likewise.
2013-01-01 00:11:43 -08:00
Joseph Myers 877f2d8e8d Fix _POSIX_TZNAME_MAX for older POSIX (bug 14856). 2012-11-19 23:36:20 +00:00
Joseph Myers 531f1ae0a7 Generate /usr/libexec/getconf files when cross-compiling. 2012-11-17 01:49:19 +00:00
Marcus Shawcroft c485e4d2cc Adding missing -fexception CFLAGS 2012-11-14 12:35:10 +00:00
Joseph Myers 8b748aed2a Support --with-pkgversion and --with-bugurl. 2012-11-09 22:13:45 +00:00
Thomas Schwinge b830319d49 [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
Joseph Myers cc1290d07e Support cross-testing. 2012-10-24 21:59:01 +00:00
Roland McGrath 6e6249d0b4 BZ#14743: Move clock_* symbols from librt to libc. 2012-10-24 14:50:46 -07:00
Joseph Myers 0708a7d1f0 Use build directory instead of /tmp in globtest.sh. 2012-10-24 11:47:16 +00:00
Joseph Myers 03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
Joseph Myers ebfd1bbd04 Use $(run-program-prefix) in posix/globtest.sh. 2012-10-23 23:32:14 +00:00
Jim Blandy 166bca2480 Add and use $(host-built-program-cmd). 2012-10-23 22:49:59 +00:00
Jim Blandy 6fb54a2254 Don't pass shell loops' stdin to programs run on glibc's host. 2012-10-22 17:12:17 +00:00
Joseph Myers e40a0d2113 Use $(run-program-prefix) in more shell script tests. 2012-10-19 23:30:43 +00:00
Joseph Myers 135948bd50 Use $(built-program-cmd) in posix/tst-getconf.sh. 2012-10-19 20:00:43 +00:00
Roland McGrath 848917f9ee Add a missing $(make-target-directory). 2012-09-28 14:48:17 -07:00