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 if VGCONF_ARCHS_INCLUDE_PPC32 14 SUBDIRS += ppc32 15 endif 16 if VGCONF_ARCHS_INCLUDE_PPC64 17 SUBDIRS += ppc64 18 endif 19 if VGCONF_ARCHS_INCLUDE_S390X 20 SUBDIRS += s390x 21 endif 22 23 # OS-specific tests 24 if VGCONF_OS_IS_LINUX 25 SUBDIRS += linux 26 endif 27 if VGCONF_OS_IS_DARWIN 28 SUBDIRS += darwin 29 endif 30 31 # Platform-specific tests 32 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX 33 SUBDIRS += x86-linux 34 endif 35 if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX 36 SUBDIRS += amd64-linux 37 endif 38 39 DIST_SUBDIRS = x86 amd64 ppc32 ppc64 s390x linux darwin x86-linux amd64-linux . 40 41 dist_noinst_SCRIPTS = \ 42 filter_addressable \ 43 filter_allocs \ 44 filter_leak_cases_possible \ 45 filter_stderr filter_xml \ 46 filter_varinfo3 \ 47 filter_memcheck 48 49 noinst_HEADERS = leak.h 50 51 EXTRA_DIST = \ 52 accounting.stderr.exp accounting.vgtest \ 53 addressable.stderr.exp addressable.stdout.exp addressable.vgtest \ 54 atomic_incs.stderr.exp atomic_incs.vgtest \ 55 atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \ 56 badaddrvalue.stderr.exp \ 57 badaddrvalue.stdout.exp badaddrvalue.vgtest \ 58 badfree-2trace.stderr.exp badfree-2trace.vgtest \ 59 badfree.stderr.exp badfree.vgtest \ 60 badfree3.stderr.exp badfree3.vgtest \ 61 badjump.stderr.exp badjump.vgtest \ 62 badjump2.stderr.exp badjump2.vgtest \ 63 badjump.stderr.exp-kfail \ 64 badjump2.stderr.exp-kfail \ 65 badloop.stderr.exp badloop.vgtest \ 66 badpoll.stderr.exp badpoll.vgtest \ 67 badrw.stderr.exp badrw.vgtest badrw.stderr.exp-s390x-mvc \ 68 big_blocks_freed_list.stderr.exp big_blocks_freed_list.vgtest \ 69 brk2.stderr.exp brk2.vgtest \ 70 buflen_check.stderr.exp buflen_check.vgtest buflen_check.stderr.exp-kfail \ 71 bug287260.stderr.exp bug287260.vgtest \ 72 calloc-overflow.stderr.exp calloc-overflow.vgtest\ 73 clientperm.stderr.exp \ 74 clientperm.stdout.exp clientperm.vgtest \ 75 clireq_nofill.stderr.exp \ 76 clireq_nofill.stdout.exp clireq_nofill.vgtest \ 77 clo_redzone_default.vgtest clo_redzone_128.vgtest \ 78 clo_redzone_default.stderr.exp clo_redzone_128.stderr.exp \ 79 custom_alloc.stderr.exp custom_alloc.vgtest custom_alloc.stderr.exp-s390x-mvc \ 80 custom-overlap.stderr.exp custom-overlap.vgtest \ 81 deep-backtrace.vgtest deep-backtrace.stderr.exp \ 82 deep_templates.vgtest \ 83 deep_templates.stdout.exp deep_templates.stderr.exp \ 84 describe-block.stderr.exp describe-block.vgtest \ 85 doublefree.stderr.exp doublefree.vgtest \ 86 dw4.vgtest dw4.stderr.exp dw4.stdout.exp \ 87 err_disable1.vgtest err_disable1.stderr.exp \ 88 err_disable2.vgtest err_disable2.stderr.exp \ 89 err_disable3.vgtest err_disable3.stderr.exp \ 90 err_disable4.vgtest err_disable4.stderr.exp \ 91 erringfds.stderr.exp erringfds.stdout.exp erringfds.vgtest \ 92 error_counts.stderr.exp error_counts.vgtest \ 93 errs1.stderr.exp errs1.vgtest \ 94 exitprog.stderr.exp exitprog.vgtest \ 95 execve1.stderr.exp execve1.vgtest execve1.stderr.exp-kfail \ 96 execve2.stderr.exp execve2.vgtest execve2.stderr.exp-kfail \ 97 file_locking.stderr.exp file_locking.vgtest \ 98 fprw.stderr.exp fprw.vgtest \ 99 fwrite.stderr.exp fwrite.vgtest fwrite.stderr.exp-kfail \ 100 holey_buffer_too_small.vgtest holey_buffer_too_small.stdout.exp \ 101 holey_buffer_too_small.stderr.exp \ 102 inits.stderr.exp inits.vgtest \ 103 inline.stderr.exp inline.stdout.exp inline.vgtest \ 104 leak-0.vgtest leak-0.stderr.exp \ 105 leak-cases-full.vgtest leak-cases-full.stderr.exp \ 106 leak-cases-possible.vgtest leak-cases-possible.stderr.exp \ 107 leak-cases-summary.vgtest leak-cases-summary.stderr.exp \ 108 leak-cycle.vgtest leak-cycle.stderr.exp \ 109 leak-delta.vgtest leak-delta.stderr.exp \ 110 leak-pool-0.vgtest leak-pool-0.stderr.exp \ 111 leak-pool-1.vgtest leak-pool-1.stderr.exp \ 112 leak-pool-2.vgtest leak-pool-2.stderr.exp \ 113 leak-pool-3.vgtest leak-pool-3.stderr.exp \ 114 leak-pool-4.vgtest leak-pool-4.stderr.exp \ 115 leak-pool-5.vgtest leak-pool-5.stderr.exp \ 116 leak-tree.vgtest leak-tree.stderr.exp \ 117 long_namespace_xml.vgtest long_namespace_xml.stdout.exp \ 118 long_namespace_xml.stderr.exp \ 119 long-supps.vgtest long-supps.stderr.exp long-supps.supp \ 120 mallinfo.stderr.exp mallinfo.vgtest \ 121 malloc_free_fill.vgtest \ 122 malloc_free_fill.stderr.exp \ 123 malloc_usable.stderr.exp malloc_usable.vgtest \ 124 malloc1.stderr.exp malloc1.vgtest \ 125 malloc2.stderr.exp malloc2.vgtest \ 126 malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \ 127 manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \ 128 manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp manuel2.vgtest \ 129 manuel3.stderr.exp manuel3.vgtest \ 130 match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \ 131 memalign_test.stderr.exp memalign_test.vgtest \ 132 memalign2.stderr.exp memalign2.vgtest \ 133 memcmptest.stderr.exp memcmptest.stderr.exp2 \ 134 memcmptest.stdout.exp memcmptest.vgtest \ 135 mempool.stderr.exp mempool.vgtest \ 136 mempool2.stderr.exp mempool2.vgtest \ 137 metadata.stderr.exp metadata.stdout.exp metadata.vgtest \ 138 mismatches.stderr.exp mismatches.vgtest \ 139 mmaptest.stderr.exp mmaptest.vgtest \ 140 nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \ 141 nanoleak2.stderr.exp nanoleak2.vgtest \ 142 new_nothrow.stderr.exp new_nothrow.vgtest \ 143 new_override.stderr.exp new_override.stdout.exp new_override.vgtest \ 144 noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \ 145 null_socket.stderr.exp null_socket.vgtest \ 146 origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \ 147 origin2-not-quite.vgtest origin2-not-quite.stdout.exp \ 148 origin2-not-quite.stderr.exp \ 149 origin3-no.vgtest origin3-no.stdout.exp \ 150 origin3-no.stderr.exp \ 151 origin4-many.vgtest origin4-many.stdout.exp \ 152 origin4-many.stderr.exp \ 153 origin5-bz2.vgtest origin5-bz2.stdout.exp \ 154 origin5-bz2.stderr.exp-glibc25-x86 \ 155 origin5-bz2.stderr.exp-glibc25-amd64 \ 156 origin5-bz2.stderr.exp-glibc27-ppc64 \ 157 origin5-bz2.stderr.exp-glibc212-s390x \ 158 origin5-bz2.stderr.exp-glibc234-s390x \ 159 origin6-fp.vgtest origin6-fp.stdout.exp \ 160 origin6-fp.stderr.exp-glibc25-amd64 \ 161 origin6-fp.stderr.exp-glibc27-ppc64 \ 162 overlap.stderr.exp overlap.stdout.exp overlap.vgtest \ 163 partiallydefinedeq.vgtest partiallydefinedeq.stderr.exp \ 164 partiallydefinedeq.stderr.exp4 \ 165 partiallydefinedeq.stderr.exp3 \ 166 partiallydefinedeq.stderr.exp2 \ 167 partiallydefinedeq.stdout.exp \ 168 partial_load_ok.vgtest partial_load_ok.stderr.exp partial_load_ok.stderr.exp64 \ 169 partial_load_dflt.vgtest partial_load_dflt.stderr.exp partial_load_dflt.stderr.exp64 \ 170 partial_load_dflt.stderr.expr-s390x-mvc \ 171 pdb-realloc.stderr.exp pdb-realloc.vgtest \ 172 pdb-realloc2.stderr.exp pdb-realloc2.stdout.exp pdb-realloc2.vgtest \ 173 pipe.stderr.exp pipe.vgtest \ 174 pointer-trace.vgtest \ 175 pointer-trace.stderr.exp \ 176 post-syscall.stderr.exp post-syscall.vgtest \ 177 realloc1.stderr.exp realloc1.vgtest \ 178 realloc2.stderr.exp realloc2.vgtest \ 179 realloc3.stderr.exp realloc3.vgtest \ 180 sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ 181 sh-mem.stderr.exp sh-mem.vgtest \ 182 sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ 183 sh-mem-random.stdout.exp sh-mem-random.vgtest \ 184 sigaltstack.stderr.exp sigaltstack.vgtest \ 185 sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.stderr.exp-mips32 \ 186 sigkill.vgtest \ 187 signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ 188 sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ 189 static_malloc.stderr.exp static_malloc.vgtest \ 190 strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \ 191 strchr.stderr.exp3 strchr.vgtest \ 192 str_tester.stderr.exp str_tester.vgtest \ 193 supp-dir.vgtest supp-dir.stderr.exp \ 194 supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \ 195 supp_unknown.stderr.exp-kfail \ 196 supp1.stderr.exp supp1.vgtest \ 197 supp2.stderr.exp supp2.vgtest \ 198 supp.supp \ 199 suppfree.stderr.exp suppfree.supp suppfree.vgtest \ 200 test-plo-no.vgtest test-plo-no.stdout.exp \ 201 test-plo-no.stderr.exp-le64 test-plo-no.stderr.exp-le32 \ 202 test-plo-yes.vgtest test-plo-yes.stdout.exp \ 203 test-plo-yes.stderr.exp-le64 test-plo-yes.stderr.exp-le32 \ 204 test-plo-no.stderr.exp-s390x-mvc \ 205 trivialleak.stderr.exp trivialleak.vgtest trivialleak.stderr.exp2 \ 206 unit_libcbase.stderr.exp unit_libcbase.vgtest \ 207 unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \ 208 varinfo1.vgtest varinfo1.stdout.exp varinfo1.stderr.exp varinfo1.stderr.exp-ppc64 \ 209 varinfo2.vgtest varinfo2.stdout.exp varinfo2.stderr.exp varinfo2.stderr.exp-ppc64 \ 210 varinfo3.vgtest varinfo3.stdout.exp varinfo3.stderr.exp varinfo3.stderr.exp-ppc64 \ 211 varinfo4.vgtest varinfo4.stdout.exp varinfo4.stderr.exp varinfo4.stderr.exp-ppc64 \ 212 varinfo5.vgtest varinfo5.stdout.exp varinfo5.stderr.exp varinfo5.stderr.exp-ppc64 \ 213 varinfo6.vgtest varinfo6.stdout.exp varinfo6.stderr.exp varinfo6.stderr.exp-ppc64 \ 214 vcpu_bz2.stdout.exp vcpu_bz2.stderr.exp vcpu_bz2.vgtest \ 215 vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \ 216 vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \ 217 vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \ 218 wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \ 219 wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \ 220 wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \ 221 wrap4.vgtest wrap4.stdout.exp wrap4.stderr.exp \ 222 wrap5.vgtest wrap5.stdout.exp wrap5.stderr.exp \ 223 wrap6.vgtest wrap6.stdout.exp wrap6.stderr.exp \ 224 wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \ 225 wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \ 226 wrap8.stdout.exp2 wrap8.stderr.exp2 \ 227 writev1.stderr.exp writev1.vgtest \ 228 xml1.stderr.exp xml1.stdout.exp xml1.vgtest xml1.stderr.exp-s390x-mvc 229 230 check_PROGRAMS = \ 231 accounting \ 232 addressable \ 233 atomic_incs \ 234 badaddrvalue badfree badjump badjump2 \ 235 badloop \ 236 badpoll \ 237 badrw \ 238 big_blocks_freed_list \ 239 brk2 \ 240 buflen_check \ 241 bug287260 \ 242 calloc-overflow \ 243 clientperm \ 244 clireq_nofill \ 245 clo_redzone \ 246 custom_alloc \ 247 custom-overlap \ 248 deep-backtrace \ 249 deep_templates \ 250 describe-block \ 251 doublefree error_counts errs1 exitprog execve1 execve2 erringfds \ 252 err_disable1 err_disable2 err_disable3 err_disable4 \ 253 file_locking \ 254 fprw fwrite inits inline \ 255 holey_buffer_too_small \ 256 leak-0 \ 257 leak-cases \ 258 leak-cycle \ 259 leak-delta \ 260 leak-pool \ 261 leak-tree \ 262 long_namespace_xml \ 263 long-supps \ 264 mallinfo \ 265 malloc_free_fill \ 266 malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \ 267 match-overrun \ 268 memalign_test memalign2 memcmptest mempool mempool2 mmaptest \ 269 mismatches new_override metadata \ 270 nanoleak_supp nanoleak2 new_nothrow \ 271 noisy_child \ 272 null_socket \ 273 origin1-yes origin2-not-quite origin3-no \ 274 origin4-many origin5-bz2 origin6-fp \ 275 overlap \ 276 partiallydefinedeq \ 277 partial_load pdb-realloc pdb-realloc2 \ 278 pipe pointer-trace \ 279 post-syscall \ 280 realloc1 realloc2 realloc3 \ 281 sbfragment \ 282 sh-mem sh-mem-random \ 283 sigaltstack signal2 sigprocmask static_malloc sigkill \ 284 strchr \ 285 str_tester \ 286 supp_unknown supp1 supp2 suppfree \ 287 test-plo \ 288 trivialleak \ 289 unit_libcbase unit_oset \ 290 varinfo1 varinfo2 varinfo3 varinfo4 \ 291 varinfo5 varinfo5so.so varinfo6 \ 292 vcpu_fbench vcpu_fnfns \ 293 xml1 \ 294 wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \ 295 writev1 296 297 if DWARF4 298 check_PROGRAMS += dw4 299 endif 300 301 AM_CFLAGS += $(AM_FLAG_M3264_PRI) 302 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) 303 304 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX 305 #AM_CFLAGS += -mfloat-abi=softfp 306 #AM_CXXFLAGS += -mfloat-abi=softfp 307 endif 308 309 if VGCONF_OS_IS_DARWIN 310 atomic_incs_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic 311 else 312 atomic_incs_CFLAGS = $(AM_CFLAGS) 313 endif 314 315 deep_templates_SOURCES = deep_templates.cpp 316 deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs 317 318 dw4_CFLAGS = $(AM_CFLAGS) -gdwarf-4 -fdebug-types-section 319 320 err_disable3_LDADD = -lpthread 321 err_disable4_LDADD = -lpthread 322 323 error_counts_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ 324 325 execve1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ 326 327 execve2_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ 328 329 inits_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ 330 331 long_namespace_xml_SOURCES = long_namespace_xml.cpp 332 333 manuel1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ 334 335 memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp 336 337 mismatches_SOURCES = mismatches.cpp 338 339 new_nothrow_SOURCES = new_nothrow.cpp 340 new_override_SOURCES = new_override.cpp 341 342 origin2_not_quite_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ 343 344 origin3_no_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ 345 346 # This requires optimisation in order to get just one resulting error. 347 origin4_many_CFLAGS = $(AM_CFLAGS) -O 348 349 # Apply -O so as to run in reasonable time. 350 origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline 351 origin6_fp_CFLAGS = $(AM_CFLAGS) -O 352 353 # Don't allow GCC to inline memcpy() and strcpy(), 354 # because then we can't intercept it 355 overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy -fno-builtin-strcpy 356 357 str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow 358 359 supp_unknown_SOURCES = badjump.c 360 supp1_SOURCES = supp.c 361 supp2_SOURCES = supp.c 362 363 vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2 364 vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2 365 vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2 366 vcpu_fnfns_LDADD = -lm 367 wrap6_CFLAGS = $(AM_CFLAGS) -O2 368 369 # To make it a bit more realistic, have some optimisation enabled 370 # for the varinfo tests. We still expect sane results. 371 varinfo1_CFLAGS = $(AM_CFLAGS) -O 372 varinfo2_CFLAGS = $(AM_CFLAGS) -O -Wno-shadow 373 varinfo3_CFLAGS = $(AM_CFLAGS) -O 374 varinfo4_CFLAGS = $(AM_CFLAGS) -O 375 varinfo5_CFLAGS = $(AM_CFLAGS) -O 376 varinfo6_CFLAGS = $(AM_CFLAGS) -O 377 378 # Build shared object for varinfo5 379 varinfo5_SOURCES = varinfo5.c 380 varinfo5_DEPENDENCIES = varinfo5so.so 381 if VGCONF_OS_IS_DARWIN 382 varinfo5_LDADD = `pwd`/varinfo5so.so 383 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) 384 else 385 varinfo5_LDADD = varinfo5so.so 386 varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \ 387 -Wl,-rpath,$(top_builddir)/memcheck/tests 388 endif 389 390 varinfo5so_so_SOURCES = varinfo5so.c 391 varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O -Wno-shadow 392 if VGCONF_OS_IS_DARWIN 393 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \ 394 -dynamiclib -all_load 395 else 396 varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \ 397 -Wl,-soname -Wl,varinfo5so.so 398 endif 399 400 # Build shared object for wrap7 401 wrap7_SOURCES = wrap7.c 402 wrap7_DEPENDENCIES = wrap7so.so 403 if VGCONF_OS_IS_DARWIN 404 wrap7_LDADD = `pwd`/wrap7so.so 405 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) 406 else 407 wrap7_LDADD = wrap7so.so 408 wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) \ 409 -Wl,-rpath,$(top_builddir)/memcheck/tests 410 endif 411 412 wrap7so_so_SOURCES = wrap7so.c 413 wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic 414 if VGCONF_OS_IS_DARWIN 415 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \ 416 -dynamiclib -all_load 417 else 418 wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \ 419 -Wl,-soname -Wl,wrap7so.so 420 endif 421 422