2011-02-27 03:28:50 +03:00
# Automake input for strace tests.
2015-12-17 20:56:48 +03:00
#
2016-01-02 02:09:02 +03:00
# Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
2017-05-22 20:14:52 +03:00
# Copyright (c) 2011-2017 The strace developers.
2015-12-17 20:56:48 +03:00
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2011-02-27 03:28:50 +03:00
2015-04-08 00:18:23 +03:00
OS = linux
ARCH = @arch@
2018-01-09 22:04:30 +03:00
NATIVE_ARCH = @arch_native@
2016-01-02 02:09:02 +03:00
MPERS_NAME =
2018-01-10 23:17:42 +03:00
MPERS_CC_FLAGS =
2015-12-08 03:14:10 +03:00
ARCH_MFLAGS =
2013-05-08 03:32:01 +04:00
AM_CFLAGS = $( WARN_CFLAGS)
2015-12-08 03:14:10 +03:00
AM_CPPFLAGS = $( ARCH_MFLAGS) \
tests: add ksysent.test
Check that syscall names and numbers defined in syscallent files
match kernel __NR_* constants defined by <asm/unistd.h>.
Tested on various platforms, including the following combinations
of architectures and kernel headers:
x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
aarch64: 4.4-rc
alpha: 4.3
arm eabi: 4.4-rc, 4.2, 4.1
hppa: 3.18
ia64: 3.18
mips o32: 4.1
ppc: 3.18
ppc64: 3.10-rhel, 2.6.32-rhel
s390: 3.18
s390x: 3.18
sparc: 4.1
sparc: 3.18
x32: 3.19
The only platform which is known at this moment to fail the test
is CentOS-5 provided by OBS. On x86_64 instance it fails with
error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
and on i586 it similarly fails with
error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
So this is a real platform bug that is not likely to be worked around
on the strace side.
* tests/ksysent.c: New file.
* tests/ksysent.sed: Likewise.
* tests/ksysent.test: New test.
* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
(check_PROGRAMS): Add ksysent.
(TESTS): Add ksysent.test.
(EXTRA_DIST): Add ksysent.sed.
(ksysent.h): New rule.
(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
* tests/.gitignore: Add ksysent.
2015-12-10 05:06:25 +03:00
-I$( builddir) \
2015-12-08 03:14:10 +03:00
-I$( top_builddir) /$( OS) /$( ARCH) \
2015-02-22 05:13:04 +03:00
-I$( top_srcdir) /$( OS) /$( ARCH) \
-I$( top_builddir) /$( OS) \
2015-08-27 01:50:58 +03:00
-I$( top_srcdir) /$( OS) \
-I$( top_builddir) \
-I$( top_srcdir)
2015-12-08 03:14:10 +03:00
AM_LDFLAGS = $( ARCH_MFLAGS)
2013-05-08 03:32:01 +04:00
2016-01-02 15:05:14 +03:00
libtests_a_SOURCES = \
2017-06-05 17:05:07 +03:00
create_nl_socket.c \
2016-04-21 01:51:28 +03:00
errno2name.c \
2016-01-02 15:05:14 +03:00
error_msg.c \
2016-10-02 23:39:11 +03:00
fill_memory.c \
2016-01-20 08:26:43 +03:00
get_page_size.c \
2017-02-20 03:10:35 +03:00
get_sigset_size.c \
2016-01-20 08:26:43 +03:00
hexdump_strdup.c \
2016-02-04 04:59:35 +03:00
hexquote_strndup.c \
2017-08-08 23:40:57 +03:00
ifindex.c \
2016-01-26 01:20:40 +03:00
inode_of_sockfd.c \
2016-07-19 18:09:05 +03:00
libmmsg.c \
2016-07-19 14:18:25 +03:00
libsocketcall.c \
2016-04-14 01:38:17 +03:00
overflowuid.c \
2016-11-30 03:56:04 +03:00
pipe_maxfd.c \
2016-03-23 16:34:15 +03:00
print_quoted_string.c \
2017-02-26 23:35:37 +03:00
print_time.c \
2016-04-26 03:13:47 +03:00
printflags.c \
2016-04-27 23:29:46 +03:00
printxval.c \
2016-06-16 05:42:13 +03:00
signal2name.c \
2017-04-19 05:16:31 +03:00
skip_unavailable.c \
2016-09-02 18:28:02 +03:00
sprintrc.c \
2016-01-02 15:05:14 +03:00
tail_alloc.c \
tests: introduce TEST_NETLINK and TEST_NETLINK_ macros
* tests/test_netlink.h: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
* tests/netlink_sock_diag.c: Include "test_netlink.h"
instead of "netlink.h".
(TEST_SOCK_DIAG): New macro.
(test_unix_diag_req, test_unix_diag_msg,
test_netlink_diag_req, test_netlink_diag_msg,
test_packet_diag_req, test_packet_diag_msg,
test_inet_diag_req, test_inet_diag_req_v2,
test_inet_diag_msg, test_smc_diag_req,
test_smc_diag_msg): Use it.
(test_odd_family_req, test_odd_family_msg,
test_inet_diag_sockid): Use TEST_NETLINK macro.
2017-07-08 11:36:46 +03:00
test_netlink.h \
2017-07-01 00:38:49 +03:00
test_nlattr.h \
2017-08-01 23:59:48 +03:00
test_printpath.c \
2017-08-02 03:44:28 +03:00
test_printstrn.c \
2017-08-01 23:59:48 +03:00
test_ucopy.c \
test_ucopy.h \
2016-01-02 15:05:14 +03:00
tests.h \
2016-01-20 05:06:59 +03:00
tprintf.c \
2016-01-02 15:05:14 +03:00
# end of libtests_a_SOURCES
libtests_a_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
check_LIBRARIES = libtests.a
LDADD = libtests.a
2017-04-17 03:53:19 +03:00
i n c l u d e p u r e _ e x e c u t a b l e s . a m
check_PROGRAMS = $( PURE_EXECUTABLES) \
2016-11-27 03:02:18 +03:00
answer \
2016-02-09 07:16:41 +03:00
attach-f-p \
2016-12-06 04:54:13 +03:00
attach-f-p-cmd \
2016-01-22 17:37:14 +03:00
attach-p-cmd-cmd \
attach-p-cmd-p \
2017-05-27 13:00:43 +03:00
block_reset_raise_run \
2016-10-18 14:04:20 +03:00
caps-abbrev \
2017-11-05 02:43:55 +03:00
check_sigblock \
2017-11-04 02:10:38 +03:00
check_sigign \
2017-08-06 03:23:20 +03:00
clone_parent \
clone_ptrace \
2016-02-23 02:42:23 +03:00
count-f \
2016-02-07 17:37:53 +03:00
execve-v \
execveat-v \
2015-06-29 14:57:44 +03:00
filter-unavailable \
2015-12-31 02:00:43 +03:00
fork-f \
2017-04-03 00:22:35 +03:00
getpid \
getppid \
2017-04-11 07:04:37 +03:00
gettid \
2017-03-16 23:38:48 +03:00
int_0x80 \
2016-10-03 00:59:06 +03:00
ioctl_dm-v \
2016-05-28 03:51:45 +03:00
ioctl_evdev-v \
2017-01-01 22:43:09 +03:00
ioctl_loop-nv \
2016-12-27 06:43:30 +03:00
ioctl_loop-v \
2017-04-13 18:10:11 +03:00
ioctl_nsfs \
2016-05-25 18:44:32 +03:00
ioctl_rtc-v \
2017-08-23 21:38:26 +03:00
is_linux_mips_n64 \
tests: add ksysent.test
Check that syscall names and numbers defined in syscallent files
match kernel __NR_* constants defined by <asm/unistd.h>.
Tested on various platforms, including the following combinations
of architectures and kernel headers:
x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
aarch64: 4.4-rc
alpha: 4.3
arm eabi: 4.4-rc, 4.2, 4.1
hppa: 3.18
ia64: 3.18
mips o32: 4.1
ppc: 3.18
ppc64: 3.10-rhel, 2.6.32-rhel
s390: 3.18
s390x: 3.18
sparc: 4.1
sparc: 3.18
x32: 3.19
The only platform which is known at this moment to fail the test
is CentOS-5 provided by OBS. On x86_64 instance it fails with
error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
and on i586 it similarly fails with
error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
So this is a real platform bug that is not likely to be worked around
on the strace side.
* tests/ksysent.c: New file.
* tests/ksysent.sed: Likewise.
* tests/ksysent.test: New test.
* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
(check_PROGRAMS): Add ksysent.
(TESTS): Add ksysent.test.
(EXTRA_DIST): Add ksysent.sed.
(ksysent.h): New rule.
(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
* tests/.gitignore: Add ksysent.
2015-12-10 05:06:25 +03:00
ksysent \
2017-11-04 02:10:38 +03:00
list_sigaction_signum \
2016-07-19 02:19:51 +03:00
mmsg-silent \
2016-07-18 13:21:42 +03:00
mmsg_name-v \
2016-07-03 00:14:26 +03:00
msg_control-v \
2014-05-30 01:35:34 +04:00
net-accept-connect \
2014-09-23 04:14:04 +04:00
netlink_inet_diag \
2016-05-21 10:49:00 +03:00
netlink_netlink_diag \
2014-12-25 03:11:40 +03:00
netlink_unix_diag \
2016-04-27 02:17:17 +03:00
nsyscalls \
2017-12-20 22:11:05 +03:00
nsyscalls-d \
2015-02-15 18:52:02 +03:00
pc \
2017-02-07 19:11:05 +03:00
perf_event_open_nonverbose \
2016-10-03 01:35:53 +03:00
perf_event_open_unabbrev \
2017-02-22 01:39:45 +03:00
ppoll-v \
2016-04-11 18:16:30 +03:00
prctl-seccomp-filter-v \
2016-04-11 18:06:28 +03:00
prctl-seccomp-strict \
2016-11-30 03:56:04 +03:00
print_maxfd \
2017-02-08 12:28:30 +03:00
qual_fault \
2017-02-10 01:26:14 +03:00
qual_inject-error-signal \
2017-02-08 12:28:30 +03:00
qual_inject-retval \
2017-02-08 16:51:33 +03:00
qual_inject-signal \
2016-11-18 03:11:27 +03:00
qual_signal \
2016-09-21 06:12:37 +03:00
quotactl-v \
quotactl-xfs-v \
2016-08-14 01:05:28 +03:00
redirect-fds \
2015-09-18 14:27:11 +03:00
restart_syscall \
2017-05-27 20:59:44 +03:00
run_expect_termsig \
2014-05-30 01:35:34 +04:00
scm_rights \
2016-04-12 03:05:43 +03:00
seccomp-filter-v \
2016-04-11 18:09:09 +03:00
seccomp-strict \
2014-05-30 01:35:34 +04:00
set_ptracer_any \
2017-11-05 02:43:55 +03:00
set_sigblock \
2017-11-04 02:10:38 +03:00
set_sigign \
2016-06-16 05:42:14 +03:00
signal_receive \
2016-04-11 18:04:08 +03:00
sleep \
2014-05-14 08:16:29 +04:00
stack-fcall \
2017-12-29 18:20:21 +03:00
stack-fcall-mangled \
2016-11-28 03:31:59 +03:00
threads-execve \
2017-05-27 20:59:44 +03:00
unblock_reset_raise \
2016-07-19 03:24:25 +03:00
unix-pair-send-recv \
2016-07-19 03:00:10 +03:00
unix-pair-sendto-recvfrom \
2015-12-31 02:00:43 +03:00
vfork-f \
2016-06-10 12:15:59 +03:00
wait4-v \
2016-06-10 12:16:10 +03:00
waitid-v \
2017-07-02 13:01:22 +03:00
zeroargc \
2015-08-18 22:21:36 +03:00
# end of check_PROGRAMS
2014-04-17 03:28:29 +04:00
2016-02-09 07:16:41 +03:00
attach_f_p_LDADD = -lrt -lpthread $( LDADD)
2016-01-02 15:05:14 +03:00
clock_xettime_LDADD = -lrt $( LDADD)
2016-02-23 02:42:23 +03:00
count_f_LDADD = -lpthread $( LDADD)
2016-01-02 15:05:14 +03:00
filter_unavailable_LDADD = -lpthread $( LDADD)
build: add -D_FILE_OFFSET_BITS=64 to _CPPFLAGS instead of _CFLAGS
* tests/Makefile.am (fstat64_CFLAGS): Rename to fstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(fstatat64_CFLAGS): Rename to fstatat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(ftruncate64_CFLAGS): Rename to ftruncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(lstat64_CFLAGS): Rename to lstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(mmap64_CFLAGS): Rename to mmap64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(newfstatat_CFLAGS): Rename to newfstatat_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(stat64_CFLAGS): Rename to stat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(statfs_CFLAGS): Rename to statfs_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(truncate64_CFLAGS): Rename to truncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(uio_CFLAGS): Rename to uio_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
2015-12-08 03:24:53 +03:00
fstat64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
fstatat64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
ftruncate64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
lstat64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
mmap64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-01-02 15:05:14 +03:00
mq_LDADD = -lrt $( LDADD)
tests: check decoding of mq_{notify,open,timedreceive,timedsend,unlink}
* tests/mq_sendrecv.c: New file.
* tests/mq_sendrecv-read.c: Likewise.
* tests/mq_sendrecv-write.c: Likewise.
* tests/mq_sendrecv.test: New test.
* tests/mq_sendrecv-read.test: Likewise.
* tests/mq_sendrecv-write.test: Likewise.
* tests/.gitignore: Add mq_sendrecv, mq_sendrecv-read,
and mq_sendrecv-write.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(mq_sendrecv_LDADD, mq_sendrecv_read_LDADD, mq_sendrecv_write_LDADD):
New variables.
(DECODER_TESTS): Add mq_sendrecv.test, mq_sendrecv-read.test,
and mq_sendrecv-write.test.
2016-10-27 10:18:44 +03:00
mq_sendrecv_LDADD = -lrt $( LDADD)
mq_sendrecv_read_LDADD = -lrt $( LDADD)
mq_sendrecv_write_LDADD = -lrt $( LDADD)
build: add -D_FILE_OFFSET_BITS=64 to _CPPFLAGS instead of _CFLAGS
* tests/Makefile.am (fstat64_CFLAGS): Rename to fstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(fstatat64_CFLAGS): Rename to fstatat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(ftruncate64_CFLAGS): Rename to ftruncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(lstat64_CFLAGS): Rename to lstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(mmap64_CFLAGS): Rename to mmap64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(newfstatat_CFLAGS): Rename to newfstatat_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(stat64_CFLAGS): Rename to stat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(statfs_CFLAGS): Rename to statfs_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(truncate64_CFLAGS): Rename to truncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(uio_CFLAGS): Rename to uio_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
2015-12-08 03:24:53 +03:00
newfstatat_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-01-02 15:05:14 +03:00
pc_LDADD = $( dl_LIBS) $( LDADD)
2016-04-02 04:08:24 +03:00
pread64_pwrite64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-03-30 06:54:21 +03:00
preadv_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-03-31 03:01:58 +03:00
preadv_pwritev_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-03-30 06:54:21 +03:00
pwritev_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
build: add -D_FILE_OFFSET_BITS=64 to _CPPFLAGS instead of _CFLAGS
* tests/Makefile.am (fstat64_CFLAGS): Rename to fstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(fstatat64_CFLAGS): Rename to fstatat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(ftruncate64_CFLAGS): Rename to ftruncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(lstat64_CFLAGS): Rename to lstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(mmap64_CFLAGS): Rename to mmap64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(newfstatat_CFLAGS): Rename to newfstatat_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(stat64_CFLAGS): Rename to stat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(statfs_CFLAGS): Rename to statfs_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(truncate64_CFLAGS): Rename to truncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(uio_CFLAGS): Rename to uio_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
2015-12-08 03:24:53 +03:00
stat64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
statfs_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-11-28 03:31:59 +03:00
threads_execve_LDADD = -lrt -lpthread $( LDADD)
2016-01-02 15:05:14 +03:00
times_LDADD = -lrt $( LDADD)
build: add -D_FILE_OFFSET_BITS=64 to _CPPFLAGS instead of _CFLAGS
* tests/Makefile.am (fstat64_CFLAGS): Rename to fstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(fstatat64_CFLAGS): Rename to fstatat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(ftruncate64_CFLAGS): Rename to ftruncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(lstat64_CFLAGS): Rename to lstat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(mmap64_CFLAGS): Rename to mmap64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(newfstatat_CFLAGS): Rename to newfstatat_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(stat64_CFLAGS): Rename to stat64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(statfs_CFLAGS): Rename to statfs_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(truncate64_CFLAGS): Rename to truncate64_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
(uio_CFLAGS): Rename to uio_CPPFLAGS,
replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
2015-12-08 03:24:53 +03:00
truncate64_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
uio_CPPFLAGS = $( AM_CPPFLAGS) -D_FILE_OFFSET_BITS= 64
2016-03-30 06:54:21 +03:00
2014-06-17 01:45:52 +04:00
stack_fcall_SOURCES = stack-fcall.c \
stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
2013-05-08 03:32:01 +04:00
2017-12-29 18:20:21 +03:00
stack_fcall_mangled_SOURCES = stack-fcall-mangled.c \
stack-fcall-mangled-0.c stack-fcall-mangled-1.c \
stack-fcall-mangled-2.c stack-fcall-mangled-3.c
2017-04-05 03:37:54 +03:00
i n c l u d e g e n _ t e s t s . a m
2016-01-02 02:09:02 +03:00
i f U S E _ L I B U N W I N D
LIBUNWIND_TESTS = strace-k.test
2017-12-29 18:20:21 +03:00
i f U S E _ D E M A N G L E
LIBUNWIND_TESTS += strace-k-demangle.test
e n d i f
2016-01-02 02:09:02 +03:00
e l s e
LIBUNWIND_TESTS =
e n d i f
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
DECODER_TESTS = \
2016-05-17 12:59:45 +03:00
brk.test \
2016-05-19 01:09:42 +03:00
btrfs-v.test \
2016-05-27 06:33:06 +03:00
btrfs-vw.test \
2017-02-07 19:11:05 +03:00
btrfs-w.test \
2016-10-18 14:04:20 +03:00
caps-abbrev.test \
2017-02-07 19:11:05 +03:00
caps.test \
2015-08-02 00:08:13 +03:00
eventfd.test \
2016-02-07 17:37:53 +03:00
execve-v.test \
2016-04-11 18:04:08 +03:00
execve.test \
2016-09-22 00:21:57 +03:00
fadvise64.test \
2016-08-30 16:30:37 +03:00
futex.test \
tests: extend test coverage of getuid/getgid family syscalls
Add strict tests for getuid, getuid32, getgid, getgid32, geteuid,
geteuid32, getegid, and getegid32 syscalls.
* tests/getegid.c: New file.
* tests/getegid.test: New test.
* tests/getegid32.c: New file.
* tests/getegid32.test: New test.
* tests/geteuid.c: New file.
* tests/geteuid.test: New test.
* tests/geteuid32.c: New file.
* tests/geteuid32.test: New test.
* tests/getgid.c: New file.
* tests/getgid.test: New test.
* tests/getgid32.c: New file.
* tests/getgid32.test: New test.
* tests/getuid.c: New file.
* tests/getuid.test: New test.
* tests/getuid32.c: New file.
* tests/getuid32.test: New test.
* tests/.gitignore: Add getuid, getuid32, getgid, getgid32, geteuid,
* geteuid32, getegid, and getegid32.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add getegid.test, getegid32.test, geteuid.test,
geteuid32.test, getgid.test, getgid32.test, getuid.test,
and getuid32.test.
2016-04-19 21:28:03 +03:00
getuid.test \
ioctl: take all 32 bits of ioctl commands into account
Historically, only 16 bits (8-bit number and 8-bit type) of 32-bit ioctl
commands were used for decoding, which was the source for numerous
annoying collisions like this:
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, MGSL_IOCGPARAMS or MMTIMER_GETRES or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0x7fffd47f7338) = -1 ENOTTY (Inappropriate ioctl for device)
The solution is to use all 32 bits for decoding, not just "number" and
"type", but also "size" and "direction".
As some architectures override defaults that come from asm-generic/ and
provide alternative definitions for some ioctl commands, we support
per-architecture ioctl definitions and merge them with common
definitions at build time. During the merge, we used to keep both
generic and architecture-specific definitions, now architecture-specific
definitions have precedence over generic ones -- ioctlsort omits
definitions from asm-generic/ for those ioctl names that have different
definitions in asm/.
Additional bits of "direction" are architecture specific -- the number
of bits and their values differ between architectures. To reduce
architecture differences in the source code, we keep "direction" in
symbolic form and compile it in ioctlsort.
Additional bits of "size" are also architecture specific -- not only the
number of bits differ between architectures, but sizes of many types
depend on sizeof(long). To reduce architecture differences in the
source code, we keep 32-bit and 64-bit versions of common ioctl
definitions, and use the appropriate version for each architecture and
personality.
To implement this, the tools for generating ioctl definitions from
kernel headers have been rewritten, and the source format of ioctl
definitions has been extended. The final ioctlent*.h files that are
included by syscall.c are now generated from source ioctls_inc*.h and
ioctls_arch*.h files at build time with ioctlsort.
* ioctl.c (ioctl_lookup): Use all 32 bits of ioctl command code.
* ioctlsort.c: Rewritten.
* linux/32/ioctls_inc.h: New file.
* linux/64/ioctls_inc.h: New file.
* linux/aarch64/ioctls_arch0.h: New file.
* linux/aarch64/ioctls_arch1.h: New file.
* linux/aarch64/ioctls_inc0.h: New file.
* linux/aarch64/ioctls_inc1.h: New file.
* linux/alpha/ioctls_arch0.h: New file.
* linux/alpha/ioctls_inc0.h: New file.
* linux/arc/ioctls_arch0.h: New file.
* linux/arc/ioctls_inc0.h: New file.
* linux/arm/ioctls_arch0.h: New file.
* linux/arm/ioctls_inc0.h: New file.
* linux/avr32/ioctls_arch0.h: New file.
* linux/avr32/ioctls_inc0.h: New file.
* linux/bfin/ioctls_arch0.h: New file.
* linux/bfin/ioctls_inc0.h: New file.
* linux/hppa/ioctls_arch0.h: New file.
* linux/hppa/ioctls_inc0.h: New file.
* linux/i386/ioctls_arch0.h: New file.
* linux/i386/ioctls_inc0.h: New file.
* linux/ia64/ioctls_arch0.h: New file.
* linux/ia64/ioctls_inc0.h: New file.
* linux/m68k/ioctls_arch0.h: New file.
* linux/m68k/ioctls_inc0.h: New file.
* linux/metag/ioctls_arch0.h: New file.
* linux/metag/ioctls_inc0.h: New file.
* linux/microblaze/ioctls_arch0.h: New file.
* linux/microblaze/ioctls_inc0.h: New file.
* linux/mips/ioctls_arch0.h: New file.
* linux/mips/ioctls_inc0.h: New file.
* linux/or1k/ioctls_arch0.h: New file.
* linux/or1k/ioctls_inc0.h: New file.
* linux/powerpc/ioctls_arch0.h: New file.
* linux/powerpc/ioctls_inc0.h: New file.
* linux/powerpc64/ioctls_arch0.h: New file.
* linux/powerpc64/ioctls_arch1.h: New file.
* linux/powerpc64/ioctls_inc0.h: New file.
* linux/powerpc64/ioctls_inc1.h: New file.
* linux/s390/ioctls_arch0.h: New file.
* linux/s390/ioctls_inc0.h: New file.
* linux/s390x/ioctls_arch0.h: New file.
* linux/s390x/ioctls_inc0.h: New file.
* linux/sh/ioctls_arch0.h: New file.
* linux/sh/ioctls_inc0.h: New file.
* linux/sh64/ioctls_arch0.h: New file.
* linux/sh64/ioctls_inc0.h: New file.
* linux/sparc/ioctls_arch0.h: New file.
* linux/sparc/ioctls_inc0.h: New file.
* linux/sparc64/ioctls_arch0.h: New file.
* linux/sparc64/ioctls_arch2.h: New file.
* linux/sparc64/ioctls_inc0.h: New file.
* linux/sparc64/ioctls_inc2.h: New file.
* linux/tile/ioctls_arch0.h: New file.
* linux/tile/ioctls_arch1.h: New file.
* linux/tile/ioctls_inc0.h: New file.
* linux/tile/ioctls_inc1.h: New file.
* linux/x32/ioctls_arch0.h: New file.
* linux/x32/ioctls_arch1.h: New file.
* linux/x32/ioctls_inc0.h: New file.
* linux/x32/ioctls_inc1.h: New file.
* linux/x86_64/ioctls_arch0.h: New file.
* linux/x86_64/ioctls_arch1.h: New file.
* linux/x86_64/ioctls_inc0.h: New file.
* linux/x86_64/ioctls_inc1.h: New file.
* linux/xtensa/ioctls_arch0.h: New file.
* linux/xtensa/ioctls_inc0.h: New file.
* linux/aarch64/ioctlent.h.in: Remove.
* linux/aarch64/ioctlent1.h: Remove.
* linux/alpha/ioctlent.h.in: Remove.
* linux/arc/ioctlent.h.in: Remove.
* linux/arm/ioctlent.h.in: Remove.
* linux/avr32/ioctlent.h.in: Remove.
* linux/bfin/ioctlent.h.in: Remove.
* linux/hppa/ioctlent.h.in: Remove.
* linux/i386/ioctlent.h.in: Remove.
* linux/ia64/ioctlent.h.in: Remove.
* linux/ioctlent.h.in: Remove.
* linux/ioctlent.sh: Remove.
* linux/m68k/ioctlent.h.in: Remove.
* linux/metag/ioctlent.h.in: Remove.
* linux/microblaze/ioctlent.h.in: Remove.
* linux/mips/ioctlent.h.in: Remove.
* linux/mips/ioctlent.sh: Remove.
* linux/or1k/ioctlent.h.in: Remove.
* linux/powerpc/ioctlent.h.in: Remove.
* linux/powerpc64/ioctlent.h: Remove.
* linux/powerpc64/ioctlent1.h: Remove.
* linux/s390/ioctlent.h.in: Remove.
* linux/s390x/ioctlent.h.in: Remove.
* linux/sh/ioctlent.h.in: Remove.
* linux/sh64/ioctlent.h.in: Remove.
* linux/sparc/ioctlent.h.in: Remove.
* linux/sparc64/ioctlent.h.in: Remove.
* linux/sparc64/ioctlent2.h: Remove.
* linux/tile/ioctlent.h.in: Remove.
* linux/tile/ioctlent1.h: Remove.
* linux/x32/ioctlent.h.in: Remove.
* linux/x32/ioctlent1.h: Remove.
* linux/x86_64/ioctlent.h.in: Remove.
* linux/x86_64/ioctlent1.h: Remove.
* linux/xtensa/ioctlent.h.in: Remove.
* linux/x86_64/ioctlent2.h: Include ioctlent0.h instead of ioctlent.h.
* syscall.c (struct_ioctlent ioctlent0): Likewise.
* Makefile.am: Remove all ioctlent-related definitions.
Define the list of ioctlent*.h files that have to be generated by
presence of $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h files.
Add rules for ioctlent*.h files generation.
(EXTRA_DIST): Update.
* maint/ioctls_gen.sh: New file.
* maint/ioctls_hex.sh: New file.
* maint/ioctls_sym.sh: New file.
* maint/print_ioctlent.c: New file.
* HACKING-scripts: Update for ioctlent.sh -> ioctls_gen.sh migration.
* .gitignore: Add ioctlent[012].h and ioctls_all[012].h.
* configure.ac (AC_CHECK_HEADERS): Add linux/hiddev.h
and linux/mmtimer.h for tests.
* tests/ioctl.c: New file.
* tests/ioctl.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add ioctl.
(TESTS): Add ioctl.test.
* tests/.gitignore: Add ioctl.
2015-01-19 20:02:16 +03:00
ioctl.test \
2016-10-03 00:59:06 +03:00
ioctl_dm-v.test \
2017-02-07 19:11:05 +03:00
ioctl_dm.test \
2017-12-04 16:08:17 +03:00
ioctl_kvm_run.test \
2017-01-01 22:43:09 +03:00
ioctl_loop-nv.test \
2017-04-13 18:10:11 +03:00
ioctl_nsfs.test \
2016-12-24 19:18:51 +03:00
ioctl_sock_gifconf.test \
2015-08-03 12:40:46 +03:00
ipc_msgbuf.test \
2015-12-01 03:59:26 +03:00
llseek.test \
lseek.test \
2015-12-08 20:33:52 +03:00
mmap.test \
2016-02-02 22:48:46 +03:00
net-y-unix.test \
2016-01-27 01:03:22 +03:00
net-yy-inet.test \
2016-05-21 10:49:00 +03:00
net-yy-netlink.test \
2016-01-26 01:20:54 +03:00
net-yy-unix.test \
2015-12-08 20:33:52 +03:00
net.test \
2017-06-05 17:05:07 +03:00
netlink_sock_diag.test \
2016-04-27 02:17:17 +03:00
nsyscalls.test \
2017-12-20 22:11:05 +03:00
nsyscalls-d.test \
nsyscalls-nd.test \
2015-12-08 20:33:52 +03:00
oldselect.test \
2015-12-25 03:52:42 +03:00
personality.test \
2015-12-08 20:33:52 +03:00
pipe.test \
2018-01-18 00:31:07 +03:00
poll-P.test \
2016-02-16 03:52:43 +03:00
poll.test \
2016-12-10 07:03:54 +03:00
prctl-arg2-intptr.test \
2016-12-10 07:04:31 +03:00
prctl-dumpable.test \
2016-11-20 02:25:54 +03:00
prctl-name.test \
2016-12-10 07:05:10 +03:00
prctl-no-args.test \
2016-11-17 16:15:51 +03:00
prctl-pdeathsig.test \
2016-04-11 18:16:30 +03:00
prctl-seccomp-filter-v.test \
2016-04-11 18:06:28 +03:00
prctl-seccomp-strict.test \
2016-12-10 07:05:31 +03:00
prctl-securebits.test \
2016-12-12 00:26:07 +03:00
prctl-tid_address.test \
2016-11-17 16:15:51 +03:00
prctl-tsc.test \
2017-02-08 12:28:30 +03:00
qual_fault-exit_group.test \
2016-01-20 03:17:02 +03:00
readv.test \
2017-05-28 20:13:29 +03:00
rt_sigaction.test \
2014-05-30 01:35:34 +04:00
scm_rights-fd.test \
2016-04-11 18:09:09 +03:00
seccomp-strict.test \
2015-07-17 04:45:25 +03:00
sigaltstack.test \
2015-01-29 18:19:21 +03:00
sun_path.test \
2018-01-08 20:48:48 +03:00
xet_thread_area_x86.test \
2015-12-08 20:33:52 +03:00
uio.test \
2015-12-07 03:06:35 +03:00
umount.test \
umount2.test \
2017-02-07 19:11:05 +03:00
umovestr.test \
2015-03-31 21:52:57 +03:00
umovestr2.test \
2016-03-01 11:55:35 +03:00
uname.test \
2016-07-19 03:24:25 +03:00
unix-pair-send-recv.test \
2016-07-19 03:00:10 +03:00
unix-pair-sendto-recvfrom.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
# end of DECODER_TESTS
MISC_TESTS = \
2016-02-09 07:16:41 +03:00
attach-f-p.test \
2016-01-22 17:37:14 +03:00
attach-p-cmd.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
bexecve.test \
2017-08-06 03:23:20 +03:00
clone_parent.test \
clone_ptrace.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
count-f.test \
count.test \
detach-running.test \
2014-02-02 19:20:11 +04:00
detach-sleeping.test \
detach-stopped.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
filter-unavailable.test \
2018-01-17 06:22:07 +03:00
filtering_fd-syntax.test \
2018-01-16 07:34:25 +03:00
filtering_syscall-syntax.test \
2017-08-06 14:26:52 +03:00
fflush.test \
2017-04-11 07:04:37 +03:00
get_regs.test \
2017-05-27 13:00:43 +03:00
interactive_block.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
ksysent.test \
2016-02-05 04:19:37 +03:00
opipe.test \
2016-11-28 15:35:51 +03:00
options-syntax.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
pc.test \
2017-08-01 23:59:48 +03:00
printpath-umovestr-legacy.test \
2017-08-02 03:45:47 +03:00
printstrn-umoven-legacy.test \
2017-02-08 12:28:30 +03:00
qual_fault-syntax.test \
qual_fault.test \
2017-02-10 01:26:14 +03:00
qual_inject-error-signal.test \
2017-02-08 12:28:30 +03:00
qual_inject-retval.test \
2017-02-08 16:51:33 +03:00
qual_inject-signal.test \
2017-02-08 12:28:38 +03:00
qual_inject-syntax.test \
2016-11-18 03:11:27 +03:00
qual_signal.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
qual_syscall.test \
2016-08-14 01:05:28 +03:00
redirect-fds.test \
2017-02-07 19:11:05 +03:00
redirect.test \
2015-04-08 00:18:23 +03:00
restart_syscall.test \
2017-11-05 02:43:55 +03:00
sigblock.test \
2017-11-04 02:10:38 +03:00
sigign.test \
2016-11-28 19:57:30 +03:00
strace-C.test \
2016-06-08 05:31:29 +03:00
strace-E.test \
2016-05-05 10:19:51 +03:00
strace-S.test \
2016-03-24 03:31:23 +03:00
strace-T.test \
2016-05-09 09:19:55 +03:00
strace-V.test \
2016-05-09 09:19:56 +03:00
strace-ff.test \
2016-03-24 04:27:03 +03:00
strace-r.test \
2016-03-24 03:59:32 +03:00
strace-t.test \
2016-03-24 04:03:31 +03:00
strace-tt.test \
2016-03-24 04:10:02 +03:00
strace-ttt.test \
2017-05-27 20:59:44 +03:00
termsig.test \
2016-11-28 03:31:59 +03:00
threads-execve.test \
tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.
* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-24 02:07:02 +03:00
# end of MISC_TESTS
2017-04-05 03:37:54 +03:00
TESTS = $( GEN_TESTS) $( DECODER_TESTS) $( MISC_TESTS) $( LIBUNWIND_TESTS)
2016-01-02 02:09:02 +03:00
XFAIL_TESTS_ =
XFAIL_TESTS_m32 = $( LIBUNWIND_TESTS)
XFAIL_TESTS_mx32 = $( LIBUNWIND_TESTS)
2017-04-05 03:37:54 +03:00
XFAIL_TESTS_x86_64 = int_0x80.gen.test
XFAIL_TESTS_x32 = int_0x80.gen.test
2017-03-16 23:38:48 +03:00
XFAIL_TESTS = $( XFAIL_TESTS_$( MPERS_NAME) ) $( XFAIL_TESTS_$( ARCH) )
2011-02-27 03:28:50 +03:00
2015-04-08 00:18:23 +03:00
TEST_LOG_COMPILER = env
2018-01-09 22:04:30 +03:00
AM_TEST_LOG_FLAGS = STRACE_ARCH = $( ARCH) STRACE_NATIVE_ARCH = $( NATIVE_ARCH) \
MIPS_ABI = $( MIPS_ABI) $( srcdir) /run.sh
2013-06-18 19:28:47 +04:00
2016-12-06 05:31:31 +03:00
@ V A L G R I N D _ C H E C K _ R U L E S @
VALGRIND_FLAGS = --quiet
2017-07-20 03:06:06 +03:00
VALGRIND_SUPPRESSIONS_FILES = $( abs_srcdir) /strace.supp
2016-12-06 05:31:31 +03:00
2017-04-17 03:50:19 +03:00
EXTRA_DIST = \
tests: robustify attach-p-cmd.test against buggy kernels
From time to time various kernels, old and new, just go nuts
and fail attach-p-cmd.test with the following diagnostics:
12345 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
-12345 chdir("attach-p-cmd.test -p") = -1 ENOENT (No such file or directory)
+12345 syscall_4294967295(0xffe60934, 0x1c0, 0xffe60934, 0x1, 0xffe609b4, 0xffe60a58) = -1 (errno 38)
+12345 chdir("attach-p-cmd.test -p") = -1 ENOSYS (Function not implemented)
Let's workaround this kernel madness by rewriting the test
without use of SIGALRM.
* tests/attach-p-cmd.h: New file.
* tests/Makefile.am (EXTRA_DIST): Add attach-p-cmd.h.
* tests/attach-p-cmd-cmd.c: Include "attach-p-cmd.h".
(write_pidfile, wait_for_peer_invocation): New functions.
(main): Use them.
* tests/attach-p-cmd-p.c: Include <time.h> and "attach-p-cmd.h".
(wait_for_peer_invocation, wait_for_peer_termination): New functions.
(main): Use them. Do not raise SIGALRM, use nanosleep after peer
termination.
2017-12-03 03:25:43 +03:00
attach-p-cmd.h \
2017-04-17 03:50:19 +03:00
caps-abbrev.awk \
caps.awk \
2017-04-21 04:29:29 +03:00
clock.in \
2017-04-17 03:50:19 +03:00
count-f.expected \
eventfd.expected \
fadvise.h \
filter-unavailable.expected \
fstatat.c \
fstatx.c \
2017-04-17 03:53:19 +03:00
gen_pure_executables.sh \
2017-04-17 03:50:19 +03:00
gen_tests.in \
gen_tests.sh \
getresugid.c \
init.sh \
init_delete_module.h \
ioctl-v.sh \
ipc.sh \
ipc_msgbuf.expected \
ksysent.sed \
lstatx.c \
match.awk \
net.expected \
2017-06-26 03:28:56 +03:00
netlink_sock_diag-v.sh \
2017-04-17 03:50:19 +03:00
oldselect.expected \
pipe.expected \
2018-01-08 20:38:17 +03:00
print_user_desc.c \
2017-04-17 03:50:19 +03:00
process_vm_readv_writev.c \
pure_executables.list \
qual_fault-exit_group.expected \
qual_inject-error-signal.expected \
qual_inject-signal.expected \
quotactl.h \
2017-04-21 04:29:29 +03:00
regex.in \
2017-05-28 20:13:29 +03:00
rt_sigaction.awk \
2017-04-17 03:50:19 +03:00
run.sh \
2017-04-21 04:29:29 +03:00
sched.in \
2017-04-17 03:50:19 +03:00
scno_tampering.sh \
setfsugid.c \
setresugid.c \
setreugid.c \
setugid.c \
sigaltstack.expected \
sockname.c \
2017-12-29 18:20:21 +03:00
stack-fcall.h \
2017-04-17 03:50:19 +03:00
strace-C.expected \
strace-E.expected \
strace-T.expected \
strace-ff.expected \
2017-12-29 18:20:21 +03:00
strace-k-demangle.test \
2017-04-17 03:50:19 +03:00
strace-k.test \
strace-r.expected \
strace.supp \
struct_flock.c \
sun_path.expected \
2017-07-17 06:44:51 +03:00
syntax.sh \
Implement -e trace=%fstat option
linux/*/syscallent*.h part is updated automatically by:
sed -i -e '/TSTA.*fx\?stat/ s/TSTA,/TFST|&/' \
-e 's/\(TD|TF|TFST|TSTA,\)[[:space:]]/\1/' linux/*/syscallent*.h
* sysent.h (TRACE_FSTAT): New macro.
* syscall.c: Alias TFST to TRACE_FSTAT around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_FSTAT for "%fstat".
* strace.1 (.SS Filtering): Add information about %fstat syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (fstat64, fstatat64): Add TFST flag.
* linux/64/syscallent.h (fstat, newfstatat): Likewise.
* linux/aarch64/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (fstat, fstat64, fstatat64, oldfstat): Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/avr32/syscallent.h (fstat, fstat64, fstatat64): Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (fstat, fstat64, fstatat64, osf_fstat,
osf_old_fstat): Likewise.
* linux/powerpc64/syscallent.h (fstat, newfstatat, oldfstat): Likewise.
* linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_oldfstat, posix_fstat,
svr4_fstat, sysv_fstat): Likewise.
* tests/gen_tests.in (trace_fstat): New entry.
* tests/trace_fstat.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TFST): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.
2017-04-18 02:52:58 +03:00
trace_fstat.in \
2017-04-17 21:29:44 +03:00
trace_fstatfs.in \
Implement -e trace=%lstat option
linux/*/syscallent*.h part is updated automatically by:
sed -i '/TSTA,.*lx\?stat/ s/TSTA,/TLST|&/' linux/*/syscallent*.h
* sysent.h (TRACE_LSTAT): New macro.
* syscall.c: Alias TLST to TRACE_LSTAT around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_LSTAT for "%lstat".
* strace.1 (.SS Filtering): Add information about %lstat syscall class.
* NEWS: Mention this change.
* linux/aarch64/syscallent.h (lstat): Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (lstat, lstat64, oldlstat): Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/avr32/syscallent.h (lstat, lstat64): Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (lstat, lstat64, osf_lstat, osf_old_lstat): Likewise.
* linux/mips/syscallent-compat.h (bsd43_lstat, posix_lstat, svr4_lstat,
sysv_lstat): Likewise.
* tests/gen_tests.in (trace_lstat): New entry.
* tests/trace_lstat.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TLST): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.
2017-04-18 03:23:05 +03:00
trace_lstat.in \
2017-04-25 05:23:12 +03:00
trace_question.in \
Implement -e trace=%stat option
linux/*/syscallent*.h part is updated automatically by:
sed -i '/statx/! s/TF|TSTA,/TF|TST|TSTA,/' linux/*/syscallent*.h
* sysent.h (TRACE_STAT): New macro.
* syscall.c: Alias LST to TRACE_STAT around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_STAT for "%stat".
* strace.1 (.SS Filtering): Add information about %stat syscall class.
* NEWS: Mention this change.
* linux/aarch64/syscallent.h (stat): Add TST flag.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (oldstat, stat, stat64): Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/avr32/syscallent.h (stat, stat64): Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h (oldstat, stat): Likewise.
* linux/alpha/syscallent.h (osf_old_stat, osf_stat, stat, stat64): Likewise.
* linux/mips/syscallent-compat.h (bsd43_oldstat, bsd43_stat, posix_stat,
svr4_stat, svr4_xstat, sysv_stat, sysv_xstat): Likewise.
* tests/gen_tests.in (trace_stat): New entry.
* tests/trace_stat.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TST): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.
2017-04-18 04:14:52 +03:00
trace_stat.in \
Implement -e trace=%%stat option
linux/*/syscallent*.h part is updated automatically by:
sed -i '/TSFA\|stat[iu]s/! s/,[[:space:]]\?\([[:space:]]*SEN(.*stat\)/|TSTA,\1/' \
linux/*/syscallent*.h
* sysent.h (TRACE_STAT_LIKE): New macro.
* syscall.c: Alias TSTA to TRACE_STAT_LIKE around syscallent.h inclusion.
* qualify.c (lookup_class): Add TRACE_STAT_LIKE for "%%stat".
* strace.1 (.SS Filtering): Add information about %%stat syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (fstat64, fstatat64, statx): Add TSTA flag.
* linux/64/syscallent.h (fstat, newfstatat, statx): Likewise.
* linux/aarch64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise.
* linux/alpha/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
osf_fstat, osf_lstat, osf_old_fstat, osf_old_lstat, osf_old_stat, osf_stat,
stat, stat64): Likewise.
* linux/arm/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/avr32/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64): Likewise.
* linux/bfin/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
* linux/crisv10/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
* linux/hppa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64): Likewise.
* linux/i386/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/ia64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise.
* linux/m68k/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/microblaze/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
* linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_lstat, bsd43_oldfstat,
bsd43_oldstat, bsd43_stat, posix_fstat, posix_lstat, posix_stat, svr4_fstat,
svr4_fxstat, svr4_lstat, svr4_lxstat, svr4_stat, svr4_xstat, sysv_fstat,
sysv_fxstat, sysv_lstat, sysv_lxstat, sysv_stat, sysv_xstat): Likewise.
* linux/mips/syscallent-n32.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/mips/syscallent-n64.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/mips/syscallent-o32.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/powerpc64/syscallent.h (fstat, lstat, newfstatat, oldfstat, oldlstat,
oldstat, stat): Likewise.
* linux/powerpc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise.
* linux/s390/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64, statx): Likewise.
* linux/s390x/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/sh64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64): Likewise.
* linux/sh/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
oldlstat, oldstat, stat, stat64): Likewise.
* linux/sparc64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldlstat, stat, stat64): Likewise.
* linux/sparc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
oldlstat, stat, stat64): Likewise.
* linux/x32/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/x86_64/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
* linux/xtensa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
stat64, statx): Likewise.
* tests/gen_tests.in (trace_stat_like): New entry.
* tests/trace_stat_like.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TSTA): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.
2017-04-18 02:14:58 +03:00
trace_stat_like.in \
2017-04-20 03:43:49 +03:00
trace_statfs.in \
Implement -e trace=%%statfs option
linux/*/syscallent*.h part is updated automatically by:
sed -i 's/\(TSF\),[[:space:]]\?/\1|TSFA,/' linux/*/syscallent*.h
sed -i 's/\(TFSF\),/\1|TSFA,/' linux/*/syscallent*.h
sed -i 's/0\(,.*ustat\)/TSFA\1/' linux/*/syscallent*.h
* sysent.h (TRACE_STATFS_LIKE): New macro.
* syscall.c: Alias TSFA to TRACE_STATFS_LIKE around syscallent.h inclusion.
* qualify.c (lookup_class): Add SCHED_STATFS_LIKE for "%%statfs".
* strace.1 (.SS Filtering): Add information about %%statfs syscall class.
* NEWS: Mention this change.
* linux/32/syscallent.h (statfs64, fstatfs64): Add TSFA flag.
* linux/64/syscallent.h (statfs, fstatfs): Likewise.
* linux/aarch64/syscallent.h (statfs, fstatfs, ustat): Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h (statfs, statfs64, fstatfs, fstatfs64, ustat):
Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/crisv10/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (osf_statfs, osf_statfs64, statfs,
ofs_fstatfs, osf_fstatfs64, ustat): Likewise.
* linux/mips/syscallent-compat.h (*_statfs, *_statvfs, *_fstatfs): Likewise.
* tests/gen_tests.in (trace_statfs_like): New entry.
* tests/trace_statfs_like.in: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/ksysent.c (TSFA): New macro, defined to 0.
* tests/nsyscalls.c: Likewise.
2017-04-16 16:30:29 +03:00
trace_statfs_like.in \
2017-04-17 03:50:19 +03:00
uio.expected \
umode_t.c \
umovestr.expected \
unix-pair-send-recv.expected \
unix-pair-sendto-recvfrom.expected \
xchownx.c \
xgetrlimit.c \
xselect.c \
xstatfs.c \
xstatfs64.c \
xstatfsx.c \
xstatx.c \
xutimes.c \
$( TESTS)
2011-02-27 03:28:50 +03:00
tests: add ksysent.test
Check that syscall names and numbers defined in syscallent files
match kernel __NR_* constants defined by <asm/unistd.h>.
Tested on various platforms, including the following combinations
of architectures and kernel headers:
x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
aarch64: 4.4-rc
alpha: 4.3
arm eabi: 4.4-rc, 4.2, 4.1
hppa: 3.18
ia64: 3.18
mips o32: 4.1
ppc: 3.18
ppc64: 3.10-rhel, 2.6.32-rhel
s390: 3.18
s390x: 3.18
sparc: 4.1
sparc: 3.18
x32: 3.19
The only platform which is known at this moment to fail the test
is CentOS-5 provided by OBS. On x86_64 instance it fails with
error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
and on i586 it similarly fails with
error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
So this is a real platform bug that is not likely to be worked around
on the strace side.
* tests/ksysent.c: New file.
* tests/ksysent.sed: Likewise.
* tests/ksysent.test: New test.
* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
(check_PROGRAMS): Add ksysent.
(TESTS): Add ksysent.test.
(EXTRA_DIST): Add ksysent.sed.
(ksysent.h): New rule.
(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
* tests/.gitignore: Add ksysent.
2015-12-10 05:06:25 +03:00
ksysent.h : $( srcdir ) /ksysent .sed
echo '#include <asm/unistd.h>' | \
2016-02-17 18:55:28 +03:00
$( CPP) $( AM_CPPFLAGS) $( CPPFLAGS) -dM - > $@ .t1
Consistently use extended regular expressions where appropriate
When grep or sed is used with basic regular expressions containing
'(', ')', '{', '}', '|', '?', and '+' special characters, convert them
to extended regular expressions for better portability and readability.
* generate_mpers_am.sh: Convert grep and sed BREs to EREs.
* Makefile.am (ioctl_redefs%.h, m%_type_defs.h, m%_funcs.h,
mpers_printer_decl_pattern, printers.h, %_printer_decls.h,
%_printer_defs.h): Convert sed BREs to EREs.
* generate_sen.sh: Likewise.
* linux/mips/genstub.sh: Likewise.
* make-dsc: Likewise.
* mpers.sh: Likewise.
* xlat/gen.sh: Likewise.
* tests/Makefile.am (ksysent.h): Likewise.
* tests/ksysent.sed: Likewise.
* tests/pc.test: Likewise.
* tests/strace-S.test: Likewise.
* tests/strace-V.test: Likewise.
* tests/strace-k.test: Likewise.
2016-07-28 19:51:58 +03:00
LC_COLLATE = C sed -r -n -f $( srcdir) /ksysent.sed < $@ .t1 > $@ .t2
tests: add ksysent.test
Check that syscall names and numbers defined in syscallent files
match kernel __NR_* constants defined by <asm/unistd.h>.
Tested on various platforms, including the following combinations
of architectures and kernel headers:
x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
aarch64: 4.4-rc
alpha: 4.3
arm eabi: 4.4-rc, 4.2, 4.1
hppa: 3.18
ia64: 3.18
mips o32: 4.1
ppc: 3.18
ppc64: 3.10-rhel, 2.6.32-rhel
s390: 3.18
s390x: 3.18
sparc: 4.1
sparc: 3.18
x32: 3.19
The only platform which is known at this moment to fail the test
is CentOS-5 provided by OBS. On x86_64 instance it fails with
error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
and on i586 it similarly fails with
error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
So this is a real platform bug that is not likely to be worked around
on the strace side.
* tests/ksysent.c: New file.
* tests/ksysent.sed: Likewise.
* tests/ksysent.test: New test.
* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
(check_PROGRAMS): Add ksysent.
(TESTS): Add ksysent.test.
(EXTRA_DIST): Add ksysent.sed.
(ksysent.h): New rule.
(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
* tests/.gitignore: Add ksysent.
2015-12-10 05:06:25 +03:00
mv -f $@ .t2 $@
rm -f $@ .t1
2016-12-30 14:16:56 +03:00
ksysent.$(OBJEXT) : ksysent .h
2016-12-30 10:20:25 +03:00
objects = $( filter %.$( OBJEXT) ,$( SOURCES:.c= .$( OBJEXT) ) )
2017-01-01 23:59:11 +03:00
$(objects) : scno .h
tests: run every test except ksysent.test in its own subdirectory
Many test executables create temporary files in the current work
directory for the duration of their execution.
This level of test isolation allows more test executables to be invoked
several times simultaneously.
* tests/.gitignore: Add *.dir, remove *.log.*, *.tmp, *.tmp-*,
and *.tmp.* patterns.
* tests/Makefile.am (clean-local, clean-local-check): New rules.
(.PHONY): Add clean-local-check.
(CLEANFILES): Remove all but ksysent.h.
* tests/init.sh: Strip test-specific prefix from LOG, OUT, and EXP
variables. When invoked from a test, create a new test-specific
directory, chdir into it, and add more ../ prefix to STRACE variable.
(run_prog): Replace "./" with "../".
* tests/attach-f-p.test: Replace "./" with "../".
* tests/attach-p-cmd.test: Likewise.
* tests/bexecve.test: Likewise.
* tests/btrfs-v.test: Likewise.
* tests/btrfs-vw.test: Likewise.
* tests/btrfs-w.test: Likewise.
* tests/count.test: Likewise.
* tests/detach-running.test: Likewise.
* tests/detach-sleeping.test: Likewise.
* tests/detach-stopped.test: Likewise.
* tests/mmap.test: Likewise.
* tests/net-y-unix.test: Likewise.
* tests/net-yy-inet.test: Likewise.
* tests/net-yy-netlink.test: Likewise.
* tests/net-yy-unix.test: Likewise.
* tests/net.test: Likewise.
* tests/opipe.test: Likewise.
* tests/poll.test: Likewise.
* tests/prctl-seccomp-strict.test: Likewise.
* tests/qual_fault-exit_group.test: Likewise.
* tests/qual_fault.test: Likewise.
* tests/qual_inject-error-signal.test: Likewise.
* tests/qual_inject-retval.test: Likewise.
* tests/qual_inject-signal.test: Likewise.
* tests/qual_signal.test: Likewise.
* tests/qual_syscall.test: Likewise.
* tests/readv.test: Likewise.
* tests/redirect-fds.test: Likewise.
* tests/sched.test: Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/seccomp-strict.test: Likewise.
* tests/strace-C.test: Likewise.
* tests/strace-E.expected: Likewise.
* tests/strace-E.test: Likewise.
* tests/strace-S.test: Likewise.
* tests/strace-T.test: Likewise.
* tests/strace-V.test: Likewise.
* tests/strace-ff.test: Likewise.
* tests/strace-k.test: Likewise.
* tests/strace-r.expected: Likewise.
* tests/strace-r.test: Likewise.
* tests/strace-t.test: Likewise.
* tests/strace-tt.test: Likewise.
* tests/strace-ttt.test: Likewise.
* tests/sun_path.test: Likewise.
* tests/uname.test: Likewise.
* tests/unix-pair-send-recv.test: Likewise.
* tests/unix-pair-sendto-recvfrom.test: Likewise.
2017-04-02 04:03:24 +03:00
clean-local : clean -local -check
.PHONY : clean -local -check
clean-local-check :
2017-04-05 03:37:54 +03:00
-rm -rf -- $( TESTS:.test= .dir) $( GEN_TESTS:.gen.test= .dir)
tests: run every test except ksysent.test in its own subdirectory
Many test executables create temporary files in the current work
directory for the duration of their execution.
This level of test isolation allows more test executables to be invoked
several times simultaneously.
* tests/.gitignore: Add *.dir, remove *.log.*, *.tmp, *.tmp-*,
and *.tmp.* patterns.
* tests/Makefile.am (clean-local, clean-local-check): New rules.
(.PHONY): Add clean-local-check.
(CLEANFILES): Remove all but ksysent.h.
* tests/init.sh: Strip test-specific prefix from LOG, OUT, and EXP
variables. When invoked from a test, create a new test-specific
directory, chdir into it, and add more ../ prefix to STRACE variable.
(run_prog): Replace "./" with "../".
* tests/attach-f-p.test: Replace "./" with "../".
* tests/attach-p-cmd.test: Likewise.
* tests/bexecve.test: Likewise.
* tests/btrfs-v.test: Likewise.
* tests/btrfs-vw.test: Likewise.
* tests/btrfs-w.test: Likewise.
* tests/count.test: Likewise.
* tests/detach-running.test: Likewise.
* tests/detach-sleeping.test: Likewise.
* tests/detach-stopped.test: Likewise.
* tests/mmap.test: Likewise.
* tests/net-y-unix.test: Likewise.
* tests/net-yy-inet.test: Likewise.
* tests/net-yy-netlink.test: Likewise.
* tests/net-yy-unix.test: Likewise.
* tests/net.test: Likewise.
* tests/opipe.test: Likewise.
* tests/poll.test: Likewise.
* tests/prctl-seccomp-strict.test: Likewise.
* tests/qual_fault-exit_group.test: Likewise.
* tests/qual_fault.test: Likewise.
* tests/qual_inject-error-signal.test: Likewise.
* tests/qual_inject-retval.test: Likewise.
* tests/qual_inject-signal.test: Likewise.
* tests/qual_signal.test: Likewise.
* tests/qual_syscall.test: Likewise.
* tests/readv.test: Likewise.
* tests/redirect-fds.test: Likewise.
* tests/sched.test: Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/seccomp-strict.test: Likewise.
* tests/strace-C.test: Likewise.
* tests/strace-E.expected: Likewise.
* tests/strace-E.test: Likewise.
* tests/strace-S.test: Likewise.
* tests/strace-T.test: Likewise.
* tests/strace-V.test: Likewise.
* tests/strace-ff.test: Likewise.
* tests/strace-k.test: Likewise.
* tests/strace-r.expected: Likewise.
* tests/strace-r.test: Likewise.
* tests/strace-t.test: Likewise.
* tests/strace-tt.test: Likewise.
* tests/strace-ttt.test: Likewise.
* tests/sun_path.test: Likewise.
* tests/uname.test: Likewise.
* tests/unix-pair-send-recv.test: Likewise.
* tests/unix-pair-sendto-recvfrom.test: Likewise.
2017-04-02 04:03:24 +03:00
2017-07-20 03:06:06 +03:00
.PHONY : check -valgrind -local
check-valgrind-local : $( check_LIBRARIES ) $( check_PROGRAMS )
2017-07-20 03:06:06 +03:00
BUILT_SOURCES = ksysent.h
tests: run every test except ksysent.test in its own subdirectory
Many test executables create temporary files in the current work
directory for the duration of their execution.
This level of test isolation allows more test executables to be invoked
several times simultaneously.
* tests/.gitignore: Add *.dir, remove *.log.*, *.tmp, *.tmp-*,
and *.tmp.* patterns.
* tests/Makefile.am (clean-local, clean-local-check): New rules.
(.PHONY): Add clean-local-check.
(CLEANFILES): Remove all but ksysent.h.
* tests/init.sh: Strip test-specific prefix from LOG, OUT, and EXP
variables. When invoked from a test, create a new test-specific
directory, chdir into it, and add more ../ prefix to STRACE variable.
(run_prog): Replace "./" with "../".
* tests/attach-f-p.test: Replace "./" with "../".
* tests/attach-p-cmd.test: Likewise.
* tests/bexecve.test: Likewise.
* tests/btrfs-v.test: Likewise.
* tests/btrfs-vw.test: Likewise.
* tests/btrfs-w.test: Likewise.
* tests/count.test: Likewise.
* tests/detach-running.test: Likewise.
* tests/detach-sleeping.test: Likewise.
* tests/detach-stopped.test: Likewise.
* tests/mmap.test: Likewise.
* tests/net-y-unix.test: Likewise.
* tests/net-yy-inet.test: Likewise.
* tests/net-yy-netlink.test: Likewise.
* tests/net-yy-unix.test: Likewise.
* tests/net.test: Likewise.
* tests/opipe.test: Likewise.
* tests/poll.test: Likewise.
* tests/prctl-seccomp-strict.test: Likewise.
* tests/qual_fault-exit_group.test: Likewise.
* tests/qual_fault.test: Likewise.
* tests/qual_inject-error-signal.test: Likewise.
* tests/qual_inject-retval.test: Likewise.
* tests/qual_inject-signal.test: Likewise.
* tests/qual_signal.test: Likewise.
* tests/qual_syscall.test: Likewise.
* tests/readv.test: Likewise.
* tests/redirect-fds.test: Likewise.
* tests/sched.test: Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/seccomp-strict.test: Likewise.
* tests/strace-C.test: Likewise.
* tests/strace-E.expected: Likewise.
* tests/strace-E.test: Likewise.
* tests/strace-S.test: Likewise.
* tests/strace-T.test: Likewise.
* tests/strace-V.test: Likewise.
* tests/strace-ff.test: Likewise.
* tests/strace-k.test: Likewise.
* tests/strace-r.expected: Likewise.
* tests/strace-r.test: Likewise.
* tests/strace-t.test: Likewise.
* tests/strace-tt.test: Likewise.
* tests/strace-ttt.test: Likewise.
* tests/sun_path.test: Likewise.
* tests/uname.test: Likewise.
* tests/unix-pair-send-recv.test: Likewise.
* tests/unix-pair-sendto-recvfrom.test: Likewise.
2017-04-02 04:03:24 +03:00
CLEANFILES = ksysent.h
2016-12-30 10:20:25 +03:00
2017-01-01 23:59:11 +03:00
i n c l u d e . . / s c n o . a m