@samitouri / QOSamiQemu / commits / 50c71bc767

tests/qtest/dbus-vmstate: Stop the daemons explicitly

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>

Fabiano Rosas committed Apr 29, 2026 at 16:05 UTC 50c71bc767409dc548e7c1f7298bb2a1579d15b5
1 file changed +2 -1
tests/qtest/dbus-vmstate-test.c
+2 -1
@@ -260,11 +260,12 @@ test_dbus_vmstate(Test *test)
260 qtest_quit(src_qemu);
261 g_bus_unown_name(ownsrcA);
262 g_bus_unown_name(ownsrcB);
263 + g_test_dbus_down(srcbus);
264 g_bus_unown_name(owndstA);
265 if (!test->without_dst_b) {
266 g_bus_unown_name(owndstB);
267 }
267 -
268 + g_test_dbus_down(dstbus);
269 g_main_loop_quit(test->loop);
270 }
271