]> granicus.if.org Git - strace/blob - tests/Makefile.am
tests: check (some) debugging output generated during nsyscalls test
[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 MPERS_NAME =
32 ARCH_MFLAGS =
33 AM_CFLAGS = $(WARN_CFLAGS)
34 AM_CPPFLAGS = $(ARCH_MFLAGS) \
35               -I$(builddir) \
36               -I$(top_builddir)/$(OS)/$(ARCH) \
37               -I$(top_srcdir)/$(OS)/$(ARCH) \
38               -I$(top_builddir)/$(OS) \
39               -I$(top_srcdir)/$(OS) \
40               -I$(top_builddir) \
41               -I$(top_srcdir)
42 AM_LDFLAGS = $(ARCH_MFLAGS)
43
44 libtests_a_SOURCES = \
45         create_nl_socket.c \
46         errno2name.c \
47         error_msg.c \
48         fill_memory.c \
49         get_page_size.c \
50         get_sigset_size.c \
51         hexdump_strdup.c \
52         hexquote_strndup.c \
53         ifindex.c \
54         inode_of_sockfd.c \
55         libmmsg.c \
56         libsocketcall.c \
57         overflowuid.c \
58         pipe_maxfd.c \
59         print_quoted_string.c \
60         print_time.c \
61         printflags.c \
62         printxval.c \
63         signal2name.c \
64         skip_unavailable.c \
65         sprintrc.c \
66         tail_alloc.c \
67         test_netlink.h \
68         test_nlattr.h \
69         test_printpath.c \
70         test_printstrn.c \
71         test_ucopy.c \
72         test_ucopy.h \
73         tests.h \
74         tprintf.c \
75         # end of libtests_a_SOURCES
76 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
77 check_LIBRARIES = libtests.a
78 LDADD = libtests.a
79
80 include pure_executables.am
81
82 check_PROGRAMS = $(PURE_EXECUTABLES) \
83         answer \
84         attach-f-p \
85         attach-f-p-cmd \
86         attach-p-cmd-cmd \
87         attach-p-cmd-p \
88         block_reset_raise_run \
89         caps-abbrev \
90         check_sigblock \
91         check_sigign \
92         clone_parent \
93         clone_ptrace \
94         count-f \
95         execve-v \
96         execveat-v \
97         filter-unavailable \
98         fork-f \
99         getpid  \
100         getppid \
101         gettid \
102         int_0x80 \
103         ioctl_dm-v \
104         ioctl_evdev-v \
105         ioctl_loop-nv \
106         ioctl_loop-v \
107         ioctl_nsfs \
108         ioctl_rtc-v \
109         is_linux_mips_n64 \
110         ksysent \
111         list_sigaction_signum \
112         mmsg-silent \
113         mmsg_name-v \
114         msg_control-v \
115         net-accept-connect \
116         netlink_inet_diag \
117         netlink_netlink_diag \
118         netlink_unix_diag \
119         nsyscalls \
120         nsyscalls-d \
121         pc \
122         perf_event_open_nonverbose \
123         perf_event_open_unabbrev \
124         ppoll-v \
125         prctl-seccomp-filter-v \
126         prctl-seccomp-strict \
127         print_maxfd \
128         qual_fault \
129         qual_inject-error-signal \
130         qual_inject-retval \
131         qual_inject-signal \
132         qual_signal \
133         quotactl-v \
134         quotactl-xfs-v \
135         redirect-fds \
136         restart_syscall \
137         run_expect_termsig \
138         scm_rights \
139         seccomp-filter-v \
140         seccomp-strict \
141         set_ptracer_any \
142         set_sigblock \
143         set_sigign \
144         signal_receive \
145         sleep \
146         stack-fcall \
147         threads-execve \
148         unblock_reset_raise \
149         unix-pair-send-recv \
150         unix-pair-sendto-recvfrom \
151         vfork-f \
152         wait4-v \
153         waitid-v \
154         zeroargc \
155         # end of check_PROGRAMS
156
157 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
158 clock_xettime_LDADD = -lrt $(LDADD)
159 count_f_LDADD = -lpthread $(LDADD)
160 filter_unavailable_LDADD = -lpthread $(LDADD)
161 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
162 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
163 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
164 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
165 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
166 mq_LDADD = -lrt $(LDADD)
167 mq_sendrecv_LDADD = -lrt $(LDADD)
168 mq_sendrecv_read_LDADD = -lrt $(LDADD)
169 mq_sendrecv_write_LDADD = -lrt $(LDADD)
170 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
171 pc_LDADD = $(dl_LIBS) $(LDADD)
172 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
173 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
174 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
175 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
176 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
177 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
178 threads_execve_LDADD = -lrt -lpthread $(LDADD)
179 times_LDADD = -lrt $(LDADD)
180 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
181 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
182
183 stack_fcall_SOURCES = stack-fcall.c \
184         stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
185
186 include gen_tests.am
187
188 if USE_LIBUNWIND
189 LIBUNWIND_TESTS = strace-k.test
190 else
191 LIBUNWIND_TESTS =
192 endif
193
194 DECODER_TESTS = \
195         brk.test \
196         btrfs-v.test \
197         btrfs-vw.test \
198         btrfs-w.test \
199         caps-abbrev.test \
200         caps.test \
201         eventfd.test \
202         execve-v.test \
203         execve.test \
204         fadvise64.test \
205         futex.test \
206         getuid.test \
207         ioctl.test \
208         ioctl_dm-v.test \
209         ioctl_dm.test \
210         ioctl_kvm_run.test \
211         ioctl_loop-nv.test \
212         ioctl_nsfs.test \
213         ioctl_sock_gifconf.test \
214         ipc_msgbuf.test \
215         llseek.test \
216         lseek.test \
217         mmap.test \
218         net-y-unix.test \
219         net-yy-inet.test \
220         net-yy-netlink.test \
221         net-yy-unix.test \
222         net.test \
223         netlink_sock_diag.test \
224         nsyscalls.test \
225         nsyscalls-d.test \
226         nsyscalls-nd.test \
227         oldselect.test \
228         personality.test \
229         pipe.test \
230         poll.test \
231         prctl-arg2-intptr.test \
232         prctl-dumpable.test \
233         prctl-name.test \
234         prctl-no-args.test \
235         prctl-pdeathsig.test \
236         prctl-seccomp-filter-v.test \
237         prctl-seccomp-strict.test \
238         prctl-securebits.test \
239         prctl-tid_address.test \
240         prctl-tsc.test \
241         qual_fault-exit_group.test \
242         readv.test \
243         rt_sigaction.test \
244         scm_rights-fd.test \
245         seccomp-strict.test \
246         sigaltstack.test \
247         sun_path.test \
248         uio.test \
249         umount.test \
250         umount2.test \
251         umovestr.test \
252         umovestr2.test \
253         uname.test \
254         unix-pair-send-recv.test \
255         unix-pair-sendto-recvfrom.test \
256         # end of DECODER_TESTS
257
258 MISC_TESTS = \
259         attach-f-p.test \
260         attach-p-cmd.test \
261         bexecve.test \
262         clone_parent.test \
263         clone_ptrace.test \
264         count-f.test \
265         count.test \
266         detach-running.test \
267         detach-sleeping.test \
268         detach-stopped.test \
269         filter-unavailable.test \
270         fflush.test \
271         get_regs.test \
272         interactive_block.test \
273         ksysent.test \
274         opipe.test \
275         options-syntax.test \
276         pc.test \
277         printpath-umovestr-legacy.test \
278         printstrn-umoven-legacy.test \
279         qual_fault-syntax.test \
280         qual_fault.test \
281         qual_inject-error-signal.test \
282         qual_inject-retval.test \
283         qual_inject-signal.test \
284         qual_inject-syntax.test \
285         qual_signal.test \
286         qual_syscall.test \
287         redirect-fds.test \
288         redirect.test \
289         restart_syscall.test \
290         sigblock.test \
291         sigign.test \
292         strace-C.test \
293         strace-E.test \
294         strace-S.test \
295         strace-T.test \
296         strace-V.test \
297         strace-ff.test \
298         strace-r.test \
299         strace-t.test \
300         strace-tt.test \
301         strace-ttt.test \
302         termsig.test \
303         threads-execve.test \
304         # end of MISC_TESTS
305
306 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
307
308 XFAIL_TESTS_ =
309 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
310 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
311 XFAIL_TESTS_x86_64 = int_0x80.gen.test
312 XFAIL_TESTS_x32 = int_0x80.gen.test
313 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
314
315 TEST_LOG_COMPILER = env
316 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
317
318 @VALGRIND_CHECK_RULES@
319 VALGRIND_FLAGS = --quiet
320 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
321
322 EXTRA_DIST = \
323         attach-p-cmd.h \
324         caps-abbrev.awk \
325         caps.awk \
326         clock.in \
327         count-f.expected \
328         eventfd.expected \
329         fadvise.h \
330         filter-unavailable.expected \
331         fstatat.c \
332         fstatx.c \
333         gen_pure_executables.sh \
334         gen_tests.in \
335         gen_tests.sh \
336         getresugid.c \
337         init.sh \
338         init_delete_module.h \
339         ioctl-v.sh \
340         ipc.sh \
341         ipc_msgbuf.expected \
342         ksysent.sed \
343         lstatx.c \
344         match.awk \
345         net.expected \
346         netlink_sock_diag-v.sh \
347         oldselect.expected \
348         pipe.expected \
349         process_vm_readv_writev.c \
350         pure_executables.list \
351         qual_fault-exit_group.expected \
352         qual_inject-error-signal.expected \
353         qual_inject-signal.expected \
354         quotactl.h \
355         regex.in \
356         rt_sigaction.awk \
357         run.sh \
358         sched.in \
359         scno_tampering.sh \
360         setfsugid.c \
361         setresugid.c \
362         setreugid.c \
363         setugid.c \
364         sigaltstack.expected \
365         sockname.c \
366         strace-C.expected \
367         strace-E.expected \
368         strace-T.expected \
369         strace-ff.expected \
370         strace-k.test \
371         strace-r.expected \
372         strace.supp \
373         struct_flock.c \
374         sun_path.expected \
375         syntax.sh \
376         trace_fstat.in \
377         trace_fstatfs.in \
378         trace_lstat.in \
379         trace_question.in \
380         trace_stat.in \
381         trace_stat_like.in \
382         trace_statfs.in \
383         trace_statfs_like.in \
384         uio.expected \
385         umode_t.c \
386         umovestr.expected \
387         unix-pair-send-recv.expected \
388         unix-pair-sendto-recvfrom.expected \
389         xchownx.c \
390         xgetrlimit.c \
391         xselect.c \
392         xstatfs.c \
393         xstatfs64.c \
394         xstatfsx.c \
395         xstatx.c \
396         xutimes.c \
397         $(TESTS)
398
399 ksysent.h: $(srcdir)/ksysent.sed
400         echo '#include <asm/unistd.h>' | \
401                 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
402         LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
403         mv -f $@.t2 $@
404         rm -f $@.t1
405
406 ksysent.$(OBJEXT): ksysent.h
407
408 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
409 $(objects): scno.h
410
411 clean-local: clean-local-check
412 .PHONY: clean-local-check
413 clean-local-check:
414         -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
415
416 .PHONY: check-valgrind-local
417 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
418
419 BUILT_SOURCES = ksysent.h
420 CLEANFILES = ksysent.h
421
422 include ../scno.am