From f3e627465c0e90a8a9231bbb3392be32962fe21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 17 Jun 2019 10:30:57 +0200 Subject: [PATCH] tests: Explicitly handle error reply from Ping method call Explicitly handle the possible error reply from D-Bus when issuing the Ping method call on xfconfd instance. This can happen when xfconfd is unknown to D-Bus (e.g. not installed yet). Explicit error replacing cryptic test failures with explicit error that xfconfd is not running. --- tests/tests-common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/tests-common.h b/tests/tests-common.h index f895cfb..b763aac 100644 --- a/tests/tests-common.h +++ b/tests/tests-common.h @@ -107,6 +107,14 @@ xfconf_tests_start(void) return FALSE; } } + if (g_dbus_message_get_message_type(ret) != G_DBUS_MESSAGE_TYPE_METHOD_RETURN) + { + g_critical("xfconfd is not running and can not be autostarted"); + g_object_unref (msg); + g_object_unref (ret); + xfconf_tests_end(); + return FALSE; + } g_object_unref (msg); g_object_unref (ret); -- 2.22.0