• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Automake input for strace tests.
2#
3# Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
4# Copyright (c) 2011-2018 The strace developers.
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions
9# are met:
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15# 3. The name of the author may not be used to endorse or promote products
16#    derived from this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29OS = linux
30ARCH = @arch_mx32@
31NATIVE_ARCH = @arch_native@
32SIZEOF_KERNEL_LONG_T = @SIZEOF_KERNEL_LONG_T@
33SIZEOF_LONG = 4
34MPERS_NAME = mx32
35MPERS_CC_FLAGS = @cc_flags_mx32@
36ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) $(MPERS_CC_FLAGS)
37AM_CFLAGS = $(WARN_CFLAGS)
38AM_CPPFLAGS = $(ARCH_MFLAGS) \
39	      -I$(builddir) \
40	      -I$(top_builddir)/$(OS)/$(ARCH) \
41	      -I$(top_srcdir)/$(OS)/$(ARCH) \
42	      -I$(top_builddir)/$(OS) \
43	      -I$(top_srcdir)/$(OS) \
44	      -I$(top_builddir) \
45	      -I$(top_srcdir)
46AM_LDFLAGS = $(ARCH_MFLAGS)
47
48libtests_a_SOURCES = \
49	create_nl_socket.c \
50	errno2name.c \
51	error_msg.c \
52	fill_memory.c \
53	get_page_size.c \
54	get_sigset_size.c \
55	hexdump_strdup.c \
56	hexquote_strndup.c \
57	ifindex.c \
58	inode_of_sockfd.c \
59	libmmsg.c \
60	libsocketcall.c \
61	overflowuid.c \
62	pipe_maxfd.c \
63	print_quoted_string.c \
64	print_time.c \
65	printflags.c \
66	printxval.c \
67	signal2name.c \
68	skip_unavailable.c \
69	sprintrc.c \
70	tail_alloc.c \
71	test_netlink.h \
72	test_nlattr.h \
73	test_printpath.c \
74	test_printstrn.c \
75	test_ucopy.c \
76	test_ucopy.h \
77	tests.h \
78	tprintf.c \
79	# end of libtests_a_SOURCES
80libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
81check_LIBRARIES = libtests.a
82LDADD = libtests.a
83
84include pure_executables.am
85
86check_PROGRAMS = $(PURE_EXECUTABLES) \
87	_newselect-P \
88	answer \
89	attach-f-p \
90	attach-f-p-cmd \
91	attach-p-cmd-cmd \
92	attach-p-cmd-p \
93	block_reset_raise_run \
94	caps-abbrev \
95	check_sigblock \
96	check_sigign \
97	clone_parent \
98	clone_ptrace \
99	count-f \
100	execve-v \
101	execveat-v \
102	filter-unavailable \
103	fork-f \
104	getpid	\
105	getppid	\
106	gettid \
107	int_0x80 \
108	ioctl_dm-v \
109	ioctl_evdev-v \
110	ioctl_loop-nv \
111	ioctl_loop-v \
112	ioctl_nsfs \
113	ioctl_rtc-v \
114	is_linux_mips_n64 \
115	ksysent \
116	list_sigaction_signum \
117	mmsg-silent \
118	mmsg_name-v \
119	msg_control-v \
120	net-accept-connect \
121	netlink_inet_diag \
122	netlink_netlink_diag \
123	netlink_unix_diag \
124	nsyscalls \
125	nsyscalls-d \
126	oldselect-P \
127	oldselect-efault-P \
128	pc \
129	perf_event_open_nonverbose \
130	perf_event_open_unabbrev \
131	ppoll-v \
132	prctl-seccomp-filter-v \
133	prctl-seccomp-strict \
134	print_maxfd \
135	qual_fault \
136	qual_inject-error-signal \
137	qual_inject-retval \
138	qual_inject-signal \
139	qual_signal \
140	quotactl-v \
141	quotactl-xfs-v \
142	redirect-fds \
143	restart_syscall \
144	run_expect_termsig \
145	scm_rights \
146	seccomp-filter-v \
147	seccomp-strict \
148	select-P \
149	set_ptracer_any \
150	set_sigblock \
151	set_sigign \
152	signal_receive \
153	sleep \
154	stack-fcall \
155	stack-fcall-mangled \
156	threads-execve \
157	unblock_reset_raise \
158	unix-pair-send-recv \
159	unix-pair-sendto-recvfrom \
160	vfork-f \
161	wait4-v \
162	waitid-v \
163	zeroargc \
164	# end of check_PROGRAMS
165
166attach_f_p_LDADD = -lrt -lpthread $(LDADD)
167clock_xettime_LDADD = -lrt $(LDADD)
168count_f_LDADD = -lpthread $(LDADD)
169filter_unavailable_LDADD = -lpthread $(LDADD)
170fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
171fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
172ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
173lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
174mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
175mq_LDADD = -lrt $(LDADD)
176mq_sendrecv_LDADD = -lrt $(LDADD)
177mq_sendrecv_read_LDADD = -lrt $(LDADD)
178mq_sendrecv_write_LDADD = -lrt $(LDADD)
179newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
180pc_LDADD = $(dl_LIBS) $(LDADD)
181pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
182preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
183preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
185stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
186statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
187threads_execve_LDADD = -lrt -lpthread $(LDADD)
188times_LDADD = -lrt $(LDADD)
189truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
190uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
191
192stack_fcall_SOURCES = stack-fcall.c \
193	stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
194
195stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
196	stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
197	stack-fcall-mangled-2.c stack-fcall-mangled-3.c
198
199include gen_tests.am
200
201if USE_LIBUNWIND
202LIBUNWIND_TESTS = strace-k.test
203if USE_DEMANGLE
204LIBUNWIND_TESTS += strace-k-demangle.test
205endif
206else
207LIBUNWIND_TESTS =
208endif
209
210DECODER_TESTS = \
211	brk.test \
212	btrfs-v.test \
213	btrfs-vw.test \
214	btrfs-w.test \
215	caps-abbrev.test \
216	caps.test \
217	eventfd.test \
218	execve-v.test \
219	execve.test \
220	fadvise64.test \
221	futex.test \
222	getuid.test \
223	ioctl.test \
224	ipc_msgbuf.test \
225	llseek.test \
226	lseek.test \
227	mmap.test \
228	net-y-unix.test \
229	net-yy-inet.test \
230	net-yy-netlink.test \
231	net-yy-unix.test \
232	net.test \
233	netlink_sock_diag.test \
234	nsyscalls.test \
235	nsyscalls-d.test \
236	nsyscalls-nd.test \
237	personality.test \
238	pipe.test \
239	poll-P.test \
240	poll.test \
241	prctl-arg2-intptr.test \
242	prctl-dumpable.test \
243	prctl-name.test \
244	prctl-no-args.test \
245	prctl-pdeathsig.test \
246	prctl-seccomp-filter-v.test \
247	prctl-seccomp-strict.test \
248	prctl-securebits.test \
249	prctl-tid_address.test \
250	prctl-tsc.test \
251	qual_fault-exit_group.test \
252	readv.test \
253	rt_sigaction.test \
254	scm_rights-fd.test \
255	seccomp-strict.test \
256	sigaltstack.test \
257	sun_path.test \
258	xet_thread_area_x86.test \
259	uio.test \
260	umount.test \
261	umount2.test \
262	umovestr.test \
263	umovestr2.test \
264	uname.test \
265	unix-pair-send-recv.test \
266	unix-pair-sendto-recvfrom.test \
267	# end of DECODER_TESTS
268
269MISC_TESTS = \
270	attach-f-p.test \
271	attach-p-cmd.test \
272	bexecve.test \
273	clone_parent.test \
274	clone_ptrace.test \
275	count-f.test \
276	count.test \
277	detach-running.test \
278	detach-sleeping.test \
279	detach-stopped.test \
280	filter-unavailable.test \
281	filtering_fd-syntax.test \
282	filtering_syscall-syntax.test \
283	fflush.test \
284	get_regs.test \
285	interactive_block.test \
286	ksysent.test \
287	opipe.test \
288	options-syntax.test \
289	pc.test \
290	printpath-umovestr-legacy.test \
291	printstrn-umoven-legacy.test \
292	qual_fault-syntax.test \
293	qual_fault.test \
294	qual_inject-error-signal.test \
295	qual_inject-retval.test \
296	qual_inject-signal.test \
297	qual_inject-syntax.test \
298	qual_signal.test \
299	qual_syscall.test \
300	redirect-fds.test \
301	redirect.test \
302	restart_syscall.test \
303	sigblock.test \
304	sigign.test \
305	strace-C.test \
306	strace-E.test \
307	strace-S.test \
308	strace-T.test \
309	strace-V.test \
310	strace-ff.test \
311	strace-r.test \
312	strace-t.test \
313	strace-tt.test \
314	strace-ttt.test \
315	termsig.test \
316	threads-execve.test \
317	# end of MISC_TESTS
318
319TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
320
321XFAIL_TESTS_ =
322XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
323XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
324XFAIL_TESTS_x86_64 = int_0x80.gen.test
325XFAIL_TESTS_x32 = int_0x80.gen.test
326XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
327
328TEST_LOG_COMPILER = env
329AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
330			SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
331			SIZEOF_LONG=$(SIZEOF_LONG) \
332			MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
333
334@VALGRIND_CHECK_RULES@
335VALGRIND_FLAGS = --quiet
336VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
337
338EXTRA_DIST = \
339	accept_compat.h \
340	attach-p-cmd.h \
341	caps-abbrev.awk \
342	caps.awk \
343	clock.in \
344	count-f.expected \
345	eventfd.expected \
346	fadvise.h \
347	filter-unavailable.expected \
348	fstatat.c \
349	fstatx.c \
350	gen_pure_executables.sh \
351	gen_tests.in \
352	gen_tests.sh \
353	getresugid.c \
354	init.sh \
355	init_delete_module.h \
356	ipc.sh \
357	ipc_msgbuf.expected \
358	ksysent.sed \
359	lstatx.c \
360	match.awk \
361	net.expected \
362	netlink_sock_diag-v.sh \
363	pipe.expected \
364	print_user_desc.c \
365	process_vm_readv_writev.c \
366	pure_executables.list \
367	qual_fault-exit_group.expected \
368	qual_inject-error-signal.expected \
369	qual_inject-signal.expected \
370	quotactl.h \
371	regex.in \
372	rt_sigaction.awk \
373	run.sh \
374	sched.in \
375	scno_tampering.sh \
376	setfsugid.c \
377	setresugid.c \
378	setreugid.c \
379	setugid.c \
380	sigaltstack.expected \
381	sockname.c \
382	stack-fcall.h \
383	strace-C.expected \
384	strace-E.expected \
385	strace-T.expected \
386	strace-ff.expected \
387	strace-k-demangle.test \
388	strace-k.test \
389	strace-r.expected \
390	strace.supp \
391	struct_flock.c \
392	sun_path.expected \
393	syntax.sh \
394	trace_fstat.in \
395	trace_fstatfs.in \
396	trace_lstat.in \
397	trace_question.in \
398	trace_stat.in \
399	trace_stat_like.in \
400	trace_statfs.in \
401	trace_statfs_like.in \
402	uio.expected \
403	umode_t.c \
404	umovestr.expected \
405	unix-pair-send-recv.expected \
406	unix-pair-sendto-recvfrom.expected \
407	xchownx.c \
408	xgetrlimit.c \
409	xselect.c \
410	xstatfs.c \
411	xstatfs64.c \
412	xstatfsx.c \
413	xstatx.c \
414	xutimes.c \
415	$(TESTS)
416
417ksysent.h: $(srcdir)/ksysent.sed
418	echo '#include <asm/unistd.h>' | \
419		$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
420	LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
421	mv -f $@.t2 $@
422	rm -f $@.t1
423
424ksysent.$(OBJEXT): ksysent.h
425
426objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
427$(objects): scno.h
428
429clean-local: clean-local-check
430.PHONY: clean-local-check
431clean-local-check:
432	-rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
433
434.PHONY: check-valgrind-local
435check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
436
437BUILT_SOURCES = ksysent.h
438CLEANFILES = ksysent.h
439
440include ../scno.am
441