about summary refs log tree commit diff
path: root/linuxthreads/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/Makefile')
-rw-r--r--linuxthreads/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile
index f3a9c02e5f..df7367b2b3 100644
--- a/linuxthreads/Makefile
+++ b/linuxthreads/Makefile
@@ -109,11 +109,14 @@ tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \
 	tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15 ex16 \
 	ex17 ex18 tst-cancel tst-context bug-sleep \
 	tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 tst-cancel5 \
-	tst-cancel6 tst-cancel7 tst-cancel8 tst-popen tst-popen2 tst-attr1
+	tst-cancel6 tst-cancel7 tst-cancel8 tst-popen tst-popen2 tst-attr1 \
+	tst-stack1
 test-srcs = tst-signal
 # These tests are linked with libc before libpthread
 tests-reverse += tst-cancel5
 
+generated += tst-stack1.mtrace tst-stack1-mem
+
 ifeq ($(build-static),yes)
 tests += tststatic tst-static-locale tst-cancel-static
 tests-static += tststatic tst-static-locale tst-cancel-static
@@ -139,6 +142,15 @@ tst-tls1modd.so-no-z-defs = yes
 tst-tls1mode.so-no-z-defs = yes
 tst-tls1modf.so-no-z-defs = yes
 
+tests: $(objpfx)tst-stack1-mem
+tst-stack1-ENV = MALLOC_TRACE=$(objpfx)tst-stack1.mtrace
+
+# There are still up to 3 objects unfreed:
+# manager thread's stack, tls block and dtv
+$(objpfx)tst-stack1-mem: $(objpfx)tst-stack1.out
+	$(common-objpfx)malloc/mtrace $(objpfx)tst-stack1.mtrace > $@ \
+	|| [ `grep ^0 $@ | wc -l` -le 3 ]
+
 $(test-modules): $(objpfx)%.so: $(objpfx)%.os $(common-objpfx)shlib.lds
 	$(build-module)