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