[MERGED] osmo-mgw[master]: mgcp_test: tweak test failure output

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Oct 11 00:04:26 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: mgcp_test: tweak test failure output
......................................................................


mgcp_test: tweak test failure output

Change-Id: Ibfc80f06b2811cc32fe38518b11efd6764b347ee
---
M tests/legacy_mgcp/mgcp_test.c
M tests/mgcp/mgcp_test.c
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/legacy_mgcp/mgcp_test.c b/tests/legacy_mgcp/mgcp_test.c
index 904ecce..1400893 100644
--- a/tests/legacy_mgcp/mgcp_test.c
+++ b/tests/legacy_mgcp/mgcp_test.c
@@ -541,7 +541,8 @@
 			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)
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index e783dac..5b292a5 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -599,7 +599,8 @@
 				OSMO_ASSERT(false);
 			}
 		} 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);
 			OSMO_ASSERT(false);
 		}
 		msgb_free(msg);

-- 
To view, visit https://gerrit.osmocom.org/4007
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfc80f06b2811cc32fe38518b11efd6764b347ee
Gerrit-PatchSet: 6
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list