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

Paul Chaignon paul.chaignon at gmail.com
Thu Jul 4 12:13:57 UTC 2019


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?

> 
> 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.

Paul


More information about the Strace-devel mailing list