glibc/string
Joseph Myers 6e89caf118 Split up rules for tests that compare output with baselines.
This patch splits makefile rules that generate a file then run cmp to
check the contents of that file into separate rules to generate and
compare the file.  This simplifies making those tests generate PASS /
FAIL results, by removing the need to insert && between commands in
the test so that a $(evaluate-test) call is reached.  It also avoids
the oddity of the .out file being an intermediate file rather than the
final result generated, as noted for some of these tests in
<https://sourceware.org/ml/libc-alpha/2012-10/msg00894.html>.

In many cases, the rule to run the program was no longer needed
because the default rules for running test programs on the host to
generate a .out file sufficed.  (I'm not asserting the commands run
after this patch are *exactly* the same as before, simply that the
rules did nothing special that appeared deliberate or relevant to
anything about what the tests were testing.  In cases where the rules
redirected stderr as well as stdout, I left the existing rule's
redirection in place to avoid changing what gets compared with the
expected results.)

It's clear there is a lot in common between the various -cmp.out rules
and it might be possible in future to refactor them into more generic
support for the case of comparing test output against a baseline.
(Some baselines are *.exp, some *.expect, some directly embedded in
the makefiles, and nptl/tst-cleanupx0.expect appears unused.)

Tested x86_64.

	* elf/Makefile ($(objpfx)order.out): Remove rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)order-cmp.out.
	($(objpfx)order-cmp.out): New rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-array1-cmp.out, $(objpfx)tst-array1-static-cmp.out,
	$(objpfx)tst-array2-cmp.out, $(objpfx)tst-array3-cmp.out,
	$(objpfx)tst-array4-cmp.out, $(objpfx)tst-array5-cmp.out and
	$(objpfx)tst-array5-static-cmp.out.
	($(objpfx)tst-array1.out): Remove rule.
	($(objpfx)tst-array1-cmp.out): New rule.
	($(objpfx)tst-array1-static.out): Remove rule.
	($(objpfx)tst-array1-static-cmp.out): New rule.
	($(objpfx)tst-array2.out): Remove rule.
	($(objpfx)tst-array2-cmp.out): New rule.
	($(objpfx)tst-array3.out): Remove rule.
	($(objpfx)tst-array3-cmp.out): New rule.
	($(objpfx)tst-array4.out): Remove rule.
	($(objpfx)tst-array4-cmp.out): New rule.
	($(objpfx)tst-array5.out): Remove rule.
	($(objpfx)tst-array5-cmp.out): New rule.
	($(objpfx)tst-array5-static.out): Remove rule.
	($(objpfx)tst-array5-static-cmp.out): New rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)order2-cmp.out.
	($(objpfx)order2.out): Remove rule.
	($(objpfx)order2-cmp.out): New rule.
	($(objpfx)tst-initorder.out): Remove rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-initorder-cmp.out.
	($(objpfx)tst-initorder-cmp.out): New rule.
	($(objpfx)tst-initorder2.out): Remove rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-initorder2-cmp.out.
	($(objpfx)tst-initorder2-cmp.out): New rule.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-unused-dep-cmp.out.
	($(objpfx)tst-unused-dep-cmp.out): Do not run cmp.
	($(objpfx)tst-unused-dep-cmp.out): New rule.
	* stdio-common/Makefile [$(run-built-tests) = yes] (tests): Depend
	on $(objpfx)tst-setvbuf1-cmp.out.
	($(objpfx)tst-setvbuf1.out): Do not run cmp.
	($(objpfx)tst-setvbuf1-cmp.out): New rule.
	* string/Makefile [$(run-built-tests) = yes] (tests): Depend
	$(objpfx)tst-svc-cmp.out instead of $(objpfx)tst-svc.out.
	($(objpfx)tst-svc.out): Remove rule.
	($(objpfx)tst-svc-cmp.out): New rule.

nptl:
	* Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
	[$(run-built-tests) = yes] (tests): Depend on
	$(objpfx)tst-cleanup0-cmp.out.
	($(objpfx)tst-cleanup0-cmp.out): New rule.
2014-02-14 13:42:44 +00:00
..
bits Clean up trivially redundant __USE_MISC conditionals. 2014-02-13 22:07:53 +00:00
Depend Update. 2001-03-19 21:40:15 +00:00
Makefile Split up rules for tests that compare output with baselines. 2014-02-14 13:42:44 +00:00
Versions Sort Versions files 2013-02-17 16:34:04 +01:00
_strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-addsep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-append.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-count.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-create.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-ctsep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-delete.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-extract.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-insert.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-next.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-replace.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz-stringify.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
argz.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
basename.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bug-envz1.c * string/Makefile (tests): Add bug-envz1. 2006-06-04 16:36:04 +00:00
bug-strcoll1.c Update. 2001-04-26 20:45:18 +00:00
bug-strncat1.c * malloc/memusagestat.c (main): Use return instead of exit to 2000-12-31 10:52:32 +00:00
bug-strpbrk1.c * malloc/memusagestat.c (main): Use return instead of exit to 2000-12-31 10:52:32 +00:00
bug-strspn1.c * malloc/memusagestat.c (main): Use return instead of exit to 2000-12-31 10:52:32 +00:00
bug-strtok1.c [BZ #2126] 2006-01-10 00:25:07 +00:00
byteswap.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bzero.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
endian.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
envz.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
envz.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ffs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ffsll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
inl-tester.c Update. 1997-09-11 12:09:10 +00:00
memccpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memfrob.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memmem.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
memmove.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memory.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mempcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
memset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
noinl-tester.c Update. 1997-09-16 00:42:43 +00:00
rawmemchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stpncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
str-two-way.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stratcliff.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcasecmp_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcasestr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strchrnul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcoll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcoll_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strcspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strdup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strerror.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strerror_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strfry.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
string-inlines.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
string.h Clean up trivially redundant __USE_MISC conditionals. 2014-02-13 22:07:53 +00:00
strings.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
strlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncase.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncase_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strndup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strnlen.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
strpbrk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strsep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strsignal.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strstr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtok_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strverscmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strxfrm.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strxfrm_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
swab.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-bcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-bzero.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-ffs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memccpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memmem.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
test-memmove.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-mempcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-memset.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-rawmemchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-stpcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-stpncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcasestr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strchrnul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strcspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-string.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncasecmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncat.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strncpy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strnlen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strpbrk.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strrchr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strspn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-strstr.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tester.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-bswap.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-endian.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
tst-inlcall.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strcoll-overflow.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strfry.c * stdlib/random_r.c (__initstate_r): Don't use non-existing state. 2005-04-12 15:29:07 +00:00
tst-strlen.c Add optimized x86-64 implementation of strnlen. 2010-07-26 08:37:08 -07:00
tst-strtok.c Update. 2001-02-22 13:46:25 +00:00
tst-strtok_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strxfrm.c 2002-08-29 Roland McGrath <roland@redhat.com> 2002-08-29 09:26:30 +00:00
tst-strxfrm2.c * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization 2006-11-10 15:20:59 +00:00
tst-svc.c * malloc/memusagestat.c (main): Use return instead of exit to 2000-12-31 10:52:32 +00:00
tst-svc.expect * string/strverscmp.c (__strverscmp): Fix last cleanups. 2009-04-07 06:51:59 +00:00
tst-svc.input * string/strverscmp.c (__strverscmp): Fix last cleanups. 2009-04-07 06:51:59 +00:00
tst-svc2.c [BZ #9893] 2009-03-14 23:57:33 +00:00
wordcopy.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xpg-strerror.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00