From 861a4c174c92fe28a544a5022102250eac035a78 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 7 Nov 2018 01:23:17 +0100 Subject: bsc: handle Deact SACCH messages Allow osmo-bsc sending a Deact SACCH messages in most cases. Prepare the ttcn3-bsc-tests to not break just because of those messages that will soon be sent. When releasing an lchan, it makes sense to Deactivate SACCH on it, if it was ever active. So far osmo-bsc was fairly reluctant to send Deactivate SACCH, but osmo-bsc Id3301df059582da2377ef82feae554e94fa42035 is about to change that. In most test cases, Deact SACCH are still optional, but in one case, the current missing Deact SACCH will introduce a test failure: in the 'interleave' of BSC_Tests.TC_ho_out_fail_no_ho_detect. As soon as abovementioned osmo-bsc patch is merged, the test will pass again. Also, as soon as Ibc64058f1e214bea585f4e8dcb66f3df8ead3845 is merged here, the bsc tests will properly ensure whether Deact SACCH is sent or not in all tests. Change-Id: I27da24dbe3184fa7a076a35f6fa6af457c1db8d2 --- bsc/BSC_Tests.ttcn | 4 ++++ bsc/MSC_ConnectionHandler.ttcn | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'bsc') diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index fcccad08..b1f3a310 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -2182,6 +2182,7 @@ private function f_tc_ho_int(charstring id) runs on MSC_ConnHdlr { /* Check the amount of MGCP transactions is still consistant with the * test expectation */ f_check_mgcp_expectations() + f_sleep(0.5); } testcase TC_ho_int() runs on test_CT { @@ -2447,6 +2448,9 @@ private function f_tc_ho_out_fail_no_ho_detect(charstring id) runs on MSC_ConnHd var MgcpCommand mgcp; var octetstring l3_rr_chan_rel := '060D00'O; interleave { + [] RSL.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) { + log("Got Deact SACCH"); + } [] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, l3_rr_chan_rel)) { log("Got RR Release"); } diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 003813a2..07eafc7d 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -682,6 +682,9 @@ altstep as_assignment(inout AssignmentState st) runs on MSC_ConnHdlr { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Unexpected L3 received", l3)); } } + [st.rr_ass_cmpl_seen] RSL.receive(tr_RSL_DEACT_SACCH(st.old_chan_nr)) { + repeat; + } [st.rr_ass_cmpl_seen] RSL.receive(tr_RSL_REL_REQ(st.old_chan_nr, tr_RslLinkID_DCCH(0))) { RSL.send(ts_RSL_REL_CONF(st.old_chan_nr, valueof(ts_RslLinkID_DCCH(0)))); repeat; @@ -1043,6 +1046,9 @@ altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr { } [st.rr_ho_cmpl_seen] as_Media_ipacc(); [st.rr_ho_cmpl_seen] as_Media_mgw(true); + [st.rr_ho_cmpl_seen] RSL.receive(tr_RSL_DEACT_SACCH(st.old_chan_nr)) { + repeat; + } [st.rr_ho_cmpl_seen] RSL.receive(tr_RSL_REL_REQ(st.old_chan_nr, tr_RslLinkID_DCCH(0))) { RSL.send(ts_RSL_REL_CONF(st.old_chan_nr, valueof(ts_RslLinkID_DCCH(0)))); repeat; -- cgit v1.2.3