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