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