1# Automake input for strace tests. 2# 3# Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org> 4# Copyright (c) 2011-2017 The strace developers. 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions 9# are met: 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. 17# 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. 28 29OS = linux 30ARCH = @arch@ 31MPERS_NAME = 32ARCH_MFLAGS = 33AM_CFLAGS = $(WARN_CFLAGS) 34AM_CPPFLAGS = $(ARCH_MFLAGS) \ 35 -I$(builddir) \ 36 -I$(top_builddir)/$(OS)/$(ARCH) \ 37 -I$(top_srcdir)/$(OS)/$(ARCH) \ 38 -I$(top_builddir)/$(OS) \ 39 -I$(top_srcdir)/$(OS) \ 40 -I$(top_builddir) \ 41 -I$(top_srcdir) 42AM_LDFLAGS = $(ARCH_MFLAGS) 43 44libtests_a_SOURCES = \ 45 create_nl_socket.c \ 46 errno2name.c \ 47 error_msg.c \ 48 fill_memory.c \ 49 get_page_size.c \ 50 get_sigset_size.c \ 51 hexdump_strdup.c \ 52 hexquote_strndup.c \ 53 inode_of_sockfd.c \ 54 libmmsg.c \ 55 libsocketcall.c \ 56 overflowuid.c \ 57 pipe_maxfd.c \ 58 print_quoted_string.c \ 59 print_time.c \ 60 printflags.c \ 61 printxval.c \ 62 signal2name.c \ 63 skip_unavailable.c \ 64 sprintrc.c \ 65 tail_alloc.c \ 66 test_nlattr.h \ 67 tests.h \ 68 tprintf.c \ 69 # end of libtests_a_SOURCES 70libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 71check_LIBRARIES = libtests.a 72LDADD = libtests.a 73 74include pure_executables.am 75 76check_PROGRAMS = $(PURE_EXECUTABLES) \ 77 answer \ 78 attach-f-p \ 79 attach-f-p-cmd \ 80 attach-p-cmd-cmd \ 81 attach-p-cmd-p \ 82 block_reset_raise_run \ 83 caps-abbrev \ 84 count-f \ 85 execve-v \ 86 execveat-v \ 87 filter-unavailable \ 88 fork-f \ 89 getpid \ 90 getppid \ 91 gettid \ 92 int_0x80 \ 93 ioctl_dm-v \ 94 ioctl_evdev-v \ 95 ioctl_loop-nv \ 96 ioctl_loop-v \ 97 ioctl_nsfs \ 98 ioctl_rtc-v \ 99 ksysent \ 100 mmsg-silent \ 101 mmsg_name-v \ 102 msg_control-v \ 103 net-accept-connect \ 104 netlink_inet_diag \ 105 netlink_netlink_diag \ 106 netlink_unix_diag \ 107 nsyscalls \ 108 pc \ 109 perf_event_open_nonverbose \ 110 perf_event_open_unabbrev \ 111 ppoll-v \ 112 prctl-seccomp-filter-v \ 113 prctl-seccomp-strict \ 114 print_maxfd \ 115 qual_fault \ 116 qual_inject-error-signal \ 117 qual_inject-retval \ 118 qual_inject-signal \ 119 qual_signal \ 120 quotactl-v \ 121 quotactl-xfs-v \ 122 redirect-fds \ 123 restart_syscall \ 124 run_expect_termsig \ 125 scm_rights \ 126 seccomp-filter-v \ 127 seccomp-strict \ 128 set_ptracer_any \ 129 signal_receive \ 130 sleep \ 131 stack-fcall \ 132 threads-execve \ 133 unblock_reset_raise \ 134 unix-pair-send-recv \ 135 unix-pair-sendto-recvfrom \ 136 vfork-f \ 137 wait4-v \ 138 waitid-v \ 139 zeroargc \ 140 # end of check_PROGRAMS 141 142attach_f_p_LDADD = -lrt -lpthread $(LDADD) 143clock_xettime_LDADD = -lrt $(LDADD) 144count_f_LDADD = -lpthread $(LDADD) 145filter_unavailable_LDADD = -lpthread $(LDADD) 146fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 147fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 148ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 149lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 150mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 151mq_LDADD = -lrt $(LDADD) 152mq_sendrecv_LDADD = -lrt $(LDADD) 153mq_sendrecv_read_LDADD = -lrt $(LDADD) 154mq_sendrecv_write_LDADD = -lrt $(LDADD) 155newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 156pc_LDADD = $(dl_LIBS) $(LDADD) 157pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 158preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 159preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 160pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 161stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 162statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 163threads_execve_LDADD = -lrt -lpthread $(LDADD) 164times_LDADD = -lrt $(LDADD) 165truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 166uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 167 168stack_fcall_SOURCES = stack-fcall.c \ 169 stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c 170 171include gen_tests.am 172 173if USE_LIBUNWIND 174LIBUNWIND_TESTS = strace-k.test 175else 176LIBUNWIND_TESTS = 177endif 178 179DECODER_TESTS = \ 180 brk.test \ 181 btrfs-v.test \ 182 btrfs-vw.test \ 183 btrfs-w.test \ 184 caps-abbrev.test \ 185 caps.test \ 186 eventfd.test \ 187 execve-v.test \ 188 execve.test \ 189 fadvise64.test \ 190 futex.test \ 191 getuid.test \ 192 ioctl.test \ 193 ioctl_dm-v.test \ 194 ioctl_dm.test \ 195 ioctl_loop-nv.test \ 196 ioctl_nsfs.test \ 197 ioctl_sock_gifconf.test \ 198 ipc_msgbuf.test \ 199 llseek.test \ 200 lseek.test \ 201 mmap.test \ 202 net-y-unix.test \ 203 net-yy-inet.test \ 204 net-yy-netlink.test \ 205 net-yy-unix.test \ 206 net.test \ 207 netlink_sock_diag.test \ 208 nsyscalls.test \ 209 oldselect.test \ 210 personality.test \ 211 pipe.test \ 212 poll.test \ 213 prctl-arg2-intptr.test \ 214 prctl-dumpable.test \ 215 prctl-name.test \ 216 prctl-no-args.test \ 217 prctl-pdeathsig.test \ 218 prctl-seccomp-filter-v.test \ 219 prctl-seccomp-strict.test \ 220 prctl-securebits.test \ 221 prctl-tid_address.test \ 222 prctl-tsc.test \ 223 qual_fault-exit_group.test \ 224 readv.test \ 225 rt_sigaction.test \ 226 scm_rights-fd.test \ 227 seccomp-strict.test \ 228 sigaltstack.test \ 229 sun_path.test \ 230 uio.test \ 231 umount.test \ 232 umount2.test \ 233 umovestr.test \ 234 umovestr2.test \ 235 uname.test \ 236 unix-pair-send-recv.test \ 237 unix-pair-sendto-recvfrom.test \ 238 # end of DECODER_TESTS 239 240MISC_TESTS = \ 241 attach-f-p.test \ 242 attach-p-cmd.test \ 243 bexecve.test \ 244 count-f.test \ 245 count.test \ 246 detach-running.test \ 247 detach-sleeping.test \ 248 detach-stopped.test \ 249 filter-unavailable.test \ 250 get_regs.test \ 251 interactive_block.test \ 252 ksysent.test \ 253 opipe.test \ 254 options-syntax.test \ 255 pc.test \ 256 qual_fault-syntax.test \ 257 qual_fault.test \ 258 qual_inject-error-signal.test \ 259 qual_inject-retval.test \ 260 qual_inject-signal.test \ 261 qual_inject-syntax.test \ 262 qual_signal.test \ 263 qual_syscall.test \ 264 redirect-fds.test \ 265 redirect.test \ 266 restart_syscall.test \ 267 strace-C.test \ 268 strace-E.test \ 269 strace-S.test \ 270 strace-T.test \ 271 strace-V.test \ 272 strace-ff.test \ 273 strace-r.test \ 274 strace-t.test \ 275 strace-tt.test \ 276 strace-ttt.test \ 277 termsig.test \ 278 threads-execve.test \ 279 # end of MISC_TESTS 280 281TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS) 282 283XFAIL_TESTS_ = 284XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) 285XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) 286XFAIL_TESTS_x86_64 = int_0x80.gen.test 287XFAIL_TESTS_x32 = int_0x80.gen.test 288XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH)) 289 290TEST_LOG_COMPILER = env 291AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh 292 293@VALGRIND_CHECK_RULES@ 294VALGRIND_FLAGS = --quiet 295VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp 296 297EXTRA_DIST = \ 298 caps-abbrev.awk \ 299 caps.awk \ 300 clock.in \ 301 count-f.expected \ 302 eventfd.expected \ 303 fadvise.h \ 304 filter-unavailable.expected \ 305 fstatat.c \ 306 fstatx.c \ 307 gen_pure_executables.sh \ 308 gen_tests.in \ 309 gen_tests.sh \ 310 getresugid.c \ 311 init.sh \ 312 init_delete_module.h \ 313 ioctl-v.sh \ 314 ipc.sh \ 315 ipc_msgbuf.expected \ 316 ksysent.sed \ 317 lstatx.c \ 318 match.awk \ 319 net.expected \ 320 oldselect.expected \ 321 pipe.expected \ 322 process_vm_readv_writev.c \ 323 pure_executables.list \ 324 qual_fault-exit_group.expected \ 325 qual_inject-error-signal.expected \ 326 qual_inject-signal.expected \ 327 quotactl.h \ 328 regex.in \ 329 rt_sigaction.awk \ 330 run.sh \ 331 sched.in \ 332 scno_tampering.sh \ 333 setfsugid.c \ 334 setresugid.c \ 335 setreugid.c \ 336 setugid.c \ 337 sigaltstack.expected \ 338 sockname.c \ 339 strace-C.expected \ 340 strace-E.expected \ 341 strace-T.expected \ 342 strace-ff.expected \ 343 strace-k.test \ 344 strace-r.expected \ 345 strace.supp \ 346 struct_flock.c \ 347 sun_path.expected \ 348 trace_fstat.in \ 349 trace_fstatfs.in \ 350 trace_lstat.in \ 351 trace_question.in \ 352 trace_stat.in \ 353 trace_stat_like.in \ 354 trace_statfs.in \ 355 trace_statfs_like.in \ 356 uio.expected \ 357 umode_t.c \ 358 umovestr.expected \ 359 unix-pair-send-recv.expected \ 360 unix-pair-sendto-recvfrom.expected \ 361 xchownx.c \ 362 xgetrlimit.c \ 363 xselect.c \ 364 xstatfs.c \ 365 xstatfs64.c \ 366 xstatfsx.c \ 367 xstatx.c \ 368 xutimes.c \ 369 $(TESTS) 370 371ksysent.h: $(srcdir)/ksysent.sed 372 echo '#include <asm/unistd.h>' | \ 373 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 374 LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 375 mv -f $@.t2 $@ 376 rm -f $@.t1 377 378ksysent.$(OBJEXT): ksysent.h 379 380objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) 381$(objects): scno.h 382 383clean-local: clean-local-check 384.PHONY: clean-local-check 385clean-local-check: 386 -rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir) 387 388CLEANFILES = ksysent.h 389 390include ../scno.am 391