aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-08-20 17:19:41 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-08-20 17:53:37 +0200
commit7abb97696d782db7e5bdcb14eb00b8a0ad7a2266 (patch)
treedd233d2b184c21ae7f17e6344e7749dc48535b6a /openbsc
parenta1254353a2d3888e23174098140d43290e138ce4 (diff)
mgcp_test: tweak test failure output
Backport from osmo-mgw.git 020e89bce914d394352dddb8186b65a319562b20. Change-Id: Ibfc80f06b2811cc32fe38518b11efd6764b347ee
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/tests/mgcp/mgcp_test.c9
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);
}