]> granicus.if.org Git - strace/blob - tests/Makefile.am
tests: check path tracing of poll syscall
[strace] / tests / Makefile.am
1 # Automake input for strace tests.
2 #
3 # Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
4 # Copyright (c) 2011-2017 The strace developers.
5 # All rights reserved.
6 #
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
9 # are met:
10 # 1. Redistributions of source code must retain the above copyright
11 #    notice, this list of conditions and the following disclaimer.
12 # 2. Redistributions in binary form must reproduce the above copyright
13 #    notice, this list of conditions and the following disclaimer in the
14 #    documentation and/or other materials provided with the distribution.
15 # 3. The name of the author may not be used to endorse or promote products
16 #    derived from this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 OS = linux
30 ARCH = @arch@
31 NATIVE_ARCH = @arch_native@
32 MPERS_NAME =
33 MPERS_CC_FLAGS =
34 ARCH_MFLAGS =
35 AM_CFLAGS = $(WARN_CFLAGS)
36 AM_CPPFLAGS = $(ARCH_MFLAGS) \
37               -I$(builddir) \
38               -I$(top_builddir)/$(OS)/$(ARCH) \
39               -I$(top_srcdir)/$(OS)/$(ARCH) \
40               -I$(top_builddir)/$(OS) \
41               -I$(top_srcdir)/$(OS) \
42               -I$(top_builddir) \
43               -I$(top_srcdir)
44 AM_LDFLAGS = $(ARCH_MFLAGS)
45
46 libtests_a_SOURCES = \
47         create_nl_socket.c \
48         errno2name.c \
49         error_msg.c \
50         fill_memory.c \
51         get_page_size.c \
52         get_sigset_size.c \
53         hexdump_strdup.c \
54         hexquote_strndup.c \
55         ifindex.c \
56         inode_of_sockfd.c \
57         libmmsg.c \
58         libsocketcall.c \
59         overflowuid.c \
60         pipe_maxfd.c \
61         print_quoted_string.c \
62         print_time.c \
63         printflags.c \
64         printxval.c \
65         signal2name.c \
66         skip_unavailable.c \
67         sprintrc.c \
68         tail_alloc.c \
69         test_netlink.h \
70         test_nlattr.h \
71         test_printpath.c \
72         test_printstrn.c \
73         test_ucopy.c \
74         test_ucopy.h \
75         tests.h \
76         tprintf.c \
77         # end of libtests_a_SOURCES
78 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
79 check_LIBRARIES = libtests.a
80 LDADD = libtests.a
81
82 include pure_executables.am
83
84 check_PROGRAMS = $(PURE_EXECUTABLES) \
85         answer \
86         attach-f-p \
87         attach-f-p-cmd \
88         attach-p-cmd-cmd \
89         attach-p-cmd-p \
90         block_reset_raise_run \
91         caps-abbrev \
92         check_sigblock \
93         check_sigign \
94         clone_parent \
95         clone_ptrace \
96         count-f \
97         execve-v \
98         execveat-v \
99         filter-unavailable \
100         fork-f \
101         getpid  \
102         getppid \
103         gettid \
104         int_0x80 \
105         ioctl_dm-v \
106         ioctl_evdev-v \
107         ioctl_loop-nv \
108         ioctl_loop-v \
109         ioctl_nsfs \
110         ioctl_rtc-v \
111         is_linux_mips_n64 \
112         ksysent \
113         list_sigaction_signum \
114         mmsg-silent \
115         mmsg_name-v \
116         msg_control-v \
117         net-accept-connect \
118         netlink_inet_diag \
119         netlink_netlink_diag \
120         netlink_unix_diag \
121         nsyscalls \
122         nsyscalls-d \
123         pc \
124         perf_event_open_nonverbose \
125         perf_event_open_unabbrev \
126         ppoll-v \
127         prctl-seccomp-filter-v \
128         prctl-seccomp-strict \
129         print_maxfd \
130         qual_fault \
131         qual_inject-error-signal \
132         qual_inject-retval \
133         qual_inject-signal \
134         qual_signal \
135         quotactl-v \
136         quotactl-xfs-v \
137         redirect-fds \
138         restart_syscall \
139         run_expect_termsig \
140         scm_rights \
141         seccomp-filter-v \
142         seccomp-strict \
143         set_ptracer_any \
144         set_sigblock \
145         set_sigign \
146         signal_receive \
147         sleep \
148         stack-fcall \
149         stack-fcall-mangled \
150         threads-execve \
151         unblock_reset_raise \
152         unix-pair-send-recv \
153         unix-pair-sendto-recvfrom \
154         vfork-f \
155         wait4-v \
156         waitid-v \
157         zeroargc \
158         # end of check_PROGRAMS
159
160 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
161 clock_xettime_LDADD = -lrt $(LDADD)
162 count_f_LDADD = -lpthread $(LDADD)
163 filter_unavailable_LDADD = -lpthread $(LDADD)
164 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
165 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
166 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
167 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
168 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
169 mq_LDADD = -lrt $(LDADD)
170 mq_sendrecv_LDADD = -lrt $(LDADD)
171 mq_sendrecv_read_LDADD = -lrt $(LDADD)
172 mq_sendrecv_write_LDADD = -lrt $(LDADD)
173 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
174 pc_LDADD = $(dl_LIBS) $(LDADD)
175 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
176 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
177 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
178 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
179 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
180 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
181 threads_execve_LDADD = -lrt -lpthread $(LDADD)
182 times_LDADD = -lrt $(LDADD)
183 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
185
186 stack_fcall_SOURCES = stack-fcall.c \
187         stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
188
189 stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
190         stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
191         stack-fcall-mangled-2.c stack-fcall-mangled-3.c
192
193 include gen_tests.am
194
195 if USE_LIBUNWIND
196 LIBUNWIND_TESTS = strace-k.test
197 if USE_DEMANGLE
198 LIBUNWIND_TESTS += strace-k-demangle.test
199 endif
200 else
201 LIBUNWIND_TESTS =
202 endif
203
204 DECODER_TESTS = \
205         brk.test \
206         btrfs-v.test \
207         btrfs-vw.test \
208         btrfs-w.test \
209         caps-abbrev.test \
210         caps.test \
211         eventfd.test \
212         execve-v.test \
213         execve.test \
214         fadvise64.test \
215         futex.test \
216         getuid.test \
217         ioctl.test \
218         ioctl_dm-v.test \
219         ioctl_dm.test \
220         ioctl_kvm_run.test \
221         ioctl_loop-nv.test \
222         ioctl_nsfs.test \
223         ioctl_sock_gifconf.test \
224         ipc_msgbuf.test \
225         llseek.test \
226         lseek.test \
227         mmap.test \
228         net-y-unix.test \
229         net-yy-inet.test \
230         net-yy-netlink.test \
231         net-yy-unix.test \
232         net.test \
233         netlink_sock_diag.test \
234         nsyscalls.test \
235         nsyscalls-d.test \
236         nsyscalls-nd.test \
237         oldselect.test \
238         personality.test \
239         pipe.test \
240         poll-P.test \
241         poll.test \
242         prctl-arg2-intptr.test \
243         prctl-dumpable.test \
244         prctl-name.test \
245         prctl-no-args.test \
246         prctl-pdeathsig.test \
247         prctl-seccomp-filter-v.test \
248         prctl-seccomp-strict.test \
249         prctl-securebits.test \
250         prctl-tid_address.test \
251         prctl-tsc.test \
252         qual_fault-exit_group.test \
253         readv.test \
254         rt_sigaction.test \
255         scm_rights-fd.test \
256         seccomp-strict.test \
257         sigaltstack.test \
258         sun_path.test \
259         xet_thread_area_x86.test \
260         uio.test \
261         umount.test \
262         umount2.test \
263         umovestr.test \
264         umovestr2.test \
265         uname.test \
266         unix-pair-send-recv.test \
267         unix-pair-sendto-recvfrom.test \
268         # end of DECODER_TESTS
269
270 MISC_TESTS = \
271         attach-f-p.test \
272         attach-p-cmd.test \
273         bexecve.test \
274         clone_parent.test \
275         clone_ptrace.test \
276         count-f.test \
277         count.test \
278         detach-running.test \
279         detach-sleeping.test \
280         detach-stopped.test \
281         filter-unavailable.test \
282         filtering_fd-syntax.test \
283         filtering_syscall-syntax.test \
284         fflush.test \
285         get_regs.test \
286         interactive_block.test \
287         ksysent.test \
288         opipe.test \
289         options-syntax.test \
290         pc.test \
291         printpath-umovestr-legacy.test \
292         printstrn-umoven-legacy.test \
293         qual_fault-syntax.test \
294         qual_fault.test \
295         qual_inject-error-signal.test \
296         qual_inject-retval.test \
297         qual_inject-signal.test \
298         qual_inject-syntax.test \
299         qual_signal.test \
300         qual_syscall.test \
301         redirect-fds.test \
302         redirect.test \
303         restart_syscall.test \
304         sigblock.test \
305         sigign.test \
306         strace-C.test \
307         strace-E.test \
308         strace-S.test \
309         strace-T.test \
310         strace-V.test \
311         strace-ff.test \
312         strace-r.test \
313         strace-t.test \
314         strace-tt.test \
315         strace-ttt.test \
316         termsig.test \
317         threads-execve.test \
318         # end of MISC_TESTS
319
320 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
321
322 XFAIL_TESTS_ =
323 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
324 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
325 XFAIL_TESTS_x86_64 = int_0x80.gen.test
326 XFAIL_TESTS_x32 = int_0x80.gen.test
327 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
328
329 TEST_LOG_COMPILER = env
330 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
331                         MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
332
333 @VALGRIND_CHECK_RULES@
334 VALGRIND_FLAGS = --quiet
335 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
336
337 EXTRA_DIST = \
338         attach-p-cmd.h \
339         caps-abbrev.awk \
340         caps.awk \
341         clock.in \
342         count-f.expected \
343         eventfd.expected \
344         fadvise.h \
345         filter-unavailable.expected \
346         fstatat.c \
347         fstatx.c \
348         gen_pure_executables.sh \
349         gen_tests.in \
350         gen_tests.sh \
351         getresugid.c \
352         init.sh \
353         init_delete_module.h \
354         ioctl-v.sh \
355         ipc.sh \
356         ipc_msgbuf.expected \
357         ksysent.sed \
358         lstatx.c \
359         match.awk \
360         net.expected \
361         netlink_sock_diag-v.sh \
362         oldselect.expected \
363         pipe.expected \
364         print_user_desc.c \
365         process_vm_readv_writev.c \
366         pure_executables.list \
367         qual_fault-exit_group.expected \
368         qual_inject-error-signal.expected \
369         qual_inject-signal.expected \
370         quotactl.h \
371         regex.in \
372         rt_sigaction.awk \
373         run.sh \
374         sched.in \
375         scno_tampering.sh \
376         setfsugid.c \
377         setresugid.c \
378         setreugid.c \
379         setugid.c \
380         sigaltstack.expected \
381         sockname.c \
382         stack-fcall.h \
383         strace-C.expected \
384         strace-E.expected \
385         strace-T.expected \
386         strace-ff.expected \
387         strace-k-demangle.test \
388         strace-k.test \
389         strace-r.expected \
390         strace.supp \
391         struct_flock.c \
392         sun_path.expected \
393         syntax.sh \
394         trace_fstat.in \
395         trace_fstatfs.in \
396         trace_lstat.in \
397         trace_question.in \
398         trace_stat.in \
399         trace_stat_like.in \
400         trace_statfs.in \
401         trace_statfs_like.in \
402         uio.expected \
403         umode_t.c \
404         umovestr.expected \
405         unix-pair-send-recv.expected \
406         unix-pair-sendto-recvfrom.expected \
407         xchownx.c \
408         xgetrlimit.c \
409         xselect.c \
410         xstatfs.c \
411         xstatfs64.c \
412         xstatfsx.c \
413         xstatx.c \
414         xutimes.c \
415         $(TESTS)
416
417 ksysent.h: $(srcdir)/ksysent.sed
418         echo '#include <asm/unistd.h>' | \
419                 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
420         LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
421         mv -f $@.t2 $@
422         rm -f $@.t1
423
424 ksysent.$(OBJEXT): ksysent.h
425
426 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
427 $(objects): scno.h
428
429 clean-local: clean-local-check
430 .PHONY: clean-local-check
431 clean-local-check:
432         -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
433
434 .PHONY: check-valgrind-local
435 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
436
437 BUILT_SOURCES = ksysent.h
438 CLEANFILES = ksysent.h
439
440 include ../scno.am