[PATCH v4 1/2] tests: add signal2name function to libtests

2016-06-14 Thread Fei Jie
* tests/tests.h (signal2name): New prototype. * tests/signal2name.c: New file. * tests/Makefile.am (libtests_a_SOURCES): Add it. --- tests/Makefile.am | 1 + tests/signal2name.c | 55 + tests/tests.h | 3 +++ 3 files changed, 59 inserti

[PATCH v4 2/2] tests: add signal_receive.test

2016-06-14 Thread Fei Jie
* tests/signal_receive.c: New file. * tests/signal_receive.test: New test. * tests/.gitignore: Add signal_receive. * tests/Makefile.am (check_PROGRAMS): Likewise. (MISC_TESTS): Add signal_receive.test. --- tests/.gitignore | 1 + tests/Makefile.am | 2 ++ tests/signal_receive.c

Re: [PATCH 1/2] tests: add signal2name function to libtests

2016-06-14 Thread Dmitry V. Levin
On Tue, May 31, 2016 at 02:13:57PM +0800, Fei Jie wrote: > * tests/tests.h (signal2name): New prototype. > * tests/signal2name.c: New file. > * tests/Makefile.am (libtests_a_SOURCES): Add it. > --- > tests/Makefile.am | 1 + > tests/signal2name.c | 125 > ++

Re: Only absolute file paths in strace possible?

2016-06-14 Thread Dmitry V. Levin
Hi, On Tue, Jun 14, 2016 at 07:02:20AM +0200, Jens Offenbach wrote: > Hallo, > I must analyze a library (*.tar.gz) that includes a lot of files and most of > them are not required for a specific run. > > I used strace 4.8.1 on Ubuntu Server 16.04 with: > strace -e trace=file -f -v -o /tmp/result

Re: [PATCH v2 3/7] tests: check decoding of netlink protocol

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:23PM +, Fabien Siron wrote: [...] > +static void > +send_query(const int fd) > +{ > + struct { > + struct nlmsghdr nlh; > + char magic[4]; > + } req = { > + .nlh = { > + .nlmsg_len = sizeof(req), > +

Re: [PATCH v2 2/7] Add a general netlink socket parser

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > This commit introduces a general socket netlink parser which prints > the header and a string for the remaining part of the buffer. It doesn't > handle all the netlink flags and types because the parser needs more > information. It wil

Re: [PATCH v2 1/7] Make getfdproto returns integer instead of string

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:21PM +, Fabien Siron wrote: > This commit aims to avoid future string comparisons with getfdproto function > in changing its return type. It also adapts the functions that use it. > > * defs.h (print_sockaddr_by_inode): Add. > * socketutils.h (socket_protocols): N