Home | History | Annotate | Download | only in tests-mx32
      1 # Automake input for strace tests.
      2 #
      3 # Copyright (c) 2011-2016 Dmitry V. Levin <ldv (a] altlinux.org>
      4 # Copyright (c) 2011-2018 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 
     29 OS = linux
     30 ARCH = @arch_mx32@
     31 NATIVE_ARCH = @arch_native@
     32 SIZEOF_KERNEL_LONG_T = @SIZEOF_KERNEL_LONG_T@
     33 SIZEOF_LONG = 4
     34 MPERS_NAME = mx32
     35 MPERS_CC_FLAGS = @cc_flags_mx32@
     36 ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) $(MPERS_CC_FLAGS)
     37 AM_CFLAGS = $(WARN_CFLAGS)
     38 AM_CPPFLAGS = $(ARCH_MFLAGS) \
     39 	      -I$(builddir) \
     40 	      -I$(top_builddir)/$(OS)/$(ARCH) \
     41 	      -I$(top_srcdir)/$(OS)/$(ARCH) \
     42 	      -I$(top_builddir)/$(OS) \
     43 	      -I$(top_srcdir)/$(OS) \
     44 	      -I$(top_builddir) \
     45 	      -I$(top_srcdir)
     46 AM_LDFLAGS = $(ARCH_MFLAGS)
     47 
     48 libtests_a_SOURCES = \
     49 	create_nl_socket.c \
     50 	errno2name.c \
     51 	error_msg.c \
     52 	fill_memory.c \
     53 	get_page_size.c \
     54 	get_sigset_size.c \
     55 	hexdump_strdup.c \
     56 	hexquote_strndup.c \
     57 	ifindex.c \
     58 	inode_of_sockfd.c \
     59 	libmmsg.c \
     60 	libsocketcall.c \
     61 	overflowuid.c \
     62 	pipe_maxfd.c \
     63 	print_quoted_string.c \
     64 	print_time.c \
     65 	printflags.c \
     66 	printxval.c \
     67 	signal2name.c \
     68 	skip_unavailable.c \
     69 	sprintrc.c \
     70 	tail_alloc.c \
     71 	test_netlink.h \
     72 	test_nlattr.h \
     73 	test_printpath.c \
     74 	test_printstrn.c \
     75 	test_ucopy.c \
     76 	test_ucopy.h \
     77 	tests.h \
     78 	tprintf.c \
     79 	# end of libtests_a_SOURCES
     80 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
     81 check_LIBRARIES = libtests.a
     82 LDADD = libtests.a
     83 
     84 include pure_executables.am
     85 
     86 check_PROGRAMS = $(PURE_EXECUTABLES) \
     87 	_newselect-P \
     88 	answer \
     89 	attach-f-p \
     90 	attach-f-p-cmd \
     91 	attach-p-cmd-cmd \
     92 	attach-p-cmd-p \
     93 	block_reset_raise_run \
     94 	caps-abbrev \
     95 	check_sigblock \
     96 	check_sigign \
     97 	clone_parent \
     98 	clone_ptrace \
     99 	count-f \
    100 	execve-v \
    101 	execveat-v \
    102 	filter-unavailable \
    103 	fork-f \
    104 	getpid	\
    105 	getppid	\
    106 	gettid \
    107 	int_0x80 \
    108 	ioctl_dm-v \
    109 	ioctl_evdev-v \
    110 	ioctl_loop-nv \
    111 	ioctl_loop-v \
    112 	ioctl_nsfs \
    113 	ioctl_rtc-v \
    114 	is_linux_mips_n64 \
    115 	ksysent \
    116 	list_sigaction_signum \
    117 	mmsg-silent \
    118 	mmsg_name-v \
    119 	msg_control-v \
    120 	net-accept-connect \
    121 	netlink_inet_diag \
    122 	netlink_netlink_diag \
    123 	netlink_unix_diag \
    124 	nsyscalls \
    125 	nsyscalls-d \
    126 	oldselect-P \
    127 	oldselect-efault-P \
    128 	pc \
    129 	perf_event_open_nonverbose \
    130 	perf_event_open_unabbrev \
    131 	ppoll-v \
    132 	prctl-seccomp-filter-v \
    133 	prctl-seccomp-strict \
    134 	print_maxfd \
    135 	qual_fault \
    136 	qual_inject-error-signal \
    137 	qual_inject-retval \
    138 	qual_inject-signal \
    139 	qual_signal \
    140 	quotactl-v \
    141 	quotactl-xfs-v \
    142 	redirect-fds \
    143 	restart_syscall \
    144 	run_expect_termsig \
    145 	scm_rights \
    146 	seccomp-filter-v \
    147 	seccomp-strict \
    148 	select-P \
    149 	set_ptracer_any \
    150 	set_sigblock \
    151 	set_sigign \
    152 	signal_receive \
    153 	sleep \
    154 	stack-fcall \
    155 	stack-fcall-mangled \
    156 	threads-execve \
    157 	unblock_reset_raise \
    158 	unix-pair-send-recv \
    159 	unix-pair-sendto-recvfrom \
    160 	vfork-f \
    161 	wait4-v \
    162 	waitid-v \
    163 	zeroargc \
    164 	# end of check_PROGRAMS
    165 
    166 attach_f_p_LDADD = -lrt -lpthread $(LDADD)
    167 clock_xettime_LDADD = -lrt $(LDADD)
    168 count_f_LDADD = -lpthread $(LDADD)
    169 filter_unavailable_LDADD = -lpthread $(LDADD)
    170 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    171 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    172 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    173 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    174 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    175 mq_LDADD = -lrt $(LDADD)
    176 mq_sendrecv_LDADD = -lrt $(LDADD)
    177 mq_sendrecv_read_LDADD = -lrt $(LDADD)
    178 mq_sendrecv_write_LDADD = -lrt $(LDADD)
    179 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    180 pc_LDADD = $(dl_LIBS) $(LDADD)
    181 pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    182 preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    183 preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    184 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    185 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    186 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    187 threads_execve_LDADD = -lrt -lpthread $(LDADD)
    188 times_LDADD = -lrt $(LDADD)
    189 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    190 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
    191 
    192 stack_fcall_SOURCES = stack-fcall.c \
    193 	stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
    194 
    195 stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
    196 	stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
    197 	stack-fcall-mangled-2.c stack-fcall-mangled-3.c
    198 
    199 include gen_tests.am
    200 
    201 if USE_LIBUNWIND
    202 LIBUNWIND_TESTS = strace-k.test
    203 if USE_DEMANGLE
    204 LIBUNWIND_TESTS += strace-k-demangle.test
    205 endif
    206 else
    207 LIBUNWIND_TESTS =
    208 endif
    209 
    210 DECODER_TESTS = \
    211 	brk.test \
    212 	btrfs-v.test \
    213 	btrfs-vw.test \
    214 	btrfs-w.test \
    215 	caps-abbrev.test \
    216 	caps.test \
    217 	eventfd.test \
    218 	execve-v.test \
    219 	execve.test \
    220 	fadvise64.test \
    221 	futex.test \
    222 	getuid.test \
    223 	ioctl.test \
    224 	ipc_msgbuf.test \
    225 	llseek.test \
    226 	lseek.test \
    227 	mmap.test \
    228 	net-y-unix.test \
    229 	net-yy-inet.test \
    230 	net-yy-netlink.test \
    231 	net-yy-unix.test \
    232 	net.test \
    233 	netlink_sock_diag.test \
    234 	nsyscalls.test \
    235 	nsyscalls-d.test \
    236 	nsyscalls-nd.test \
    237 	personality.test \
    238 	pipe.test \
    239 	poll-P.test \
    240 	poll.test \
    241 	prctl-arg2-intptr.test \
    242 	prctl-dumpable.test \
    243 	prctl-name.test \
    244 	prctl-no-args.test \
    245 	prctl-pdeathsig.test \
    246 	prctl-seccomp-filter-v.test \
    247 	prctl-seccomp-strict.test \
    248 	prctl-securebits.test \
    249 	prctl-tid_address.test \
    250 	prctl-tsc.test \
    251 	qual_fault-exit_group.test \
    252 	readv.test \
    253 	rt_sigaction.test \
    254 	scm_rights-fd.test \
    255 	seccomp-strict.test \
    256 	sigaltstack.test \
    257 	sun_path.test \
    258 	xet_thread_area_x86.test \
    259 	uio.test \
    260 	umount.test \
    261 	umount2.test \
    262 	umovestr.test \
    263 	umovestr2.test \
    264 	uname.test \
    265 	unix-pair-send-recv.test \
    266 	unix-pair-sendto-recvfrom.test \
    267 	# end of DECODER_TESTS
    268 
    269 MISC_TESTS = \
    270 	attach-f-p.test \
    271 	attach-p-cmd.test \
    272 	bexecve.test \
    273 	clone_parent.test \
    274 	clone_ptrace.test \
    275 	count-f.test \
    276 	count.test \
    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 \
    283 	fflush.test \
    284 	get_regs.test \
    285 	interactive_block.test \
    286 	ksysent.test \
    287 	opipe.test \
    288 	options-syntax.test \
    289 	pc.test \
    290 	printpath-umovestr-legacy.test \
    291 	printstrn-umoven-legacy.test \
    292 	qual_fault-syntax.test \
    293 	qual_fault.test \
    294 	qual_inject-error-signal.test \
    295 	qual_inject-retval.test \
    296 	qual_inject-signal.test \
    297 	qual_inject-syntax.test \
    298 	qual_signal.test \
    299 	qual_syscall.test \
    300 	redirect-fds.test \
    301 	redirect.test \
    302 	restart_syscall.test \
    303 	sigblock.test \
    304 	sigign.test \
    305 	strace-C.test \
    306 	strace-E.test \
    307 	strace-S.test \
    308 	strace-T.test \
    309 	strace-V.test \
    310 	strace-ff.test \
    311 	strace-r.test \
    312 	strace-t.test \
    313 	strace-tt.test \
    314 	strace-ttt.test \
    315 	termsig.test \
    316 	threads-execve.test \
    317 	# end of MISC_TESTS
    318 
    319 TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS)
    320 
    321 XFAIL_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))
    327 
    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
    333 
    334 @VALGRIND_CHECK_RULES@
    335 VALGRIND_FLAGS = --quiet
    336 VALGRIND_SUPPRESSIONS_FILES = $(abs_srcdir)/strace.supp
    337 
    338 EXTRA_DIST = \
    339 	accept_compat.h \
    340 	attach-p-cmd.h \
    341 	caps-abbrev.awk \
    342 	caps.awk \
    343 	clock.in \
    344 	count-f.expected \
    345 	eventfd.expected \
    346 	fadvise.h \
    347 	filter-unavailable.expected \
    348 	fstatat.c \
    349 	fstatx.c \
    350 	gen_pure_executables.sh \
    351 	gen_tests.in \
    352 	gen_tests.sh \
    353 	getresugid.c \
    354 	init.sh \
    355 	init_delete_module.h \
    356 	ipc.sh \
    357 	ipc_msgbuf.expected \
    358 	ksysent.sed \
    359 	lstatx.c \
    360 	match.awk \
    361 	net.expected \
    362 	netlink_sock_diag-v.sh \
    363 	pipe.expected \
    364 	print_user_desc.c \
    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 \
    370 	quotactl.h \
    371 	regex.in \
    372 	rt_sigaction.awk \
    373 	run.sh \
    374 	sched.in \
    375 	scno_tampering.sh \
    376 	setfsugid.c \
    377 	setresugid.c \
    378 	setreugid.c \
    379 	setugid.c \
    380 	sigaltstack.expected \
    381 	sockname.c \
    382 	stack-fcall.h \
    383 	strace-C.expected \
    384 	strace-E.expected \
    385 	strace-T.expected \
    386 	strace-ff.expected \
    387 	strace-k-demangle.test \
    388 	strace-k.test \
    389 	strace-r.expected \
    390 	strace.supp \
    391 	struct_flock.c \
    392 	sun_path.expected \
    393 	syntax.sh \
    394 	trace_fstat.in \
    395 	trace_fstatfs.in \
    396 	trace_lstat.in \
    397 	trace_question.in \
    398 	trace_stat.in \
    399 	trace_stat_like.in \
    400 	trace_statfs.in \
    401 	trace_statfs_like.in \
    402 	uio.expected \
    403 	umode_t.c \
    404 	umovestr.expected \
    405 	unix-pair-send-recv.expected \
    406 	unix-pair-sendto-recvfrom.expected \
    407 	xchownx.c \
    408 	xgetrlimit.c \
    409 	xselect.c \
    410 	xstatfs.c \
    411 	xstatfs64.c \
    412 	xstatfsx.c \
    413 	xstatx.c \
    414 	xutimes.c \
    415 	$(TESTS)
    416 
    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
    421 	mv -f $@.t2 $@
    422 	rm -f $@.t1
    423 
    424 ksysent.$(OBJEXT): ksysent.h
    425 
    426 objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT)))
    427 $(objects): scno.h
    428 
    429 clean-local: clean-local-check
    430 .PHONY: clean-local-check
    431 clean-local-check:
    432 	-rm -rf -- $(TESTS:.test=.dir) $(GEN_TESTS:.gen.test=.dir)
    433 
    434 .PHONY: check-valgrind-local
    435 check-valgrind-local: $(check_LIBRARIES) $(check_PROGRAMS)
    436 
    437 BUILT_SOURCES = ksysent.h
    438 CLEANFILES = ksysent.h
    439 
    440 include ../scno.am
    441