Change in osmo-ttcn3-hacks[master]: MGCP_Test: Test what happens when two ends use different PT

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/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Jul 25 08:34:40 UTC 2018


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/10155


Change subject: MGCP_Test: Test what happens when two ends use different PT
......................................................................

MGCP_Test: Test what happens when two ends use different PT

It is legal that two connections use the same codec but negotiate
different dynamic payload types for both connections. Then the MGW is
expected to receive packets with one PT and send them with the other PT.
This is currently not done in osmo-mgw so the two tests that this commit
adds are expected to fail for now.

- add testcase TC_two_crcx_diff_pt_and_rtp
- add testcase TC_two_crcx_diff_pt_and_rtp_bidir

Change-Id: Ib4606dfc08764410ee9e450949361544adb07cd3
Related: OS#3384
---
M mgw/MGCP_Test.ttcn
M mgw/expected-results.xml
2 files changed, 24 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/55/10155/1

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index a6d3460..494e8bb 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -998,7 +998,8 @@
 		setverdict(pass);
 	}
 
-	function f_TC_two_crcx_and_rtp(boolean bidir) runs on dummy_CT {
+	function f_TC_two_crcx_and_rtp(boolean bidir, charstring codec_name_a, integer pt_a,
+					charstring codec_name_b, integer pt_b) runs on dummy_CT {
 		var RtpFlowData flow[2];
 		var RtpemStats stats[2];
 		var MgcpResponse resp;
@@ -1009,13 +1010,13 @@
 		f_init(ep);
 
 		/* from us to MGW */
-		flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 98, "AMR/8000"));
+		flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, pt_a, codec_name_a));
 		/* bind local RTP emulation sockets */
 		flow[0].em.portnr := 10000;
 		f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]);
 
 		/* from MGW back to us */
-		flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 98, "AMR/8000"));
+		flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, pt_b, codec_name_b));
 		flow[1].em.portnr := 20000;
 		f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]);
 
@@ -1053,13 +1054,23 @@
 
 	/* create two local RTP emulations; create two connections on MGW EP, exchange some data */
 	testcase TC_two_crcx_and_rtp() runs on dummy_CT {
-		 f_TC_two_crcx_and_rtp(false);
+		 f_TC_two_crcx_and_rtp(false, "AMR/8000", 98, "AMR/8000", 98);
 	}
 
 	/* create two local RTP emulations; create two connections on MGW EP,
 	 * exchange some data in both directions */
 	testcase TC_two_crcx_and_rtp_bidir() runs on dummy_CT {
-		 f_TC_two_crcx_and_rtp(true);
+		 f_TC_two_crcx_and_rtp(true, "AMR/8000", 98, "AMR/8000", 98);
+	}
+
+	/* same as TC_two_crcx_and_rtp, but with different PT number on both ends */
+	testcase TC_two_crcx_diff_pt_and_rtp() runs on dummy_CT {
+		 f_TC_two_crcx_and_rtp(false, "AMR/8000", 98, "AMR/8000", 112);
+	}
+
+	/* same as TC_two_crcx_and_rtp, but with different PT number on both ends */
+	testcase TC_two_crcx_diff_pt_and_rtp_bidir() runs on dummy_CT {
+		 f_TC_two_crcx_and_rtp(true, "AMR/8000", 98, "AMR/8000", 112);
 	}
 
 	/* create two local RTP emulations and pass data in both directions */
@@ -1328,6 +1339,8 @@
 		execute(TC_one_crcx_loopback_rtp());
 		execute(TC_two_crcx_and_rtp());
 		execute(TC_two_crcx_and_rtp_bidir());
+		execute(TC_two_crcx_diff_pt_and_rtp());
+		execute(TC_two_crcx_diff_pt_and_rtp_bidir());
 		execute(TC_two_crcx_mdcx_and_rtp());
 		execute(TC_two_crcx_and_unsolicited_rtp());
 		execute(TC_two_crcx_and_one_mdcx_rtp_ho());
diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml
index f201099..92b9351 100644
--- a/mgw/expected-results.xml
+++ b/mgw/expected-results.xml
@@ -34,6 +34,12 @@
   <testcase classname='MGCP_Test' name='TC_one_crcx_receive_only_rtp' time='MASKED'/>
   <testcase classname='MGCP_Test' name='TC_one_crcx_loopback_rtp' time='MASKED'/>
   <testcase classname='MGCP_Test' name='TC_two_crcx_and_rtp_bidir' time='MASKED'/>
+  <testcase classname='MGCP_Test' name='TC_two_crcx_diff_pt_and_rtp' time='MASKED'>
+    <failure type='fail-verdict'>RTP packet payload type errors occurred</failure>
+  </testcase>
+  <testcase classname='MGCP_Test' name='TC_two_crcx_diff_pt_and_rtp_bidir' time='MASKED'>
+    <failure type='fail-verdict'>RTP packet payload type errors occurred</failure>
+  </testcase>
   <testcase classname='MGCP_Test' name='TC_two_crcx_mdcx_and_rtp' time='MASKED'/>
   <testcase classname='MGCP_Test' name='TC_two_crcx_and_unsolicited_rtp' time='MASKED'/>
   <testcase classname='MGCP_Test' name='TC_two_crcx_and_one_mdcx_rtp_ho' time='MASKED'/>

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4606dfc08764410ee9e450949361544adb07cd3
Gerrit-Change-Number: 10155
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180725/f9811afb/attachment.htm>


More information about the gerrit-log mailing list