diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2016-06-30 13:57:29 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2016-06-30 13:57:29 +0100 |
commit | b5bef9dc1647b0516d199e0575e6f2db5a387817 (patch) | |
tree | 0eaef6b8a08d2c8a21840cbf83f8b76e973f98ad /test | |
parent | 727c5429ba94aad935ff7f483fcb350aee00c1dd (diff) | |
parent | 2fe59f1892825ced87c45ae25d9f5795b1d735b6 (diff) | |
download | dbus-b5bef9dc1647b0516d199e0575e6f2db5a387817.tar.gz |
Merge branch 'dbus-1.10' into dbus-1.10-cidbus-1.10-ci
Diffstat (limited to 'test')
-rw-r--r-- | test/dbus-daemon.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index 72bcd08c..99d2bc63 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -526,7 +526,18 @@ test_processid (Fixture *f, while (m == NULL) test_main_context_iterate (f->ctx, TRUE); - if (dbus_message_get_args (m, &error, + if (dbus_set_error_from_message (&error, m)) + { + g_assert_cmpstr (error.name, ==, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN); + +#ifdef PID_SHOULD_WORK + g_error ("Expected pid to be passed, but got %s: %s", + error.name, error.message); +#endif + + dbus_error_free (&error); + } + else if (dbus_message_get_args (m, &error, DBUS_TYPE_UINT32, &pid, DBUS_TYPE_INVALID)) { @@ -545,14 +556,7 @@ test_processid (Fixture *f, } else { - g_assert_cmpstr (error.name, ==, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN); - -#ifdef PID_SHOULD_WORK - g_error ("Expected pid to be passed, but got %s: %s", - error.name, error.message); -#endif - - dbus_error_free (&error); + g_error ("Unexpected error: %s: %s", error.name, error.message); } } |