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 36 # OS-specific tests 37 if VGCONF_OS_IS_LINUX 38 SUBDIRS += linux 39 endif 40 if VGCONF_OS_IS_DARWIN 41 SUBDIRS += darwin 42 endif 43 if VGCONF_OS_IS_SOLARIS 44 SUBDIRS += solaris 45 endif 46 47 # Platform-specific tests 48 if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX 49 SUBDIRS += amd64-linux 50 endif 51 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX 52 SUBDIRS += x86-linux 53 endif 54 if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN 55 SUBDIRS += amd64-darwin 56 endif 57 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN 58 SUBDIRS += x86-darwin 59 endif 60 if VGCONF_PLATFORMS_INCLUDE_AMD64_SOLARIS 61 SUBDIRS += amd64-solaris 62 endif 63 if VGCONF_PLATFORMS_INCLUDE_X86_SOLARIS 64 SUBDIRS += x86-solaris 65 endif 66 67 DIST_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 71 dist_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 81 noinst_HEADERS = fdleak.h 82 83 EXTRA_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 206 check_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 254 if HAVE_NESTED_FUNCTIONS 255 check_PROGRAMS += nestedfns 256 endif 257 258 # This doesn't appear to be compilable on Darwin. 259 if ! VGCONF_OS_IS_DARWIN 260 check_PROGRAMS += rlimit64_nofile \ 261 ppoll_alarm 262 endif 263 264 # clang does not know -ansi 265 if ! COMPILER_IS_CLANG 266 check_PROGRAMS += ansi 267 endif 268 269 if BUILD_IFUNC_TESTS 270 check_PROGRAMS += ifunc 271 endif 272 273 AM_CFLAGS += $(AM_FLAG_M3264_PRI) 274 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) 275 276 # Extra stuff for C tests 277 ansi_CFLAGS = $(AM_CFLAGS) -ansi 278 execve_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ 279 if VGCONF_OS_IS_SOLARIS 280 fcntl_setown_LDADD = -lsocket -lnsl 281 fdleak_cmsg_CFLAGS = $(AM_CFLAGS) -std=c99 -D_XOPEN_SOURCE=600 282 fdleak_cmsg_LDADD = -lsocket -lnsl 283 fdleak_ipv4_LDADD = -lsocket -lnsl 284 fdleak_creat_LDADD = -lsocket -lnsl 285 fdleak_socketpair_LDADD = -lsocket -lnsl 286 endif 287 floored_LDADD = -lm 288 manythreads_LDADD = -lpthread 289 if VGCONF_OS_IS_DARWIN 290 nestedfns_CFLAGS = $(AM_CFLAGS) -fnested-functions 291 else 292 nestedfns_CFLAGS = $(AM_CFLAGS) 293 mq_LDADD = -lrt 294 endif 295 libvex_test_CFLAGS = $(AM_CFLAGS) @FLAG_FSANITIZE@ 296 libvex_test_LDADD = ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ 297 @LIB_UBSAN@ 298 libvexmultiarch_test_CFLAGS= $(AM_CFLAGS) @FLAG_FSANITIZE@ 299 libvexmultiarch_test_LDADD = \ 300 ../../VEX/libvexmultiarch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \ 301 ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a @LIB_UBSAN@ 302 libvexmultiarch_test_SOURCES = libvex_test.c 303 ppoll_alarm_LDADD = -lpthread 304 pselect_alarm_LDADD = -lpthread 305 pth_atfork1_LDADD = -lpthread 306 pth_blockedsig_LDADD = -lpthread 307 pth_cancel1_CFLAGS = $(AM_CFLAGS) -Wno-shadow 308 pth_cancel1_LDADD = -lpthread 309 pth_cancel2_LDADD = -lpthread 310 pth_cvsimple_LDADD = -lpthread 311 pth_empty_LDADD = -lpthread 312 pth_exit_LDADD = -lpthread 313 pth_exit2_LDADD = -lpthread 314 pth_mutexspeed_LDADD = -lpthread 315 pth_once_LDADD = -lpthread 316 pth_rwlock_LDADD = -lpthread 317 pth_rwlock_CFLAGS = $(AM_CFLAGS) 318 if VGCONF_OS_IS_SOLARIS 319 pth_rwlock_CFLAGS += --std=c99 320 endif 321 pth_stackalign_LDADD = -lpthread 322 pth_2sig_LDADD = -lpthread 323 pth_term_signal_LDADD = -lpthread 324 res_search_LDADD = -lresolv -lpthread 325 resolv_CFLAGS = $(AM_CFLAGS) 326 resolv_LDADD = -lresolv -lpthread 327 if VGCONF_OS_IS_SOLARIS 328 resolv_CFLAGS += -U_REENTRANT 329 endif 330 semlimit_LDADD = -lpthread 331 sha1_test_CFLAGS = $(AM_CFLAGS) 332 if VGCONF_OS_IS_SOLARIS 333 sha1_test_CFLAGS += -Du_int32_t=uint32_t 334 endif 335 sigsusp_LDADD = -lpthread 336 thread_exits_LDADD = -lpthread 337 threaded_fork_LDADD = -lpthread 338 threadederrno_CFLAGS = $(AM_CFLAGS) 339 threadederrno_LDADD = -lpthread 340 if VGCONF_OS_IS_SOLARIS 341 threadederrno_CFLAGS += --std=c99 342 endif 343 tls_SOURCES = tls.c tls2.c 344 tls_DEPENDENCIES = tls.so tls2.so 345 tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests 346 tls_LDADD = tls.so tls2.so -lpthread 347 tls_so_SOURCES = tls_so.c 348 tls_so_DEPENDENCIES = tls2.so 349 if VGCONF_OS_IS_DARWIN 350 tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic 351 tls_so_LDADD = `pwd`/tls2.so 352 else 353 tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC 354 tls_so_LDADD = tls2.so 355 endif 356 tls_so_CFLAGS = $(AM_CFLAGS) -fPIC 357 tls2_so_SOURCES = tls2_so.c 358 if VGCONF_OS_IS_DARWIN 359 tls2_so_LDFLAGS = -dynamic -dynamiclib -all_load 360 else 361 tls2_so_LDFLAGS = -shared 362 endif 363 364 vgprintf_nvalgrind_SOURCES = vgprintf.c 365 vgprintf_nvalgrind_CFLAGS = -DNVALGRIND 366 367 valgrind_cpp_test_SOURCES = valgrind_cpp_test.cpp 368 valgrind_cpp_test_LDADD = -lstdc++ 369 370 # C++ tests 371 coolo_sigaction_SOURCES = coolo_sigaction.cpp 372 gxx304_SOURCES = gxx304.cpp 373 374