[PATCH v5 0/4] Stage output and filter on syscall return statuses

Dmitry V. Levin ldv at altlinux.org
Mon Jul 1 23:45:08 UTC 2019


On Fri, Jun 28, 2019 at 11:32:08AM +0200, Paul Chaignon wrote:
> This patchset adds a new -e status=set option to filter syscalls based on
> their return statuses.  It also introduces a new option -Z to trace failed
> syscalls, as an alias to -e status=failed.  When using the status
> qualifier, the output is staged, using open_memstream, until the syscall
> return status is known.
> 
> The first patch adds the -Z option; the second implements the output
> staging; the third introduces the -e status=set option, and the last adds
> five new test cases.
> 
> In addition to the test cases in this patchset, I performed several manual
> tests over the entire test suite.  First, I set -e status to default to
> the empty set (using 'none') and checked that none of the existing tests
> were returning syscalls.  Second, I set -e status to default to the
> complete set (explicitly, not using 'all') and checked that all tests were
> succeeding.  Finally, I added a dummy entry to the status set, set -e
> status to default to the complete set minus that entry, and checked all
> tests were succeeding again.  This last test differs from the previous
> because the output is only staged when the -e status set in incomplete.
> With this third check, the threads-execve test failed because the syscalls
> were printed out in a different order (expected and mentioned in the man
> page).
> 
> Changelogs:
>   Changes in v5:
>     - Test case for status=detached.
>     - Print warning when both -Z and -z are used.
>     - Fix -z and -Z aliases to -estatus.
>     - Fix memory leak.
>     - Fix comment formatting, indentations, and list orderings.
>     - Refactor popcount functions.
>     - Rename __MAX_STATUS to NUMBER_OF_STATUSES.
>     - Fix man page formatting.
>     - Trace exit_group in multithreads test cases.
>     - Refactor test cases based on chdir(2).
>   Changes in v4:
>     - Title change from "Stage output for -z and new -Z options".
>     - Add -e status=set option.
>     - Fix for stage output under execve switch.
>     - Remove most HAVE_OPEN_MEMSTREAM guards.
>     - Fix for filtering in raw(tcp) case.
>     - Simplify test cases for failed and successful.
>     - Add test cases for all, none, and unfinished statuses.
>   Changes in v3:
>     - Refactor/rename functions in stage_output.c (use bool drop).
>     - Move staging start/end to func syscall_entering_trace/
>       syscall_exiting trace.
>     - Add -z/-Z option to strace man page (strace.1.in).
>     - Rename test binaries to strace-z/strace-Z.
>     - Swap _NR_open to _NR_chdir for test cases.
>   Changes in v2:
>     - Fix stage_output.c added to wrong patch.
> 
> Paul Chaignon (4):
>   Option to print only failing syscalls
>   Stage output for -z and -Z options
>   Implement -e status=set option
>   tests: check status qualifier

The patchset is almost ready, I suppose the next edition will be final.
See my comments about individual patches in separate messages.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190702/f91980e2/attachment.bin>


More information about the Strace-devel mailing list