2 include $(top_srcdir)/Makefile.tool-tests.am
7 if VGCONF_ARCHS_INCLUDE_X86
10 if VGCONF_ARCHS_INCLUDE_AMD64
14 if VGCONF_ARCHS_INCLUDE_PPC32
17 if VGCONF_ARCHS_INCLUDE_PPC64
25 if VGCONF_OS_IS_DARWIN
29 # Platform-specific tests
30 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
33 if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
34 SUBDIRS += amd64-linux
37 DIST_SUBDIRS = x86 amd64 ppc32 ppc64 linux darwin x86-linux amd64-linux .
39 dist_noinst_SCRIPTS = \
42 filter_leak_cases_possible \
43 filter_stderr filter_xml \
46 noinst_HEADERS = leak.h
49 addressable.stderr.exp addressable.stdout.exp addressable.vgtest \
50 atomic_incs.stderr.exp atomic_incs.vgtest \
51 atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \
52 badaddrvalue.stderr.exp \
53 badaddrvalue.stdout.exp badaddrvalue.vgtest \
54 badfree-2trace.stderr.exp badfree-2trace.vgtest \
55 badfree.stderr.exp badfree.vgtest \
56 badfree3.stderr.exp badfree3.vgtest \
57 badjump.stderr.exp badjump.vgtest \
58 badjump2.stderr.exp badjump2.vgtest \
59 badjump.stderr.exp-s390x \
60 badjump2.stderr.exp-s390x \
61 badloop.stderr.exp badloop.vgtest \
62 badpoll.stderr.exp badpoll.vgtest \
63 badrw.stderr.exp badrw.vgtest \
64 brk2.stderr.exp brk2.vgtest \
65 buflen_check.stderr.exp buflen_check.vgtest \
66 calloc-overflow.stderr.exp calloc-overflow.vgtest\
67 clientperm.stderr.exp \
68 clientperm.stdout.exp clientperm.vgtest \
69 custom_alloc.stderr.exp custom_alloc.vgtest \
70 custom-overlap.stderr.exp custom-overlap.vgtest \
71 deep_templates.vgtest \
72 deep_templates.stdout.exp deep_templates.stderr.exp \
73 describe-block.stderr.exp describe-block.vgtest \
74 doublefree.stderr.exp doublefree.vgtest \
75 erringfds.stderr.exp erringfds.stdout.exp erringfds.vgtest \
76 error_counts.stderr.exp error_counts.vgtest \
77 errs1.stderr.exp errs1.vgtest \
78 exitprog.stderr.exp exitprog.vgtest \
79 execve.stderr.exp execve.vgtest \
80 execve2.stderr.exp execve2.vgtest \
81 file_locking.stderr.exp file_locking.vgtest \
82 fprw.stderr.exp fprw.vgtest \
83 fwrite.stderr.exp fwrite.vgtest \
84 inits.stderr.exp inits.vgtest \
85 inline.stderr.exp inline.stdout.exp inline.vgtest \
86 leak-0.vgtest leak-0.stderr.exp \
87 leak-cases-full.vgtest leak-cases-full.stderr.exp \
88 leak-cases-possible.vgtest leak-cases-possible.stderr.exp \
89 leak-cases-summary.vgtest leak-cases-summary.stderr.exp \
90 leak-cycle.vgtest leak-cycle.stderr.exp \
91 leak-pool-0.vgtest leak-pool-0.stderr.exp \
92 leak-pool-1.vgtest leak-pool-1.stderr.exp \
93 leak-pool-2.vgtest leak-pool-2.stderr.exp \
94 leak-pool-3.vgtest leak-pool-3.stderr.exp \
95 leak-pool-4.vgtest leak-pool-4.stderr.exp \
96 leak-pool-5.vgtest leak-pool-5.stderr.exp \
97 leak-tree.vgtest leak-tree.stderr.exp \
98 long_namespace_xml.vgtest long_namespace_xml.stdout.exp \
99 long_namespace_xml.stderr.exp \
100 long-supps.vgtest long-supps.stderr.exp long-supps.supp \
101 mallinfo.stderr.exp mallinfo.vgtest \
102 malloc_free_fill.vgtest \
103 malloc_free_fill.stderr.exp \
104 malloc_usable.stderr.exp malloc_usable.vgtest \
105 malloc1.stderr.exp malloc1.vgtest \
106 malloc2.stderr.exp malloc2.vgtest \
107 malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \
108 manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \
109 manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp manuel2.vgtest \
110 manuel3.stderr.exp manuel3.vgtest \
111 match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \
112 memalign_test.stderr.exp memalign_test.vgtest \
113 memalign2.stderr.exp memalign2.vgtest \
114 memcmptest.stderr.exp memcmptest.stderr.exp2 \
115 memcmptest.stdout.exp memcmptest.vgtest \
116 mempool.stderr.exp mempool.vgtest \
117 mempool2.stderr.exp mempool2.vgtest \
118 metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
119 mismatches.stderr.exp mismatches.vgtest \
120 mmaptest.stderr.exp mmaptest.vgtest \
121 nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \
122 nanoleak2.stderr.exp nanoleak2.vgtest \
123 new_nothrow.stderr.exp new_nothrow.vgtest \
124 new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
125 noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \
126 null_socket.stderr.exp null_socket.vgtest \
127 origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \
128 origin2-not-quite.vgtest origin2-not-quite.stdout.exp \
129 origin2-not-quite.stderr.exp \
130 origin3-no.vgtest origin3-no.stdout.exp \
131 origin3-no.stderr.exp \
132 origin4-many.vgtest origin4-many.stdout.exp \
133 origin4-many.stderr.exp \
134 origin5-bz2.vgtest origin5-bz2.stdout.exp \
135 origin5-bz2.stderr.exp-glibc25-x86 \
136 origin5-bz2.stderr.exp-glibc25-amd64 \
137 origin5-bz2.stderr.exp-glibc27-ppc64 \
138 origin5-bz2.stderr.exp-glibc212-s390x \
139 origin6-fp.vgtest origin6-fp.stdout.exp \
140 origin6-fp.stderr.exp-glibc25-amd64 \
141 origin6-fp.stderr.exp-glibc27-ppc64 \
142 overlap.stderr.exp overlap.stdout.exp overlap.vgtest \
143 partiallydefinedeq.vgtest partiallydefinedeq.stderr.exp \
144 partiallydefinedeq.stderr.exp4 \
145 partiallydefinedeq.stderr.exp3 \
146 partiallydefinedeq.stderr.exp2 \
147 partiallydefinedeq.stdout.exp \
148 partial_load_ok.vgtest partial_load_ok.stderr.exp partial_load_ok.stderr.exp64 \
149 partial_load_dflt.vgtest partial_load_dflt.stderr.exp partial_load_dflt.stderr.exp64 \
150 pdb-realloc.stderr.exp pdb-realloc.vgtest \
151 pdb-realloc2.stderr.exp pdb-realloc2.stdout.exp pdb-realloc2.vgtest \
152 pipe.stderr.exp pipe.vgtest \
153 pointer-trace.vgtest \
154 pointer-trace.stderr.exp \
155 post-syscall.stderr.exp post-syscall.vgtest \
156 realloc1.stderr.exp realloc1.vgtest \
157 realloc2.stderr.exp realloc2.vgtest \
158 realloc3.stderr.exp realloc3.vgtest \
159 sh-mem.stderr.exp sh-mem.vgtest \
160 sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \
161 sh-mem-random.stdout.exp sh-mem-random.vgtest \
162 sigaltstack.stderr.exp sigaltstack.vgtest \
163 sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.vgtest \
164 signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
165 sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
166 strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \
168 str_tester.stderr.exp str_tester.vgtest \
169 supp-dir.vgtest supp-dir.stderr.exp \
170 supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \
171 supp_unknown.stderr.exp-s390x \
172 supp1.stderr.exp supp1.vgtest \
173 supp2.stderr.exp supp2.vgtest \
175 suppfree.stderr.exp suppfree.vgtest \
176 trivialleak.stderr.exp trivialleak.vgtest \
177 unit_libcbase.stderr.exp unit_libcbase.vgtest \
178 unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \
179 varinfo1.vgtest varinfo1.stdout.exp varinfo1.stderr.exp varinfo1.stderr.exp-ppc64\
180 varinfo2.vgtest varinfo2.stdout.exp varinfo2.stderr.exp varinfo2.stderr.exp-ppc64\
181 varinfo3.vgtest varinfo3.stdout.exp varinfo3.stderr.exp varinfo3.stderr.exp-ppc64\
182 varinfo4.vgtest varinfo4.stdout.exp varinfo4.stderr.exp varinfo4.stderr.exp-ppc64\
183 varinfo5.vgtest varinfo5.stdout.exp varinfo5.stderr.exp varinfo5.stderr.exp-ppc64\
184 varinfo6.vgtest varinfo6.stdout.exp varinfo6.stderr.exp varinfo6.stderr.exp-ppc64\
185 vcpu_bz2.stdout.exp vcpu_bz2.stderr.exp vcpu_bz2.vgtest \
186 vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \
187 vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \
188 vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \
189 wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \
190 wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \
191 wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \
192 wrap4.vgtest wrap4.stdout.exp wrap4.stderr.exp \
193 wrap5.vgtest wrap5.stdout.exp wrap5.stderr.exp \
194 wrap6.vgtest wrap6.stdout.exp wrap6.stderr.exp \
195 wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \
196 wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \
197 wrap8.stdout.exp2 wrap8.stderr.exp2 \
198 writev.stderr.exp writev.vgtest \
199 xml1.stderr.exp xml1.stdout.exp xml1.vgtest
204 badaddrvalue badfree badjump badjump2 \
216 doublefree error_counts errs1 exitprog execve execve2 erringfds \
218 fprw fwrite inits inline \
228 malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
230 memalign_test memalign2 memcmptest mempool mempool2 mmaptest \
231 mismatches new_override metadata \
232 nanoleak_supp nanoleak2 new_nothrow \
235 origin1-yes origin2-not-quite origin3-no \
236 origin4-many origin5-bz2 origin6-fp \
239 partial_load pdb-realloc pdb-realloc2 \
242 realloc1 realloc2 realloc3 \
243 sh-mem sh-mem-random \
244 sigaltstack signal2 sigprocmask sigkill \
247 supp_unknown supp1 supp2 suppfree \
249 unit_libcbase unit_oset \
250 varinfo1 varinfo2 varinfo3 varinfo4 \
251 varinfo5 varinfo5so.so varinfo6 \
252 vcpu_fbench vcpu_fnfns \
254 wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
258 AM_CFLAGS += $(AM_FLAG_M3264_PRI)
259 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
261 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
262 AM_CFLAGS += -mfloat-abi=softfp
263 AM_CXXFLAGS += -mfloat-abi=softfp
266 if VGCONF_OS_IS_DARWIN
267 atomic_incs_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic
269 atomic_incs_CFLAGS = $(AM_CFLAGS)
272 deep_templates_SOURCES = deep_templates.cpp
273 deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
275 error_counts_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
277 execve_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
279 execve2_CFLAGS = $(AM_CFLASG) @FLAG_W_NO_NONNULL@
281 inits_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
283 long_namespace_xml_SOURCES = long_namespace_xml.cpp
285 manuel1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
287 memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
289 mismatches_SOURCES = mismatches.cpp
291 new_nothrow_SOURCES = new_nothrow.cpp
292 new_override_SOURCES = new_override.cpp
294 origin2_not_quite_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
296 origin3_no_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
298 # This requires optimisation in order to get just one resulting error.
299 origin4_many_CFLAGS = $(AM_CFLAGS) -O
301 # Apply -O so as to run in reasonable time.
302 origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
303 origin6_fp_CFLAGS = $(AM_CFLAGS) -O
305 # Don't allow GCC to inline memcpy() and strcpy(),
306 # because then we can't intercept it
307 overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy -fno-builtin-strcpy
309 str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
311 supp_unknown_SOURCES = badjump.c
312 supp1_SOURCES = supp.c
313 supp2_SOURCES = supp.c
315 vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
316 vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
317 vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
318 vcpu_fnfns_LDADD = -lm
319 wrap6_CFLAGS = $(AM_CFLAGS) -O2
321 # To make it a bit more realistic, have some optimisation enabled
322 # for the varinfo tests. We still expect sane results.
323 varinfo1_CFLAGS = $(AM_CFLAGS) -O
324 varinfo2_CFLAGS = $(AM_CFLAGS) -O -Wno-shadow
325 varinfo3_CFLAGS = $(AM_CFLAGS) -O
326 varinfo4_CFLAGS = $(AM_CFLAGS) -O
327 varinfo5_CFLAGS = $(AM_CFLAGS) -O
328 varinfo6_CFLAGS = $(AM_CFLAGS) -O
330 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
331 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
333 # persuade the AIX linker not to junk apparently unused
334 # function descriptors. Unfortunately -Wl,-G -Wl,-bnogc
335 # produces a link error on 64-bit AIX, hence only 32-bit
337 wrap1_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
338 wrap2_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
339 wrap3_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
340 wrap4_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
341 wrap5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
342 wrap6_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
343 wrap8_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
347 # Build shared object for varinfo5
348 varinfo5_SOURCES = varinfo5.c
349 varinfo5_DEPENDENCIES = varinfo5so.so
350 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
351 varinfo5_LDADD = `pwd`/varinfo5so.so
352 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
354 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
355 varinfo5_LDADD = `pwd`/varinfo5so.so
356 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
358 if VGCONF_OS_IS_DARWIN
359 varinfo5_LDADD = `pwd`/varinfo5so.so
360 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
362 varinfo5_LDADD = varinfo5so.so
363 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
364 -Wl,-rpath,$(top_builddir)/memcheck/tests
368 varinfo5so_so_SOURCES = varinfo5so.c
369 varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O -Wno-shadow
370 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
371 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
373 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
374 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
377 if VGCONF_OS_IS_DARWIN
378 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
379 -dynamiclib -all_load
381 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
382 -Wl,-soname -Wl,varinfo5so.so
387 # Build shared object for wrap7
388 wrap7_SOURCES = wrap7.c
389 wrap7_DEPENDENCIES = wrap7so.so
390 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
391 wrap7_LDADD = `pwd`/wrap7so.so
392 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
394 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
395 wrap7_LDADD = `pwd`/wrap7so.so
396 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
398 if VGCONF_OS_IS_DARWIN
399 wrap7_LDADD = `pwd`/wrap7so.so
400 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
402 wrap7_LDADD = wrap7so.so
403 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) \
404 -Wl,-rpath,$(top_builddir)/memcheck/tests
409 wrap7so_so_SOURCES = wrap7so.c
410 wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic
411 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
412 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
414 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
415 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
418 if VGCONF_OS_IS_DARWIN
419 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
420 -dynamiclib -all_load
422 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
423 -Wl,-soname -Wl,wrap7so.so