From 9f06ec577540c274fdc00d25ad2bdaedb91a69bc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 1 Jan 2019 16:54:12 -0500 Subject: [PATCH] Fix coverage for system helper and portal These services were not generating coverage data because they always get ended by GDBus raising SIGTERM when the bus goes away. Prevent this by telling GDBus not to do that, and let the services exit regularly, on their own terms. This makes the system helper code show up in the coverage statistics. Closes: #2530 Approved by: matthiasclasen --- portal/flatpak-portal.c | 2 ++ system-helper/flatpak-system-helper.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/portal/flatpak-portal.c b/portal/flatpak-portal.c index 3a43fae8..42dd0a7c 100644 --- a/portal/flatpak-portal.c +++ b/portal/flatpak-portal.c @@ -749,6 +749,8 @@ on_bus_acquired (GDBusConnection *connection, g_debug ("Bus acquired, creating skeleton"); + g_dbus_connection_set_exit_on_close (connection, FALSE); + portal = portal_flatpak_skeleton_new (); g_dbus_connection_signal_subscribe (connection, diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c index ebab4071..2c53e199 100644 --- a/system-helper/flatpak-system-helper.c +++ b/system-helper/flatpak-system-helper.c @@ -1505,6 +1505,8 @@ on_bus_acquired (GDBusConnection *connection, g_debug ("Bus acquired, creating skeleton"); + g_dbus_connection_set_exit_on_close (connection, FALSE); + helper = flatpak_system_helper_skeleton_new (); flatpak_system_helper_set_version (FLATPAK_SYSTEM_HELPER (helper), 2);