1 2include $(top_srcdir)/Makefile.tool-tests.am 3 4SUBDIRS = . 5SUBDIRS += scripts 6 7# Arch-specific tests. 8if VGCONF_ARCHS_INCLUDE_X86 9SUBDIRS += x86 10endif 11if VGCONF_ARCHS_INCLUDE_AMD64 12SUBDIRS += amd64 13endif 14if VGCONF_ARCHS_INCLUDE_PPC32 15SUBDIRS += ppc32 16endif 17if VGCONF_ARCHS_INCLUDE_PPC64 18SUBDIRS += ppc64 19endif 20if VGCONF_ARCHS_INCLUDE_ARM 21SUBDIRS += arm 22endif 23if VGCONF_ARCHS_INCLUDE_ARM64 24SUBDIRS += arm64 25endif 26if VGCONF_ARCHS_INCLUDE_S390X 27SUBDIRS += s390x 28endif 29if VGCONF_ARCHS_INCLUDE_MIPS32 30SUBDIRS += mips32 31endif 32if VGCONF_ARCHS_INCLUDE_MIPS64 33SUBDIRS += mips64 34endif 35 36# OS-specific tests 37if VGCONF_OS_IS_LINUX 38SUBDIRS += linux 39endif 40if VGCONF_OS_IS_DARWIN 41SUBDIRS += darwin 42endif 43if VGCONF_OS_IS_SOLARIS 44SUBDIRS += solaris 45endif 46 47# Platform-specific tests 48if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX 49SUBDIRS += amd64-linux 50endif 51if VGCONF_PLATFORMS_INCLUDE_X86_LINUX 52SUBDIRS += x86-linux 53endif 54if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN 55SUBDIRS += amd64-darwin 56endif 57if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN 58SUBDIRS += x86-darwin 59endif 60if VGCONF_PLATFORMS_INCLUDE_AMD64_SOLARIS 61SUBDIRS += amd64-solaris 62endif 63if VGCONF_PLATFORMS_INCLUDE_X86_SOLARIS 64SUBDIRS += x86-solaris 65endif 66 67DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm arm64 s390x mips32 mips64 \ 68 linux darwin solaris amd64-linux x86-linux amd64-darwin \ 69 x86-darwin amd64-solaris x86-solaris scripts . 70 71dist_noinst_SCRIPTS = \ 72 filter_cmdline0 \ 73 filter_cmdline1 \ 74 filter_fdleak \ 75 filter_ioctl_moans \ 76 filter_none_discards \ 77 filter_stderr \ 78 filter_timestamp \ 79 allexec_prepare_prereq 80 81noinst_HEADERS = fdleak.h 82 83EXTRA_DIST = \ 84 allexec32.stdout.exp allexec32.stderr.exp allexec32.vgtest\ 85 allexec64.stdout.exp allexec64.stderr.exp allexec64.vgtest\ 86 ansi.stderr.exp ansi.vgtest \ 87 args.stderr.exp args.stdout.exp args.vgtest \ 88 async-sigs.stderr.exp async-sigs.stderr.exp-mips32 \ 89 async-sigs.vgtest \ 90 bigcode.vgtest bigcode.stderr.exp bigcode.stdout.exp \ 91 bitfield1.stderr.exp bitfield1.vgtest \ 92 bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \ 93 bug234814.vgtest bug234814.stderr.exp bug234814.stdout.exp \ 94 closeall.stderr.exp closeall.vgtest \ 95 cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \ 96 cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \ 97 cmdline2.stderr.exp cmdline2.stdout.exp cmdline2.vgtest \ 98 cmdline3.stderr.exp cmdline3.vgtest \ 99 cmdline4.stderr.exp cmdline4.vgtest \ 100 cmdline5.stderr.exp cmdline5.vgtest \ 101 cmdline6.stderr.exp cmdline6.vgtest \ 102 cmd-with-special.stderr.exp cmd-with-special.vgtest \ 103 coolo_sigaction.stderr.exp \ 104 coolo_sigaction.stdout.exp coolo_sigaction.vgtest \ 105 coolo_strlen.stderr.exp coolo_strlen.vgtest \ 106 discard.stderr.exp discard.stdout.exp \ 107 discard.vgtest \ 108 empty-exe.vgtest empty-exe.stderr.exp \ 109 exec-sigmask.vgtest exec-sigmask.stdout.exp \ 110 exec-sigmask.stdout.exp2 exec-sigmask.stdout.exp3 \ 111 exec-sigmask.stdout.exp-solaris exec-sigmask.stderr.exp \ 112 execve.vgtest execve.stdout.exp execve.stderr.exp \ 113 faultstatus.vgtest faultstatus.stderr.exp faultstatus.stderr.exp-s390x \ 114 fcntl_setown.vgtest fcntl_setown.stdout.exp fcntl_setown.stderr.exp \ 115 fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \ 116 fdleak_creat.stderr.exp fdleak_creat.vgtest \ 117 fdleak_dup.stderr.exp fdleak_dup.vgtest \ 118 fdleak_dup2.stderr.exp fdleak_dup2.vgtest \ 119 fdleak_fcntl.stderr.exp fdleak_fcntl.vgtest \ 120 fdleak_ipv4.stderr.exp fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \ 121 fdleak_open.stderr.exp fdleak_open.vgtest \ 122 fdleak_pipe.stderr.exp fdleak_pipe.vgtest \ 123 fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \ 124 floored.stderr.exp floored.stdout.exp floored.vgtest \ 125 fork.stderr.exp fork.stdout.exp fork.vgtest \ 126 fucomip.stderr.exp fucomip.vgtest \ 127 gxx304.stderr.exp gxx304.vgtest \ 128 ifunc.stderr.exp ifunc.stdout.exp ifunc.vgtest \ 129 ioctl_moans.stderr.exp ioctl_moans.vgtest \ 130 libvex_test.stderr.exp libvex_test.vgtest \ 131 libvexmultiarch_test.stderr.exp libvexmultiarch_test.vgtest \ 132 manythreads.stdout.exp manythreads.stderr.exp manythreads.vgtest \ 133 map_unaligned.stderr.exp map_unaligned.vgtest \ 134 map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \ 135 mmap_fcntl_bug.vgtest mmap_fcntl_bug.stdout.exp \ 136 mmap_fcntl_bug.stderr.exp \ 137 mq.stderr.exp mq.vgtest \ 138 munmap_exe.stderr.exp munmap_exe.vgtest \ 139 nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \ 140 nocwd.stdout.exp nocwd.stderr.exp nocwd.vgtest \ 141 nodir.stderr.exp nodir.vgtest \ 142 pending.stdout.exp pending.stderr.exp pending.vgtest \ 143 ppoll_alarm.stdout.exp ppoll_alarm.stderr.exp ppoll_alarm.vgtest \ 144 procfs-linux.stderr.exp-with-readlinkat \ 145 procfs-linux.stderr.exp-without-readlinkat \ 146 procfs-linux.vgtest \ 147 procfs-non-linux.vgtest \ 148 procfs-non-linux.stderr.exp-with-readlinkat \ 149 procfs-non-linux.stderr.exp-without-readlinkat \ 150 pselect_alarm.stdout.exp pselect_alarm.stderr.exp pselect_alarm.vgtest \ 151 pselect_sigmask_null.vgtest \ 152 pselect_sigmask_null.stdout.exp pselect_sigmask_null.stderr.exp \ 153 pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \ 154 pth_blockedsig.stderr.exp \ 155 pth_blockedsig.stdout.exp pth_blockedsig.vgtest \ 156 pth_cancel1.stderr.exp pth_cancel1.stdout.exp pth_cancel1.vgtest \ 157 pth_cancel2.stderr.exp pth_cancel2.vgtest \ 158 pth_cvsimple.stderr.exp pth_cvsimple.stdout.exp pth_cvsimple.vgtest \ 159 pth_empty.stderr.exp pth_empty.vgtest \ 160 pth_exit.stderr.exp pth_exit.vgtest \ 161 pth_exit2.stderr.exp pth_exit2.vgtest \ 162 pth_mutexspeed.stderr.exp \ 163 pth_mutexspeed.stdout.exp pth_mutexspeed.vgtest \ 164 pth_once.stderr.exp pth_once.stdout.exp pth_once.vgtest \ 165 pth_rwlock.stderr.exp pth_rwlock.vgtest \ 166 pth_stackalign.stderr.exp \ 167 pth_stackalign.stdout.exp pth_stackalign.vgtest \ 168 pth_2sig.stderr.exp-linux pth_2sig.stderr.exp-solaris pth_2sig.vgtest \ 169 pth_term_signal.stderr.exp pth_term_signal.vgtest \ 170 rcrl.stderr.exp rcrl.stdout.exp rcrl.vgtest \ 171 readline1.stderr.exp readline1.stdout.exp \ 172 readline1.vgtest \ 173 require-text-symbol-1.vgtest \ 174 require-text-symbol-1.stderr.exp \ 175 require-text-symbol-2.vgtest \ 176 require-text-symbol-2.stderr.exp-libcso1 \ 177 require-text-symbol-2.stderr.exp-libcso6 \ 178 res_search.stderr.exp res_search.stdout.exp res_search.vgtest \ 179 resolv.stderr.exp resolv.stdout.exp resolv.vgtest \ 180 rlimit_nofile.stderr.exp rlimit_nofile.stdout.exp rlimit_nofile.vgtest \ 181 rlimit64_nofile.stderr.exp rlimit64_nofile.stdout.exp rlimit64_nofile.vgtest \ 182 selfrun.stderr.exp selfrun.stdout.exp selfrun.vgtest \ 183 sem.stderr.exp sem.stdout.exp sem.vgtest \ 184 semlimit.stderr.exp semlimit.stdout.exp semlimit.vgtest \ 185 sha1_test.stderr.exp sha1_test.vgtest \ 186 shortpush.stderr.exp shortpush.vgtest \ 187 shorts.stderr.exp shorts.vgtest \ 188 sigstackgrowth.stdout.exp sigstackgrowth.stderr.exp sigstackgrowth.vgtest \ 189 sigsusp.stderr.exp sigsusp.vgtest \ 190 stackgrowth.stdout.exp stackgrowth.stderr.exp stackgrowth.vgtest \ 191 syscall-restart1.vgtest syscall-restart1.stdout.exp syscall-restart1.stderr.exp \ 192 syscall-restart2.vgtest syscall-restart2.stdout.exp syscall-restart2.stderr.exp \ 193 syslog.vgtest syslog.stderr.exp \ 194 system.stderr.exp system.vgtest \ 195 thread-exits.stderr.exp thread-exits.stdout.exp thread-exits.vgtest \ 196 threaded-fork.stderr.exp threaded-fork.stdout.exp threaded-fork.vgtest \ 197 threadederrno.stderr.exp threadederrno.stdout.exp \ 198 threadederrno.vgtest \ 199 timestamp.stderr.exp timestamp.vgtest \ 200 tls.vgtest tls.stderr.exp tls.stdout.exp \ 201 unit_debuglog.stderr.exp unit_debuglog.vgtest \ 202 vgprintf.stderr.exp vgprintf.vgtest \ 203 vgprintf_nvalgrind.stderr.exp vgprintf_nvalgrind.vgtest \ 204 process_vm_readv_writev.stderr.exp process_vm_readv_writev.vgtest 205 206check_PROGRAMS = \ 207 args \ 208 async-sigs \ 209 bitfield1 \ 210 bug129866 bug234814 \ 211 closeall coolo_strlen \ 212 discard exec-sigmask execve faultstatus fcntl_setown \ 213 fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \ 214 fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \ 215 fdleak_socketpair \ 216 floored fork fucomip \ 217 ioctl_moans \ 218 libvex_test \ 219 libvexmultiarch_test \ 220 manythreads \ 221 mmap_fcntl_bug \ 222 munmap_exe map_unaligned map_unmap mq \ 223 nocwd \ 224 pending \ 225 procfs-cmdline-exe \ 226 pselect_alarm \ 227 pselect_sigmask_null \ 228 pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \ 229 pth_empty pth_exit pth_exit2 pth_mutexspeed pth_once pth_rwlock \ 230 pth_stackalign pth_2sig pth_term_signal\ 231 rcrl readline1 \ 232 require-text-symbol \ 233 res_search resolv \ 234 rlimit_nofile selfrun sem semlimit sha1_test \ 235 shortpush shorts stackgrowth sigstackgrowth sigsusp \ 236 syscall-restart1 syscall-restart2 \ 237 syslog \ 238 system \ 239 thread-exits \ 240 threaded-fork \ 241 threadederrno \ 242 timestamp \ 243 tls \ 244 tls.so \ 245 tls2.so \ 246 unit_debuglog \ 247 valgrind_cpp_test \ 248 vgprintf \ 249 vgprintf_nvalgrind \ 250 coolo_sigaction \ 251 gxx304 \ 252 process_vm_readv_writev 253 254if HAVE_NESTED_FUNCTIONS 255 check_PROGRAMS += nestedfns 256endif 257 258# This doesn't appear to be compilable on Darwin. 259if ! VGCONF_OS_IS_DARWIN 260 check_PROGRAMS += rlimit64_nofile \ 261 ppoll_alarm 262endif 263 264# clang does not know -ansi 265if ! COMPILER_IS_CLANG 266 check_PROGRAMS += ansi 267endif 268 269if BUILD_IFUNC_TESTS 270 check_PROGRAMS += ifunc 271endif 272 273AM_CFLAGS += $(AM_FLAG_M3264_PRI) 274AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) 275 276# Extra stuff for C tests 277ansi_CFLAGS = $(AM_CFLAGS) -ansi 278execve_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ 279if VGCONF_OS_IS_SOLARIS 280fcntl_setown_LDADD = -lsocket -lnsl 281fdleak_cmsg_CFLAGS = $(AM_CFLAGS) -std=c99 -D_XOPEN_SOURCE=600 282fdleak_cmsg_LDADD = -lsocket -lnsl 283fdleak_ipv4_LDADD = -lsocket -lnsl 284fdleak_creat_LDADD = -lsocket -lnsl 285fdleak_socketpair_LDADD = -lsocket -lnsl 286endif 287floored_LDADD = -lm 288manythreads_LDADD = -lpthread 289if VGCONF_OS_IS_DARWIN 290 nestedfns_CFLAGS = $(AM_CFLAGS) -fnested-functions 291else 292 nestedfns_CFLAGS = $(AM_CFLAGS) 293 mq_LDADD = -lrt 294endif 295libvex_test_CFLAGS = $(AM_CFLAGS) @FLAG_FSANITIZE@ 296libvex_test_LDADD = ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ 297 @LIB_UBSAN@ 298libvexmultiarch_test_CFLAGS= $(AM_CFLAGS) @FLAG_FSANITIZE@ 299libvexmultiarch_test_LDADD = \ 300 ../../VEX/libvexmultiarch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ 301 ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a @LIB_UBSAN@ 302libvexmultiarch_test_SOURCES = libvex_test.c 303ppoll_alarm_LDADD = -lpthread 304pselect_alarm_LDADD = -lpthread 305pth_atfork1_LDADD = -lpthread 306pth_blockedsig_LDADD = -lpthread 307pth_cancel1_CFLAGS = $(AM_CFLAGS) -Wno-shadow 308pth_cancel1_LDADD = -lpthread 309pth_cancel2_LDADD = -lpthread 310pth_cvsimple_LDADD = -lpthread 311pth_empty_LDADD = -lpthread 312pth_exit_LDADD = -lpthread 313pth_exit2_LDADD = -lpthread 314pth_mutexspeed_LDADD = -lpthread 315pth_once_LDADD = -lpthread 316pth_rwlock_LDADD = -lpthread 317pth_rwlock_CFLAGS = $(AM_CFLAGS) 318if VGCONF_OS_IS_SOLARIS 319pth_rwlock_CFLAGS += --std=c99 320endif 321pth_stackalign_LDADD = -lpthread 322pth_2sig_LDADD = -lpthread 323pth_term_signal_LDADD = -lpthread 324res_search_LDADD = -lresolv -lpthread 325resolv_CFLAGS = $(AM_CFLAGS) 326resolv_LDADD = -lresolv -lpthread 327if VGCONF_OS_IS_SOLARIS 328resolv_CFLAGS += -U_REENTRANT 329endif 330semlimit_LDADD = -lpthread 331sha1_test_CFLAGS = $(AM_CFLAGS) 332if VGCONF_OS_IS_SOLARIS 333sha1_test_CFLAGS += -Du_int32_t=uint32_t 334endif 335sigsusp_LDADD = -lpthread 336thread_exits_LDADD = -lpthread 337threaded_fork_LDADD = -lpthread 338threadederrno_CFLAGS = $(AM_CFLAGS) 339threadederrno_LDADD = -lpthread 340if VGCONF_OS_IS_SOLARIS 341threadederrno_CFLAGS += --std=c99 342endif 343tls_SOURCES = tls.c tls2.c 344tls_DEPENDENCIES = tls.so tls2.so 345tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests 346tls_LDADD = tls.so tls2.so -lpthread 347tls_so_SOURCES = tls_so.c 348tls_so_DEPENDENCIES = tls2.so 349if VGCONF_OS_IS_DARWIN 350 tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic 351 tls_so_LDADD = `pwd`/tls2.so 352else 353 tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC 354 tls_so_LDADD = tls2.so 355endif 356tls_so_CFLAGS = $(AM_CFLAGS) -fPIC 357tls2_so_SOURCES = tls2_so.c 358if VGCONF_OS_IS_DARWIN 359 tls2_so_LDFLAGS = -dynamic -dynamiclib -all_load 360else 361 tls2_so_LDFLAGS = -shared 362endif 363 364vgprintf_nvalgrind_SOURCES = vgprintf.c 365vgprintf_nvalgrind_CFLAGS = -DNVALGRIND 366 367valgrind_cpp_test_SOURCES = valgrind_cpp_test.cpp 368valgrind_cpp_test_LDADD = -lstdc++ 369 370# C++ tests 371coolo_sigaction_SOURCES = coolo_sigaction.cpp 372gxx304_SOURCES = gxx304.cpp 373 374