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 AM_LDFLAGS = $(ARCH_MFLAGS)
48 libtests_a_SOURCES = \
63 print_quoted_string.c \
79 # end of libtests_a_SOURCES
80 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
81 check_LIBRARIES = libtests.a
84 include pure_executables.am
86 check_PROGRAMS = $(PURE_EXECUTABLES) \
93 block_reset_raise_run \
118 list_sigaction_signum \
124 netlink_netlink_diag \
131 perf_event_open_nonverbose \
132 perf_event_open_unabbrev \
134 prctl-seccomp-filter-v \
135 prctl-seccomp-strict \
138 qual_inject-error-signal \
157 stack-fcall-mangled \
159 unblock_reset_raise \
160 unix-pair-send-recv \
161 unix-pair-sendto-recvfrom \
166 # end of check_PROGRAMS
168 attach_f_p_LDADD = -lpthread $(LDADD)
169 count_f_LDADD = -lpthread $(LDADD)
170 delay_LDADD = $(clock_LIBS) $(LDADD)
171 filter_unavailable_LDADD = -lpthread $(LDADD)
172 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
173 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
174 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
175 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
176 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
177 mq_LDADD = $(mq_LIBS) $(LDADD)
178 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
179 pc_LDADD = $(dl_LIBS) $(LDADD)
180 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
181 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
182 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
183 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
185 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
186 threads_execve_LDADD = -lpthread $(clock_LIBS) $(LDADD)
187 times_LDADD = $(clock_LIBS) $(LDADD)
188 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
189 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
191 stack_fcall_SOURCES = stack-fcall.c \
192 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
194 stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
195 stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
196 stack-fcall-mangled-2.c stack-fcall-mangled-3.c
201 LIBUNWIND_TESTS = strace-k.test
203 LIBUNWIND_TESTS += strace-k-demangle.test
229 net-yy-netlink.test \
232 netlink_sock_diag.test \
240 prctl-arg2-intptr.test \
241 prctl-dumpable.test \
244 prctl-pdeathsig.test \
245 prctl-seccomp-filter-v.test \
246 prctl-seccomp-strict.test \
247 prctl-securebits.test \
248 prctl-tid_address.test \
250 qual_fault-exit_group.test \
254 seccomp-strict.test \
257 xet_thread_area_x86.test \
264 unix-pair-send-recv.test \
265 unix-pair-sendto-recvfrom.test \
266 # end of DECODER_TESTS
277 detach-running.test \
278 detach-sleeping.test \
279 detach-stopped.test \
280 filter-unavailable.test \
281 filtering_fd-syntax.test \
282 filtering_syscall-syntax.test \
285 interactive_block.test \
288 options-syntax.test \
290 printpath-umovestr-legacy.test \
291 printstrn-umoven-legacy.test \
292 qual_fault-syntax.test \
294 qual_inject-error-signal.test \
295 qual_inject-retval.test \
296 qual_inject-signal.test \
297 qual_inject-syntax.test \
302 restart_syscall.test \
316 threads-execve.test \
319 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
322 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
323 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
324 XFAIL_TESTS_x86_64 = int_0x80.gen.test
325 XFAIL_TESTS_x32 = int_0x80.gen.test
326 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
328 TEST_LOG_COMPILER = env
329 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
330 SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
331 SIZEOF_LONG=$(SIZEOF_LONG) \
332 MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
334 @VALGRIND_CHECK_RULES@
335 VALGRIND_FLAGS = --quiet
336 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
347 filter-unavailable.expected \
350 gen_pure_executables.sh \
355 init_delete_module.h \
357 ipc_msgbuf.expected \
362 netlink_sock_diag-v.sh \
365 process_vm_readv_writev.c \
366 pure_executables.list \
367 qual_fault-exit_group.expected \
368 qual_inject-error-signal.expected \
369 qual_inject-signal.expected \
380 sigaltstack.expected \
387 strace-k-demangle.test \
401 trace_statfs_like.in \
405 unix-pair-send-recv.expected \
406 unix-pair-sendto-recvfrom.expected \
417 ksysent.h: $(srcdir)/ksysent.sed
418 echo '#include <asm/unistd.h>' | \
419 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
420 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
424 ksysent.$(OBJEXT): ksysent.h
426 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
429 clean-local: clean-local-check
430 .PHONY: clean-local-check
432 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
434 .PHONY: check-valgrind-local
435 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
437 BUILT_SOURCES = ksysent.h
438 CLEANFILES = ksysent.h