summary refs log tree commit diff stats
path: root/scripts/tracetool
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-09-19 13:27:11 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-09-19 13:27:11 +0100
commit590c0ac982a8fc726f4784bb6e3c721661e0718a (patch)
tree01d877fe78014bab13d0130ab18575e95f9d8644 /scripts/tracetool
parent7cc0cdcd6a771010ca4a4857c4e4df966bb4e6c2 (diff)
parent9f7ad79c16ede0da01902b18fb32929cfbd20f87 (diff)
downloadfocaccia-qemu-590c0ac982a8fc726f4784bb6e3c721661e0718a.tar.gz
focaccia-qemu-590c0ac982a8fc726f4784bb6e3c721661e0718a.zip
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Pull request

# gpg: Signature made Wed 18 Sep 2019 14:17:59 BST
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  trace: Forbid event format ending with newline character
  trace: Remove trailing newline in events
  loader: Trace loaded images

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/tracetool')
-rw-r--r--scripts/tracetool/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 6fca674936..04279fa62e 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -277,6 +277,9 @@ class Event(object):
         if fmt.find("%m") != -1 or fmt_trans.find("%m") != -1:
             raise ValueError("Event format '%m' is forbidden, pass the error "
                              "as an explicit trace argument")
+        if fmt.endswith(r'\n"'):
+            raise ValueError("Event format must not end with a newline "
+                             "character")
 
         if len(fmt_trans) > 0:
             fmt = [fmt_trans, fmt]