From: Simon McVittie Date: Thu, 29 Nov 2018 14:24:00 +0000 (+0000) Subject: test/dbus-daemon: Mark max-connections-per-user as unimplemented on Windows X-Git-Tag: dbus-1.13.8~13^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e87d52a46699209f6badb98e1a01715191e32f9;p=thirdparty%2Fdbus.git test/dbus-daemon: Mark max-connections-per-user as unimplemented on Windows The implementation of the max-connections-per-user limit works in terms of Unix uids, so it doesn't apply on Windows. This is not a problem in practice, because it only makes sense to limit connections per user if you have multiple users, and we don't support the well-known system bus on Windows. Signed-off-by: Simon McVittie --- diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index 146f3113e..20935ffb1 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -660,6 +660,11 @@ test_canonical_path_uae (Fixture *f, dbus_clear_message (&m); } +static Config max_connections_per_user_config = { + NULL, 1, "valid-config-files/max-connections-per-user.conf", + TEST_USER_ME, SPECIFY_ADDRESS +}; + static void test_max_connections (Fixture *f, gconstpointer context) @@ -667,10 +672,27 @@ test_max_connections (Fixture *f, DBusError error = DBUS_ERROR_INIT; DBusConnection *third_conn; DBusConnection *failing_conn; +#ifdef DBUS_WIN + const Config *config = context; +#endif if (f->skip) return; +#ifdef DBUS_WIN + if (config == &max_connections_per_user_config) + { + /* is currently only + * implemented in terms of Unix uids. It could be implemented for + * Windows SIDs too, but there wouldn't be much point, because we + * don't support use of a multi-user dbus-daemon on Windows, so + * in practice all connections have the same SID. */ + g_test_skip ("Maximum connections per Windows SID are not " + "implemented"); + return; + } +#endif + /* We have two connections already */ g_assert (f->left_conn != NULL); g_assert (f->right_conn != NULL); @@ -2021,11 +2043,6 @@ static Config max_completed_connections_config = { TEST_USER_ME, SPECIFY_ADDRESS }; -static Config max_connections_per_user_config = { - NULL, 1, "valid-config-files/max-connections-per-user.conf", - TEST_USER_ME, SPECIFY_ADDRESS -}; - static Config max_replies_per_connection_config = { NULL, 1, "valid-config-files/max-replies-per-connection.conf", TEST_USER_ME, SPECIFY_ADDRESS