From ab56d9a1166c33de716ad068aca19c2fc23134a3 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 13 Nov 2015 19:16:22 +0100 Subject: [PATCH] Fix test-bus test for GetConnectionUnixUser driver method on windows. Because GetConnectionUnixUser is not supported on windows it fails with DBUS_ERROR_FAIL. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721 --- bus/dispatch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bus/dispatch.c b/bus/dispatch.c index c69b481..68a8197 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -1277,6 +1277,12 @@ check_get_connection_unix_user (BusContext *context, { ; /* good, this is a valid response */ } +#ifdef DBUS_WIN + else if (dbus_message_is_error (message, DBUS_ERROR_FAILED)) + { + /* this is OK, Unix uids aren't meaningful on Windows */ + } +#endif else { warn_unexpected (connection, message, "not this error"); @@ -4838,7 +4844,6 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, #endif #ifdef DBUS_WIN_FIXME - _dbus_warn("TODO: testing of GetConnectionUnixUser message skipped for now\n"); _dbus_warn("TODO: testing of GetConnectionUnixProcessID message skipped for now\n"); #else if (!check_get_connection_unix_user (context, baz)) -- 1.8.4.5