aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-26 16:30:14 +0200
committerpespin <pespin@sysmocom.de>2019-07-03 12:20:16 +0000
commit7aa027413810e61cc0dc01832775e3ebb193999a (patch)
treedf02465dd922b0a44ea043e28b791f7dcc73db6f
parent54ab92f78726b9273463b8be64158742edd4080f (diff)
bsc: Do proper chan release in TC_ho_out_fail_no_ho_detect
BSC waits to receive a ClearCommand in response to its ClearRequest before it starts tearing down the MGCP conn on the MSC-side of the MGW endpoint. As a result, expected DLCX was not being sent which made test fail. However, currently test still fails because current osmo-bsc master sends a repeated ClearRequest message in this scenario. Related: OS#4078 Change-Id: Ic398896147a0b6b04ffeae56a23d25783b2b17fe
-rw-r--r--bsc/BSC_Tests.ttcn24
1 files changed, 13 insertions, 11 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f9609ba0..88df9bc3 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2893,7 +2893,7 @@ testcase TC_ho_int() runs on test_CT {
}
/* Expecting MGCP to DLCX the endpoint's two connections: towards BTS and towards MSC */
-private function f_expect_dlcx_conns(boolean exp_clear_cmpl := true) runs on MSC_ConnHdlr {
+private function f_expect_dlcx_conns() runs on MSC_ConnHdlr {
var MgcpCommand mgcp;
var template MgcpResponse mgcp_resp;
var MGCP_RecvFrom mrf;
@@ -2923,9 +2923,7 @@ private function f_expect_dlcx_conns(boolean exp_clear_cmpl := true) runs on MSC
};
}
- if (exp_clear_cmpl) {
- BSSAP.receive(tr_BSSMAP_ClearComplete);
- }
+ BSSAP.receive(tr_BSSMAP_ClearComplete);
}
private function f_tc_ho_out_of_this_bsc(charstring id) runs on MSC_ConnHdlr {
@@ -2978,7 +2976,7 @@ private function f_tc_ho_out_of_this_bsc(charstring id) runs on MSC_ConnHdlr {
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));
- f_expect_dlcx_conns(true);
+ f_expect_dlcx_conns();
setverdict(pass);
f_sleep(1.0);
}
@@ -3171,6 +3169,7 @@ private function f_tc_ho_out_fail_no_ho_detect(charstring id) runs on MSC_ConnHd
* RR should be released and Clear Request should go to the MSC. */
var MgcpCommand mgcp;
+ var PDU_BSSAP rx_clear_request;
interleave {
[] RSL.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
log("Got Deact SACCH");
@@ -3182,12 +3181,15 @@ private function f_tc_ho_out_fail_no_ho_detect(charstring id) runs on MSC_ConnHd
log("Got RF Chan Rel");
RSL.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
}
- [] BSSAP.receive(tr_BSSMAP_ClearRequest) {
+ [] BSSAP.receive(tr_BSSMAP_ClearRequest) -> value rx_clear_request {
log("Got BSSMAP Clear Request");
+ /* Instruct BSC to clear channel */
+ var BssmapCause cause := bit2int(rx_clear_request.pdu.bssmap.clearRequest.cause.causeValue);
+ BSSAP.send(ts_BSSMAP_ClearCommand(cause));
}
}
- f_expect_dlcx_conns(false);
+ f_expect_dlcx_conns();
setverdict(pass);
f_sleep(1.0);
@@ -3332,7 +3334,7 @@ private function f_tc_ho_in_fail_msc_clears(charstring id) runs on MSC_ConnHdlr
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));
- f_expect_dlcx_conns(true);
+ f_expect_dlcx_conns();
setverdict(pass);
f_sleep(1.0);
@@ -3414,7 +3416,7 @@ private function f_tc_ho_in_fail_msc_clears_after_ho_detect(charstring id) runs
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));
- f_expect_dlcx_conns(true);
+ f_expect_dlcx_conns();
setverdict(pass);
f_sleep(1.0);
}
@@ -3493,7 +3495,7 @@ private function f_tc_ho_in_fail_no_detect(charstring id) runs on MSC_ConnHdlr {
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));
- f_expect_dlcx_conns(true);
+ f_expect_dlcx_conns();
setverdict(pass);
f_sleep(1.0);
@@ -3566,7 +3568,7 @@ private function f_tc_ho_in_fail_no_detect2(charstring id) runs on MSC_ConnHdlr
var BssmapCause cause := bit2int(rx_clear_request.pdu.bssmap.clearRequest.cause.causeValue);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));
};
- f_expect_dlcx_conns(true);
+ f_expect_dlcx_conns();
setverdict(pass);
f_sleep(1.0);
}