[PATCH v5 2/4] Stage output for -z and -Z options

Dmitry V. Levin ldv at altlinux.org
Thu Jul 4 21:28:41 UTC 2019


On Thu, Jul 04, 2019 at 02:13:57PM +0200, Paul Chaignon wrote:
> On Thu, Jul 04, 2019 at 04:41:01AM +0300, Dmitry V. Levin wrote:
> > On Tue, Jul 02, 2019 at 02:07:15AM +0300, Dmitry V. Levin wrote:
> > > On Fri, Jun 28, 2019 at 11:34:02AM +0200, Paul Chaignon wrote:
> > > > -z and -Z options print only successful and failing syscalls respectively.
> > > > However, failure of syscall is only known after syscall return.  Thus, we
> > > > end up with something like this on, e.g., ENOENT:
> > > > 
> > > >   open("does_not_exist", O_RDONLY <unfinished ...>
> > > > 
> > > > whereas the intended result is that the open(...) line is not shown at all.
> > > > 
> > > > This patch fixes this issue using open_memstream.  When either the -z or
> > > > the -Z option is used, the output is staged in memory (using
> > > > open_memstream) until we know the syscall return status.  If the
> > > > open_memstream function is not available, these new options error out.
> > > 
> > > I have no more comments on 1/4 and 2/4.
> > 
> > Could you also add
> > Resolves: https://github.com/strace/strace/issues/49
> > Resolves: https://github.com/strace/strace/issues/50
> > to the commit message, please?
> 
> I've added "Resolves #49" and "Resolves #50" to the first and second
> commit messages, so that GitHub will link them to the issues and
> automatically close.  Is that okay or did you prefer having the full URL?

There is no difference for github, but for others full URLs usually work
better, so I suggest to use full URLs.

> > I think this change as well as -e status=set worth a NEWS entry.
> 
> I added the following items under Bug fixes and Improvements respectively:
> 
>   * Fixed -z option to print only successful syscalls.
>   * Added syscall return status filtering with -e status option and -Z
>     alias for failed syscalls.

Thanks.


-- 
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/20190705/6b9a0d95/attachment.bin>


More information about the Strace-devel mailing list