]> granicus.if.org Git - strace/blob - tests/Makefile.am
tests: check non-verbose capget/capset output
[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         errno2name.c \
45         error_msg.c \
46         fill_memory.c \
47         get_page_size.c \
48         hexdump_strdup.c \
49         hexquote_strndup.c \
50         inode_of_sockfd.c \
51         libmmsg.c \
52         libsocketcall.c \
53         overflowuid.c \
54         print_quoted_string.c \
55         printflags.c \
56         printxval.c \
57         signal2name.c \
58         sprintrc.c \
59         tail_alloc.c \
60         tests.h \
61         tprintf.c \
62         # end of libtests_a_SOURCES
63 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
64 check_LIBRARIES = libtests.a
65 LDADD = libtests.a
66
67 check_PROGRAMS = \
68         _newselect \
69         accept \
70         accept4 \
71         access \
72         acct \
73         add_key \
74         adjtimex \
75         aio \
76         alarm \
77         attach-f-p \
78         attach-p-cmd-cmd \
79         attach-p-cmd-p \
80         bpf \
81         brk \
82         btrfs \
83         caps \
84         caps-abbrev \
85         chmod \
86         chown \
87         chown32 \
88         chroot \
89         clock_adjtime \
90         clock_nanosleep \
91         clock_xettime \
92         copy_file_range \
93         count-f \
94         creat \
95         delete_module \
96         dup \
97         dup2 \
98         dup3 \
99         epoll_create \
100         epoll_create1 \
101         epoll_ctl \
102         epoll_pwait \
103         epoll_wait \
104         eventfd \
105         execve \
106         execve-v \
107         execveat \
108         execveat-v \
109         faccessat \
110         fadvise64 \
111         fadvise64_64 \
112         fallocate \
113         fanotify_init \
114         fanotify_mark \
115         fchdir \
116         fchmod \
117         fchmodat \
118         fchown \
119         fchown32 \
120         fchownat \
121         fcntl \
122         fcntl64 \
123         fdatasync \
124         file_handle \
125         file_ioctl \
126         filter-unavailable \
127         finit_module \
128         flock \
129         fork-f \
130         fstat \
131         fstat64 \
132         fstatat64 \
133         fstatfs \
134         fstatfs64 \
135         fsync \
136         ftruncate \
137         ftruncate64 \
138         futex \
139         futimesat \
140         get_mempolicy \
141         getcpu \
142         getcwd \
143         getdents \
144         getdents64 \
145         getegid \
146         getegid32 \
147         geteuid \
148         geteuid32 \
149         getgid \
150         getgid32 \
151         getgroups \
152         getgroups32 \
153         getpeername \
154         getpgrp \
155         getrandom \
156         getresgid \
157         getresgid32 \
158         getresuid \
159         getresuid32 \
160         getrlimit \
161         getrusage \
162         getsid \
163         getsockname \
164         getuid \
165         getuid32 \
166         getxxid \
167         inet-cmsg \
168         init_module \
169         inotify \
170         inotify_init1 \
171         ioctl \
172         ioctl_block \
173         ioctl_evdev \
174         ioctl_evdev-v \
175         ioctl_mtd \
176         ioctl_rtc \
177         ioctl_rtc-v \
178         ioctl_uffdio \
179         ioctl_v4l2 \
180         ioperm \
181         iopl \
182         ioprio \
183         ip_mreq \
184         ipc \
185         ipc_msg \
186         ipc_msgbuf \
187         ipc_sem \
188         ipc_shm \
189         kcmp \
190         keyctl \
191         kill \
192         ksysent \
193         lchown \
194         lchown32 \
195         link \
196         linkat \
197         llseek \
198         lookup_dcookie \
199         lseek \
200         lstat \
201         lstat64 \
202         mbind \
203         membarrier \
204         memfd_create \
205         migrate_pages \
206         mincore \
207         mkdir \
208         mkdirat \
209         mknod \
210         mknodat \
211         mlock \
212         mlock2 \
213         mlockall \
214         mmap \
215         mmap64 \
216         mmsg \
217         mmsg-silent \
218         mmsg_name \
219         mmsg_name-v \
220         mount \
221         move_pages \
222         mq \
223         msg_control \
224         msg_control-v \
225         msg_name \
226         munlockall \
227         nanosleep \
228         net-accept-connect \
229         net-icmp_filter \
230         net-sockaddr \
231         net-y-unix \
232         net-yy-inet \
233         net-yy-netlink \
234         net-yy-unix \
235         netlink_inet_diag \
236         netlink_netlink_diag \
237         netlink_protocol \
238         netlink_unix_diag \
239         newfstatat \
240         nsyscalls \
241         old_mmap \
242         oldselect \
243         open \
244         openat \
245         pause \
246         pc \
247         perf_event_open \
248         personality \
249         pipe \
250         poll \
251         ppoll \
252         prctl-seccomp-filter-v \
253         prctl-seccomp-strict \
254         pread64-pwrite64 \
255         preadv \
256         preadv-pwritev \
257         preadv2-pwritev2 \
258         prlimit64 \
259         process_vm_readv \
260         process_vm_writev \
261         pselect6 \
262         ptrace \
263         pwritev \
264         quotactl \
265         quotactl-v \
266         quotactl-xfs \
267         quotactl-xfs-v \
268         read-write \
269         readahead \
270         readdir \
271         readlink \
272         readlinkat \
273         readv \
274         reboot \
275         recvfrom \
276         recvmmsg-timeout \
277         recvmsg \
278         redirect-fds \
279         remap_file_pages \
280         rename \
281         renameat \
282         renameat2 \
283         request_key \
284         restart_syscall \
285         rmdir \
286         rt_sigpending \
287         rt_sigprocmask \
288         rt_sigqueueinfo \
289         rt_sigsuspend \
290         rt_sigtimedwait \
291         rt_tgsigqueueinfo \
292         sched_get_priority_mxx \
293         sched_rr_get_interval \
294         sched_xetaffinity \
295         sched_xetattr \
296         sched_xetparam \
297         sched_xetscheduler \
298         sched_yield \
299         scm_rights \
300         seccomp-filter \
301         seccomp-filter-v \
302         seccomp-strict \
303         select \
304         semop \
305         sendfile \
306         sendfile64 \
307         set_mempolicy \
308         set_ptracer_any \
309         setdomainname \
310         setfsgid \
311         setfsgid32 \
312         setfsuid \
313         setfsuid32 \
314         setgid \
315         setgid32 \
316         setgroups \
317         setgroups32 \
318         sethostname \
319         setregid \
320         setregid32 \
321         setresgid \
322         setresgid32 \
323         setresuid \
324         setresuid32 \
325         setreuid \
326         setreuid32 \
327         setrlimit \
328         setuid \
329         setuid32 \
330         shmxt \
331         shutdown \
332         sigaction \
333         sigaltstack \
334         siginfo \
335         signal_receive \
336         signalfd4 \
337         sigreturn \
338         sleep \
339         socketcall \
340         splice \
341         stack-fcall \
342         stat \
343         stat64 \
344         statfs \
345         statfs64 \
346         swap \
347         symlink \
348         symlinkat \
349         sync \
350         sync_file_range \
351         sync_file_range2 \
352         sysinfo \
353         syslog \
354         tee \
355         time \
356         timer_create \
357         timer_xettime \
358         timerfd_xettime \
359         times \
360         times-fail \
361         truncate \
362         truncate64 \
363         ugetrlimit \
364         uio \
365         umask \
366         umount \
367         umount2 \
368         umovestr \
369         umovestr2 \
370         umovestr3 \
371         uname \
372         unix-pair-send-recv \
373         unix-pair-sendto-recvfrom \
374         unlink \
375         unlinkat \
376         userfaultfd \
377         utime \
378         utimensat \
379         utimes \
380         vfork-f \
381         vhangup \
382         vmsplice \
383         wait4 \
384         wait4-v \
385         waitid \
386         waitid-v \
387         waitpid \
388         xattr \
389         xet_robust_list \
390         xetitimer \
391         xetpgid \
392         xetpriority \
393         xettimeofday \
394         # end of check_PROGRAMS
395
396 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
397 clock_xettime_LDADD = -lrt $(LDADD)
398 count_f_LDADD = -lpthread $(LDADD)
399 filter_unavailable_LDADD = -lpthread $(LDADD)
400 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
401 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
402 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
403 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
404 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
405 mq_LDADD = -lrt $(LDADD)
406 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
407 pc_LDADD = $(dl_LIBS) $(LDADD)
408 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
409 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
410 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
411 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
412 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
413 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
414 times_LDADD = -lrt $(LDADD)
415 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
416 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
417
418 stack_fcall_SOURCES = stack-fcall.c \
419         stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
420
421 if USE_LIBUNWIND
422 LIBUNWIND_TESTS = strace-k.test
423 else
424 LIBUNWIND_TESTS =
425 endif
426
427 DECODER_TESTS = \
428         _newselect.test \
429         accept.test \
430         accept4.test \
431         access.test \
432         acct.test \
433         add_key.test \
434         adjtimex.test \
435         aio.test \
436         alarm.test \
437         bpf.test \
438         brk.test \
439         btrfs.test \
440         btrfs-v.test \
441         btrfs-w.test \
442         btrfs-vw.test \
443         caps.test \
444         caps-abbrev.test \
445         chmod.test \
446         chown.test \
447         chown32.test \
448         chroot.test \
449         clock_adjtime.test \
450         clock_nanosleep.test \
451         clock_xettime.test \
452         copy_file_range.test \
453         creat.test \
454         delete_module.test \
455         dup.test \
456         dup2.test \
457         dup3.test \
458         epoll_create.test \
459         epoll_create1.test \
460         epoll_ctl.test \
461         epoll_pwait.test \
462         epoll_wait.test \
463         eventfd.test \
464         execve-v.test \
465         execve.test \
466         execveat-v.test \
467         execveat.test \
468         faccessat.test \
469         fadvise64.test \
470         fadvise64_64.test \
471         fallocate.test \
472         fanotify_init.test \
473         fanotify_mark.test \
474         fchdir.test \
475         fchmod.test \
476         fchmodat.test \
477         fchown.test \
478         fchown32.test \
479         fchownat.test \
480         fcntl.test \
481         fcntl64.test \
482         fdatasync.test \
483         file_handle.test \
484         file_ioctl.test \
485         finit_module.test \
486         flock.test \
487         fstat.test \
488         fstat64.test \
489         fstatat64.test \
490         fstatfs.test \
491         fstatfs64.test \
492         fsync.test \
493         ftruncate.test \
494         ftruncate64.test \
495         futex.test \
496         futimesat.test \
497         get_mempolicy.test \
498         getcpu.test \
499         getcwd.test \
500         getdents.test \
501         getdents64.test \
502         getegid.test \
503         getegid32.test \
504         geteuid.test \
505         geteuid32.test \
506         getgid.test \
507         getgid32.test \
508         getgroups.test \
509         getgroups32.test \
510         getpeername.test \
511         getpgrp.test \
512         getrandom.test \
513         getresgid.test \
514         getresgid32.test \
515         getresuid.test \
516         getresuid32.test \
517         getrlimit.test \
518         getrusage.test \
519         getsid.test \
520         getsockname.test \
521         getuid.test \
522         getuid32.test \
523         getxxid.test \
524         inet-cmsg.test \
525         init_module.test \
526         inotify.test \
527         inotify_init1.test \
528         ioctl.test \
529         ioctl_block.test \
530         ioctl_evdev.test \
531         ioctl_evdev-v.test \
532         ioctl_mtd.test \
533         ioctl_rtc.test \
534         ioctl_rtc-v.test \
535         ioctl_uffdio.test \
536         ioctl_v4l2.test \
537         ioperm.test \
538         iopl.test \
539         ioprio.test \
540         ip_mreq.test \
541         ipc.test \
542         ipc_msg.test \
543         ipc_msgbuf.test \
544         ipc_sem.test \
545         ipc_shm.test \
546         kcmp.test \
547         keyctl.test \
548         kill.test \
549         lchown.test \
550         lchown32.test \
551         link.test \
552         linkat.test \
553         llseek.test \
554         lookup_dcookie.test \
555         lseek.test \
556         lstat.test \
557         lstat64.test \
558         mbind.test \
559         membarrier.test \
560         memfd_create.test \
561         migrate_pages.test \
562         mincore.test \
563         mkdir.test \
564         mkdirat.test \
565         mknod.test \
566         mknodat.test \
567         mlock.test \
568         mlock2.test \
569         mlockall.test \
570         mmap.test \
571         mmap64.test \
572         mmsg.test \
573         mmsg-silent.test \
574         mmsg_name.test \
575         mmsg_name-v.test \
576         mount.test \
577         move_pages.test \
578         mq.test \
579         msg_control.test \
580         msg_control-v.test \
581         msg_name.test \
582         munlockall.test \
583         nanosleep.test \
584         net-icmp_filter.test \
585         net-sockaddr.test \
586         net-y-unix.test \
587         net-yy-inet.test \
588         net-yy-netlink.test \
589         net-yy-unix.test \
590         net.test \
591         netlink_protocol.test \
592         newfstatat.test \
593         nsyscalls.test \
594         old_mmap.test \
595         oldselect.test \
596         open.test \
597         openat.test \
598         pause.test \
599         perf_event_open.test \
600         personality.test \
601         pipe.test \
602         poll.test \
603         ppoll.test \
604         prctl-seccomp-filter-v.test \
605         prctl-seccomp-strict.test \
606         pread64-pwrite64.test \
607         preadv-pwritev.test \
608         preadv2-pwritev2.test \
609         preadv.test \
610         prlimit64.test \
611         process_vm_readv.test \
612         process_vm_writev.test \
613         pselect6.test \
614         ptrace.test \
615         pwritev.test \
616         quotactl.test \
617         quotactl-v.test \
618         quotactl-xfs.test \
619         quotactl-xfs-v.test \
620         read-write.test \
621         readahead.test \
622         readdir.test \
623         readlink.test \
624         readlinkat.test \
625         readv.test \
626         reboot.test \
627         recvfrom.test \
628         recvmmsg-timeout.test \
629         recvmsg.test \
630         remap_file_pages.test \
631         rename.test \
632         renameat.test \
633         renameat2.test \
634         request_key.test \
635         rmdir.test \
636         rt_sigpending.test \
637         rt_sigprocmask.test \
638         rt_sigqueueinfo.test \
639         rt_sigsuspend.test \
640         rt_sigtimedwait.test \
641         rt_tgsigqueueinfo.test \
642         sched_get_priority_mxx.test \
643         sched_rr_get_interval.test \
644         sched_xetaffinity.test \
645         sched_xetattr.test \
646         sched_xetparam.test \
647         sched_xetscheduler.test \
648         sched_yield.test \
649         scm_rights-fd.test \
650         seccomp-filter-v.test \
651         seccomp-filter.test \
652         seccomp-strict.test \
653         select.test \
654         semop.test \
655         sendfile.test \
656         sendfile64.test \
657         set_mempolicy.test \
658         setdomainname.test \
659         setfsgid.test \
660         setfsgid32.test \
661         setfsuid.test \
662         setfsuid32.test \
663         setgid.test \
664         setgid32.test \
665         setgroups.test \
666         setgroups32.test \
667         sethostname.test \
668         setregid.test \
669         setregid32.test \
670         setresgid.test \
671         setresgid32.test \
672         setresuid.test \
673         setresuid32.test \
674         setreuid.test \
675         setreuid32.test \
676         setrlimit.test \
677         setuid.test \
678         setuid32.test \
679         shmxt.test \
680         shutdown.test \
681         sigaction.test \
682         sigaltstack.test \
683         siginfo.test \
684         signalfd4.test \
685         sigreturn.test \
686         socketcall.test \
687         splice.test \
688         stat.test \
689         stat64.test \
690         statfs.test \
691         statfs64.test \
692         sun_path.test \
693         swap.test \
694         symlink.test \
695         symlinkat.test \
696         sync.test \
697         sync_file_range.test \
698         sync_file_range2.test \
699         sysinfo.test \
700         syslog.test \
701         tee.test \
702         time.test \
703         timer_create.test \
704         timer_xettime.test \
705         timerfd_xettime.test \
706         times-fail.test \
707         times.test \
708         truncate.test \
709         truncate64.test \
710         ugetrlimit.test \
711         uio.test \
712         umask.test \
713         umount.test \
714         umount2.test \
715         umovestr.test \
716         umovestr2.test \
717         umovestr3.test \
718         uname.test \
719         unix-pair-send-recv.test \
720         unix-pair-sendto-recvfrom.test \
721         unlink.test \
722         unlinkat.test \
723         userfaultfd.test \
724         utime.test \
725         utimensat.test \
726         utimes.test \
727         vhangup.test \
728         vmsplice.test \
729         wait4.test \
730         wait4-v.test \
731         waitid.test \
732         waitid-v.test \
733         waitpid.test \
734         xattr.test \
735         xet_robust_list.test \
736         xetitimer.test \
737         xetpgid.test \
738         xetpriority.test \
739         xettimeofday.test \
740         # end of DECODER_TESTS
741
742 MISC_TESTS = \
743         attach-f-p.test \
744         attach-p-cmd.test \
745         bexecve.test \
746         count-f.test \
747         count.test \
748         detach-running.test \
749         detach-sleeping.test \
750         detach-stopped.test \
751         filter-unavailable.test \
752         fork-f.test \
753         ksysent.test \
754         opipe.test \
755         pc.test \
756         qual_syscall.test \
757         redirect.test \
758         redirect-fds.test \
759         restart_syscall.test \
760         signal_receive.test \
761         strace-E.test \
762         strace-S.test \
763         strace-T.test \
764         strace-V.test \
765         strace-ff.test \
766         strace-r.test \
767         strace-t.test \
768         strace-tt.test \
769         strace-ttt.test \
770         vfork-f.test \
771         # end of MISC_TESTS
772
773 TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
774
775 XFAIL_TESTS_ =
776 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
777 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
778 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME))
779
780 TEST_LOG_COMPILER = env
781 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
782
783 EXTRA_DIST = init.sh run.sh match.awk \
784              caps.awk \
785              caps-abbrev.awk \
786              count-f.expected \
787              eventfd.expected \
788              fadvise.h \
789              filter-unavailable.expected \
790              fstatat.c \
791              fstatx.c \
792              getresugid.c \
793              init_delete_module.h \
794              ipc.sh \
795              ipc_msgbuf.expected \
796              ksysent.sed \
797              lstatx.c \
798              mq.expected \
799              net.expected \
800              oldselect.expected \
801              pipe.expected \
802              ppoll.expected \
803              ppoll-v.expected \
804              process_vm_readv_writev.c \
805              quotactl.h \
806              setfsugid.c \
807              setreugid.c \
808              setresugid.c \
809              setugid.c \
810              sigaction.awk \
811              sigaltstack.expected \
812              sockname.c \
813              statfs.expected \
814              statx.sh \
815              strace-E.expected \
816              strace-T.expected \
817              strace-ff.expected \
818              strace-k.test \
819              strace-r.expected \
820              struct_flock.c \
821              sun_path.expected \
822              uio.expected \
823              umode_t.c \
824              umovestr.expected \
825              unix-pair-send-recv.expected \
826              unix-pair-sendto-recvfrom.expected \
827              xchownx.c \
828              xgetrlimit.c \
829              xselect.c \
830              xstatfs.c \
831              xstatfs64.c \
832              xstatfsx.c \
833              xstatx.c \
834              $(TESTS)
835
836 ksysent.h: $(srcdir)/ksysent.sed
837         echo '#include <asm/unistd.h>' | \
838                 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
839         LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
840         mv -f $@.t2 $@
841         rm -f $@.t1
842
843 BUILT_SOURCES = ksysent.h
844 CLEANFILES = ksysent.h $(TESTS:=.tmp)