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.
31 NATIVE_ARCH = @arch_native@
35 AM_CFLAGS = $(WARN_CFLAGS)
36 AM_CPPFLAGS = $(ARCH_MFLAGS) \
38 -I$(top_builddir)/$(OS)/$(ARCH) \
39 -I$(top_srcdir)/$(OS)/$(ARCH) \
40 -I$(top_builddir)/$(OS) \
41 -I$(top_srcdir)/$(OS) \
44 AM_LDFLAGS = $(ARCH_MFLAGS)
46 libtests_a_SOURCES = \
61 print_quoted_string.c \
77 # end of libtests_a_SOURCES
78 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
79 check_LIBRARIES = libtests.a
82 include pure_executables.am
84 check_PROGRAMS = $(PURE_EXECUTABLES) \
90 block_reset_raise_run \
113 list_sigaction_signum \
119 netlink_netlink_diag \
124 perf_event_open_nonverbose \
125 perf_event_open_unabbrev \
127 prctl-seccomp-filter-v \
128 prctl-seccomp-strict \
131 qual_inject-error-signal \
149 stack-fcall-mangled \
151 unblock_reset_raise \
152 unix-pair-send-recv \
153 unix-pair-sendto-recvfrom \
158 # end of check_PROGRAMS
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
186 stack_fcall_SOURCES = stack-fcall.c \
187 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
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
196 LIBUNWIND_TESTS = strace-k.test
198 LIBUNWIND_TESTS += strace-k-demangle.test
223 ioctl_sock_gifconf.test \
230 net-yy-netlink.test \
233 netlink_sock_diag.test \
241 prctl-arg2-intptr.test \
242 prctl-dumpable.test \
245 prctl-pdeathsig.test \
246 prctl-seccomp-filter-v.test \
247 prctl-seccomp-strict.test \
248 prctl-securebits.test \
249 prctl-tid_address.test \
251 qual_fault-exit_group.test \
255 seccomp-strict.test \
258 xet_thread_area_x86.test \
265 unix-pair-send-recv.test \
266 unix-pair-sendto-recvfrom.test \
267 # end of DECODER_TESTS
277 detach-running.test \
278 detach-sleeping.test \
279 detach-stopped.test \
280 filter-unavailable.test \
281 filtering_syscall-syntax.test \
284 interactive_block.test \
287 options-syntax.test \
289 printpath-umovestr-legacy.test \
290 printstrn-umoven-legacy.test \
291 qual_fault-syntax.test \
293 qual_inject-error-signal.test \
294 qual_inject-retval.test \
295 qual_inject-signal.test \
296 qual_inject-syntax.test \
301 restart_syscall.test \
315 threads-execve.test \
318 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
321 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
322 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
323 XFAIL_TESTS_x86_64 = int_0x80.gen.test
324 XFAIL_TESTS_x32 = int_0x80.gen.test
325 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
327 TEST_LOG_COMPILER = env
328 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
329 MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
331 @VALGRIND_CHECK_RULES@
332 VALGRIND_FLAGS = --quiet
333 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
343 filter-unavailable.expected \
346 gen_pure_executables.sh \
351 init_delete_module.h \
354 ipc_msgbuf.expected \
359 netlink_sock_diag-v.sh \
363 process_vm_readv_writev.c \
364 pure_executables.list \
365 qual_fault-exit_group.expected \
366 qual_inject-error-signal.expected \
367 qual_inject-signal.expected \
378 sigaltstack.expected \
385 strace-k-demangle.test \
399 trace_statfs_like.in \
403 unix-pair-send-recv.expected \
404 unix-pair-sendto-recvfrom.expected \
415 ksysent.h: $(srcdir)/ksysent.sed
416 echo '#include <asm/unistd.h>' | \
417 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
418 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
422 ksysent.$(OBJEXT): ksysent.h
424 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
427 clean-local: clean-local-check
428 .PHONY: clean-local-check
430 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
432 .PHONY: check-valgrind-local
433 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
435 BUILT_SOURCES = ksysent.h
436 CLEANFILES = ksysent.h