[Qemu-devel] [PATCH v2 0/2] trace: Forbid trailing newline in event format

Philippe Mathieu-Daudé posted 2 patches 6 years, 1 month ago
Test docker-clang@ubuntu failed
Test FreeBSD failed
Test checkpatch failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190916095121.29506-1-philmd@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Jason Wang <jasowang@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Eric Blake <eblake@redhat.com>, Fam Zheng <fam@euphon.net>
docs/devel/tracing.txt        |  2 ++
hw/misc/trace-events          | 10 +++++-----
hw/scsi/trace-events          |  2 +-
hw/sd/trace-events            |  2 +-
nbd/trace-events              |  4 ++--
net/trace-events              |  6 +++---
scripts/tracetool/__init__.py |  3 +++
7 files changed, 17 insertions(+), 12 deletions(-)
[Qemu-devel] [PATCH v2 0/2] trace: Forbid trailing newline in event format
Posted by Philippe Mathieu-Daudé 6 years, 1 month ago
Hi Stefan,

I'v been confused by trailing newline in trace reports,
so this series aims to fix this, by cleaning current
formats and add a check to catch new one introduced.

v2:
- Use regex format (easier to review)
- Added R-b

Regards,

Phil.

Philippe Mathieu-Daudé (2):
  trace: Remove trailing newline in events
  trace: Forbid event format ending with newline character

 docs/devel/tracing.txt        |  2 ++
 hw/misc/trace-events          | 10 +++++-----
 hw/scsi/trace-events          |  2 +-
 hw/sd/trace-events            |  2 +-
 nbd/trace-events              |  4 ++--
 net/trace-events              |  6 +++---
 scripts/tracetool/__init__.py |  3 +++
 7 files changed, 17 insertions(+), 12 deletions(-)

-- 
2.20.1


Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/2] trace: Forbid trailing newline in event format
Posted by Stefan Hajnoczi 6 years, 1 month ago
On Mon, Sep 16, 2019 at 11:51:19AM +0200, Philippe Mathieu-Daudé wrote:
> Hi Stefan,
> 
> I'v been confused by trailing newline in trace reports,
> so this series aims to fix this, by cleaning current
> formats and add a check to catch new one introduced.
> 
> v2:
> - Use regex format (easier to review)
> - Added R-b
> 
> Regards,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (2):
>   trace: Remove trailing newline in events
>   trace: Forbid event format ending with newline character
> 
>  docs/devel/tracing.txt        |  2 ++
>  hw/misc/trace-events          | 10 +++++-----
>  hw/scsi/trace-events          |  2 +-
>  hw/sd/trace-events            |  2 +-
>  nbd/trace-events              |  4 ++--
>  net/trace-events              |  6 +++---
>  scripts/tracetool/__init__.py |  3 +++
>  7 files changed, 17 insertions(+), 12 deletions(-)

We can continue the broader discussion about whether trace events may
contain newlines in string arguments (John's AHCI case) or in
non-trailing position in the format string.  These patches look fine
though and are ready to go.

Thanks, applied (with Eric's typo fix) to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan