qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracetool-test: allow to run in parallel
@ 2025-09-08 11:46 marcandre.lureau
  2025-09-08 13:49 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: marcandre.lureau @ 2025-09-08 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: berrange, stefanha, pbonzini, Marc-André Lureau, Mads Ynddal

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Create a temporary build subdirectory, to avoid conflicting with other
running tests. This fixes "meson test" with tracetool-test which is
parallel default.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/tracetool/tracetool-test.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/tracetool/tracetool-test.py b/tests/tracetool/tracetool-test.py
index d317e04789..786083ad7f 100755
--- a/tests/tracetool/tracetool-test.py
+++ b/tests/tracetool/tracetool-test.py
@@ -6,6 +6,7 @@
 from shutil import copyfile
 from subprocess import check_call
 import sys
+import tempfile
 
 
 def get_formats(backend):
@@ -101,7 +102,8 @@ def test_tracetool(tracetool, backend, source_dir, build_dir):
         print("syntax: {argv0} TRACE-TOOL BACKEND SRC-DIR BUILD-DIR", file=sys.stderr)
         sys.exit(1)
 
-    fail = test_tracetool(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])
-    if fail:
-        sys.exit(1)
+    with tempfile.TemporaryDirectory(prefix=sys.argv[4]) as tmpdir:
+        fail = test_tracetool(sys.argv[1], sys.argv[2], sys.argv[3], tmpdir)
+        if fail:
+            sys.exit(1)
     sys.exit(0)
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tracetool-test: allow to run in parallel
  2025-09-08 11:46 [PATCH] tracetool-test: allow to run in parallel marcandre.lureau
@ 2025-09-08 13:49 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2025-09-08 13:49 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel, berrange, pbonzini, Mads Ynddal

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

On Mon, Sep 08, 2025 at 03:46:51PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Create a temporary build subdirectory, to avoid conflicting with other
> running tests. This fixes "meson test" with tracetool-test which is
> parallel default.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tests/tracetool/tracetool-test.py | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Thanks, applied to my tracing tree:
https://gitlab.com/stefanha/qemu/commits/tracing

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-08 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 11:46 [PATCH] tracetool-test: allow to run in parallel marcandre.lureau
2025-09-08 13:49 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).