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