1 # Automake input for strace tests.
3 # Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
4 # Copyright (c) 2011-2018 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@
32 SIZEOF_KERNEL_LONG_T = @SIZEOF_KERNEL_LONG_T@
33 SIZEOF_LONG = @SIZEOF_LONG@
37 AM_CFLAGS = $(WARN_CFLAGS)
38 AM_CPPFLAGS = $(ARCH_MFLAGS) \
40 -I$(top_builddir)/$(OS)/$(ARCH) \
41 -I$(top_srcdir)/$(OS)/$(ARCH) \
42 -I$(top_builddir)/$(OS) \
43 -I$(top_srcdir)/$(OS) \
46 -DTESTS_SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
47 -DTESTS_SIZEOF_LONG=$(SIZEOF_LONG)
48 AM_LDFLAGS = $(ARCH_MFLAGS)
50 libtests_a_SOURCES = \
65 print_quoted_string.c \
81 # end of libtests_a_SOURCES
82 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
83 check_LIBRARIES = libtests.a
86 include pure_executables.am
88 check_PROGRAMS = $(PURE_EXECUTABLES) \
95 block_reset_raise_run \
121 list_sigaction_signum \
128 netlink_netlink_diag \
135 perf_event_open_nonverbose \
136 perf_event_open_unabbrev \
138 prctl-seccomp-filter-v \
139 prctl-seccomp-strict \
142 qual_inject-error-signal \
161 stack-fcall-mangled \
163 unblock_reset_raise \
164 unix-pair-send-recv \
165 unix-pair-sendto-recvfrom \
170 # end of check_PROGRAMS
172 attach_f_p_LDADD = -lpthread $(LDADD)
173 count_f_LDADD = -lpthread $(LDADD)
174 delay_LDADD = $(clock_LIBS) $(LDADD)
175 filter_unavailable_LDADD = -lpthread $(LDADD)
176 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
177 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
178 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
179 localtime_LDADD = $(clock_LIBS) $(LDADD)
180 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
181 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
182 mq_LDADD = $(mq_LIBS) $(LDADD)
183 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184 pc_LDADD = $(dl_LIBS) $(LDADD)
185 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
186 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
187 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
188 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
189 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
190 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
191 threads_execve_LDADD = -lpthread $(clock_LIBS) $(LDADD)
192 times_LDADD = $(clock_LIBS) $(LDADD)
193 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
194 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
196 stack_fcall_SOURCES = stack-fcall.c \
197 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
199 stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
200 stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
201 stack-fcall-mangled-2.c stack-fcall-mangled-3.c
206 LIBUNWIND_TESTS = strace-k.test
208 LIBUNWIND_TESTS += strace-k-demangle.test
229 kern_features-fault.test \
235 net-yy-netlink.test \
238 netlink_sock_diag.test \
246 prctl-arg2-intptr.test \
247 prctl-dumpable.test \
250 prctl-pdeathsig.test \
251 prctl-seccomp-filter-v.test \
252 prctl-seccomp-strict.test \
253 prctl-securebits.test \
254 prctl-tid_address.test \
256 qual_fault-exit_group.test \
260 seccomp-strict.test \
263 xet_thread_area_x86.test \
270 unix-pair-send-recv.test \
271 unix-pair-sendto-recvfrom.test \
272 # end of DECODER_TESTS
283 detach-running.test \
284 detach-sleeping.test \
285 detach-stopped.test \
286 filter-unavailable.test \
287 filtering_fd-syntax.test \
288 filtering_syscall-syntax.test \
292 interactive_block.test \
296 options-syntax.test \
298 printpath-umovestr-legacy.test \
299 printstrn-umoven-legacy.test \
300 qual_fault-syntax.test \
302 qual_inject-error-signal.test \
303 qual_inject-retval.test \
304 qual_inject-signal.test \
305 qual_inject-syntax.test \
310 restart_syscall.test \
324 threads-execve.test \
327 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
330 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
331 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
332 XFAIL_TESTS_x86_64 = int_0x80.gen.test
333 XFAIL_TESTS_x32 = int_0x80.gen.test
334 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
336 TEST_LOG_COMPILER = env
337 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
338 SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
339 SIZEOF_LONG=$(SIZEOF_LONG) \
340 MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
342 @VALGRIND_CHECK_RULES@
343 VALGRIND_FLAGS = --quiet
344 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
355 filter-unavailable.expected \
358 gen_pure_executables.sh \
363 init_delete_module.h \
365 ipc_msgbuf.expected \
370 netlink_sock_diag-v.sh \
373 process_vm_readv_writev.c \
374 pure_executables.list \
375 qual_fault-exit_group.expected \
376 qual_inject-error-signal.expected \
377 qual_inject-signal.expected \
388 sigaltstack.expected \
395 strace-k-demangle.test \
409 trace_statfs_like.in \
413 unix-pair-send-recv.expected \
414 unix-pair-sendto-recvfrom.expected \
425 ksysent.h: $(srcdir)/ksysent.sed
426 echo '#include <asm/unistd.h>' | \
427 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
428 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
432 ksysent.$(OBJEXT): ksysent.h
434 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
437 clean-local: clean-local-check
438 .PHONY: clean-local-check
440 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
442 .PHONY: check-valgrind-local
443 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
445 BUILT_SOURCES = ksysent.h
446 CLEANFILES = ksysent.h