summaryrefslogtreecommitdiff
path: root/test/internals
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-11-27 19:26:03 +0000
committerSimon McVittie <smcv@collabora.com>2017-12-04 11:52:52 +0000
commitf59b4f9226c0134f91fc1eefebef6e7a816f85cd (patch)
treebeda5c6503d7bb010ee42abf15ea9a23466140a8 /test/internals
parent38ff6bd20d58b57a5dd0eab1b1c09c5c43b61d26 (diff)
downloaddbus-f59b4f9226c0134f91fc1eefebef6e7a816f85cd.tar.gz
test-utils: Separate failable and non-failable functions
test_object_try_whatever() now has libdbus-like OOM handling, while test_object_whatever() has GLib-like OOM handling. This is because an overwhelming majority of the callers of these functions either didn't check for OOM anyway, or checked for it but then aborted. In the uncommon case where we do care, we can use the _try_ version. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317 Reviewed-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/internals')
-rw-r--r--test/internals/refs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/internals/refs.c b/test/internals/refs.c
index 3c6b438d..15178772 100644
--- a/test/internals/refs.c
+++ b/test/internals/refs.c
@@ -251,8 +251,7 @@ setup_connection (Fixture *f,
dbus_server_set_new_connection_function (f->server,
new_conn_cb, f, NULL);
- if (!test_server_setup (f->loop, f->server))
- g_error ("failed to set up server");
+ test_server_setup (f->loop, f->server);
address = dbus_server_get_address (f->server);
g_assert (address != NULL);
@@ -261,8 +260,7 @@ setup_connection (Fixture *f,
g_assert (f->connection != NULL);
dbus_free (address);
- if (!test_connection_setup (f->loop, f->connection))
- g_error ("failed to set up connection");
+ test_connection_setup (f->loop, f->connection);
while (f->server_connection == NULL)
_dbus_loop_iterate (f->loop, TRUE);