1 # Automake input for strace tests.
3 # Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
4 # Copyright (c) 2011-2017 The strace developers.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
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.
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.
33 AM_CFLAGS = $(WARN_CFLAGS)
34 AM_CPPFLAGS = $(ARCH_MFLAGS) \
36 -I$(top_builddir)/$(OS)/$(ARCH) \
37 -I$(top_srcdir)/$(OS)/$(ARCH) \
38 -I$(top_builddir)/$(OS) \
39 -I$(top_srcdir)/$(OS) \
42 AM_LDFLAGS = $(ARCH_MFLAGS)
44 libtests_a_SOURCES = \
58 print_quoted_string.c \
69 # end of libtests_a_SOURCES
70 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
71 check_LIBRARIES = libtests.a
74 include pure_executables.am
76 check_PROGRAMS = $(PURE_EXECUTABLES) \
82 block_reset_raise_run \
105 netlink_netlink_diag \
109 perf_event_open_nonverbose \
110 perf_event_open_unabbrev \
112 prctl-seccomp-filter-v \
113 prctl-seccomp-strict \
116 qual_inject-error-signal \
133 unblock_reset_raise \
134 unix-pair-send-recv \
135 unix-pair-sendto-recvfrom \
139 # end of check_PROGRAMS
141 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
142 clock_xettime_LDADD = -lrt $(LDADD)
143 count_f_LDADD = -lpthread $(LDADD)
144 filter_unavailable_LDADD = -lpthread $(LDADD)
145 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
146 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
147 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
148 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
149 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
150 mq_LDADD = -lrt $(LDADD)
151 mq_sendrecv_LDADD = -lrt $(LDADD)
152 mq_sendrecv_read_LDADD = -lrt $(LDADD)
153 mq_sendrecv_write_LDADD = -lrt $(LDADD)
154 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
155 pc_LDADD = $(dl_LIBS) $(LDADD)
156 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
157 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
158 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
159 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
160 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
161 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
162 threads_execve_LDADD = -lrt -lpthread $(LDADD)
163 times_LDADD = -lrt $(LDADD)
164 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
165 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
167 stack_fcall_SOURCES = stack-fcall.c \
168 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
173 LIBUNWIND_TESTS = strace-k.test
196 ioctl_sock_gifconf.test \
203 net-yy-netlink.test \
206 netlink_sock_diag.test \
212 prctl-arg2-intptr.test \
213 prctl-dumpable.test \
216 prctl-pdeathsig.test \
217 prctl-seccomp-filter-v.test \
218 prctl-seccomp-strict.test \
219 prctl-securebits.test \
220 prctl-tid_address.test \
222 qual_fault-exit_group.test \
226 seccomp-strict.test \
235 unix-pair-send-recv.test \
236 unix-pair-sendto-recvfrom.test \
237 # end of DECODER_TESTS
245 detach-running.test \
246 detach-sleeping.test \
247 detach-stopped.test \
248 filter-unavailable.test \
250 interactive_block.test \
253 options-syntax.test \
255 qual_fault-syntax.test \
257 qual_inject-error-signal.test \
258 qual_inject-retval.test \
259 qual_inject-signal.test \
260 qual_inject-syntax.test \
265 restart_syscall.test \
277 threads-execve.test \
280 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
283 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
284 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
285 XFAIL_TESTS_x86_64 = int_0x80.gen.test
286 XFAIL_TESTS_x32 = int_0x80.gen.test
287 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
289 TEST_LOG_COMPILER = env
290 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
292 @VALGRIND_CHECK_RULES@
293 VALGRIND_FLAGS = --quiet
294 VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp
303 filter-unavailable.expected \
306 gen_pure_executables.sh \
311 init_delete_module.h \
314 ipc_msgbuf.expected \
321 process_vm_readv_writev.c \
322 pure_executables.list \
323 qual_fault-exit_group.expected \
324 qual_inject-error-signal.expected \
325 qual_inject-signal.expected \
336 sigaltstack.expected \
354 trace_statfs_like.in \
358 unix-pair-send-recv.expected \
359 unix-pair-sendto-recvfrom.expected \
370 ksysent.h: $(srcdir)/ksysent.sed
371 echo '#include <asm/unistd.h>' | \
372 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
373 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
377 ksysent.$(OBJEXT): ksysent.h
379 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
382 clean-local: clean-local-check
383 .PHONY: clean-local-check
385 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
387 CLEANFILES = ksysent.h