pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28191 )


Change subject: mgw: Introduce test 
TC_two_crcx_mdcx_and_iuup{_rtp}_rfci_unordered
......................................................................

mgw: Introduce test TC_two_crcx_mdcx_and_iuup{_rtp}_rfci_unordered

Related: SYS#5969
Change-Id: I2523f18a0fdba87f4e13a2ce3c5da482c4af2e3c
---
M mgw/MGCP_Test.ttcn
1 file changed, 39 insertions(+), 2 deletions(-)



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

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index de00e9d..60f955f 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -19,6 +19,7 @@
        import from RTP_CodecPort all;
        import from RTP_CodecPort_CtrlFunct all;
        import from RTP_Emulation all;
+       import from IuUP_Emulation all;
        import from OSMUX_Types all;
        import from OSMUX_CodecPort all;
        import from OSMUX_CodecPort_CtrlFunct all;
@@ -2465,6 +2466,7 @@

        /* create two local RTP+IuUP emulations and pass data in both 
directions */
        function f_tc_two_crcx_mdcx_and_iuup(charstring local_ip_a, charstring 
remote_ip_a,
+                                           IuUP_RabFlowCombinationList rfcl_a,
                                            charstring local_ip_b, charstring 
remote_ip_b) runs on dummy_CT {
                var RtpFlowData flow[2];
                var RtpemStats stats[2];
@@ -2483,6 +2485,7 @@
                flow[0].rtp_cfg.tx_payload_type := flow[0].pt;
                flow[0].rtp_cfg.iuup_mode := true;
                flow[0].rtp_cfg.iuup_cfg.active_init := true;
+               flow[0].rtp_cfg.iuup_cfg.rab_flow_combs := rfcl_a;
                f_flow_create(RTPEM[0], ep, call_id, "recvonly", flow[0], true);
                f_rtpem_mode(RTPEM[0], RTPEM_MODE_RXONLY);

@@ -2576,12 +2579,28 @@
                setverdict(pass);
        }
        testcase TC_two_crcx_mdcx_and_iuup() runs on dummy_CT {
-               f_tc_two_crcx_mdcx_and_iuup(mp_local_ipv4, mp_remote_ipv4,
+               var template (value) IuUP_RabFlowCombinationList rfcl := {
+                       t_IuUP_RFC_AMR_12_2(0),
+                       t_IuUP_RFC_AMR_SID(1),
+                       t_IuUP_RFC_AMR_NO_DATA(2)
+               };
+               f_tc_two_crcx_mdcx_and_iuup(mp_local_ipv4, mp_remote_ipv4, 
valueof(rfcl),
+                                          mp_local_ipv4, mp_remote_ipv4);
+       }
+       /* Same as TC_two_crcx_mdcx_and_iuup, but passing unordered RFCI list 
(ID != position) */
+       testcase TC_two_crcx_mdcx_and_iuup_rfci_unordered() runs on dummy_CT {
+               var template (value) IuUP_RabFlowCombinationList rfcl := {
+                       t_IuUP_RFC_AMR_12_2(1),
+                       t_IuUP_RFC_AMR_SID(2),
+                       t_IuUP_RFC_AMR_NO_DATA(0)
+               };
+               f_tc_two_crcx_mdcx_and_iuup(mp_local_ipv4, mp_remote_ipv4, 
valueof(rfcl),
                                           mp_local_ipv4, mp_remote_ipv4);
        }

        /* create two local emulations (1 RTP, 1 RTP+IuUP) and pass data in 
both directions */
        function f_tc_two_crcx_mdcx_and_iuup_rtp(charstring local_ip_a, 
charstring remote_ip_a,
+                                           IuUP_RabFlowCombinationList rfcl_a,
                                            charstring local_ip_b, charstring 
remote_ip_b) runs on dummy_CT {
                var RtpFlowData flow[2];
                var RtpemStats stats[2];
@@ -2602,6 +2621,7 @@
                flow[0].rtp_cfg.rx_fixed_payload := 
'08556d944c71a1a081e7ead204244480000ecd82b81118000097c4794e7740'O; /* 
flow[1].rtp_cfg.tx_fixed_payload converted AMR-BE-RTP->AMR-IUUP*/
                flow[0].rtp_cfg.iuup_mode := true;
                flow[0].rtp_cfg.iuup_cfg.active_init := true;
+               flow[0].rtp_cfg.iuup_cfg.rab_flow_combs := rfcl_a;
                f_flow_create(RTPEM[0], ep, call_id, "recvonly", flow[0], true);
                f_rtpem_mode(RTPEM[0], RTPEM_MODE_RXONLY);

@@ -2696,7 +2716,22 @@
                setverdict(pass);
        }
        testcase TC_two_crcx_mdcx_and_iuup_rtp() runs on dummy_CT {
-               f_tc_two_crcx_mdcx_and_iuup_rtp(mp_local_ipv4, mp_remote_ipv4,
+               var template (value) IuUP_RabFlowCombinationList rfcl := {
+                       t_IuUP_RFC_AMR_12_2(0),
+                       t_IuUP_RFC_AMR_SID(1),
+                       t_IuUP_RFC_AMR_NO_DATA(2)
+               };
+               f_tc_two_crcx_mdcx_and_iuup_rtp(mp_local_ipv4, mp_remote_ipv4, 
valueof(rfcl),
+                                          mp_local_ipv4, mp_remote_ipv4);
+       }
+       /* Same as TC_two_crcx_mdcTC_two_crcx_mdcx_and_iuup_rtpx_and_iuup, but 
passing unordered RFCI list (ID != position) */
+       testcase TC_two_crcx_mdcx_and_iuup_rtp_rfci_unordered() runs on 
dummy_CT {
+               var template (value) IuUP_RabFlowCombinationList rfcl := {
+                       t_IuUP_RFC_AMR_12_2(1),
+                       t_IuUP_RFC_AMR_SID(2),
+                       t_IuUP_RFC_AMR_NO_DATA(0)
+               };
+               f_tc_two_crcx_mdcx_and_iuup_rtp(mp_local_ipv4, mp_remote_ipv4, 
valueof(rfcl),
                                           mp_local_ipv4, mp_remote_ipv4);
        }

@@ -2775,7 +2810,9 @@
                execute(TC_two_crcx_mdcx_and_rtp_osmux_ipv6_ipv4());

                execute(TC_two_crcx_mdcx_and_iuup());
+               execute(TC_two_crcx_mdcx_and_iuup_rfci_unordered());
                execute(TC_two_crcx_mdcx_and_iuup_rtp());
+               execute(TC_two_crcx_mdcx_and_iuup_rtp_rfci_unordered());

                /* Note: This testcase will trigger an OSMO_ASSERT() bug in
                 * older versions of osmo-mgw. This eventually leads into

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28191
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2523f18a0fdba87f4e13a2ce3c5da482c4af2e3c
Gerrit-Change-Number: 28191
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to