[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 6/6] tracetool: Forbid newline character in event format
From: |
Stefan Hajnoczi |
Subject: |
[PULL 6/6] tracetool: Forbid newline character in event format |
Date: |
Mon, 10 Jun 2024 13:13:15 -0400 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Events aren't designed to be multi-lines. Multiple events
can be used instead. Prevent that format using multi-lines
by forbidding the newline character.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Mads Ynddal <mads@ynddal.dk>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20240606103943.79116-6-philmd@linaro.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
scripts/tracetool/__init__.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 7237abe0e8..bc03238c0f 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -301,6 +301,8 @@ def build(line_str, lineno, filename):
if fmt.endswith(r'\n"'):
raise ValueError("Event format must not end with a newline "
"character")
+ if '\\n' in fmt:
+ raise ValueError("Event format must not use new line character")
if len(fmt_trans) > 0:
fmt = [fmt_trans, fmt]
--
2.45.1
- [PULL 0/6] Tracing patches, Stefan Hajnoczi, 2024/06/10
- [PULL 1/6] tracetool: Remove unused vcpu.py script, Stefan Hajnoczi, 2024/06/10
- [PULL 2/6] backends/tpm: Remove newline character in trace event, Stefan Hajnoczi, 2024/06/10
- [PULL 3/6] hw/sh4: Remove newline character in trace events, Stefan Hajnoczi, 2024/06/10
- [PULL 4/6] hw/usb: Remove newline character in trace events, Stefan Hajnoczi, 2024/06/10
- [PULL 5/6] hw/vfio: Remove newline character in trace events, Stefan Hajnoczi, 2024/06/10
- [PULL 6/6] tracetool: Forbid newline character in event format,
Stefan Hajnoczi <=
- Re: [PULL 0/6] Tracing patches, Richard Henderson, 2024/06/12