diff mbox series

[PULL,v2,05/25] trace: block use of "long int" for dtrace

Message ID 20261104201802.11556-6-stefanha@redhat.com
State New
Headers show
Series [PULL,v2,01/25] osdep: add 'ignore_value(x)' macro | expand

Commit Message

Stefan Hajnoczi Nov. 4, 2026, 8:17 p.m. UTC
From: Daniel P. Berrangé <berrange@redhat.com>

dtrace (or at least systemtap's fake "dtrace" binary) complains about a
syntax error due to use of "long int", as it wants a bare "long" type
Enforce this when parsing the trace-events files.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20261102142844.3464712-6-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/tracetool/__init__.py | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 61ba6f1ba8c..6ed7cdd6ce4 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -177,6 +177,11 @@  def out(*lines, **kwargs):
 
 def validate_type(name):
     bits = name.split(" ")
+
+    if "long" in bits and "int" in bits:
+        raise ValueError("Invalid use of 'int' typename in %s, "
+                         "use 'long' alone" % name)
+
     for bit in bits:
         bit = re.sub(r"\*", "", bit)
         if bit == "":