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