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 mmap64_Xabbrev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
183 mmap64_Xraw_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184 mmap64_Xverbose_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
185 mq_LDADD = $(mq_LIBS) $(LDADD)
186 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
187 pc_LDADD = $(dl_LIBS) $(LDADD)
188 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
189 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
190 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
191 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
192 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
193 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
194 threads_execve_LDADD = -lpthread $(clock_LIBS) $(LDADD)
195 times_LDADD = $(clock_LIBS) $(LDADD)
196 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
197 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
199 stack_fcall_SOURCES = stack-fcall.c \
200 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
202 stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
203 stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
204 stack-fcall-mangled-2.c stack-fcall-mangled-3.c
209 STACKTRACE_TESTS = strace-k.test
211 STACKTRACE_TESTS += strace-k-demangle.test
236 kern_features-fault.test \
242 net-yy-netlink.test \
245 netlink_sock_diag.test \
253 prctl-arg2-intptr.test \
254 prctl-dumpable.test \
257 prctl-pdeathsig.test \
258 prctl-seccomp-filter-v.test \
259 prctl-seccomp-strict.test \
260 prctl-securebits.test \
261 prctl-tid_address.test \
263 qual_fault-exit_group.test \
267 seccomp-strict.test \
270 xet_thread_area_x86.test \
277 unix-pair-send-recv.test \
278 unix-pair-sendto-recvfrom.test \
279 # end of DECODER_TESTS
290 detach-running.test \
291 detach-sleeping.test \
292 detach-stopped.test \
293 filter-unavailable.test \
294 filtering_fd-syntax.test \
295 filtering_syscall-syntax.test \
299 interactive_block.test \
303 options-syntax.test \
305 printpath-umovestr-legacy.test \
306 printstrn-umoven-legacy.test \
307 qual_fault-syntax.test \
309 qual_inject-error-signal.test \
310 qual_inject-retval.test \
311 qual_inject-signal.test \
312 qual_inject-syntax.test \
317 restart_syscall.test \
331 threads-execve.test \
334 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(STACKTRACE_TESTS)
337 XFAIL_TESTS_m32 = $(STACKTRACE_TESTS)
338 XFAIL_TESTS_mx32 = $(STACKTRACE_TESTS)
339 XFAIL_TESTS_x86_64 = int_0x80.gen.test
340 XFAIL_TESTS_x32 = int_0x80.gen.test
341 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
343 TEST_LOG_COMPILER = env
344 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
345 SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
346 SIZEOF_LONG=$(SIZEOF_LONG) \
347 MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
349 @VALGRIND_CHECK_RULES@
350 VALGRIND_FLAGS = --quiet
351 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
362 filter-unavailable.expected \
365 gen_pure_executables.sh \
370 init_delete_module.h \
372 ipc_msgbuf.expected \
377 netlink_sock_diag-v.sh \
380 process_vm_readv_writev.c \
381 pure_executables.list \
382 qual_fault-exit_group.expected \
383 qual_inject-error-signal.expected \
384 qual_inject-signal.expected \
395 sigaltstack.expected \
402 strace-k-demangle.expected \
403 strace-k-demangle.test \
418 trace_statfs_like.in \
422 unix-pair-send-recv.expected \
423 unix-pair-sendto-recvfrom.expected \
434 ksysent.h: $(srcdir)/ksysent.sed
435 echo '#include <asm/unistd.h>' | \
436 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
437 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
441 ksysent.$(OBJEXT): ksysent.h
443 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
446 clean-local: clean-local-check
447 .PHONY: clean-local-check
449 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
451 .PHONY: check-valgrind-local
452 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
454 BUILT_SOURCES = ksysent.h
455 CLEANFILES = ksysent.h