bsc: refuse VAMOS mode without BTS_FEAT_VAMOS

Change-Id: I73b8eb5e6073ae46b83bed9fddd4762861029a84
This commit is contained in:
Neels Hofmeyr 2021-04-25 16:17:47 +00:00
parent 9d68630a74
commit 87857ecf37
1 changed files with 96 additions and 0 deletions

View File

@ -8579,6 +8579,99 @@ testcase TC_no_msc() runs on test_CT {
* is the info correct on delayed PCU (re)connect?
*/
private function f_TC_refuse_mode_modif_to_vamos(charstring id) runs on MSC_ConnHdlr {
var PDU_BSSAP ass_cmd := f_gen_ass_req(g_pars.use_osmux);
var template PDU_BSSAP exp_compl := f_gen_exp_compl(g_pars.use_osmux);
/* puzzle together the ASSIGNMENT REQ for given codec[s] */
if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_AoIP) {
ass_cmd.pdu.bssmap.assignmentRequest.codecList := g_pars.ass_codec_list;
exp_compl.pdu.bssmap.assignmentComplete.speechCodec.codecElements[0] :=
g_pars.ass_codec_list.codecElements[0];
if (isvalue(g_pars.expect_mr_s0_s7)) {
exp_compl.pdu.bssmap.assignmentComplete.speechCodec.codecElements[0].s0_7 :=
g_pars.expect_mr_s0_s7;
}
}
ass_cmd.pdu.bssmap.assignmentRequest.channelType :=
f_BSSMAP_chtype_from_codec(g_pars.ass_codec_list.codecElements[0]);
log("expecting ASS COMPL like this: ", exp_compl);
f_establish_fully(ass_cmd, exp_compl);
f_vty_transceive(BSCVTY, "vamos modify first");
var RSL_Message rsl;
timer T := 5.0;
T.start;
alt {
[] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl {
var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload);
log("Rx L3 from net: ", l3);
if (ischosen(l3.msgs.rrm.channelModeModify)) {
setverdict(fail, "Mode Modify to VAMOS succeeded even though BTS does not support VAMOS");
mtc.stop;
}
}
[] RSL.receive(tr_RSL_MODE_MODIFY_REQ(g_chan_nr, ?)) -> value rsl {
setverdict(fail, "Mode Modify to VAMOS succeeded even though BTS does not support VAMOS");
mtc.stop;
}
[] T.timeout {
/* The BTS does not exhibit BTS_FEAT_VAMOS, so no VAMOS related Mode Modify should happen. */
setverdict(pass);
}
}
T.stop;
}
/* The BSC does *not* indicate BTS_FEAT_VAMOS; make sure that a channel Mode Modify to VAMOS mode is refused by
* osmo-bsc. */
testcase TC_refuse_mode_modif_to_vamos() runs on test_CT {
var TestHdlrParams pars := f_gen_test_hdlr_pars();
var MSC_ConnHdlr vc_conn;
f_init(1, true);
f_sleep(1.0);
pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
vc_conn := f_start_handler(refers(f_TC_refuse_mode_modif_to_vamos), pars);
vc_conn.done;
f_shutdown_helper();
}
/* The BSC does *not* indicate BTS_FEAT_VAMOS; make sure that a channel activation to VAMOS mode is refused by osmo-bsc.
*/
testcase TC_refuse_chan_act_to_vamos() runs on test_CT {
f_init_vty();
f_init(1, false);
f_sleep(1.0);
f_vty_transceive(BSCVTY, "bts 0 trx 0 timeslot 1 sub-slot 0 activate-vamos fr");
var ASP_RSL_Unitdata rx_rsl_ud;
timer T := 5.0;
T.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(?, IPAC_PROTO_RSL_TRX0)) -> value rx_rsl_ud {
if (rx_rsl_ud.rsl.msg_type == RSL_MT_CHAN_ACTIV) {
T.stop;
setverdict(fail, "CHANnel ACTivate in VAMOS mode succeeded even though BTS does not support VAMOS");
mtc.stop;
}
repeat;
}
[] T.timeout {
/* The BTS does not exhibit BTS_FEAT_VAMOS, so no VAMOS related CHANnel ACTivate should happen. */
setverdict(pass);
}
}
}
control {
/* CTRL interface testing */
execute( TC_ctrl_msc_connection_status() );
@ -8839,6 +8932,9 @@ control {
}
execute( TC_no_msc() );
execute( TC_refuse_chan_act_to_vamos() );
execute( TC_refuse_mode_modif_to_vamos() );
}
}