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