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
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f9609ba..88df9bc 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2893,7 +2893,7 @@
}
/* 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 @@
};
}
- 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 @@
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 @@
* 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 @@
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 @@
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 @@
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 @@
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 @@
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);
}