laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27658 )

Change subject: bsc: as_Media_mgw: fail on DLCX
......................................................................

bsc: as_Media_mgw: fail on DLCX

as_Media_mgw() is used to establish a voice stream. If a DLCX happens as
part of that, that should be flagged as a problem.

In fact the Mode Modify test with current osmo-bsc does exhibit a DLCX
right upon the Assignment Complete message, which is a bug fixed in
I5ab10ee7fd9c5d7608e8a06893881d990943feed.

This patch now correctly flags this as a failure.

In the two tests
TC_ho_in_fail_no_detect, TC_ho_in_fail_no_detect2
the expected failure causes expected DLCX, so exempt those.

Related: SYS#5916
Change-Id: I0633f60f09d58802f6be0238ef41a632d93a4327
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 16 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 4683dc7..cce8837 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6553,7 +6553,7 @@

        f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
        f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
-       activate(as_Media());
+       activate(as_Media(fail_on_dlcx := false));

        BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc,
                                     f_gen_handover_req()));
@@ -6643,7 +6643,7 @@

        f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
        f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
-       activate(as_Media());
+       activate(as_Media(fail_on_dlcx := false));

        BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc,
                                     f_gen_handover_req()));
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index db2e9ef..06f9ebe 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -373,7 +373,7 @@
 /* altstep for handling of MGCP media related commands. Activated by 
as_Media() to test
  * MGW level media handling */

-altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr {
+altstep as_Media_mgw(boolean norepeat := false, boolean fail_on_dlcx := true) 
runs on MSC_ConnHdlr {
        var MgcpCommand mgcp_cmd;
        var template MgcpResponse mgcp_resp;
        var MGCP_RecvFrom mrf;
@@ -383,6 +383,9 @@
        var template MgcpMessage msg_mdcx := {
                command := tr_MDCX
        }
+       var template MgcpMessage msg_dlcx := {
+               command := tr_DLCX
+       }
        var template MgcpMessage msg_resp;

        [g_pars.aoip] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
@@ -422,13 +425,21 @@
                        repeat;
                }
        }
+
+       [fail_on_dlcx and g_pars.aoip] MGCP.receive(tr_DLCX) {
+               setverdict(fail, "Unexpected DLCX received");
+       }
+
+       [fail_on_dlcx and not g_pars.aoip] 
MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) {
+               setverdict(fail, "Unexpected DLCX received");
+       }
 }

 /* Altsteps for handling of media related commands. Can be activated by a given
  * test case if it expects to see media related handling (i.e. voice calls) */
-altstep as_Media() runs on MSC_ConnHdlr {
+altstep as_Media(boolean fail_on_dlcx := true) runs on MSC_ConnHdlr {
        [] as_Media_ipacc();
-       [] as_Media_mgw();
+       [] as_Media_mgw(fail_on_dlcx := fail_on_dlcx);
 }

 type port Coord_PT message

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27658
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: I0633f60f09d58802f6be0238ef41a632d93a4327
Gerrit-Change-Number: 27658
Gerrit-PatchSet: 3
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to