| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sigset_t provided by libc is not quite convenient.
In glibc, sigset_t is an array with space for 1024 bits, which is much
more than required: all architectures supported by Linux have only 64
signals except MIPS, which has 128.
In bionic libc, LP32 sigset_t is only 4 bytes long, which is less than
necessary.
With this change, signal mask is decoded without use of intermediate
sigset_t structure, which saves us some cpu cycles in case of glibc with
its inflated sigset_t, and enables build with libcs where sigset_t is
broken.
Old implementation used to check each signal number in the given signal
mask twice using sigismember().
New implementation is based on popcount and next_set_bit() so it's
noticeably faster.
* configure.ac: Check for __builtin_popcount.
* signal.c: Ensure that NSIG >= 32.
(sprintsigmask, sprintsigmask_long, printsigmask): Remove.
(popcount32, sprintsigmask_n): New functions.
(tprintsigmask_addr, sprintsigmask_val, tprintsigmask_val): New macros.
(print_sigset_addr_len, sys_sigsetmask, sys_sigreturn, sys_siggetmask,
sys_sigsuspend, sys_sigprocmask, decode_new_sigaction): Update to use
new signal mask decoding interface.
* tests/sigaction.c (main): Add a test with almost filled signal mask.
* tests/sigaction.awk: Update.
|
|
|
|
| |
* tests/sigaction.awk: Check that input conatins all expected lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* net.c (sys_bind, sys_listen, do_accept, sys_send, sys_sendto,
sys_sendmsg, sys_sendmmsg, sys_recv, sys_recvfrom, sys_recvmsg,
sys_recvmmsg, sys_shutdown, sys_getsockopt, sys_setsockopt): Decode
socket descriptor arguments using printfd.
* pathtrace.c (pathtrace_match): Also check TRACE_NETWORK syscalls
that take socket descriptor arguments.
* tests/net-fd.test: New test for socket descriptor arguments decoding.
* tests/Makefile.am (TESTS): Add net-fd.test.
(net-fd.log): New dependency on net.log.
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to automake limitations, some features work only for tests
that end in one of the suffixes listed in TEST_EXTENSIONS.
* tests/detach-running: Rename to detach-running.test.
* tests/detach-sleeping: Rename to detach-sleeping.test.
* tests/detach-stopped: Rename to detach-stopped.test.
* tests/net: Rename to net.test.
* tests/ptrace_setoptions: Rename to ptrace_setoptions.test.
* tests/qual_syscall: Rename to qual_syscall.test.
* tests/sigaction.sh: Rename to sigaction.test.
* tests/stat: Rename to stat.test.
* tests/strace-f: Rename to strace-f.test.
* tests/Makefile.am (TESTS): Update.
(LOG_COMPILER): Rename to TEST_LOG_COMPILER.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since "struct sigaction" varies between architectures, rt_sigaction
decoding sometimes produces incorrect output. This test is expected
to catch basic rt_sigaction decoding bugs.
Based on a patch proposed by Chris Dearman.
* tests/sigaction.c: New file.
* tests/sigaction.awk: Likewise.
* tests/sigaction.sh: New test.
* tests/Makefile.am (check_PROGRAMS): Add sigaction.
(TESTS): Add sigaction.sh.
(EXTRA_DIST): Add sigaction.awk.
* tests/.gitignore: Add sigaction.
|
|
|
|
|
|
|
| |
* tests/detach-running: Disable /proc based checks when
/proc/self/status is not available.
* tests/detach-sleeping: Likewise.
* tests/detach-stopped: Likewise.
|
|
|
|
|
|
|
| |
Check that traced process still exists and is in a right state
after strace detached from it.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
|
|
|
| |
* tests/detach-running: New test.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
| |
* tests/detach-sleeping: Do not send SIGCONT to the sleeping process.
|
|
|
|
|
| |
* tests/detach-sleeping: Use $LOG file for set_ptracer_any output.
* tests/detach-stopped: Likewise.
|
|
|
|
|
|
| |
* tests/init.sh (SLEEP_A_BIT): New variable.
* tests/detach-sleeping: Use it.
* tests/detach-stopped: Likewise.
|
|
|
|
|
|
|
|
|
| |
* tests/set_ptracer_any.c: New file.
* tests/detach-sleeping: New test.
* tests/detach-stopped: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add set_ptracer_any.
(TESTS): Add detach-sleeping and detach-stopped.
* tests/.gitignore: Add set_ptracer_any.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run each test using a wrapper that does all necessary timeout checks.
* tests/run.sh: New file.
* tests/Makefile.am (EXTRA_DIST, LOG_COMPILER): Add it.
* tests/init.sh (check_strace, check_timeout): Remove.
* tests/detach-stopped: Update callers.
* tests/net: Likewise.
* tests/ptrace_setoptions: Likewise.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* tests/Makefile.am (CLEANFILES): Calculate dynamically from TESTS.
* tests/init.sh (LOG): New variable.
* tests/detach-stopped: Use it.
* tests/net: Likewise.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
|
|
|
|
|
|
| |
* tests/net-accept-connect.c: Fix address length passed to bind()
and connect().
* tests/net: Update regexps.
|
|
|
|
|
|
|
|
|
| |
* tests/.gitignore: Add net-accept-connect, *.o and *.log.*.
* tests/Makefile.am (AM_CFLAGS): New variable.
(check_PROGRAMS): Add net-accept-connect.
(TESTS): Add net.
* tests/net-accept-connect.c: New file.
* tests/net: New file.
|
|
|
|
|
|
|
|
| |
* tests/init.sh (check_timeout): New function.
* tests/ptrace_setoptions: Use it.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
|
|
|
|
|
| |
* tests/stat: Enhance regexps that check tracing of stat/stat64 and
fstatat/fstatat64 syscalls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer Linux architectures don't support the stat/stat64 syscalls.
Instead they use fstatat() with AT_FDCWD and an extra flags argument.
Support seeing this output in the 'strace -efile' test.
As part of this change, use "grep -E -x" syntax consistently for
all stat tests, since the number of \(foo\)\? expressions was becoming
pretty unwieldy.
* tests/stat: Update stat/stat64 check regexp to handle architectures
that use fstatat instead. Use "grep -E -x" syntax consistently.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
|
|
|
|
| |
* tests/stat: Also rm the sample file at the end of the test.
|
|
|
|
|
| |
* .gitignore: Add gdb related files.
* tests/.gitignore: Ignore test logs.
|
|
|
|
|
| |
* tests/stat: New test.
* tests/Makefile.am (TESTS): Add stat.
|
|
|
|
|
|
|
|
|
|
| |
Busybox version of timeout doesn't have --version option.
Relax check_prog to handle those cases.
* tests/init.sh (check_prog): Use type builtin to check program
availability.
Signed-off-by: Maxin B. John <maxin.john@enea.com>
|
|
|
|
|
|
|
| |
* syscall.c (qual_syscall, qualify): Pass personality down to
qualify_one.
* tests/qual_syscall: New test.
* tests/Makefile.am (TESTS): Add qual_syscall.
|
|
|
|
|
|
|
|
| |
* tests/init.sh (check_timeout): New variable.
* tests/ptrace_setoptions: Use it.
* tests/strace-f: Likewise.
Reported-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
* tests/init.sh (check_strace): Use "${parameter:-word}" shell syntax
instead of "${parameter-word}".
Reported-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
| |
* tests/Makefile.am (TESTS): Merge ptrace_setoptions_*.
* tests/ptrace_setoptions: Check for Linux kernel > 2.6.
|
|
|
|
| |
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
|
|
|
| |
* tests/ptrace_setoptions_for_all: New file.
* tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all.
|
|
|
|
| |
* tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6.
|
|
|
|
|
|
|
|
|
| |
The test have to be adjusted after commit v4.6-5-g3454e4b.
* ptrace_setoptions: Update grep pattern, rename to
ptrace_setoptions_followfork.
* tests/Makefile.am (TESTS): Rename ptrace_setoptions to
ptrace_setoptions_followfork.
|
|
|
|
|
|
|
| |
* tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null".
The former may result to strace being killed by SIGPIPE, which in
certain configuratons may lead to generation of a core file.
Suggested by Mike Frysinger.
|
|
|
|
|
|
|
| |
* tests/init.sh (framework_skip_): New function.
(check_prog): Use it instead of framework_failure_.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
* Makefile.am (SUBDIRS): Add tests.
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
* tests/.gitignore: New file.
* tests/Makefile.am: Likewise.
* tests/init.sh: Likewise.
* tests/ptrace_setoptions: Likewise.
* tests/strace-f: Likewise.
|