1# Automake input for strace tests.
2#
3# Copyright (c) 2011-2015 Dmitry V. Levin <ldv@altlinux.org>
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12#    notice, this list of conditions and the following disclaimer in the
13#    documentation and/or other materials provided with the distribution.
14# 3. The name of the author may not be used to endorse or promote products
15#    derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28OS = linux
29ARCH = @arch@
30ARCH_MFLAGS =
31AM_CFLAGS = $(WARN_CFLAGS)
32AM_CPPFLAGS = $(ARCH_MFLAGS) \
33	      -I$(builddir) \
34	      -I$(top_builddir)/$(OS)/$(ARCH) \
35	      -I$(top_srcdir)/$(OS)/$(ARCH) \
36	      -I$(top_builddir)/$(OS) \
37	      -I$(top_srcdir)/$(OS) \
38	      -I$(top_builddir) \
39	      -I$(top_srcdir)
40AM_LDFLAGS = $(ARCH_MFLAGS)
41
42check_PROGRAMS = \
43	_newselect \
44	adjtimex \
45	aio \
46	bpf \
47	caps \
48	clock_nanosleep \
49	clock_xettime \
50	epoll_create1 \
51	eventfd \
52	execve \
53	execveat \
54	fanotify_mark \
55	fcntl \
56	fcntl64 \
57	file_handle \
58	filter-unavailable \
59	fork-f \
60	fstat \
61	fstat64 \
62	fstatat64 \
63	ftruncate \
64	ftruncate64 \
65	getdents \
66	getdents64 \
67	getrandom \
68	inet-accept-connect-send-recv \
69	inet-cmsg \
70	ioctl \
71	ip_mreq \
72	ipc_msg \
73	ipc_msgbuf \
74	ipc_sem \
75	ipc_shm \
76	ksysent \
77	llseek \
78	lseek \
79	lstat \
80	lstat64 \
81	membarrier \
82	memfd_create \
83	mlock2 \
84	mmap \
85	mmap64 \
86	mmsg \
87	mq \
88	nanosleep \
89	net-accept-connect \
90	netlink_inet_diag \
91	netlink_unix_diag \
92	newfstatat \
93	oldselect \
94	pc \
95	personality \
96	pipe \
97	ppoll \
98	pselect6 \
99	readdir \
100	readlink \
101	readlinkat \
102	restart_syscall \
103	rt_sigqueueinfo \
104	sched_xetattr \
105	scm_rights \
106	seccomp \
107	select \
108	sendfile \
109	sendfile64 \
110	set_ptracer_any \
111	sigaction \
112	sigaltstack \
113	signalfd \
114	sigreturn \
115	stack-fcall \
116	stat \
117	stat64 \
118	statfs \
119	sysinfo \
120	time \
121	timer_create \
122	timer_xettime \
123	timerfd_xettime \
124	times \
125	times-fail \
126	truncate \
127	truncate64 \
128	uid \
129	uid16 \
130	uid32 \
131	uio \
132	umount \
133	umount2 \
134	umovestr \
135	umovestr2 \
136	unix-pair-send-recv \
137	userfaultfd \
138	utime \
139	utimensat \
140	vfork-f \
141	wait \
142	xattr \
143	xet_robust_list \
144	xetitimer \
145	xettimeofday \
146	# end of check_PROGRAMS
147
148clock_xettime_LDADD = -lrt
149filter_unavailable_LDADD = -lpthread
150fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
151fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
152ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
153lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
154mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
155mq_LDADD = -lrt
156newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
157pc_LDADD = $(dl_LIBS)
158stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
159statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
160times_LDADD = -lrt
161truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
162uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
163stack_fcall_SOURCES = stack-fcall.c \
164	stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
165
166TESTS = \
167	strace-f.test \
168	qual_syscall.test \
169	ksysent.test \
170	\
171	_newselect.test \
172	adjtimex.test \
173	aio.test \
174	bexecve.test \
175	bpf.test \
176	caps.test \
177	clock_nanosleep.test \
178	clock_xettime.test \
179	dumpio.test \
180	epoll_create1.test \
181	eventfd.test \
182	execve.test \
183	execveat.test \
184	fanotify_mark.test \
185	fcntl.test \
186	fcntl64.test \
187	file_handle.test \
188	filter-unavailable.test \
189	fork-f.test \
190	fstat.test \
191	fstat64.test \
192	fstatat64.test \
193	ftruncate.test \
194	ftruncate64.test \
195	getdents.test \
196	getdents64.test \
197	getrandom.test \
198	inet-cmsg.test \
199	ioctl.test \
200	ip_mreq.test \
201	ipc_msg.test \
202	ipc_msgbuf.test \
203	ipc_sem.test \
204	ipc_shm.test \
205	llseek.test \
206	lseek.test \
207	lstat.test \
208	lstat64.test \
209	membarrier.test \
210	memfd_create.test \
211	mlock2.test \
212	mmap.test \
213	mmap64.test \
214	mmsg.test \
215	mq.test \
216	nanosleep.test \
217	net-fd.test \
218	net-yy.test \
219	net.test \
220	newfstatat.test \
221	oldselect.test \
222	pc.test \
223	personality.test \
224	pipe.test \
225	ppoll.test \
226	pselect6.test \
227	readdir.test \
228	readlink.test \
229	readlinkat.test \
230	rt_sigqueueinfo.test \
231	sched_xetattr.test \
232	scm_rights-fd.test \
233	seccomp.test \
234	select.test \
235	sendfile.test \
236	sendfile64.test \
237	sigaction.test \
238	sigaltstack.test \
239	signalfd.test \
240	sigreturn.test \
241	stat.test \
242	stat64.test \
243	statfs.test \
244	sun_path.test \
245	sysinfo.test \
246	time.test \
247	timer_create.test \
248	timer_xettime.test \
249	timerfd_xettime.test \
250	times-fail.test \
251	times.test \
252	truncate.test \
253	truncate64.test \
254	uid.test \
255	uid16.test \
256	uid32.test \
257	uio.test \
258	umount.test \
259	umount2.test \
260	umovestr.test \
261	umovestr2.test \
262	unix-yy.test \
263	userfaultfd.test \
264	utime.test \
265	utimensat.test \
266	vfork-f.test \
267	wait.test \
268	xattr.test \
269	xet_robust_list.test \
270	xetitimer.test \
271	xettimeofday.test \
272	\
273	count.test \
274	detach-sleeping.test \
275	detach-stopped.test \
276	detach-running.test \
277	restart_syscall.test \
278	strace-k.test
279
280net-fd.log: net.log
281
282TEST_LOG_COMPILER = env
283AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh
284
285EXTRA_DIST = init.sh run.sh match.awk \
286	     caps.awk \
287	     dumpio.expected \
288	     epoll_create1.expected \
289	     eventfd.expected \
290	     execve.expected \
291	     execve-v.expected \
292	     execveat.expected \
293	     execveat-v.expected \
294	     fanotify_mark.expected \
295	     filter-unavailable.expected \
296	     fstatat.c \
297	     fstatx.c \
298	     ip_mreq.expected \
299	     ipc.sh \
300	     ipc_msgbuf.expected \
301	     ksysent.sed \
302	     lstatx.c \
303	     memfd_create.expected \
304	     mmsg.expected \
305	     mq.expected \
306	     net.expected \
307	     net-fd.expected \
308	     net-yy-accept.awk \
309	     net-yy-connect.awk \
310	     oldselect.expected \
311	     pipe.expected \
312	     ppoll.expected \
313	     ppoll-v.expected \
314	     sigaction.awk \
315	     sigaltstack.expected \
316	     signalfd.expected \
317	     statfs.expected \
318	     statx.sh \
319	     struct_flock.c \
320	     sun_path.expected \
321	     uid.awk \
322	     uio.expected \
323	     umovestr.expected \
324	     unix-yy-accept.awk \
325	     unix-yy-connect.awk \
326	     wait.expected \
327	     xattr.expected \
328	     xselect.c \
329	     xstatx.c \
330	     $(TESTS)
331
332ksysent.h: $(srcdir)/ksysent.sed
333	echo '#include <asm/unistd.h>' | \
334		$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1
335	LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
336	mv -f $@.t2 $@
337	rm -f $@.t1
338
339BUILT_SOURCES = ksysent.h
340CLEANFILES = ksysent.h $(TESTS:=.tmp)
341