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 \
73 # end of libtests_a_SOURCES
74 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
75 check_LIBRARIES = libtests.a
78 include pure_executables.am
80 check_PROGRAMS = $(PURE_EXECUTABLES) \
86 block_reset_raise_run \
109 netlink_netlink_diag \
113 perf_event_open_nonverbose \
114 perf_event_open_unabbrev \
116 prctl-seccomp-filter-v \
117 prctl-seccomp-strict \
120 qual_inject-error-signal \
137 unblock_reset_raise \
138 unix-pair-send-recv \
139 unix-pair-sendto-recvfrom \
144 # end of check_PROGRAMS
146 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
147 clock_xettime_LDADD = -lrt $(LDADD)
148 count_f_LDADD = -lpthread $(LDADD)
149 filter_unavailable_LDADD = -lpthread $(LDADD)
150 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
151 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
152 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
153 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
154 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
155 mq_LDADD = -lrt $(LDADD)
156 mq_sendrecv_LDADD = -lrt $(LDADD)
157 mq_sendrecv_read_LDADD = -lrt $(LDADD)
158 mq_sendrecv_write_LDADD = -lrt $(LDADD)
159 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
160 pc_LDADD = $(dl_LIBS) $(LDADD)
161 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
162 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
163 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
164 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
165 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
166 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
167 threads_execve_LDADD = -lrt -lpthread $(LDADD)
168 times_LDADD = -lrt $(LDADD)
169 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
170 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
172 stack_fcall_SOURCES = stack-fcall.c \
173 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
178 LIBUNWIND_TESTS = strace-k.test
201 ioctl_sock_gifconf.test \
208 net-yy-netlink.test \
211 netlink_sock_diag.test \
217 prctl-arg2-intptr.test \
218 prctl-dumpable.test \
221 prctl-pdeathsig.test \
222 prctl-seccomp-filter-v.test \
223 prctl-seccomp-strict.test \
224 prctl-securebits.test \
225 prctl-tid_address.test \
227 qual_fault-exit_group.test \
231 seccomp-strict.test \
240 unix-pair-send-recv.test \
241 unix-pair-sendto-recvfrom.test \
242 # end of DECODER_TESTS
250 detach-running.test \
251 detach-sleeping.test \
252 detach-stopped.test \
253 filter-unavailable.test \
255 interactive_block.test \
258 options-syntax.test \
260 qual_fault-syntax.test \
262 qual_inject-error-signal.test \
263 qual_inject-retval.test \
264 qual_inject-signal.test \
265 qual_inject-syntax.test \
270 restart_syscall.test \
282 threads-execve.test \
285 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
288 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
289 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
290 XFAIL_TESTS_x86_64 = int_0x80.gen.test
291 XFAIL_TESTS_x32 = int_0x80.gen.test
292 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
294 TEST_LOG_COMPILER = env
295 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
297 @VALGRIND_CHECK_RULES@
298 VALGRIND_FLAGS = --quiet
299 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
308 filter-unavailable.expected \
311 gen_pure_executables.sh \
316 init_delete_module.h \
319 ipc_msgbuf.expected \
324 netlink_sock_diag-v.sh \
327 process_vm_readv_writev.c \
328 pure_executables.list \
329 qual_fault-exit_group.expected \
330 qual_inject-error-signal.expected \
331 qual_inject-signal.expected \
342 sigaltstack.expected \
360 trace_statfs_like.in \
364 unix-pair-send-recv.expected \
365 unix-pair-sendto-recvfrom.expected \
376 ksysent.h: $(srcdir)/ksysent.sed
377 echo '#include <asm/unistd.h>' | \
378 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1
379 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
383 ksysent.$(OBJEXT): ksysent.h
385 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
388 clean-local: clean-local-check
389 .PHONY: clean-local-check
391 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
393 .PHONY: check-valgrind-local
394 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
396 BUILT_SOURCES = ksysent.h
397 CLEANFILES = ksysent.h