aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-02-14 13:45:14 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-02-14 13:45:14 +0000
commit7f98f1806a9b13fc6425566693e6674fd44e33e4 (patch)
tree00ad9a42886e8dc72824244003f2c1e591a4c294 /libio
parent6e89caf118d4091356ff79a7a3e9d5439c231cd1 (diff)
downloadglibc-7f98f1806a9b13fc6425566693e6674fd44e33e4.zip
glibc-7f98f1806a9b13fc6425566693e6674fd44e33e4.tar.gz
glibc-7f98f1806a9b13fc6425566693e6674fd44e33e4.tar.bz2
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.
Diffstat (limited to 'libio')
-rw-r--r--libio/Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/libio/Makefile b/libio/Makefile
index 747a779..8c333ce 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -179,9 +179,9 @@ include ../Rules
ifeq ($(run-built-tests),yes)
tests: $(objpfx)test-freopen.out
ifeq (yes,$(build-shared))
-# Run tst-fopenloc.check only if shared library is enabled since it
-# depends on tst-fopenloc.out.
-tests: $(objpfx)tst-fopenloc.check
+# Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
+# library is enabled since they depend on tst-fopenloc.out.
+tests: $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out
endif
endif
@@ -189,7 +189,9 @@ $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)' \
$(common-objpfx)libio/
-$(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out
- cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \
- > $@
- $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@
+$(objpfx)tst-fopenloc-cmp.out: ../iconvdata/testdata/ISO-8859-1..UTF8 \
+ $(objpfx)tst-fopenloc.out
+ cmp $^ > $@
+
+$(objpfx)tst-fopenloc-mem.out: $(objpfx)tst-fopenloc.out
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace > $@