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