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
13if VGCONF_ARCHS_INCLUDE_PPC32
14SUBDIRS += ppc32
15endif
16if VGCONF_ARCHS_INCLUDE_PPC64
17SUBDIRS += ppc64
18endif
19if VGCONF_ARCHS_INCLUDE_ARM
20SUBDIRS += arm
21endif
22if VGCONF_ARCHS_INCLUDE_S390X
23SUBDIRS += s390x
24endif
25if VGCONF_ARCHS_INCLUDE_MIPS32
26SUBDIRS += mips32
27endif
28if VGCONF_ARCHS_INCLUDE_MIPS64
29SUBDIRS += mips64
30endif
31
32# OS-specific tests
33if VGCONF_OS_IS_LINUX
34SUBDIRS += linux
35endif
36if VGCONF_OS_IS_DARWIN
37SUBDIRS += darwin
38endif
39
40# Platform-specific tests
41if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
42SUBDIRS += x86-linux
43endif
44
45DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm s390x mips32 mips64 linux darwin \
46               x86-linux .
47
48dist_noinst_SCRIPTS = \
49	filter_cmdline0 \
50	filter_cmdline1 \
51	filter_fdleak \
52	filter_linenos \
53	filter_none_discards \
54	filter_shell_output \
55	filter_stderr \
56	filter_timestamp \
57	allexec_prepare_prereq
58
59noinst_HEADERS = fdleak.h
60
61EXTRA_DIST = \
62	allexec32.stdout.exp allexec32.stderr.exp allexec32.vgtest\
63	allexec64.stdout.exp allexec64.stderr.exp allexec64.vgtest\
64	ansi.stderr.exp ansi.vgtest \
65	args.stderr.exp args.stdout.exp args.vgtest \
66	async-sigs.stderr.exp async-sigs.stderr.exp-mips32 async-sigs.vgtest \
67	bitfield1.stderr.exp bitfield1.vgtest \
68	bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \
69	closeall.stderr.exp closeall.vgtest \
70	cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \
71	cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \
72	cmdline2.stderr.exp cmdline2.stdout.exp cmdline2.vgtest \
73	cmdline3.stderr.exp cmdline3.vgtest \
74	cmdline4.stderr.exp cmdline4.vgtest \
75	cmdline5.stderr.exp cmdline5.vgtest \
76	cmdline6.stderr.exp cmdline6.vgtest \
77	cmd-with-special.stderr.exp cmd-with-special.vgtest \
78	coolo_sigaction.stderr.exp \
79	coolo_sigaction.stdout.exp coolo_sigaction.vgtest \
80	coolo_strlen.stderr.exp coolo_strlen.vgtest \
81	discard.stderr.exp discard.stdout.exp \
82	discard.vgtest \
83	empty-exe.vgtest empty-exe.stderr.exp \
84	exec-sigmask.vgtest exec-sigmask.stdout.exp \
85	exec-sigmask.stdout.exp2 exec-sigmask.stdout.exp3 exec-sigmask.stderr.exp \
86	execve.vgtest execve.stdout.exp execve.stderr.exp \
87	faultstatus.vgtest faultstatus.stderr.exp faultstatus.stderr.exp-s390x \
88	fcntl_setown.vgtest fcntl_setown.stdout.exp fcntl_setown.stderr.exp \
89	fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \
90	fdleak_creat.stderr.exp fdleak_creat.vgtest \
91	fdleak_dup.stderr.exp fdleak_dup.vgtest \
92	fdleak_dup2.stderr.exp fdleak_dup2.vgtest \
93	fdleak_fcntl.stderr.exp fdleak_fcntl.vgtest \
94	fdleak_ipv4.stderr.exp fdleak_ipv4.stdout.exp fdleak_ipv4.vgtest \
95	fdleak_open.stderr.exp fdleak_open.vgtest \
96	fdleak_pipe.stderr.exp fdleak_pipe.vgtest \
97	fdleak_socketpair.stderr.exp fdleak_socketpair.vgtest \
98	floored.stderr.exp floored.stdout.exp floored.vgtest \
99	fork.stderr.exp fork.stdout.exp fork.vgtest \
100	fucomip.stderr.exp fucomip.vgtest \
101	gxx304.stderr.exp gxx304.vgtest \
102	ifunc.stderr.exp ifunc.stdout.exp ifunc.vgtest \
103	manythreads.stdout.exp manythreads.stderr.exp manythreads.vgtest \
104	map_unaligned.stderr.exp map_unaligned.vgtest \
105	map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \
106	mmap_fcntl_bug.vgtest mmap_fcntl_bug.stdout.exp \
107		mmap_fcntl_bug.stderr.exp \
108	mq.stderr.exp mq.vgtest \
109	munmap_exe.stderr.exp munmap_exe.vgtest \
110	nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \
111	nodir.stderr.exp nodir.vgtest \
112	pending.stdout.exp pending.stderr.exp pending.vgtest \
113	procfs-linux.stderr.exp-with-readlinkat \
114	procfs-linux.stderr.exp-without-readlinkat \
115	procfs-linux.vgtest \
116	procfs-non-linux.stderr.exp procfs-non-linux.vgtest \
117	pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \
118	pth_blockedsig.stderr.exp \
119	pth_blockedsig.stdout.exp pth_blockedsig.vgtest \
120	pth_cancel1.stderr.exp pth_cancel1.stdout.exp pth_cancel1.vgtest \
121	pth_cancel2.stderr.exp pth_cancel2.vgtest \
122	pth_cvsimple.stderr.exp pth_cvsimple.stdout.exp pth_cvsimple.vgtest \
123	pth_empty.stderr.exp pth_empty.vgtest \
124	pth_exit.stderr.exp pth_exit.vgtest \
125	pth_exit2.stderr.exp pth_exit2.vgtest \
126	pth_mutexspeed.stderr.exp \
127	pth_mutexspeed.stdout.exp pth_mutexspeed.vgtest \
128	pth_once.stderr.exp pth_once.stdout.exp pth_once.vgtest \
129	pth_rwlock.stderr.exp pth_rwlock.vgtest \
130	pth_stackalign.stderr.exp \
131	pth_stackalign.stdout.exp pth_stackalign.vgtest \
132	rcrl.stderr.exp rcrl.stdout.exp rcrl.vgtest \
133	readline1.stderr.exp readline1.stdout.exp \
134	readline1.vgtest \
135	require-text-symbol-1.vgtest \
136		require-text-symbol-1.stderr.exp \
137	require-text-symbol-2.vgtest \
138		require-text-symbol-2.stderr.exp-libcso6 \
139	res_search.stderr.exp res_search.stdout.exp res_search.vgtest \
140	resolv.stderr.exp resolv.stdout.exp resolv.vgtest \
141	rlimit_nofile.stderr.exp rlimit_nofile.stdout.exp rlimit_nofile.vgtest \
142	rlimit64_nofile.stderr.exp rlimit64_nofile.stdout.exp rlimit64_nofile.vgtest \
143	selfrun.stderr.exp selfrun.stdout.exp selfrun.vgtest \
144	sem.stderr.exp sem.stdout.exp sem.vgtest \
145	semlimit.stderr.exp semlimit.stdout.exp semlimit.vgtest \
146	shell shell.vgtest shell.stderr.exp shell.stderr.exp-dash \
147	    shell.stdout.exp shell.stderr.exp-dash2 \
148	shell_badinterp shell_badinterp.vgtest shell_badinterp.stderr.exp \
149	shell_binaryfile shell_binaryfile.vgtest shell_binaryfile.stderr.exp \
150	shell_dir.vgtest shell_dir.stderr.exp \
151	shell_nonexec.vgtest shell_nonexec.stderr.exp \
152	shell_nosuchfile.vgtest shell_nosuchfile.stderr.exp \
153	shell_valid1 shell_valid1.vgtest shell_valid1.stderr.exp \
154	shell_valid2 shell_valid2.vgtest shell_valid2.stderr.exp \
155	shell_valid3 shell_valid3.vgtest shell_valid3.stderr.exp \
156	shell_zerolength shell_zerolength.vgtest shell_zerolength.stderr.exp \
157	    shell_zerolength.stderr.exp-dash \
158	sha1_test.stderr.exp sha1_test.vgtest \
159	shortpush.stderr.exp shortpush.vgtest \
160	shorts.stderr.exp shorts.vgtest \
161	sigstackgrowth.stdout.exp sigstackgrowth.stderr.exp sigstackgrowth.vgtest \
162	stackgrowth.stdout.exp stackgrowth.stderr.exp stackgrowth.vgtest \
163	syscall-restart1.vgtest syscall-restart1.stdout.exp syscall-restart1.stderr.exp \
164	syscall-restart2.vgtest syscall-restart2.stdout.exp syscall-restart2.stderr.exp \
165	syslog.vgtest syslog.stderr.exp \
166	system.stderr.exp system.vgtest \
167	thread-exits.stderr.exp thread-exits.stdout.exp thread-exits.vgtest \
168	threaded-fork.stderr.exp threaded-fork.stdout.exp threaded-fork.vgtest \
169	threadederrno.stderr.exp threadederrno.stdout.exp \
170	threadederrno.vgtest \
171	timestamp.stderr.exp timestamp.vgtest \
172	tls.vgtest tls.stderr.exp tls.stdout.exp  \
173	vgprintf.stderr.exp vgprintf.vgtest \
174	process_vm_readv_writev.stderr.exp process_vm_readv_writev.vgtest
175
176check_PROGRAMS = \
177	ansi args \
178	async-sigs \
179	bitfield1 \
180	bug129866 \
181	closeall coolo_strlen \
182	discard exec-sigmask execve faultstatus fcntl_setown \
183	fdleak_cmsg fdleak_creat fdleak_dup fdleak_dup2 \
184	fdleak_fcntl fdleak_ipv4 fdleak_open fdleak_pipe \
185	fdleak_socketpair \
186	floored fork fucomip \
187	mmap_fcntl_bug \
188	munmap_exe map_unaligned map_unmap mq \
189	pending \
190	procfs-cmdline-exe \
191	pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \
192	pth_empty pth_exit pth_exit2 pth_mutexspeed pth_once pth_rwlock \
193	pth_stackalign \
194	rcrl readline1 \
195	require-text-symbol \
196	res_search resolv \
197	rlimit_nofile selfrun sem semlimit sha1_test \
198	shortpush shorts stackgrowth sigstackgrowth \
199	syscall-restart1 syscall-restart2 \
200	syslog \
201	system \
202	threaded-fork \
203	threadederrno \
204	timestamp \
205	tls \
206	tls.so \
207	tls2.so \
208	valgrind_cpp_test \
209	vgprintf \
210	coolo_sigaction \
211	gxx304 \
212	process_vm_readv_writev
213
214if HAVE_NESTED_FUNCTIONS
215   check_PROGRAMS += nestedfns
216endif
217
218# DDD:
219# - manythreads and thread-exits have lots of this:
220# --61831:0:aspacem  sync_check_mapping_callback: segment mismatch:
221#                    kernel's seg:
222# --61831:0:aspacem  start=0x102538000 end=0x1025b7fff prot=3 dev=0 ino=0 
223#                    offset=0 name="(none)"
224# --61831:0:aspacem  sync_check_mapping_callback: segment mismatch: V's seg:
225# --61831:0:aspacem  NSegment{    , start=0x10067a000, end=0x109a1efff,
226#                    smode=SmFixed, dev=0, ino=0, offset=0, fnIdx=-1, hasR=0,
227#                    hasW=0, hasX=0, hasT=0, mark=0, name="(none)"}
228if ! VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
229   check_PROGRAMS += \
230	manythreads \
231	thread-exits
232endif
233# This doesn't appear to be compilable on Darwin.
234if ! VGCONF_OS_IS_DARWIN
235   check_PROGRAMS += rlimit64_nofile 
236endif
237
238if BUILD_IFUNC_TESTS
239   check_PROGRAMS += ifunc
240endif
241
242AM_CFLAGS   += $(AM_FLAG_M3264_PRI)
243AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
244
245# Extra stuff for C tests
246ansi_CFLAGS		= $(AM_CFLAGS) -ansi
247execve_CFLAGS		= $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
248floored_LDADD 		= -lm
249manythreads_LDADD	= -lpthread
250if VGCONF_OS_IS_DARWIN
251 nestedfns_CFLAGS	= $(AM_CFLAGS) -fnested-functions
252else
253 nestedfns_CFLAGS	= $(AM_CFLAGS)
254 mq_LDADD		= -lrt
255endif
256pth_atfork1_LDADD	= -lpthread
257pth_blockedsig_LDADD	= -lpthread
258pth_cancel1_CFLAGS	= $(AM_CFLAGS) -Wno-shadow
259pth_cancel1_LDADD	= -lpthread
260pth_cancel2_LDADD	= -lpthread
261pth_cvsimple_LDADD	= -lpthread
262pth_empty_LDADD 	= -lpthread
263pth_exit_LDADD	 	= -lpthread
264pth_exit2_LDADD	 	= -lpthread
265pth_mutexspeed_LDADD	= -lpthread
266pth_once_LDADD		= -lpthread
267pth_rwlock_LDADD	= -lpthread
268pth_stackalign_LDADD	= -lpthread
269res_search_LDADD        = -lresolv -lpthread
270resolv_LDADD            = -lresolv -lpthread
271semlimit_LDADD		= -lpthread
272thread_exits_LDADD	= -lpthread
273threaded_fork_LDADD	= -lpthread
274threadederrno_LDADD	= -lpthread
275tls_SOURCES		= tls.c tls2.c
276tls_DEPENDENCIES	= tls.so tls2.so
277tls_LDFLAGS		= -Wl,-rpath,$(top_builddir)/none/tests
278tls_LDADD		= tls.so tls2.so -lpthread
279tls_so_SOURCES		= tls_so.c
280tls_so_DEPENDENCIES	= tls2.so
281if VGCONF_OS_IS_DARWIN
282 tls_so_LDFLAGS		= -dynamic -dynamiclib -all_load -fpic
283 tls_so_LDADD		= `pwd`/tls2.so
284else
285 tls_so_LDFLAGS		= -Wl,-rpath,$(top_builddir)/none/tests -shared -fPIC
286 tls_so_LDADD		= tls2.so
287endif
288tls_so_CFLAGS		= $(AM_CFLAGS) -fPIC
289tls2_so_SOURCES		= tls2_so.c
290if VGCONF_OS_IS_DARWIN
291 tls2_so_LDFLAGS	= -dynamic -dynamiclib -all_load
292else
293 tls2_so_LDFLAGS	= -shared
294endif
295
296valgrind_cpp_test_SOURCES = valgrind_cpp_test.cpp
297valgrind_cpp_test_LDADD   = -lstdc++
298
299# C++ tests
300coolo_sigaction_SOURCES	= coolo_sigaction.cpp
301gxx304_SOURCES		= gxx304.cpp
302
303