summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-17 11:45:31 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-17 11:57:15 +0900
commitbae51a061267a958cc1d9662623e2fef27b9a3d6 (patch)
treeb95ec7aadaaee1e7376f7794461a256f66d5c99c
parente58e00b08a51b65974c3ff201c535338926ab19b (diff)
tests: Add better debugging for eldbus failure
It keeps on failing for me, but quite inconsistently (i.e. sometimes, not always). Annoying.
-rw-r--r--src/tests/eldbus/eldbus_fake_server.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/tests/eldbus/eldbus_fake_server.c b/src/tests/eldbus/eldbus_fake_server.c
index 67d47580eb..3a8776ef90 100644
--- a/src/tests/eldbus/eldbus_fake_server.c
+++ b/src/tests/eldbus/eldbus_fake_server.c
@@ -174,7 +174,27 @@ _fake_server_name_request_cb(void *data EINA_UNUSED,
174 ck_abort_msg("error geting arguments on _fake_server_name_request_cb"); 174 ck_abort_msg("error geting arguments on _fake_server_name_request_cb");
175 175
176 if (ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER != reply) 176 if (ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER != reply)
177 ck_abort_msg("error name already in use"); 177 {
178 const char *errcode = "Unknown reply";
179 char errmsg[512];
180 switch (reply)
181 {
182 case ELDBUS_NAME_REQUEST_REPLY_IN_QUEUE:
183 errcode = "Service could not become the primary owner and has "
184 "been placed in the queue";
185 break;
186 case ELDBUS_NAME_REQUEST_REPLY_EXISTS:
187 errcode = "Service is already in the queue";
188 break;
189 case ELDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER:
190 errcode = "Service is already the primary owner";
191 break;
192 default: break;
193 }
194 snprintf(errmsg, sizeof(errmsg), "Failed to start fake server: %s (%u)",
195 errcode, reply);
196 ck_abort_msg(errmsg);
197 }
178 198
179 ecore_main_loop_quit(); 199 ecore_main_loop_quit();
180} 200}