diff options
author | Richard Hansen <rhansen@rhansen.org> | 2023-04-21 00:05:54 -0400 |
---|---|---|
committer | Robert Ancell <robert.ancell@gmail.com> | 2023-04-26 09:33:47 +1200 |
commit | 332caeff4fd7f31fdf1024b2f1851ae44eb94bc4 (patch) | |
tree | e4c2f39bcd5277256d32d5cabcd565d475c00cb9 | |
parent | 03e56a4365d87e77c169b0ec3e1cd771c837d2ad (diff) | |
download | lightdm-git-332caeff4fd7f31fdf1024b2f1851ae44eb94bc4.tar.gz |
tests: Check for dbus connection error
-rw-r--r-- | tests/src/test-runner.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index bf4fd9f5..11dd9ba9 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -2770,7 +2770,9 @@ main (int argc, char **argv) if (g_key_file_has_key (config, "test-runner-config", "timeout", NULL)) status_timeout_ms = g_key_file_get_integer (config, "test-runner-config", "timeout", NULL) * 1000; - dbus_conn = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); + dbus_conn = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); + if (!dbus_conn) + g_error("Failed to connect to system D-Bus: %s", error->message); /* Start D-Bus services */ if (!g_key_file_get_boolean (config, "test-runner-config", "disable-upower", NULL)) |