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