Commit 017df702 authored by Simon McVittie's avatar Simon McVittie

Merge branch 'max-conns-per-user' into 'master'

test/dbus-daemon: Mark max-connections-per-user as unimplemented on Windows

See merge request !54

Reviewed-by: pwithnall
Reviewed-by: rhabacker
parents 007de46c 89208de6
Pipeline #10996 canceled with stage
......@@ -791,7 +791,7 @@ Available limit names are:</para>
"max_incomplete_connections" : max number of unauthenticated
connections
"max_connections_per_user" : max number of completed connections from
the same user
the same user (only enforced on Unix OSs)
"max_pending_service_starts" : max number of service launches in
progress at the same time
"max_names_per_connection" : max number of names a single
......
......@@ -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)
{
/* <limit name="max_connections_per_user"/> 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment