]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/memcheck/tests/Makefile.am
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / memcheck / tests / Makefile.am
1
2 include $(top_srcdir)/Makefile.tool-tests.am
3
4 SUBDIRS = .
5
6 # Arch-specific tests.
7 if VGCONF_ARCHS_INCLUDE_X86
8 SUBDIRS += x86
9 endif
10 if VGCONF_ARCHS_INCLUDE_AMD64
11 SUBDIRS += amd64
12 endif
13
14 if VGCONF_ARCHS_INCLUDE_PPC32
15 SUBDIRS += ppc32
16 endif
17 if VGCONF_ARCHS_INCLUDE_PPC64
18 SUBDIRS += ppc64
19 endif
20
21 # OS-specific tests
22 if VGCONF_OS_IS_LINUX
23 SUBDIRS += linux
24 endif
25 if VGCONF_OS_IS_DARWIN
26 SUBDIRS += darwin
27 endif
28
29 # Platform-specific tests
30 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
31 SUBDIRS += x86-linux
32 endif
33 if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
34 SUBDIRS += amd64-linux
35 endif
36
37 DIST_SUBDIRS = x86 amd64 ppc32 ppc64 linux darwin x86-linux amd64-linux .
38
39 dist_noinst_SCRIPTS = \
40         filter_addressable \
41         filter_allocs \
42         filter_leak_cases_possible \
43         filter_stderr filter_xml \
44         filter_varinfo3
45
46 noinst_HEADERS = leak.h
47
48 EXTRA_DIST = \
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 \
167             strchr.vgtest \
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 \
174         supp.supp \
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
200
201 check_PROGRAMS = \
202         addressable \
203         atomic_incs \
204         badaddrvalue badfree badjump badjump2 \
205         badloop \
206         badpoll \
207         badrw \
208         brk2 \
209         buflen_check \
210         calloc-overflow \
211         clientperm \
212         custom_alloc \
213         custom-overlap \
214         deep_templates \
215         describe-block \
216         doublefree error_counts errs1 exitprog execve execve2 erringfds \
217         file_locking \
218         fprw fwrite inits inline \
219         leak-0 \
220         leak-cases \
221         leak-cycle \
222         leak-pool \
223         leak-tree \
224         long_namespace_xml \
225         long-supps \
226         mallinfo \
227         malloc_free_fill \
228         malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
229         match-overrun \
230         memalign_test memalign2 memcmptest mempool mempool2 mmaptest \
231         mismatches new_override metadata \
232         nanoleak_supp nanoleak2 new_nothrow \
233         noisy_child \
234         null_socket \
235         origin1-yes origin2-not-quite origin3-no \
236         origin4-many origin5-bz2 origin6-fp \
237         overlap \
238         partiallydefinedeq \
239         partial_load pdb-realloc pdb-realloc2 \
240         pipe pointer-trace \
241         post-syscall \
242         realloc1 realloc2 realloc3 \
243         sh-mem sh-mem-random \
244         sigaltstack signal2 sigprocmask sigkill \
245         strchr \
246         str_tester \
247         supp_unknown supp1 supp2 suppfree \
248         trivialleak \
249         unit_libcbase unit_oset \
250         varinfo1 varinfo2 varinfo3 varinfo4 \
251         varinfo5 varinfo5so.so varinfo6 \
252         vcpu_fbench vcpu_fnfns \
253         xml1 \
254         wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
255         writev
256
257
258 AM_CFLAGS   += $(AM_FLAG_M3264_PRI)
259 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
260
261 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
262 AM_CFLAGS   += -mfloat-abi=softfp
263 AM_CXXFLAGS += -mfloat-abi=softfp
264 endif
265
266 if VGCONF_OS_IS_DARWIN
267 atomic_incs_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic
268 else
269 atomic_incs_CFLAGS = $(AM_CFLAGS)
270 endif
271
272 deep_templates_SOURCES  = deep_templates.cpp
273 deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
274
275 error_counts_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
276
277 execve_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
278
279 execve2_CFLAGS = $(AM_CFLASG) @FLAG_W_NO_NONNULL@
280
281 inits_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
282
283 long_namespace_xml_SOURCES = long_namespace_xml.cpp
284
285 manuel1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
286
287 memcmptest_CFLAGS       = $(AM_CFLAGS) -fno-builtin-memcmp
288
289 mismatches_SOURCES      = mismatches.cpp
290
291 new_nothrow_SOURCES     = new_nothrow.cpp
292 new_override_SOURCES    = new_override.cpp
293
294 origin2_not_quite_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
295
296 origin3_no_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
297
298 # This requires optimisation in order to get just one resulting error.
299 origin4_many_CFLAGS     = $(AM_CFLAGS) -O
300
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
304
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
308
309 str_tester_CFLAGS       = $(AM_CFLAGS) -Wno-shadow
310
311 supp_unknown_SOURCES    = badjump.c
312 supp1_SOURCES           = supp.c
313 supp2_SOURCES           = supp.c
314
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
320
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
329
330 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
331 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
332 else
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
336  # gets these flags.
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
344 endif
345 endif
346
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)
353 else
354 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
355  varinfo5_LDADD         = `pwd`/varinfo5so.so
356  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
357 else
358 if VGCONF_OS_IS_DARWIN
359  varinfo5_LDADD         = `pwd`/varinfo5so.so
360  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI)
361 else
362  varinfo5_LDADD         = varinfo5so.so
363  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI) \
364                                 -Wl,-rpath,$(top_builddir)/memcheck/tests
365 endif
366 endif
367
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
372 else
373 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
374  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -shared \
375                                 -Wl,-G -Wl,-bnogc
376 else
377 if VGCONF_OS_IS_DARWIN
378  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
379                                 -dynamiclib -all_load
380 else
381  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -shared \
382                                 -Wl,-soname -Wl,varinfo5so.so
383 endif
384 endif
385 endif
386
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)
393 else
394 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
395  wrap7_LDADD            = `pwd`/wrap7so.so
396  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
397 else
398 if VGCONF_OS_IS_DARWIN
399  wrap7_LDADD            = `pwd`/wrap7so.so
400  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI)
401 else
402  wrap7_LDADD            = wrap7so.so
403  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI) \
404                                 -Wl,-rpath,$(top_builddir)/memcheck/tests
405 endif
406 endif
407 endif
408
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
413 else
414 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
415  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared \
416                                 -Wl,-G -Wl,-bnogc
417 else
418 if VGCONF_OS_IS_DARWIN
419  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
420                                 -dynamiclib -all_load
421 else
422  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared \
423                                 -Wl,-soname -Wl,wrap7so.so
424 endif
425 endif
426 endif
427
428 endif
429