Skip to contentSkip to conversation

Tracing patches

GIT PULL Stefan Hajnoczi 4 participants 6 messages Jun 11, 2025 – Jun 12, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

The following changes since commit bc98ffdc7577e55ab8373c579c28fe24d600c40f:

Merge tag 'pull-10.1-maintainer-may-2025-070625-1' of https://gitlab.com/stsquad/qemu into staging (2025-06-07 15:08:55 -0400)

are available in the Git repository at:

https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to 9b8a5fd79df09efa7bfd728ba9e0c95297e42afa:

meson: fix Windows build (2025-06-11 14:18:01 -0400)

----------------------------------------------------------------
Pull request

----------------------------------------------------------------

oltolm (1):
meson: fix Windows build

 contrib/plugins/meson.build         |  2 +-
 plugins/meson.build                 |  2 +-
 scripts/tracetool/__init__.py       | 15 ++++++++++++---
 scripts/tracetool/backend/ftrace.py |  4 +---
 scripts/tracetool/backend/log.py    |  4 +---
 scripts/tracetool/backend/syslog.py |  4 +---
 tests/functional/meson.build        |  4 +---
 tests/include/meson.build           |  2 +-
 tests/tcg/plugins/meson.build       |  2 +-
 trace/meson.build                   |  5 +++--
 10 files changed, 23 insertions(+), 21 deletions(-)
Signature · 1 line
2.49.0
#1 lore raw

[PULL 1/1] meson: fix Windows build

From: oltolm <[email protected]>

Sorry, I forgot to cc the maintainers.

The build failed when run on Windows. I replaced calls to Unix programs like ´cat´, ´sed´ and ´true´ with calls to ´python´. I wrapped calls to ´os.path.relpath´ in try-except because it can fail when the two paths are on different drives. I made sure to convert the Windows paths to Unix paths to prevent warnings in generated files.

Message-id: [email protected]

---
 contrib/plugins/meson.build         |  2 +-
 plugins/meson.build                 |  2 +-
 scripts/tracetool/__init__.py       | 15 ++++++++++++---
 scripts/tracetool/backend/ftrace.py |  4 +---
 scripts/tracetool/backend/log.py    |  4 +---
 scripts/tracetool/backend/syslog.py |  4 +---
 tests/functional/meson.build        |  4 +---
 tests/include/meson.build           |  2 +-
 tests/tcg/plugins/meson.build       |  2 +-
 trace/meson.build                   |  5 +++--
 10 files changed, 23 insertions(+), 21 deletions(-)
contrib/plugins/meson.build +1 -1
index fa8a426c8b..1876bc7843 100644
@@ -24,7 +24,7 @@ endif
 if t.length() > 0
   alias_target('contrib-plugins', t)
 else
-  run_target('contrib-plugins', command: find_program('true'))
+  run_target('contrib-plugins', command: [python, '-c', ''])
 endif
 
 plugin_modules += t
plugins/meson.build +1 -1
index b20edfbabc..62c991d87f 100644
@@ -33,7 +33,7 @@ if host_os == 'windows'
     input: qemu_plugin_symbols,
     output: 'qemu_plugin_api.def',
     capture: true,
-    command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
+    command: [python, '-c', 'import fileinput, re; print("EXPORTS", end=""); [print(re.sub(r"[{};]", "", line), end="") for line in fileinput.input()]', '@INPUT@'])
 
   # then use dlltool to assemble a delaylib.
   # The delaylib will have an "imaginary" name (qemu.exe), that is used by the
scripts/tracetool/__init__.py +12 -3
index bc03238c0f..6dfcbf71e1 100644
@@ -12,12 +12,14 @@
 __email__      = "[email protected]"
 
 
+import os
 import re
 import sys
 import weakref
+from pathlib import PurePath
 
-import tracetool.format
 import tracetool.backend
+import tracetool.format
 
 
 def error_write(*lines):
@@ -36,7 +38,7 @@ def error(*lines):
 
 def out_open(filename):
     global out_filename, out_fobj
-    out_filename = filename
+    out_filename = posix_relpath(filename)
     out_fobj = open(filename, 'wt')
 
 def out(*lines, **kwargs):
@@ -308,7 +310,7 @@ def build(line_str, lineno, filename):
             fmt = [fmt_trans, fmt]
         args = Arguments.build(groups["args"])
 
-        return Event(name, props, fmt, args, lineno, filename)
+        return Event(name, props, fmt, args, lineno, posix_relpath(filename))
 
     def __repr__(self):
         """Evaluable string representation for this object."""
@@ -447,3 +449,10 @@ def generate(events, group, format, backends,
     tracetool.backend.dtrace.PROBEPREFIX = probe_prefix
 
     tracetool.format.generate(events, format, backend, group)
+
+def posix_relpath(path, start=None):
+    try:
+        path = os.path.relpath(path, start)
+    except ValueError:
+        pass
+    return PurePath(path).as_posix()
scripts/tracetool/backend/ftrace.py +1 -3
index baed2ae61c..5fa30ccc08 100644
@@ -12,8 +12,6 @@
 __email__      = "[email protected]"
 
 
-import os.path
-
 from tracetool import out
 
 
@@ -47,7 +45,7 @@ def generate_h(event, group):
         args=event.args,
         event_id="TRACE_" + event.name.upper(),
         event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
         fmt=event.fmt.rstrip("\n"),
         argnames=argnames)
 
scripts/tracetool/backend/log.py +1 -3
index de27b7e62e..17ba1cd90e 100644
@@ -12,8 +12,6 @@
 __email__      = "[email protected]"
 
 
-import os.path
-
 from tracetool import out
 
 
@@ -55,7 +53,7 @@ def generate_h(event, group):
         '    }',
         cond=cond,
         event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
         name=event.name,
         fmt=event.fmt.rstrip("\n"),
         argnames=argnames)
scripts/tracetool/backend/syslog.py +1 -3
index 012970f6cc..5a3a00fe31 100644
@@ -12,8 +12,6 @@
 __email__      = "[email protected]"
 
 
-import os.path
-
 from tracetool import out
 
 
@@ -43,7 +41,7 @@ def generate_h(event, group):
         '    }',
         cond=cond,
         event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
         name=event.name,
         fmt=event.fmt.rstrip("\n"),
         argnames=argnames)
tests/functional/meson.build +1 -3
index 557d59ddf4..4bce961c04 100644
@@ -412,6 +412,4 @@ foreach speed : ['quick', 'thorough']
   endforeach
 endforeach
 
-run_target('precache-functional',
-           depends: precache_all,
-           command: ['true'])
+alias_target('precache-functional', precache_all)
tests/include/meson.build +1 -1
index 9abba308fa..8e8d1ec4e6 100644
@@ -13,4 +13,4 @@ test_qapi_outputs_extra = [
 test_qapi_files_extra = custom_target('QAPI test (include)',
                                       output: test_qapi_outputs_extra,
                                       input: test_qapi_files,
-                                      command: 'true')
+                                      command: [python, '-c', ''])
tests/tcg/plugins/meson.build +1 -1
index 41f02f2c7f..029342282a 100644
@@ -17,7 +17,7 @@ endif
 if t.length() > 0
   alias_target('test-plugins', t)
 else
-  run_target('test-plugins', command: find_program('true'))
+  run_target('test-plugins', command: [python, '-c', ''])
 endif
 
 plugin_modules += t
trace/meson.build +3 -2
index 3df4549355..9c42a57a05 100644
@@ -4,7 +4,7 @@ trace_events_files = []
 foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
   if item in qapi_trace_events
     trace_events_file = item
-    group_name = item.full_path().split('/')[-1].underscorify()
+    group_name = fs.name(item).underscorify()
   else
     trace_events_file = meson.project_source_root() / item / 'trace-events'
     group_name = item == '.' ? 'root' : item.underscorify()
@@ -57,10 +57,11 @@ foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
   endif
 endforeach
 
+cat = [ python, '-c', 'import fileinput; [print(line, end="") for line in fileinput.input()]', '@INPUT@' ]
 trace_events_all = custom_target('trace-events-all',
                                  output: 'trace-events-all',
                                  input: trace_events_files,
-                                 command: [ 'cat', '@INPUT@' ],
+                                 command: cat,
                                  capture: true,
                                  install: get_option('trace_backends') != [ 'nop' ],
                                  install_dir: qemu_datadir)
Signature · 1 line
2.49.0
#2 lore raw

Re: [PULL 1/1] meson: fix Windows build

Quoted 3 lines · Stefan Hajnoczi

From: oltolm <[email protected]>

Sorry, I forgot to cc the maintainers.

Do we want comments like this end up in git log? This could have been fixed before a pull. Also the other pull request about uninitialised stack variables had hw/audio/gus twice which was pointed out by a comment before the pull that one of those should be different but the pull request still had this error. Did you miss these or aren't these important enough to fix before getting in git log forever or there is just no easy way to fix up commit messages in pull requests?

Regards,
BALATON Zoltan

Quoted 231 lines

The build failed when run on Windows. I replaced calls to Unix programs like ´cat´, ´sed´ and ´true´ with calls to ´python´. I wrapped calls to ´os.path.relpath´ in try-except because it can fail when the two paths are on different drives. I made sure to convert the Windows paths to Unix paths to prevent warnings in generated files.

Message-id: [email protected]

---

contrib/plugins/meson.build         |  2 +-
plugins/meson.build                 |  2 +-
scripts/tracetool/__init__.py       | 15 ++++++++++++---
scripts/tracetool/backend/ftrace.py |  4 +---
scripts/tracetool/backend/log.py    |  4 +---
scripts/tracetool/backend/syslog.py |  4 +---
tests/functional/meson.build        |  4 +---
tests/include/meson.build           |  2 +-
tests/tcg/plugins/meson.build       |  2 +-
trace/meson.build                   |  5 +++--
10 files changed, 23 insertions(+), 21 deletions(-)
contrib/plugins/meson.build +0 -0
index fa8a426c8b..1876bc7843 100644
@@ -24,7 +24,7 @@ endif

if t.length() > 0
alias_target('contrib-plugins', t)
else

contrib/plugins/meson.build +1 -1
-  run_target('contrib-plugins', command: find_program('true'))
+  run_target('contrib-plugins', command: [python, '-c', ''])

endif

plugin_modules += t

plugins/meson.build +1 -1
index b20edfbabc..62c991d87f 100644
@@ -33,7 +33,7 @@ if host_os == 'windows'
    input: qemu_plugin_symbols,
    output: 'qemu_plugin_api.def',
    capture: true,
-    command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
+    command: [python, '-c', 'import fileinput, re; print("EXPORTS", end=""); [print(re.sub(r"[{};]", "", line), end="") for line in fileinput.input()]', '@INPUT@'])
 
  # then use dlltool to assemble a delaylib.
  # The delaylib will have an "imaginary" name (qemu.exe), that is used by the
scripts/tracetool/__init__.py +0 -0
index bc03238c0f..6dfcbf71e1 100644
@@ -12,12 +12,14 @@

__email__ = "[email protected]"

+import os
import re
import sys
import weakref

scripts/tracetool/__init__.py +1 -1
+from pathlib import PurePath
 
-import tracetool.format

import tracetool.backend
+import tracetool.format

def error_write(*lines):

scripts/tracetool/__init__.py +0 -0
@@ -36,7 +38,7 @@ def error(*lines):
 

def out_open(filename):
global out_filename, out_fobj

scripts/tracetool/__init__.py +1 -1
-    out_filename = filename
+    out_filename = posix_relpath(filename)
    out_fobj = open(filename, 'wt')

def out(*lines, **kwargs):

scripts/tracetool/__init__.py +8 -1
@@ -308,7 +310,7 @@ def build(line_str, lineno, filename):
            fmt = [fmt_trans, fmt]
        args = Arguments.build(groups["args"])
 
-        return Event(name, props, fmt, args, lineno, filename)
+        return Event(name, props, fmt, args, lineno, posix_relpath(filename))
 
    def __repr__(self):
        """Evaluable string representation for this object."""
@@ -447,3 +449,10 @@ def generate(events, group, format, backends,
    tracetool.backend.dtrace.PROBEPREFIX = probe_prefix
 
    tracetool.format.generate(events, format, backend, group)
+
+def posix_relpath(path, start=None):
+    try:
+        path = os.path.relpath(path, start)
+    except ValueError:
+        pass
+    return PurePath(path).as_posix()
scripts/tracetool/backend/ftrace.py +0 -0
index baed2ae61c..5fa30ccc08 100644
@@ -12,8 +12,6 @@

__email__ = "[email protected]"

scripts/tracetool/backend/ftrace.py +0 -2
-import os.path
-

from tracetool import out

scripts/tracetool/backend/ftrace.py +1 -1
@@ -47,7 +45,7 @@ def generate_h(event, group):
        args=event.args,
        event_id="TRACE_" + event.name.upper(),
        event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
        fmt=event.fmt.rstrip("\n"),
        argnames=argnames)
 
scripts/tracetool/backend/log.py +0 -0
index de27b7e62e..17ba1cd90e 100644
@@ -12,8 +12,6 @@

__email__ = "[email protected]"

scripts/tracetool/backend/log.py +0 -2
-import os.path
-

from tracetool import out

scripts/tracetool/backend/log.py +1 -1
@@ -55,7 +53,7 @@ def generate_h(event, group):
        '    }',
        cond=cond,
        event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
        name=event.name,
        fmt=event.fmt.rstrip("\n"),
        argnames=argnames)
scripts/tracetool/backend/syslog.py +0 -0
index 012970f6cc..5a3a00fe31 100644
@@ -12,8 +12,6 @@

__email__ = "[email protected]"

scripts/tracetool/backend/syslog.py +0 -2
-import os.path
-

from tracetool import out

scripts/tracetool/backend/syslog.py +1 -1
@@ -43,7 +41,7 @@ def generate_h(event, group):
        '    }',
        cond=cond,
        event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
        name=event.name,
        fmt=event.fmt.rstrip("\n"),
        argnames=argnames)
tests/functional/meson.build +0 -0
index 557d59ddf4..4bce961c04 100644
@@ -412,6 +412,4 @@ foreach speed : ['quick', 'thorough']
  endforeach

endforeach

tests/functional/meson.build +1 -3
-run_target('precache-functional',
-           depends: precache_all,
-           command: ['true'])
+alias_target('precache-functional', precache_all)
tests/include/meson.build +1 -1
index 9abba308fa..8e8d1ec4e6 100644
@@ -13,4 +13,4 @@ test_qapi_outputs_extra = [
 test_qapi_files_extra = custom_target('QAPI test (include)',
                                      output: test_qapi_outputs_extra,
                                      input: test_qapi_files,
-                                      command: 'true')
+                                      command: [python, '-c', ''])
tests/tcg/plugins/meson.build +0 -0
index 41f02f2c7f..029342282a 100644
@@ -17,7 +17,7 @@ endif

if t.length() > 0
alias_target('test-plugins', t)
else

tests/tcg/plugins/meson.build +1 -1
-  run_target('test-plugins', command: find_program('true'))
+  run_target('test-plugins', command: [python, '-c', ''])

endif

plugin_modules += t

trace/meson.build +0 -0
index 3df4549355..9c42a57a05 100644
@@ -4,7 +4,7 @@ trace_events_files = []

foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
if item in qapi_trace_events
trace_events_file = item

trace/meson.build +1 -1
-    group_name = item.full_path().split('/')[-1].underscorify()
+    group_name = fs.name(item).underscorify()
  else
    trace_events_file = meson.project_source_root() / item / 'trace-events'
    group_name = item == '.' ? 'root' : item.underscorify()
@@ -57,10 +57,11 @@ foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
  endif

endforeach

+cat = [ python, '-c', 'import fileinput; [print(line, end="") for line in fileinput.input()]', '@INPUT@' ] trace_events_all = custom_target('trace-events-all',
output: 'trace-events-all',
input: trace_events_files,

trace/meson.build +1 -1
-                                 command: [ 'cat', '@INPUT@' ],
+                                 command: cat,
                                 capture: true,
                                 install: get_option('trace_backends') != [ 'nop' ],
                                 install_dir: qemu_datadir)
Signature · 1 line
2.49.0
#3 lore raw

Re: [PULL 1/1] meson: fix Windows build

Quoted 6 lines · BALATON Zoltan
Quoted 3 lines · Stefan Hajnoczi

From: oltolm <[email protected]>

Sorry, I forgot to cc the maintainers.

Quoted 7 lines

Do we want comments like this end up in git log? This could have been fixed before a pull. Also the other pull request about uninitialised stack variables had hw/audio/gus twice which was pointed out by a comment before the pull that one of those should be different but the pull request still had this error. Did you miss these or aren't these important enough to fix before getting in git log forever or there is just no easy way to fix up commit messages in pull requests?

If another reviewer asks for the author to resend then I'll hold off on merging, but I didn't see the comment about hw/audio/gus. Sorry!

I did see this "Sorry, I forgot to cc the maintainers" comment. Although I'm not consistent, nowadays I generally do not fix these issues when merging, provided it's a small issue that can be ignored or understood from the context.

I don't really mind either way, so if there is a consensus that all maintainers should be strict about this, I'm happy to join.

One related point I do have a strong opinion on is that the qemu.git/master maintainer shouldn't be expected to do fixups on a pull request they receive. Fixups should be done by subsystem maintainers (and the pull request must be resent) or the original patch authors. It doesn't scale when the qemu.git/master maintainer has to make changes to code that they are unfamiliar with. That's not the case here, but I just wanted to mention it because from time to time someone requests this.

Quoted 235 lines

Regards,
BALATON Zoltan

Quoted 231 lines

The build failed when run on Windows. I replaced calls to Unix programs like ´cat´, ´sed´ and ´true´ with calls to ´python´. I wrapped calls to ´os.path.relpath´ in try-except because it can fail when the two paths are on different drives. I made sure to convert the Windows paths to Unix paths to prevent warnings in generated files.

Message-id: [email protected]

---

contrib/plugins/meson.build         |  2 +-
plugins/meson.build                 |  2 +-
scripts/tracetool/__init__.py       | 15 ++++++++++++---
scripts/tracetool/backend/ftrace.py |  4 +---
scripts/tracetool/backend/log.py    |  4 +---
scripts/tracetool/backend/syslog.py |  4 +---
tests/functional/meson.build        |  4 +---
tests/include/meson.build           |  2 +-
tests/tcg/plugins/meson.build       |  2 +-
trace/meson.build                   |  5 +++--
10 files changed, 23 insertions(+), 21 deletions(-)
contrib/plugins/meson.build +0 -0
index fa8a426c8b..1876bc7843 100644
@@ -24,7 +24,7 @@ endif

if t.length() > 0
alias_target('contrib-plugins', t)
else

contrib/plugins/meson.build +1 -1
-  run_target('contrib-plugins', command: find_program('true'))
+  run_target('contrib-plugins', command: [python, '-c', ''])

endif

plugin_modules += t

plugins/meson.build +1 -1
index b20edfbabc..62c991d87f 100644
@@ -33,7 +33,7 @@ if host_os == 'windows'
    input: qemu_plugin_symbols,
    output: 'qemu_plugin_api.def',
    capture: true,
-    command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
+    command: [python, '-c', 'import fileinput, re; print("EXPORTS", end=""); [print(re.sub(r"[{};]", "", line), end="") for line in fileinput.input()]', '@INPUT@'])
 
  # then use dlltool to assemble a delaylib.
  # The delaylib will have an "imaginary" name (qemu.exe), that is used by the
scripts/tracetool/__init__.py +0 -0
index bc03238c0f..6dfcbf71e1 100644
@@ -12,12 +12,14 @@

__email__ = "[email protected]"

+import os
import re
import sys
import weakref

scripts/tracetool/__init__.py +1 -1
+from pathlib import PurePath
 
-import tracetool.format

import tracetool.backend
+import tracetool.format

def error_write(*lines):

scripts/tracetool/__init__.py +0 -0
@@ -36,7 +38,7 @@ def error(*lines):
 

def out_open(filename):
global out_filename, out_fobj

scripts/tracetool/__init__.py +1 -1
-    out_filename = filename
+    out_filename = posix_relpath(filename)
    out_fobj = open(filename, 'wt')

def out(*lines, **kwargs):

scripts/tracetool/__init__.py +8 -1
@@ -308,7 +310,7 @@ def build(line_str, lineno, filename):
            fmt = [fmt_trans, fmt]
        args = Arguments.build(groups["args"])
 
-        return Event(name, props, fmt, args, lineno, filename)
+        return Event(name, props, fmt, args, lineno, posix_relpath(filename))
 
    def __repr__(self):
        """Evaluable string representation for this object."""
@@ -447,3 +449,10 @@ def generate(events, group, format, backends,
    tracetool.backend.dtrace.PROBEPREFIX = probe_prefix
 
    tracetool.format.generate(events, format, backend, group)
+
+def posix_relpath(path, start=None):
+    try:
+        path = os.path.relpath(path, start)
+    except ValueError:
+        pass
+    return PurePath(path).as_posix()
scripts/tracetool/backend/ftrace.py +0 -0
index baed2ae61c..5fa30ccc08 100644
@@ -12,8 +12,6 @@

__email__ = "[email protected]"

scripts/tracetool/backend/ftrace.py +0 -2
-import os.path
-

from tracetool import out

scripts/tracetool/backend/ftrace.py +1 -1
@@ -47,7 +45,7 @@ def generate_h(event, group):
        args=event.args,
        event_id="TRACE_" + event.name.upper(),
        event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
        fmt=event.fmt.rstrip("\n"),
        argnames=argnames)
 
scripts/tracetool/backend/log.py +0 -0
index de27b7e62e..17ba1cd90e 100644
@@ -12,8 +12,6 @@

__email__ = "[email protected]"

scripts/tracetool/backend/log.py +0 -2
-import os.path
-

from tracetool import out

scripts/tracetool/backend/log.py +1 -1
@@ -55,7 +53,7 @@ def generate_h(event, group):
        '    }',
        cond=cond,
        event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
        name=event.name,
        fmt=event.fmt.rstrip("\n"),
        argnames=argnames)
scripts/tracetool/backend/syslog.py +0 -0
index 012970f6cc..5a3a00fe31 100644
@@ -12,8 +12,6 @@

__email__ = "[email protected]"

scripts/tracetool/backend/syslog.py +0 -2
-import os.path
-

from tracetool import out

scripts/tracetool/backend/syslog.py +1 -1
@@ -43,7 +41,7 @@ def generate_h(event, group):
        '    }',
        cond=cond,
        event_lineno=event.lineno,
-        event_filename=os.path.relpath(event.filename),
+        event_filename=event.filename,
        name=event.name,
        fmt=event.fmt.rstrip("\n"),
        argnames=argnames)
tests/functional/meson.build +0 -0
index 557d59ddf4..4bce961c04 100644
@@ -412,6 +412,4 @@ foreach speed : ['quick', 'thorough']
  endforeach

endforeach

tests/functional/meson.build +1 -3
-run_target('precache-functional',
-           depends: precache_all,
-           command: ['true'])
+alias_target('precache-functional', precache_all)
tests/include/meson.build +1 -1
index 9abba308fa..8e8d1ec4e6 100644
@@ -13,4 +13,4 @@ test_qapi_outputs_extra = [
 test_qapi_files_extra = custom_target('QAPI test (include)',
                                      output: test_qapi_outputs_extra,
                                      input: test_qapi_files,
-                                      command: 'true')
+                                      command: [python, '-c', ''])
tests/tcg/plugins/meson.build +0 -0
index 41f02f2c7f..029342282a 100644
@@ -17,7 +17,7 @@ endif

if t.length() > 0
alias_target('test-plugins', t)
else

tests/tcg/plugins/meson.build +1 -1
-  run_target('test-plugins', command: find_program('true'))
+  run_target('test-plugins', command: [python, '-c', ''])

endif

plugin_modules += t

trace/meson.build +0 -0
index 3df4549355..9c42a57a05 100644
@@ -4,7 +4,7 @@ trace_events_files = []

foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
if item in qapi_trace_events
trace_events_file = item

trace/meson.build +1 -1
-    group_name = item.full_path().split('/')[-1].underscorify()
+    group_name = fs.name(item).underscorify()
  else
    trace_events_file = meson.project_source_root() / item / 'trace-events'
    group_name = item == '.' ? 'root' : item.underscorify()
@@ -57,10 +57,11 @@ foreach item : [ '.' ] + trace_events_subdirs + qapi_trace_events
  endif

endforeach

+cat = [ python, '-c', 'import fileinput; [print(line, end="") for line in fileinput.input()]', '@INPUT@' ] trace_events_all = custom_target('trace-events-all',
output: 'trace-events-all',
input: trace_events_files,

trace/meson.build +1 -2
-                                 command: [ 'cat', '@INPUT@' ],
+                                 command: cat,
                                 capture: true,
                                 install: get_option('trace_backends') != [ 'nop' ],
                                 install_dir: qemu_datadir)
--

2.49.0

#4 lore raw

Re: [PULL 1/1] meson: fix Windows build

Quoted 18 lines · Stefan Hajnoczi
Quoted 6 lines · BALATON Zoltan
Quoted 3 lines · Stefan Hajnoczi

From: oltolm <[email protected]>

Sorry, I forgot to cc the maintainers.

Quoted 7 lines

Do we want comments like this end up in git log? This could have been fixed before a pull. Also the other pull request about uninitialised stack variables had hw/audio/gus twice which was pointed out by a comment before the pull that one of those should be different but the pull request still had this error. Did you miss these or aren't these important enough to fix before getting in git log forever or there is just no easy way to fix up commit messages in pull requests?

If another reviewer asks for the author to resend then I'll hold off on merging, but I didn't see the comment about hw/audio/gus. Sorry!

Quoted 7 lines

I did see this "Sorry, I forgot to cc the maintainers" comment. Although I'm not consistent, nowadays I generally do not fix these issues when merging, provided it's a small issue that can be ignored or understood from the context.

I don't really mind either way, so if there is a consensus that all maintainers should be strict about this, I'm happy to join.

I wouldn't ask maintainers to fixup commits regularly, especially changing the patch itself would need resend from the author but for small typos in commit message only it might be OK to fix them up on commit if noticed before a pull. Just because if these aren't fixed they will be in git log forever.

Regards,
BALATON Zoltan

#5 lore raw

Re: [PULL 1/1] meson: fix Windows build

In reply to Stefan Hajnoczi
Quoted 19 lines · Stefan Hajnoczi
Quoted 6 lines · BALATON Zoltan
Quoted 3 lines · Stefan Hajnoczi

From: oltolm <[email protected]>

Sorry, I forgot to cc the maintainers.

Quoted 7 lines

Do we want comments like this end up in git log? This could have been fixed before a pull. Also the other pull request about uninitialised stack variables had hw/audio/gus twice which was pointed out by a comment before the pull that one of those should be different but the pull request still had this error. Did you miss these or aren't these important enough to fix before getting in git log forever or there is just no easy way to fix up commit messages in pull requests?

If another reviewer asks for the author to resend then I'll hold off on merging, but I didn't see the comment about hw/audio/gus. Sorry!

Quoted 7 lines

I did see this "Sorry, I forgot to cc the maintainers" comment. Although I'm not consistent, nowadays I generally do not fix these issues when merging, provided it's a small issue that can be ignored or understood from the context.

I don't really mind either way, so if there is a consensus that all maintainers should be strict about this, I'm happy to join.

Personally when I'm accumulating patches as a maintainer I do fix up this kind of commit message. It's generally from a first time contributor, so the commit needs closer attention anyway, and I favour just fixing "this isn't quite the way we usually do things" problems at my end, rather than asking the submitter to resend. I also fix nits from longer term contributors where it's faster to do that than to ask for a respin.

In this specific case I'd probably re-cast the commit message entirely, because the first-person past-tense phrasing is not our standard commit log style. I would also want to add something clarifying exactly what we're fixing (clearly "the Windows build" generally was not broken, or we'd have seen it in CI, so this is fixing a more niche build environment setup, and it's worth having the commit message be clear about what that setup is).

Quoted 8 lines

One related point I do have a strong opinion on is that the qemu.git/master maintainer shouldn't be expected to do fixups on a pull request they receive. Fixups should be done by subsystem maintainers (and the pull request must be resent) or the original patch authors. It doesn't scale when the qemu.git/master maintainer has to make changes to code that they are unfamiliar with. That's not the case here, but I just wanted to mention it because from time to time someone requests this.

Fixing up a pullreq is also basically not possible -- the pullreq is signed and you can't change the commits in it. I don't recommend throwing random fixes (as opposed to genuine simple merge conflict fixes) into the merge commit.

thanks
-- PMM