Change in osmo-mgw[master]: mgcp_test: fix log of conn_id presence

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 Aug 29 00:39:26 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/10674


Change subject: mgcp_test: fix log of conn_id presence
......................................................................

mgcp_test: fix log of conn_id presence

Flip logic to accurately log whether an 'I:' is included, instead of logging
the opposite.

Note that it isn't possible to log the actual conn ID, because they are random
and differ in every test run, which would collide with the fixed expected
output file mgcp_test.ok.

Change-Id: Idcd731b9daf618b97d8f7e6a776266071cd29e08
---
M tests/mgcp/mgcp_test.c
M tests/mgcp/mgcp_test.ok
2 files changed, 27 insertions(+), 27 deletions(-)



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

diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index f8f701e..228b2f9 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -737,7 +737,7 @@
 		if (msg) {
 			rc = get_conn_id_from_response(msg->data, last_conn_id,
 						       sizeof(last_conn_id));
-			if (rc)
+			if (rc == 0)
 				printf("(response contains a connection id)\n");
 			else
 				printf("(response does not contain a connection id)\n");
diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok
index fcad85a..915d45e 100644
--- a/tests/mgcp/mgcp_test.ok
+++ b/tests/mgcp/mgcp_test.ok
@@ -22,7 +22,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing AUEP2
@@ -34,7 +34,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing MDCX1
@@ -46,7 +46,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing MDCX2
@@ -58,7 +58,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing CRCX
@@ -79,7 +79,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -93,7 +93,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -117,7 +117,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -141,7 +141,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -165,7 +165,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -189,7 +189,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -213,7 +213,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 
 ================================================
 Testing MDCX4_RO
@@ -228,7 +228,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -243,7 +243,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing CRCX_ZYN
@@ -256,7 +256,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -277,7 +277,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing SHORT2
@@ -288,7 +288,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing SHORT3
@@ -299,7 +299,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing SHORT4
@@ -310,7 +310,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing RQNT1
@@ -324,7 +324,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing RQNT2
@@ -338,7 +338,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing DLCX
@@ -352,7 +352,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing CRCX
@@ -373,7 +373,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -387,7 +387,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -402,7 +402,7 @@
 checking response:
 using message as statically defined for comparison
 Response matches our expectations.
-(response contains a connection id)
+(response does not contain a connection id)
 
 ================================================
 Testing CRCX
@@ -416,7 +416,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================
@@ -439,7 +439,7 @@
 checking response:
 using message with patched conn_id for comparison
 Response matches our expectations.
-(response does not contain a connection id)
+(response contains a connection id)
 Dummy packets: 2
 
 ================================================

-- 
To view, visit https://gerrit.osmocom.org/10674
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcd731b9daf618b97d8f7e6a776266071cd29e08
Gerrit-Change-Number: 10674
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180829/79a2f68e/attachment.htm>


More information about the gerrit-log mailing list