From 82ad0510d223cf64e636a77ace972414abf6387b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 5 Apr 2022 14:43:16 +0100 Subject: [PATCH] =?UTF-8?q?tests:=20Don=E2=80=99t=20exit=20gdbus-method-in?= =?UTF-8?q?vocation=20test=20early=20on=20connection=20close?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s (deliberately) a bit of race in implementing/handling `CloseBeforeReturning()` in `gdbus-method-invocation.c`. If the server closes the D-Bus connection early, the client may exit with `SIGTERM` if `GDBusConnection:exit-on-close` is set. We don’t want that, as the test is trying to check that the default handling of a D-Bus method return after a connection has closed works. See https://gnome.pages.gitlab.gnome.org/-/glib/-/jobs/1935191/artifacts/_build/meson-logs/testlog.txt Signed-off-by: Philip Withnall --- gio/tests/gdbus-method-invocation.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gio/tests/gdbus-method-invocation.c b/gio/tests/gdbus-method-invocation.c index 985fd45ce..45fb67757 100644 --- a/gio/tests/gdbus-method-invocation.c +++ b/gio/tests/gdbus-method-invocation.c @@ -300,6 +300,10 @@ test_method_invocation_return (void) g_assert_no_error (local_error); g_assert_nonnull (connection); + /* Don’t exit the test when the server closes the connection in + * CloseBeforeReturning(). */ + g_dbus_connection_set_exit_on_close (connection, FALSE); + /* Register an object which we can call methods on. */ registration_id = g_dbus_connection_register_object (connection, "/foo",