]> granicus.if.org Git - strace/blob - tests/Makefile.am
883249378c2660a7d919f9852f06070f615b43e7
[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         print_quoted_string.c \
50         tail_alloc.c \
51         tests.h \
52         tprintf.c \
53         # end of libtests_a_SOURCES
54 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
55 check_LIBRARIES = libtests.a
56 LDADD = libtests.a
57
58 check_PROGRAMS = \
59         _newselect \
60         acct \
61         adjtimex \
62         aio \
63         alarm \
64         attach-f-p \
65         attach-p-cmd-cmd \
66         attach-p-cmd-p \
67         bpf \
68         caps \
69         chmod \
70         clock_nanosleep \
71         clock_xettime \
72         copy_file_range \
73         count-f \
74         creat \
75         dup \
76         dup2 \
77         dup3 \
78         epoll_create1 \
79         eventfd \
80         execve \
81         execve-v \
82         execveat \
83         execveat-v \
84         faccessat \
85         fanotify_mark \
86         fchmod \
87         fcntl \
88         fcntl64 \
89         file_handle \
90         filter-unavailable \
91         flock \
92         fork-f \
93         fstat \
94         fstat64 \
95         fstatat64 \
96         ftruncate \
97         ftruncate64 \
98         getcwd \
99         getdents \
100         getdents64 \
101         getrandom \
102         getrusage \
103         getxxid \
104         inet-cmsg \
105         ioctl \
106         ip_mreq \
107         ipc_msg \
108         ipc_msgbuf \
109         ipc_sem \
110         ipc_shm \
111         ksysent \
112         llseek \
113         lseek \
114         lstat \
115         lstat64 \
116         membarrier \
117         memfd_create \
118         mincore \
119         mknod \
120         mlock2 \
121         mmap \
122         mmap64 \
123         mmsg \
124         mq \
125         nanosleep \
126         net-accept-connect \
127         net-y-unix \
128         net-yy-inet \
129         net-yy-unix \
130         netlink_inet_diag \
131         netlink_unix_diag \
132         newfstatat \
133         oldselect \
134         open \
135         openat \
136         pc \
137         personality \
138         pipe \
139         poll \
140         ppoll \
141         pselect6 \
142         readdir \
143         readlink \
144         readlinkat \
145         readv \
146         recvmsg \
147         rename \
148         renameat\
149         restart_syscall \
150         rt_sigpending \
151         rt_sigprocmask \
152         rt_sigqueueinfo \
153         rt_sigsuspend \
154         rt_sigtimedwait \
155         rt_tgsigqueueinfo \
156         sched_get_priority_mxx \
157         sched_xetaffinity \
158         sched_xetattr \
159         sched_xetparam \
160         sched_xetscheduler \
161         scm_rights \
162         seccomp \
163         select \
164         sendfile \
165         sendfile64 \
166         set_ptracer_any \
167         sigaction \
168         sigaltstack \
169         signalfd \
170         sigreturn \
171         splice \
172         stack-fcall \
173         sleep \
174         stat \
175         stat64 \
176         statfs \
177         sysinfo \
178         syslog \
179         tee \
180         time \
181         timer_create \
182         timer_xettime \
183         timerfd_xettime \
184         times \
185         times-fail \
186         truncate \
187         truncate64 \
188         uid \
189         uid16 \
190         uid32 \
191         uio \
192         umask \
193         umount \
194         umount2 \
195         umovestr \
196         umovestr2 \
197         uname \
198         unix-pair-send-recv \
199         userfaultfd \
200         utime \
201         utimensat \
202         vfork-f \
203         vmsplice \
204         wait \
205         xattr \
206         xet_robust_list \
207         xetitimer \
208         xetpgid \
209         xetpriority \
210         xettimeofday \
211         # end of check_PROGRAMS
212
213 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
214 clock_xettime_LDADD = -lrt $(LDADD)
215 count_f_LDADD = -lpthread $(LDADD)
216 filter_unavailable_LDADD = -lpthread $(LDADD)
217 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
218 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
219 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
220 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
221 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
222 mq_LDADD = -lrt $(LDADD)
223 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
224 pc_LDADD = $(dl_LIBS) $(LDADD)
225 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
226 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
227 times_LDADD = -lrt $(LDADD)
228 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
229 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
230 stack_fcall_SOURCES = stack-fcall.c \
231         stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
232
233 if USE_LIBUNWIND
234 LIBUNWIND_TESTS = strace-k.test
235 else
236 LIBUNWIND_TESTS =
237 endif
238
239 DECODER_TESTS = \
240         _newselect.test \
241         acct.test \
242         adjtimex.test \
243         aio.test \
244         alarm.test \
245         bpf.test \
246         caps.test \
247         chmod.test \
248         clock_nanosleep.test \
249         clock_xettime.test \
250         copy_file_range.test \
251         creat.test \
252         dup.test \
253         dup2.test \
254         dup3.test \
255         epoll_create1.test \
256         eventfd.test \
257         execve.test \
258         execve-v.test \
259         execveat.test \
260         execveat-v.test \
261         faccessat.test \
262         fanotify_mark.test \
263         fchmod.test \
264         fcntl.test \
265         fcntl64.test \
266         file_handle.test \
267         flock.test \
268         fstat.test \
269         fstat64.test \
270         fstatat64.test \
271         ftruncate.test \
272         ftruncate64.test \
273         getcwd.test \
274         getdents.test \
275         getdents64.test \
276         getrandom.test \
277         getrusage.test \
278         getxxid.test \
279         inet-cmsg.test \
280         ioctl.test \
281         ip_mreq.test \
282         ipc_msg.test \
283         ipc_msgbuf.test \
284         ipc_sem.test \
285         ipc_shm.test \
286         llseek.test \
287         lseek.test \
288         lstat.test \
289         lstat64.test \
290         membarrier.test \
291         memfd_create.test \
292         mincore.test \
293         mknod.test \
294         mlock2.test \
295         mmap.test \
296         mmap64.test \
297         mmsg.test \
298         mq.test \
299         nanosleep.test \
300         net-y-unix.test \
301         net-yy-inet.test \
302         net-yy-unix.test \
303         net.test \
304         newfstatat.test \
305         oldselect.test \
306         open.test \
307         openat.test \
308         personality.test \
309         pipe.test \
310         poll.test \
311         ppoll.test \
312         pselect6.test \
313         readdir.test \
314         readlink.test \
315         readlinkat.test \
316         readv.test \
317         recvmsg.test \
318         rename.test \
319         renameat.test \
320         rt_sigpending.test \
321         rt_sigprocmask.test \
322         rt_sigqueueinfo.test \
323         rt_sigsuspend.test \
324         rt_sigtimedwait.test \
325         rt_tgsigqueueinfo.test \
326         sched_get_priority_mxx.test \
327         sched_xetaffinity.test \
328         sched_xetattr.test \
329         sched_xetparam.test \
330         sched_xetscheduler.test \
331         scm_rights-fd.test \
332         seccomp.test \
333         select.test \
334         sendfile.test \
335         sendfile64.test \
336         sigaction.test \
337         sigaltstack.test \
338         signalfd.test \
339         sigreturn.test \
340         splice.test \
341         stat.test \
342         stat64.test \
343         statfs.test \
344         sun_path.test \
345         sysinfo.test \
346         syslog.test \
347         tee.test \
348         time.test \
349         timer_create.test \
350         timer_xettime.test \
351         timerfd_xettime.test \
352         times-fail.test \
353         times.test \
354         truncate.test \
355         truncate64.test \
356         uid.test \
357         uid16.test \
358         uid32.test \
359         uio.test \
360         umask.test \
361         umount.test \
362         umount2.test \
363         umovestr.test \
364         umovestr2.test \
365         uname.test \
366         userfaultfd.test \
367         utime.test \
368         utimensat.test \
369         vmsplice.test \
370         wait.test \
371         xattr.test \
372         xet_robust_list.test \
373         xetitimer.test \
374         xetpgid.test \
375         xetpriority.test \
376         xettimeofday.test \
377         # end of DECODER_TESTS
378
379 MISC_TESTS = \
380         attach-f-p.test \
381         attach-p-cmd.test \
382         bexecve.test \
383         count-f.test \
384         count.test \
385         detach-running.test \
386         detach-sleeping.test \
387         detach-stopped.test \
388         dumpio.test \
389         filter-unavailable.test \
390         fork-f.test \
391         ksysent.test \
392         opipe.test \
393         pc.test \
394         qual_syscall.test \
395         redirect.test \
396         restart_syscall.test \
397         strace-T.test \
398         strace-f.test \
399         strace-r.test \
400         strace-t.test \
401         strace-tt.test \
402         strace-ttt.test \
403         vfork-f.test \
404         # end of MISC_TESTS
405
406 TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
407
408 XFAIL_TESTS_ =
409 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
410 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
411 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME))
412
413 TEST_LOG_COMPILER = env
414 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh
415
416 EXTRA_DIST = init.sh run.sh match.awk \
417              caps.awk \
418              count-f.expected \
419              dumpio.expected \
420              eventfd.expected \
421              fanotify_mark.expected \
422              filter-unavailable.expected \
423              fstatat.c \
424              fstatx.c \
425              ip_mreq.expected \
426              ipc.sh \
427              ipc_msgbuf.expected \
428              ksysent.sed \
429              lstatx.c \
430              memfd_create.expected \
431              mq.expected \
432              net.expected \
433              oldselect.expected \
434              pipe.expected \
435              ppoll.expected \
436              ppoll-v.expected \
437              sigaction.awk \
438              sigaltstack.expected \
439              signalfd.expected \
440              statfs.expected \
441              statx.sh \
442              strace-T.expected \
443              strace-r.expected \
444              struct_flock.c \
445              sun_path.expected \
446              uid.awk \
447              uio.expected \
448              umovestr.expected \
449              wait.expected \
450              xattr.expected \
451              xselect.c \
452              xstatx.c \
453              $(TESTS)
454
455 ksysent.h: $(srcdir)/ksysent.sed
456         echo '#include <asm/unistd.h>' | \
457                 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
458         LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
459         mv -f $@.t2 $@
460         rm -f $@.t1
461
462 BUILT_SOURCES = ksysent.h
463 CLEANFILES = ksysent.h $(TESTS:=.tmp)