]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/qtest/dbus-vmstate: Stop the daemons explicitly
authorFabiano Rosas <farosas@suse.de>
Wed, 29 Apr 2026 19:05:49 +0000 (16:05 -0300)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 9 May 2026 06:20:36 +0000 (10:20 +0400)
The dbus-vmstate test is currently non-deterministically emitting a
"cleaning up pid" message, followed by the PID of one of the
dbus-daemon processes used during the test. This is due to a race
between the GTestDBus g_autoptr destructor and a child process that
does cleanup when the program ends.

Add calls to g_test_dbus_down() to make the issuance of the SIGTERM to
the dbus-daemon deterministic.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260429190550.20122-5-farosas@suse.de>

tests/qtest/dbus-vmstate-test.c

index 05e598a3e3c463bd12892db4b07efe84a7017043..15c35e7c0fab68b3327db13775ac1265ca2481c5 100644 (file)
@@ -260,11 +260,12 @@ test_dbus_vmstate(Test *test)
     qtest_quit(src_qemu);
     g_bus_unown_name(ownsrcA);
     g_bus_unown_name(ownsrcB);
+    g_test_dbus_down(srcbus);
     g_bus_unown_name(owndstA);
     if (!test->without_dst_b) {
         g_bus_unown_name(owndstB);
     }
-
+    g_test_dbus_down(dstbus);
     g_main_loop_quit(test->loop);
 }