History log of /external/strace/tests/sigaction.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dc75b01004a0588c1eb3bc26d7248a6e473b2cdd 05-Jul-2017 Elliott Hughes <enh@google.com> Update strace to 4.18.

Noteworthy changes in release 4.18 (2017-07-05)
===============================================

* Improvements
* Implemented decoding of SCM_TIMESTAMP* control messages.
* Implemented decoding of netlink NLMSG_DONE messages.
* Implemented decoding of netlink generic nlmsg_type and nlmsg_flags.
* Implemented decoding of NETLINK_AUDIT, NETLINK_NETFILTER, NETLINK_ROUTE,
NETLINK_SELINUX, NETLINK_SOCK_DIAG, and NETLINK_XFRM message types.
* Implemented decoding of NETLINK_GENERIC protocol families.
* Implemented basic protocol specific decoding of AF_INET, AF_INET6,
AF_NETLINK, AF_PACKET, AF_SMC, and AF_UNIX messages of NETLINK_SOCK_DIAG.
* Implemented basic decoding of netlink attributes.
* Implemented basic protocol specific decoding of AF_INET, AF_NETLINK,
AF_PACKET, AF_SMC, and AF_UNIX netlink attributes of NETLINK_SOCK_DIAG.
* Implemented decoding of inet_diag_msg, netlink_diag_msg, and unix_diag_msg
netlink attributes of NETLINK_SOCK_DIAG.
* Updated lists of ARPHRD_*, KEYCTL_*, NDIAG_SHOW_*, RTM_*, SCM_*, SCTP_*,
SO_*, V4L2_*, and prctl ARCH_* constants.
* Updated lists of ioctl commands from Linux 4.12.

* Bug fixes
* In interactive mode (-I2), those signals that were blocked at startup
will remain blocked for the whole period of strace execution.
* strace no longer resets SIGCHLD handler in tracees to the default action.
* When traced command is terminated by a blocked signal, strace unblocks
that signal to ensure its own termination with the same signal.
* Fixed corner cases in decoding of old sigaction syscall.
* Fixed build with old kernel headers on mips.
* Fixed build on aarch64 and tile with glibc >= 2.26.
* Fixed build on arc and nios2.

Bug: N/A
Test: strace date
Change-Id: Ib34873ff60824b04f67332380c3460721f66002e
/external/strace/tests/sigaction.c
38a34c9349267c99ce1ddbd0b6e985147415d355 17-Dec-2015 Dmitry V. Levin <ldv@altlinux.org> Add copyright headers to some files which lack them

Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't. This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained. In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
/external/strace/tests/sigaction.c
38593e942ad4b16b2c3c43ea521167368771cbfb 26-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Rewrite signal mask decoding without sigset_t

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.
/external/strace/tests/sigaction.c
66a15a5bb832032591e57a4fc2c6ec70bce0732a 07-Jan-2014 Dmitry V. Levin <ldv@altlinux.org> tests: add a test for rt_sigaction output

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.
/external/strace/tests/sigaction.c