]> granicus.if.org Git - strace/blob - tests/Makefile.am
tests: extend coverage of execve and execveat syscalls
[strace] / tests / Makefile.am
1 # Automake input for strace tests.
2 #
3 # Copyright (c) 2011-2016 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
28 OS = linux
29 ARCH = @arch@
30 MPERS_NAME =
31 ARCH_MFLAGS =
32 AM_CFLAGS = $(WARN_CFLAGS)
33 AM_CPPFLAGS = $(ARCH_MFLAGS) \
34               -I$(builddir) \
35               -I$(top_builddir)/$(OS)/$(ARCH) \
36               -I$(top_srcdir)/$(OS)/$(ARCH) \
37               -I$(top_builddir)/$(OS) \
38               -I$(top_srcdir)/$(OS) \
39               -I$(top_builddir) \
40               -I$(top_srcdir)
41 AM_LDFLAGS = $(ARCH_MFLAGS)
42
43 libtests_a_SOURCES = \
44         error_msg.c \
45         get_page_size.c \
46         hexdump_strdup.c \
47         hexquote_strndup.c \
48         inode_of_sockfd.c \
49         tail_alloc.c \
50         tests.h \
51         tprintf.c \
52         # end of libtests_a_SOURCES
53 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
54 check_LIBRARIES = libtests.a
55 LDADD = libtests.a
56
57 check_PROGRAMS = \
58         _newselect \
59         adjtimex \
60         aio \
61         attach-p-cmd-cmd \
62         attach-p-cmd-p \
63         bpf \
64         caps \
65         clock_nanosleep \
66         clock_xettime \
67         epoll_create1 \
68         eventfd \
69         execve \
70         execve-v \
71         execveat \
72         execveat-v \
73         fanotify_mark \
74         fcntl \
75         fcntl64 \
76         file_handle \
77         filter-unavailable \
78         fork-f \
79         fstat \
80         fstat64 \
81         fstatat64 \
82         ftruncate \
83         ftruncate64 \
84         getdents \
85         getdents64 \
86         getrandom \
87         getxxid \
88         inet-cmsg \
89         ioctl \
90         ip_mreq \
91         ipc_msg \
92         ipc_msgbuf \
93         ipc_sem \
94         ipc_shm \
95         ksysent \
96         llseek \
97         lseek \
98         lstat \
99         lstat64 \
100         membarrier \
101         memfd_create \
102         mincore \
103         mlock2 \
104         mmap \
105         mmap64 \
106         mmsg \
107         mq \
108         nanosleep \
109         net-accept-connect \
110         net-y-unix \
111         net-yy-inet \
112         net-yy-unix \
113         netlink_inet_diag \
114         netlink_unix_diag \
115         newfstatat \
116         oldselect \
117         pc \
118         personality \
119         pipe \
120         ppoll \
121         pselect6 \
122         readdir \
123         readlink \
124         readlinkat \
125         readv \
126         recvmsg \
127         restart_syscall \
128         rt_sigqueueinfo \
129         sched_xetaffinity \
130         sched_xetattr \
131         scm_rights \
132         seccomp \
133         select \
134         sendfile \
135         sendfile64 \
136         set_ptracer_any \
137         sigaction \
138         sigaltstack \
139         signalfd \
140         sigreturn \
141         stack-fcall \
142         sleep \
143         stat \
144         stat64 \
145         statfs \
146         sysinfo \
147         time \
148         timer_create \
149         timer_xettime \
150         timerfd_xettime \
151         times \
152         times-fail \
153         truncate \
154         truncate64 \
155         uid \
156         uid16 \
157         uid32 \
158         uio \
159         umount \
160         umount2 \
161         umovestr \
162         umovestr2 \
163         unix-pair-send-recv \
164         userfaultfd \
165         utime \
166         utimensat \
167         vfork-f \
168         wait \
169         xattr \
170         xet_robust_list \
171         xetitimer \
172         xettimeofday \
173         # end of check_PROGRAMS
174
175 clock_xettime_LDADD = -lrt $(LDADD)
176 filter_unavailable_LDADD = -lpthread $(LDADD)
177 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
178 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
179 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
180 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
181 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
182 mq_LDADD = -lrt $(LDADD)
183 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184 pc_LDADD = $(dl_LIBS) $(LDADD)
185 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
186 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
187 times_LDADD = -lrt $(LDADD)
188 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
189 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
190 stack_fcall_SOURCES = stack-fcall.c \
191         stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
192
193 if USE_LIBUNWIND
194 LIBUNWIND_TESTS = strace-k.test
195 else
196 LIBUNWIND_TESTS =
197 endif
198
199 TESTS = \
200         strace-f.test \
201         qual_syscall.test \
202         ksysent.test \
203         \
204         _newselect.test \
205         adjtimex.test \
206         aio.test \
207         bexecve.test \
208         bpf.test \
209         caps.test \
210         clock_nanosleep.test \
211         clock_xettime.test \
212         dumpio.test \
213         epoll_create1.test \
214         eventfd.test \
215         execve.test \
216         execve-v.test \
217         execveat.test \
218         execveat-v.test \
219         fanotify_mark.test \
220         fcntl.test \
221         fcntl64.test \
222         file_handle.test \
223         filter-unavailable.test \
224         fork-f.test \
225         fstat.test \
226         fstat64.test \
227         fstatat64.test \
228         ftruncate.test \
229         ftruncate64.test \
230         getdents.test \
231         getdents64.test \
232         getrandom.test \
233         getxxid.test \
234         inet-cmsg.test \
235         ioctl.test \
236         ip_mreq.test \
237         ipc_msg.test \
238         ipc_msgbuf.test \
239         ipc_sem.test \
240         ipc_shm.test \
241         llseek.test \
242         lseek.test \
243         lstat.test \
244         lstat64.test \
245         membarrier.test \
246         memfd_create.test \
247         mincore.test \
248         mlock2.test \
249         mmap.test \
250         mmap64.test \
251         mmsg.test \
252         mq.test \
253         nanosleep.test \
254         net-y-unix.test \
255         net-yy-inet.test \
256         net-yy-unix.test \
257         net.test \
258         newfstatat.test \
259         oldselect.test \
260         pc.test \
261         personality.test \
262         pipe.test \
263         ppoll.test \
264         pselect6.test \
265         readdir.test \
266         readlink.test \
267         readlinkat.test \
268         readv.test \
269         recvmsg.test \
270         rt_sigqueueinfo.test \
271         sched_xetaffinity.test \
272         sched_xetattr.test \
273         scm_rights-fd.test \
274         seccomp.test \
275         select.test \
276         sendfile.test \
277         sendfile64.test \
278         sigaction.test \
279         sigaltstack.test \
280         signalfd.test \
281         sigreturn.test \
282         stat.test \
283         stat64.test \
284         statfs.test \
285         sun_path.test \
286         sysinfo.test \
287         time.test \
288         timer_create.test \
289         timer_xettime.test \
290         timerfd_xettime.test \
291         times-fail.test \
292         times.test \
293         truncate.test \
294         truncate64.test \
295         uid.test \
296         uid16.test \
297         uid32.test \
298         uio.test \
299         umount.test \
300         umount2.test \
301         umovestr.test \
302         umovestr2.test \
303         userfaultfd.test \
304         utime.test \
305         utimensat.test \
306         vfork-f.test \
307         wait.test \
308         xattr.test \
309         xet_robust_list.test \
310         xetitimer.test \
311         xettimeofday.test \
312         \
313         count.test \
314         attach-p-cmd.test \
315         detach-sleeping.test \
316         detach-stopped.test \
317         detach-running.test \
318         opipe.test \
319         redirect.test \
320         restart_syscall.test \
321         $(LIBUNWIND_TESTS)
322
323 XFAIL_TESTS_ =
324 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
325 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
326 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME))
327
328 TEST_LOG_COMPILER = env
329 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh
330
331 EXTRA_DIST = init.sh run.sh match.awk \
332              caps.awk \
333              dumpio.expected \
334              eventfd.expected \
335              fanotify_mark.expected \
336              filter-unavailable.expected \
337              fstatat.c \
338              fstatx.c \
339              ip_mreq.expected \
340              ipc.sh \
341              ipc_msgbuf.expected \
342              ksysent.sed \
343              lstatx.c \
344              memfd_create.expected \
345              mq.expected \
346              net.expected \
347              oldselect.expected \
348              pipe.expected \
349              ppoll.expected \
350              ppoll-v.expected \
351              sigaction.awk \
352              sigaltstack.expected \
353              signalfd.expected \
354              statfs.expected \
355              statx.sh \
356              struct_flock.c \
357              sun_path.expected \
358              uid.awk \
359              uio.expected \
360              umovestr.expected \
361              wait.expected \
362              xattr.expected \
363              xselect.c \
364              xstatx.c \
365              $(TESTS)
366
367 ksysent.h: $(srcdir)/ksysent.sed
368         echo '#include <asm/unistd.h>' | \
369                 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1
370         LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
371         mv -f $@.t2 $@
372         rm -f $@.t1
373
374 BUILT_SOURCES = ksysent.h
375 CLEANFILES = ksysent.h $(TESTS:=.tmp)