bsc: Test CSFB "Fast Return" in new TC_chan_rel_hard_clear_csfb

When a MSC releases a connection using the BSSMAP CLEAR CMD, it can
specify that this call was part of CSFB.

The BSC is then supposed to add a special IE to the RR RELEASE
message which will help the phone to switch back to LTE as soon
as possible.

This commit adds a new test case testing for exactly that behavior.

The test does *not* verify if the EARFCN information contained is
actually correct, only that the IE is present in the RR RELEASE.

Change-Id: I7501fb25578412c882ff92da5d388f3079bbce7f
Requires: osmo-bsc Ibfbb87e2e16b05032ad1cb91c11fad1b2f76d755
Related: OS#3777
This commit is contained in:
Harald Welte 2019-02-04 10:41:36 +01:00
parent 924b6ea17b
commit 9978710c4b
3 changed files with 56 additions and 2 deletions

View File

@ -856,7 +856,8 @@ function f_expect_chan_rel(integer bts_nr, RslChannelNr rsl_chan_nr,
boolean expect_deact_sacch := true,
boolean expect_rr_chan_rel := true,
boolean expect_rll_rel_req := true,
boolean handle_rll_rel := true
boolean handle_rll_rel := true,
boolean is_csfb := false
) runs on test_CT {
var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0));
@ -871,7 +872,11 @@ function f_expect_chan_rel(integer bts_nr, RslChannelNr rsl_chan_nr,
got_deact_sacch := true;
repeat;
}
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) {
[is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE_CSFB))) {
got_rr_chan_rel := true;
repeat;
}
[not is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) {
got_rr_chan_rel := true;
repeat;
}
@ -932,6 +937,29 @@ testcase TC_chan_rel_hard_clear() runs on test_CT {
setverdict(pass);
}
/* Test behavior of channel release after Clear Command with CSFB indicator from MSC */
testcase TC_chan_rel_hard_clear_csfb() runs on test_CT {
var BSSAP_N_DATA_ind rx_di;
var DchanTuple dt;
f_init(1);
dt := f_est_dchan('23'O, 23, '00010203040506'O);
/* Instruct BSC to clear channel */
var BssmapCause cause := 0;
BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_ClearCommandCSFB(cause)));
/* expect Clear Complete from BSC on A */
BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_ClearComplete)) {
/* release the SCCP connection */
BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0));
}
f_expect_chan_rel(0, dt.rsl_chan_nr, expect_rll_rel_req := false, is_csfb := true);
setverdict(pass);
}
/* Test behavior of channel release after hard RLSD from MSC */
testcase TC_chan_rel_hard_rlsd() runs on test_CT {
var DchanTuple dt;
@ -3697,6 +3725,7 @@ control {
execute( TC_chan_rel_rll_rel_ind() );
execute( TC_chan_rel_conn_fail() );
execute( TC_chan_rel_hard_clear() );
execute( TC_chan_rel_hard_clear_csfb() );
execute( TC_chan_rel_hard_rlsd() );
execute( TC_chan_rel_hard_rlsd_ms_dead() );
execute( TC_chan_rel_a_reset() );

View File

@ -612,6 +612,18 @@ modifies ts_BSSAP_BSSMAP := {
}
}
}
template (value) PDU_BSSAP ts_BSSMAP_ClearCommandCSFB(BssmapCause cause)
modifies ts_BSSMAP_ClearCommand := {
pdu := {
bssmap := {
clearCommand := {
cSFB_Indication := {
elementIdentifier := '8F'O
}
}
}
}
}
template PDU_BSSAP tr_BSSMAP_ClearCommand modifies tr_BSSAP_BSSMAP := {
pdu := {

View File

@ -692,6 +692,19 @@ template PDU_ML3_NW_MS tr_RRM_RR_RELEASE(template OCT1 cause := ?) := {
}
}
template PDU_ML3_NW_MS tr_RRM_RR_RELEASE_CSFB(template OCT1 cause := ?) modifies tr_RRM_RR_RELEASE := {
msgs := {
rrm := {
channelRelease := {
cellSelectionIndicator := {
elementIdentifier := '77'O,
lengthIndicator := ?,
cellSelectionIndicatorValue := ?
}
}
}
}
}
template PDU_ML3_MS_NW ts_ML3_MO := {
discriminator := '0000'B,