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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Sep 20 22:13:18 UTC 2017


Review at  https://gerrit.osmocom.org/4007

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/07/4007/1

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 6a43b7b..c75cf6a 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -598,7 +598,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: newchange
Gerrit-Change-Id: Ibfc80f06b2811cc32fe38518b11efd6764b347ee
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list