2 include $(top_srcdir)/Makefile.tool-tests.am
7 if VGCONF_ARCHS_INCLUDE_X86
10 if VGCONF_ARCHS_INCLUDE_AMD64
18 if VGCONF_OS_IS_DARWIN
22 # Platform-specific tests
23 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
27 DIST_SUBDIRS = x86 amd64 linux darwin x86-linux .
29 dist_noinst_SCRIPTS = \
32 filter_stderr filter_xml \
35 noinst_HEADERS = leak.h
38 addressable.stderr.exp addressable.stdout.exp addressable.vgtest \
39 atomic_incs.stderr.exp atomic_incs.vgtest \
40 atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \
41 badaddrvalue.stderr.exp \
42 badaddrvalue.stdout.exp badaddrvalue.vgtest \
43 badfree-2trace.stderr.exp badfree-2trace.vgtest \
44 badfree.stderr.exp badfree.vgtest \
45 badjump.stderr.exp badjump.vgtest \
46 badjump2.stderr.exp badjump2.vgtest \
47 badloop.stderr.exp badloop.vgtest \
48 badpoll.stderr.exp badpoll.vgtest \
49 badrw.stderr.exp badrw.vgtest \
50 brk2.stderr.exp brk2.vgtest \
51 buflen_check.stderr.exp buflen_check.vgtest \
52 calloc-overflow.stderr.exp calloc-overflow.vgtest\
53 clientperm.stderr.exp \
54 clientperm.stdout.exp clientperm.vgtest \
55 custom_alloc.stderr.exp custom_alloc.vgtest \
56 custom-overlap.stderr.exp custom-overlap.vgtest \
57 deep_templates.vgtest \
58 deep_templates.stdout.exp deep_templates.stderr.exp \
59 describe-block.stderr.exp describe-block.vgtest \
60 doublefree.stderr.exp doublefree.vgtest \
61 erringfds.stderr.exp erringfds.stdout.exp erringfds.vgtest \
62 error_counts.stderr.exp error_counts.vgtest \
63 errs1.stderr.exp errs1.vgtest \
64 exitprog.stderr.exp exitprog.vgtest \
65 execve.stderr.exp execve.vgtest \
66 execve2.stderr.exp execve2.vgtest \
67 file_locking.stderr.exp file_locking.vgtest \
68 fprw.stderr.exp fprw.vgtest \
69 fwrite.stderr.exp fwrite.vgtest \
70 inits.stderr.exp inits.vgtest \
71 inline.stderr.exp inline.stdout.exp inline.vgtest \
72 leak-0.vgtest leak-0.stderr.exp \
73 leak-cases-full.vgtest leak-cases-full.stderr.exp \
74 leak-cases-summary.vgtest leak-cases-summary.stderr.exp \
75 leak-cycle.vgtest leak-cycle.stderr.exp \
76 leak-pool-0.vgtest leak-pool-0.stderr.exp \
77 leak-pool-1.vgtest leak-pool-1.stderr.exp \
78 leak-pool-2.vgtest leak-pool-2.stderr.exp \
79 leak-pool-3.vgtest leak-pool-3.stderr.exp \
80 leak-pool-4.vgtest leak-pool-4.stderr.exp \
81 leak-pool-5.vgtest leak-pool-5.stderr.exp \
82 leak-tree.vgtest leak-tree.stderr.exp \
83 linux-syslog-syscall linux-syslog-syscall.stderr.exp \
84 linux-syscalls-2007 linux-syscalls-2007.stderr.exp \
85 long_namespace_xml.vgtest long_namespace_xml.stdout.exp \
86 long_namespace_xml.stderr.exp \
87 long-supps.vgtest long-supps.stderr.exp long-supps.supp \
88 mallinfo.stderr.exp mallinfo.vgtest \
89 malloc_free_fill.vgtest \
90 malloc_free_fill.stderr.exp \
91 malloc_usable.stderr.exp malloc_usable.vgtest \
92 malloc1.stderr.exp malloc1.vgtest \
93 malloc2.stderr.exp malloc2.vgtest \
94 malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \
95 manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \
96 manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp manuel2.vgtest \
97 manuel3.stderr.exp manuel3.vgtest \
98 match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \
99 memalign_test.stderr.exp memalign_test.vgtest \
100 memalign2.stderr.exp memalign2.vgtest \
101 memcmptest.stderr.exp memcmptest.stderr.exp2 \
102 memcmptest.stdout.exp memcmptest.vgtest \
103 mempool.stderr.exp mempool.vgtest \
104 metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
105 mismatches.stderr.exp mismatches.vgtest \
106 mmaptest.stderr.exp mmaptest.vgtest \
107 nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \
108 nanoleak2.stderr.exp nanoleak2.vgtest \
109 new_nothrow.stderr.exp new_nothrow.vgtest \
110 new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
111 noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \
112 null_socket.stderr.exp null_socket.vgtest \
113 origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \
114 origin2-not-quite.vgtest origin2-not-quite.stdout.exp \
115 origin2-not-quite.stderr.exp \
116 origin3-no.vgtest origin3-no.stdout.exp \
117 origin3-no.stderr.exp \
118 origin4-many.vgtest origin4-many.stdout.exp \
119 origin4-many.stderr.exp \
120 origin5-bz2.vgtest origin5-bz2.stdout.exp \
121 origin5-bz2.stderr.exp-glibc25-x86 \
122 origin5-bz2.stderr.exp-glibc25-amd64 \
123 origin5-bz2.stderr.exp-glibc27-ppc64 \
124 origin6-fp.vgtest origin6-fp.stdout.exp \
125 origin6-fp.stderr.exp-glibc25-amd64 \
126 origin6-fp.stderr.exp-glibc27-ppc64 \
127 overlap.stderr.exp overlap.stdout.exp overlap.vgtest \
128 partiallydefinedeq.vgtest partiallydefinedeq.stderr.exp \
129 partiallydefinedeq.stderr.exp2 \
130 partiallydefinedeq.stdout.exp \
131 partial_load_ok.vgtest partial_load_ok.stderr.exp partial_load_ok.stderr.exp64 \
132 partial_load_dflt.vgtest partial_load_dflt.stderr.exp partial_load_dflt.stderr.exp64 \
133 pdb-realloc.stderr.exp pdb-realloc.vgtest \
134 pdb-realloc2.stderr.exp pdb-realloc2.stdout.exp pdb-realloc2.vgtest \
135 pipe.stderr.exp pipe.vgtest \
136 pointer-trace.vgtest \
137 pointer-trace.stderr.exp \
138 post-syscall.stderr.exp post-syscall.vgtest \
139 realloc1.stderr.exp realloc1.vgtest \
140 realloc2.stderr.exp realloc2.vgtest \
141 realloc3.stderr.exp realloc3.vgtest \
142 sh-mem.stderr.exp sh-mem.vgtest \
143 sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \
144 sh-mem-random.stdout.exp sh-mem-random.vgtest \
145 sigaltstack.stderr.exp sigaltstack.vgtest \
146 sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.vgtest \
147 signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
148 sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
149 strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \
151 str_tester.stderr.exp str_tester.vgtest \
152 supp-dir.vgtest supp-dir.stderr.exp \
153 supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \
154 supp1.stderr.exp supp1.vgtest \
155 supp2.stderr.exp supp2.vgtest \
157 suppfree.stderr.exp suppfree.vgtest \
158 trivialleak.stderr.exp trivialleak.vgtest \
159 unit_libcbase.stderr.exp unit_libcbase.vgtest \
160 unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \
161 varinfo1.vgtest varinfo1.stdout.exp varinfo1.stderr.exp \
162 varinfo2.vgtest varinfo2.stdout.exp varinfo2.stderr.exp \
163 varinfo3.vgtest varinfo3.stdout.exp varinfo3.stderr.exp \
164 varinfo4.vgtest varinfo4.stdout.exp varinfo4.stderr.exp \
165 varinfo5.vgtest varinfo5.stdout.exp varinfo5.stderr.exp \
166 varinfo6.vgtest varinfo6.stdout.exp varinfo6.stderr.exp \
167 vcpu_bz2.stdout.exp vcpu_bz2.stderr.exp vcpu_bz2.vgtest \
168 vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \
169 vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \
170 vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \
171 wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \
172 wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \
173 wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \
174 wrap4.vgtest wrap4.stdout.exp wrap4.stderr.exp \
175 wrap5.vgtest wrap5.stdout.exp wrap5.stderr.exp \
176 wrap6.vgtest wrap6.stdout.exp wrap6.stderr.exp \
177 wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \
178 wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \
179 wrap8.stdout.exp2 wrap8.stderr.exp2 \
180 writev.stderr.exp writev.vgtest \
181 xml1.stderr.exp xml1.stdout.exp xml1.vgtest
186 badaddrvalue badfree badjump badjump2 \
198 doublefree error_counts errs1 exitprog execve execve2 erringfds \
200 fprw fwrite inits inline \
206 linux-syslog-syscall \
207 linux-syscalls-2007 \
212 malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
214 memalign_test memalign2 memcmptest mempool mmaptest \
215 mismatches new_override metadata \
216 nanoleak_supp nanoleak2 new_nothrow \
219 origin1-yes origin2-not-quite origin3-no \
220 origin4-many origin5-bz2 origin6-fp \
223 partial_load pdb-realloc pdb-realloc2 \
226 realloc1 realloc2 realloc3 \
227 sh-mem sh-mem-random \
228 sigaltstack signal2 sigprocmask sigkill \
231 supp_unknown supp1 supp2 suppfree \
233 unit_libcbase unit_oset \
234 varinfo1 varinfo2 varinfo3 varinfo4 \
235 varinfo5 varinfo5so.so varinfo6 \
236 vcpu_fbench vcpu_fnfns \
238 wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
242 AM_CFLAGS += $(AM_FLAG_M3264_PRI)
243 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
245 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
246 AM_CFLAGS += -mfloat-abi=softfp
247 AM_CXXFLAGS += -mfloat-abi=softfp
250 if VGCONF_OS_IS_DARWIN
251 atomic_incs_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic
253 atomic_incs_CFLAGS = $(AM_CFLAGS)
256 deep_templates_SOURCES = deep_templates.cpp
257 deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
259 error_counts_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
261 inits_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
263 long_namespace_xml_SOURCES = long_namespace_xml.cpp
265 manuel1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
267 memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
269 mismatches_SOURCES = mismatches.cpp
271 new_nothrow_SOURCES = new_nothrow.cpp
272 new_override_SOURCES = new_override.cpp
274 origin2_not_quite_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
276 origin3_no_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
278 # This requires optimisation in order to get just one resulting error.
279 origin4_many_CFLAGS = $(AM_CFLAGS) -O
281 # Apply -O so as to run in reasonable time.
282 origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
283 origin6_fp_CFLAGS = $(AM_CFLAGS) -O
285 # Don't allow GCC to inline memcpy(), because then we can't intercept it
286 overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
288 str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
290 supp_unknown_SOURCES = badjump.c
291 supp1_SOURCES = supp.c
292 supp2_SOURCES = supp.c
294 vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
295 vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
296 vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
297 vcpu_fnfns_LDADD = -lm
298 wrap6_CFLAGS = $(AM_CFLAGS) -O2
300 # To make it a bit more realistic, have some optimisation enabled
301 # for the varinfo tests. We still expect sane results.
302 varinfo1_CFLAGS = $(AM_CFLAGS) -O
303 varinfo2_CFLAGS = $(AM_CFLAGS) -O -Wno-shadow
304 varinfo3_CFLAGS = $(AM_CFLAGS) -O
305 varinfo4_CFLAGS = $(AM_CFLAGS) -O
306 varinfo5_CFLAGS = $(AM_CFLAGS) -O
307 varinfo6_CFLAGS = $(AM_CFLAGS) -O
309 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
310 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
312 # persuade the AIX linker not to junk apparently unused
313 # function descriptors. Unfortunately -Wl,-G -Wl,-bnogc
314 # produces a link error on 64-bit AIX, hence only 32-bit
316 wrap1_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
317 wrap2_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
318 wrap3_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
319 wrap4_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
320 wrap5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
321 wrap6_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
322 wrap8_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
326 # Build shared object for varinfo5
327 varinfo5_SOURCES = varinfo5.c
328 varinfo5_DEPENDENCIES = varinfo5so.so
329 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
330 varinfo5_LDADD = `pwd`/varinfo5so.so
331 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
333 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
334 varinfo5_LDADD = `pwd`/varinfo5so.so
335 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
337 if VGCONF_OS_IS_DARWIN
338 varinfo5_LDADD = `pwd`/varinfo5so.so
339 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
341 varinfo5_LDADD = varinfo5so.so
342 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
343 -Wl,-rpath,$(top_builddir)/memcheck/tests
347 varinfo5so_so_SOURCES = varinfo5so.c
348 varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O -Wno-shadow
349 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
350 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
352 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
353 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
356 if VGCONF_OS_IS_DARWIN
357 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
358 -dynamiclib -all_load
360 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
361 -Wl,-soname -Wl,varinfo5so.so
366 # Build shared object for wrap7
367 wrap7_SOURCES = wrap7.c
368 wrap7_DEPENDENCIES = wrap7so.so
369 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
370 wrap7_LDADD = `pwd`/wrap7so.so
371 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
373 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
374 wrap7_LDADD = `pwd`/wrap7so.so
375 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
377 if VGCONF_OS_IS_DARWIN
378 wrap7_LDADD = `pwd`/wrap7so.so
379 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
381 wrap7_LDADD = wrap7so.so
382 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) \
383 -Wl,-rpath,$(top_builddir)/memcheck/tests
388 wrap7so_so_SOURCES = wrap7so.c
389 wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic
390 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
391 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
393 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
394 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
397 if VGCONF_OS_IS_DARWIN
398 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
399 -dynamiclib -all_load
401 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
402 -Wl,-soname -Wl,wrap7so.so