diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-08-20 17:19:41 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-08-20 17:53:37 +0200 |
commit | 7abb97696d782db7e5bdcb14eb00b8a0ad7a2266 (patch) | |
tree | dd233d2b184c21ae7f17e6344e7749dc48535b6a /openbsc/tests | |
parent | a1254353a2d3888e23174098140d43290e138ce4 (diff) |
mgcp_test: tweak test failure output
Backport from osmo-mgw.git 020e89bce914d394352dddb8186b65a319562b20.
Change-Id: Ibfc80f06b2811cc32fe38518b11efd6764b347ee
Diffstat (limited to 'openbsc/tests')
-rw-r--r-- | openbsc/tests/mgcp/mgcp_test.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index 570a0c927..154d0f308 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -543,7 +543,8 @@ static void test_messages(void) if (msg) printf("%s failed '%s'\n", t->name, (char *) msg->data); } else if (strcmp((char *) msg->data, t->exp_resp) != 0) - printf("%s failed '%s'\n", t->name, (char *) msg->data); + printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", + t->name, t->exp_resp, (char *) msg->data); msgb_free(msg); if (dummy_packets) @@ -653,7 +654,8 @@ static void test_retransmission(void) msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (strcmp((char *) msg->data, t->exp_resp) != 0) - printf("%s failed '%s'\n", t->name, (char *) msg->data); + printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", + t->name, t->exp_resp, (char *) msg->data); msgb_free(msg); /* Retransmit... */ @@ -662,7 +664,8 @@ static void test_retransmission(void) msg = mgcp_handle_message(cfg, inp); msgb_free(inp); if (strcmp((char *) msg->data, t->exp_resp) != 0) - printf("%s failed '%s'\n", t->name, (char *) msg->data); + printf("%s failed.\nExpected:\n%s\nGot:\n%s\n", + t->name, t->exp_resp, (char *) msg->data); msgb_free(msg); } |