diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2022-04-07 00:19:01 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2022-04-07 14:18:28 +0000 |
commit | 9b320c10f29a43a0409fd7ba5037af251fbb1dd8 (patch) | |
tree | 498984ce4ec29e132bd16f3f0aa156a043f21e1d | |
parent | 5a778ae426dca97d29991403ad7a9f422065f005 (diff) |
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
-rw-r--r-- | bsc/BSC_Tests.ttcn | 4 | ||||
-rw-r--r-- | bsc/MSC_ConnectionHandler.ttcn | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 4683dc76..cce88379 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -6553,7 +6553,7 @@ private function f_tc_ho_in_fail_no_detect(charstring id) runs on MSC_ConnHdlr { 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 @@ private function f_tc_ho_in_fail_no_detect2(charstring id) runs on MSC_ConnHdlr 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 db2e9ef2..06f9ebe5 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -373,7 +373,7 @@ runs on MSC_ConnHdlr return template MGCP_RecvFrom { /* 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 @@ altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr { 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 @@ altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr { 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 |