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