2 include $(top_srcdir)/Makefile.tool-tests.am
8 if VGCONF_ARCHS_INCLUDE_X86
11 if VGCONF_ARCHS_INCLUDE_AMD64
14 if VGCONF_ARCHS_INCLUDE_PPC32
17 if VGCONF_ARCHS_INCLUDE_PPC64
20 if VGCONF_ARCHS_INCLUDE_ARM
23 if VGCONF_ARCHS_INCLUDE_ARM64
26 if VGCONF_ARCHS_INCLUDE_S390X
29 if VGCONF_ARCHS_INCLUDE_MIPS32
32 if VGCONF_ARCHS_INCLUDE_MIPS64
35 if VGCONF_ARCHS_INCLUDE_NANOMIPS
44 if VGCONF_OS_IS_DARWIN
47 if VGCONF_OS_IS_SOLARIS
50 if VGCONF_OS_IS_FREEBSD
54 # Platform-specific tests
55 if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
56 SUBDIRS += amd64-linux
58 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
61 if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
62 SUBDIRS += amd64-darwin
64 if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
67 if VGCONF_PLATFORMS_INCLUDE_AMD64_SOLARIS
68 SUBDIRS += amd64-solaris
70 if VGCONF_PLATFORMS_INCLUDE_X86_SOLARIS
71 SUBDIRS += x86-solaris
73 if VGCONF_PLATFORMS_INCLUDE_X86_FREEBSD
74 SUBDIRS += x86-freebsd
77 DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm arm64 s390x mips32 mips64 nanomips \
78 linux darwin solaris freebsd amd64-linux x86-linux amd64-darwin \
79 x86-darwin amd64-solaris x86-solaris x86-freebsd scripts .
81 dist_noinst_SCRIPTS = \
86 filter_none_discards \
90 allexec_prepare_prereq
92 noinst_HEADERS = fdleak.h
95 allexec32.stdout.exp allexec32.stderr.exp allexec32.vgtest\
96 allexec64.stdout.exp allexec64.stderr.exp allexec64.vgtest\
97 ansi.stderr.exp ansi.vgtest \
98 args.stderr.exp args.stdout.exp args.vgtest \
99 async-sigs.stderr.exp async-sigs.stderr.exp-mips32 \
100 async-sigs.vgtest async-sigs.stderr.exp-freebsd \
101 bigcode.vgtest bigcode.stderr.exp bigcode.stdout.exp \
102 bitfield1.stderr.exp bitfield1.vgtest \
103 bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
104 bug234814.vgtest bug234814.stderr.exp bug234814.stdout.exp \
105 bug491394.vgtest bug491394.stderr.exp \
106 closeall.stderr.exp closeall.vgtest \
107 cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \
108 cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \
109 cmdline1.stdout.exp-non-linux \
110 cmdline2.stderr.exp cmdline2.stdout.exp cmdline2.vgtest \
111 cmdline2.stdout.exp-non-linux \
112 cmdline3.stderr.exp cmdline3.vgtest \
113 cmdline4.stderr.exp cmdline4.vgtest \
114 cmdline5.stderr.exp cmdline5.vgtest \
115 cmdline6.stderr.exp cmdline6.vgtest \
116 cmdline7.stderr.exp cmdline7.vgtest \
117 cmdline8.stderr.exp cmdline8.vgtest \
118 cmdline9.stderr.exp cmdline9.vgtest \
119 cmdline10.stderr.exp cmdline10.vgtest \
120 cmdline11.stderr.exp cmdline11.vgtest \
121 cmd-with-special.stderr.exp cmd-with-special.vgtest \
122 coolo_sigaction.stderr.exp \
123 coolo_sigaction.stdout.exp coolo_sigaction.vgtest \
124 coolo_strlen.stderr.exp coolo_strlen.vgtest \
125 discard.stderr.exp discard.stdout.exp \
127 double_close_range_xml.stderr.exp \
128 double_close_range_xml.vgtest \
129 double_close_range_sup.stderr.exp double_close_range_sup.vgtest \
130 empty-exe.vgtest empty-exe.stderr.exp \
131 exec-sigmask.vgtest exec-sigmask.stdout.exp \
132 exec-sigmask.stdout.exp2 exec-sigmask.stdout.exp3 \
133 exec-sigmask.stdout.exp-solaris exec-sigmask.stderr.exp \
134 execve.vgtest execve.stdout.exp execve.stderr.exp \
135 faultstatus.vgtest faultstatus.stderr.exp faultstatus.stderr.exp-s390x \
136 fcntl_setown.vgtest fcntl_setown.stdout.exp fcntl_setown.stderr.exp \
137 fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \
138 fdleak_cmsg_xml.stderr.exp-ppc64le \
139 fdleak_cmsg_xml.stderr.exp fdleak_cmsg_xml.vgtest \
140 fdleak_cmsg_supp.stderr.exp fdleak_cmsg_supp.supp \
141 fdleak_cmsg_supp.vgtest \
142 fdleak_creat.stderr.exp fdleak_creat.vgtest \
143 fdleak_creat_xml.stderr.exp fdleak_creat_xml.vgtest \
144 fdleak_creat_sup.stderr.exp fdleak_creat_sup.supp \
145 fdleak_creat_sup.vgtest \
146 fdleak_dup.stderr.exp fdleak_dup.vgtest \
147 fdleak_dup_xml.stderr.exp fdleak_dup_xml.vgtest \
148 fdleak_dup2.stderr.exp fdleak_dup2.vgtest \
149 fdleak_dup2_xml.stderr.exp fdleak_dup2_xml.vgtest \
150 fdleak_fcntl.stderr.exp fdleak_fcntl.vgtest \
151 fdleak_fcntl_xml.stderr.exp fdleak_fcntl_xml.vgtest \
152 fdleak_ipv4.stderr.exp fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \
153 fdleak_ipv4_xml.stderr.exp-ppc64le \
154 fdleak_ipv4_xml.stderr.exp fdleak_ipv4_xml.stdout.exp \
155 fdleak_ipv4_xml.vgtest fdleak_ipv4_xml.stderr.exp-nomain \
156 fdleak_open.stderr.exp fdleak_open.vgtest \
157 fdleak_open_xml.stderr.exp fdleak_open_xml.vgtest \
158 fdleak_pipe.stderr.exp fdleak_pipe.vgtest \
159 fdleak_pipe_xml.stderr.exp fdleak_pipe_xml.vgtest \
160 fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \
161 fdleak_socketpair_xml.stderr.exp fdleak_socketpair_xml.vgtest \
162 floored.stderr.exp floored.stdout.exp floored.vgtest \
163 fork.stderr.exp fork.stdout.exp fork.vgtest \
164 fucomip.stderr.exp fucomip.vgtest \
165 gxx304.stderr.exp gxx304.vgtest \
166 ifunc.stderr.exp ifunc.stdout.exp ifunc.vgtest \
167 ioctl_moans.stderr.exp ioctl_moans.vgtest \
168 libvex_test.stderr.exp libvex_test.vgtest \
169 libvexmultiarch_test.stderr.exp libvexmultiarch_test.vgtest \
170 manythreads.stdout.exp manythreads.stderr.exp manythreads.vgtest \
171 map_unaligned.stderr.exp map_unaligned.vgtest \
172 map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \
173 mmap_fcntl_bug.vgtest mmap_fcntl_bug.stdout.exp \
174 mmap_fcntl_bug.stderr.exp \
175 mmap_o_direct.stderr.exp mmap_o_direct.vgtest \
176 mq.stderr.exp mq.vgtest \
177 munmap_exe.stderr.exp munmap_exe.vgtest \
178 nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \
179 nocwd.stdout.exp nocwd.stderr.exp nocwd.vgtest \
180 nocwd.stderr.exp-freebsd \
181 nodir.stderr.exp nodir.vgtest \
182 nodir.stderr.exp-freebsd \
183 pending.stdout.exp pending.stderr.exp pending.vgtest \
184 ppoll_alarm.stdout.exp ppoll_alarm.stderr.exp ppoll_alarm.vgtest \
185 procfs-linux.stderr.exp-with-readlinkat \
186 procfs-linux.stderr.exp-without-readlinkat \
187 procfs-linux.vgtest \
188 procfs-non-linux.vgtest \
189 procfs-non-linux.stderr.exp-with-readlinkat \
190 procfs-non-linux.stderr.exp-without-readlinkat \
191 pselect_alarm.stdout.exp pselect_alarm.stderr.exp pselect_alarm.vgtest \
192 pselect_sigmask_null.vgtest \
193 pselect_sigmask_null.stdout.exp pselect_sigmask_null.stderr.exp \
194 pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \
195 pth_blockedsig.stderr.exp \
196 pth_blockedsig.stdout.exp pth_blockedsig.vgtest \
197 pth_cancel1.stderr.exp pth_cancel1.stdout.exp pth_cancel1.vgtest \
198 pth_cancel2.stderr.exp pth_cancel2.vgtest \
199 pth_cvsimple.stderr.exp pth_cvsimple.stdout.exp pth_cvsimple.vgtest \
200 pth_empty.stderr.exp pth_empty.vgtest \
201 pth_exit.stderr.exp pth_exit.vgtest \
202 pth_exit2.stderr.exp pth_exit2.vgtest \
203 pth_mutexspeed.stderr.exp \
204 pth_mutexspeed.stdout.exp pth_mutexspeed.vgtest \
205 pth_once.stderr.exp pth_once.stdout.exp pth_once.vgtest \
206 pth_rwlock.stderr.exp pth_rwlock.vgtest \
207 pth_self_kill_9.stderr.exp pth_self_kill_9.vgtest \
208 pth_self_kill_15_other.stderr.exp pth_self_kill_15_other.vgtest \
209 pth_stackalign.stderr.exp \
210 pth_stackalign.stdout.exp pth_stackalign.vgtest \
211 pth_2sig.stderr.exp-linux pth_2sig.stderr.exp-solaris pth_2sig.vgtest \
212 pth_term_signal.stderr.exp pth_term_signal.vgtest \
213 rc_option_with_spaces.stderr.exp rc_option_with_spaces.vgtest \
214 rcrl.stderr.exp rcrl.stdout.exp rcrl.vgtest \
215 readline1.stderr.exp readline1.stdout.exp \
217 require-text-symbol-1.vgtest \
218 require-text-symbol-1.stderr.exp \
219 require-text-symbol-2.vgtest \
220 require-text-symbol-2.stderr.exp-libcso1 \
221 require-text-symbol-2.stderr.exp-libcso6 \
222 require-text-symbol-2.stderr.exp-freebsd \
223 res_search.stderr.exp res_search.stdout.exp res_search.vgtest \
224 resolv.stderr.exp resolv.stdout.exp resolv.vgtest \
225 rlimit_nofile.stderr.exp rlimit_nofile.stdout.exp rlimit_nofile.vgtest \
226 rlimit64_nofile.stderr.exp rlimit64_nofile.stdout.exp rlimit64_nofile.vgtest \
227 selfrun.stderr.exp selfrun.stdout.exp selfrun.vgtest \
228 sem.stderr.exp sem.stdout.exp sem.vgtest \
229 semlimit.stderr.exp semlimit.stdout.exp semlimit.vgtest \
230 sha1_test.stderr.exp sha1_test.vgtest \
231 shortpush.stderr.exp shortpush.vgtest \
232 shorts.stderr.exp shorts.vgtest \
233 sigstackgrowth.stdout.exp sigstackgrowth.stderr.exp sigstackgrowth.vgtest \
234 sigsusp.stderr.exp sigsusp.vgtest \
235 stackgrowth.stdout.exp stackgrowth.stderr.exp stackgrowth.vgtest \
236 syscall-restart1.vgtest syscall-restart1.stdout.exp syscall-restart1.stderr.exp \
237 syscall-restart2.vgtest syscall-restart2.stdout.exp syscall-restart2.stderr.exp \
238 syslog.vgtest syslog.stderr.exp \
239 system.stderr.exp system.vgtest \
240 thread-exits.stderr.exp thread-exits.stdout.exp thread-exits.vgtest \
241 threaded-fork.stderr.exp threaded-fork.stdout.exp threaded-fork.vgtest \
242 threadederrno.stderr.exp threadederrno.stdout.exp \
243 threadederrno.vgtest \
244 timestamp.stderr.exp timestamp.vgtest \
245 tls.vgtest tls.stderr.exp tls.stdout.exp \
246 track-fds-exec-children.vgtest track-fds-exec-children.stderr.exp \
247 unit_debuglog.stderr.exp unit_debuglog.vgtest \
248 vgprintf.stderr.exp vgprintf.vgtest \
249 vgprintf_nvalgrind.stderr.exp vgprintf_nvalgrind.vgtest \
250 process_vm_readv_writev.stderr.exp process_vm_readv_writev.vgtest \
251 sigprocmask.stderr.exp sigprocmask.vgtest \
252 socket_close.stderr.exp socket_close.vgtest \
253 socket_close_xml.stderr.exp-ppc64le \
254 socket_close_xml.stderr.exp socket_close_xml.vgtest \
255 file_dclose.stderr.exp file_dclose.vgtest \
256 file_dclose_xml.stderr.exp file_dclose_xml.vgtest \
257 file_dclose_xml.stderr.exp-nomain \
258 file_dclose.supp file_dclose_sup.stderr.exp file_dclose_sup.vgtest \
259 double_close_range.stderr.exp double_close_range.vgtest \
260 log-track-fds.stderr.exp log-track-fds.vgtest \
261 xml-track-fds.stderr.exp xml-track-fds.vgtest \
262 fdbaduse.stderr.exp fdbaduse.vgtest \
263 use_after_close.stderr.exp use_after_close.vgtest
270 bug129866 bug234814 \
271 closeall coolo_strlen \
272 discard exec-sigmask execve faultstatus fcntl_setown \
273 fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
274 fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \
276 floored fork fucomip \
279 libvexmultiarch_test \
283 munmap_exe map_unaligned map_unmap mq \
288 pselect_sigmask_null \
289 pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \
290 pth_empty pth_exit pth_exit2 pth_mutexspeed pth_once pth_rwlock \
291 pth_self_kill pth_stackalign pth_2sig pth_term_signal\
293 require-text-symbol \
295 rlimit_nofile selfrun sem semlimit sha1_test \
296 shortpush shorts stackgrowth sigstackgrowth sigsusp \
297 syscall-restart1 syscall-restart2 \
307 track-fds-exec-children \
314 process_vm_readv_writev \
322 if ! VGCONF_OS_IS_LINUX
323 check_PROGRAMS += bug491394
325 if VGCONF_OS_IS_LINUX
326 if VGCONF_ARCHS_INCLUDE_AMD64
327 check_PROGRAMS += bug491394
333 check_PROGRAMS += double_close_range
336 if HAVE_NESTED_FUNCTIONS
337 check_PROGRAMS += nestedfns
338 nestedfns_LDFLAGS = @FLAG_NO_WARN_EXECSTACK@
341 # This doesn't appear to be compilable on Darwin.
342 if ! VGCONF_OS_IS_DARWIN_OR_FREEBSD
343 check_PROGRAMS += rlimit64_nofile
346 if ! VGCONF_OS_IS_DARWIN
347 check_PROGRAMS += ppoll_alarm
350 # older (?) clang does not know -ansi
352 check_PROGRAMS += ansi
356 check_PROGRAMS += ifunc
359 AM_CFLAGS += $(AM_FLAG_M3264_PRI)
360 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
362 # Extra stuff for C tests
363 ansi_CFLAGS = $(AM_CFLAGS) -ansi
364 bug491394_LDADD = -lc
365 bug491394_LDFLAGS = -nostdlib -static
366 bug491394_CFLAGS = ${AM_CFLAGS} -Os
367 execve_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
368 if VGCONF_OS_IS_SOLARIS
369 fcntl_setown_LDADD = -lsocket -lnsl
370 fdleak_cmsg_CFLAGS = $(AM_CFLAGS) -D_XOPEN_SOURCE=600
371 fdleak_cmsg_LDADD = -lsocket -lnsl
372 fdleak_ipv4_LDADD = -lsocket -lnsl
373 fdleak_creat_LDADD = -lsocket -lnsl
374 fdleak_socketpair_LDADD = -lsocket -lnsl
375 socket_close_LDADD = -lsocket -lnsl
377 fcntl_setown_LDADD = $(AL_LDFLAGS)
378 fdleak_cmsg_CFLAGS = $(AM_CFLAGS)
379 fdleak_cmsg_LDADD = $(AM_LDFLAGS)
380 fdleak_ipv4_LDADD = $(AM_LDFLAGS)
381 fdleak_creat_LDADD = $(AM_LDFLAGS)
382 fdleak_socketpair_LDADD = $(AM_LDFLAGS)
383 socket_close_LDADD = $(AM_LDFLAGS)
386 ifunc_CFLAGS = $(AM_CFLAGS) -Wno-unused-function
387 manythreads_LDADD = -lpthread
388 if VGCONF_OS_IS_DARWIN
389 nestedfns_CFLAGS = $(AM_CFLAGS) -fnested-functions
391 nestedfns_CFLAGS = $(AM_CFLAGS)
394 libvex_test_CFLAGS = $(AM_CFLAGS) @FLAG_FSANITIZE@
395 libvex_test_LDADD = ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \
397 libvexmultiarch_test_CFLAGS= $(AM_CFLAGS) @FLAG_FSANITIZE@
398 libvexmultiarch_test_LDADD = \
399 ../../VEX/libvexmultiarch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \
400 ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a @LIB_UBSAN@
401 libvexmultiarch_test_SOURCES = libvex_test.c
402 ppoll_alarm_LDADD = -lpthread
403 pselect_alarm_LDADD = -lpthread
404 pth_atfork1_LDADD = -lpthread
405 pth_blockedsig_LDADD = -lpthread
406 pth_cancel1_CFLAGS = $(AM_CFLAGS) -Wno-shadow
407 pth_cancel1_LDADD = -lpthread
408 pth_cancel2_LDADD = -lpthread
409 pth_cvsimple_LDADD = -lpthread
410 pth_empty_LDADD = -lpthread
411 pth_exit_LDADD = -lpthread
412 pth_exit2_LDADD = -lpthread
413 pth_mutexspeed_LDADD = -lpthread
414 pth_once_LDADD = -lpthread
415 pth_rwlock_LDADD = -lpthread
416 pth_rwlock_CFLAGS = $(AM_CFLAGS)
417 pth_self_kill_LDADD = -lpthread
418 pth_stackalign_LDADD = -lpthread
419 pth_2sig_LDADD = -lpthread
420 pth_term_signal_LDADD = -lpthread
421 if VGCONF_OS_IS_FREEBSD
422 res_search_LDADD = -lpthread
423 resolv_LDADD = -lpthread
425 res_search_LDADD = -lresolv -lpthread
426 resolv_LDADD = -lresolv -lpthread
428 resolv_CFLAGS = $(AM_CFLAGS)
429 if VGCONF_OS_IS_SOLARIS
430 resolv_CFLAGS += -U_REENTRANT
432 semlimit_LDADD = -lpthread
433 sha1_test_CFLAGS = $(AM_CFLAGS)
434 if VGCONF_OS_IS_SOLARIS
435 sha1_test_CFLAGS += -Du_int32_t=uint32_t
437 sigsusp_LDADD = -lpthread
438 thread_exits_LDADD = -lpthread
439 threaded_fork_LDADD = -lpthread
440 threadederrno_CFLAGS = $(AM_CFLAGS)
441 threadederrno_LDADD = -lpthread
442 timestamp_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@
443 tls_SOURCES = tls.c tls2.c
444 tls_DEPENDENCIES = tls.so tls2.so
445 tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
446 tls_LDADD = tls.so tls2.so -lpthread
447 tls_so_SOURCES = tls_so.c
448 tls_so_DEPENDENCIES = tls2.so
449 if VGCONF_OS_IS_DARWIN
450 tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
451 tls_so_LDADD = `pwd`/tls2.so
453 tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
454 tls_so_LDADD = tls2.so
456 tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
457 tls2_so_SOURCES = tls2_so.c
458 if VGCONF_OS_IS_DARWIN
459 tls2_so_LDFLAGS = -dynamic -dynamiclib -all_load
461 tls2_so_LDFLAGS = -shared
463 track_fds_exec_children_SOURCES = track-fds-exec-children.c
465 vgprintf_nvalgrind_SOURCES = vgprintf.c
466 vgprintf_nvalgrind_CFLAGS = ${AM_CFLAGS} -DNVALGRIND
468 valgrind_cpp_test_SOURCES = valgrind_cpp_test.cpp
469 valgrind_cpp_test_LDADD = -lstdc++
472 coolo_sigaction_SOURCES = coolo_sigaction.cpp
473 gxx304_SOURCES = gxx304.cpp