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