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