bsc: add RSL, RSL_PROC port args in various places

To be able to run tests on a cell other than bts 0, there needs to be a
way to select the RSL_DCHAN_PT and RSLEM_PROC_PT in various places.

Upcoming BSC_Tests.TC_cm_reestablishment depends on this, to be able to
run through an Assignment on bts 1.

Related: SYS#5130
Change-Id: Ia14f46d4e5e8d4722224b97c346c0cb7973fff97
This commit is contained in:
Neels Hofmeyr 2021-07-22 19:14:48 +02:00 committed by laforge
parent 3222e0eee8
commit 85bcd27bf0
1 changed files with 40 additions and 38 deletions

View File

@ -5539,7 +5539,7 @@ private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr {
exp_rr_rel_tmpl := tr_RRM_RR_RELEASE;
}
f_ho_into_this_bsc(id, oldToNewBSSIEs);
f_perform_clear(RSL, exp_rr_rel_tmpl);
f_perform_clear(exp_rr_rel_tmpl := exp_rr_rel_tmpl);
setverdict(pass);
}
function f_tc_ho_into_this_bsc_main(TestHdlrParams pars) runs on test_CT {
@ -7215,33 +7215,34 @@ testcase TC_c0_power_red_mode() runs on test_CT {
template MobileIdentityLV ts_MI_TMSI_NRI_LV(integer nri_v, integer nri_bitlen := 10) :=
ts_MI_TMSI_LV(tmsi := f_gen_tmsi(suffix := 0, nri_v := nri_v, nri_bitlen := nri_bitlen));
private function f_expect_lchan_rel(RSL_DCHAN_PT rsl, template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
private function f_expect_lchan_rel(RSL_DCHAN_PT rsl_pt, RSLEM_PROC_PT rsl_proc_pt, template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
runs on MSC_ConnHdlr {
interleave {
[] rsl.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
[] rsl_pt.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
f_logp(BSCVTY, "Got RSL RR Release");
}
[] rsl.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
[] rsl_pt.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
f_logp(BSCVTY, "Got RSL Deact SACCH");
}
[] rsl.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
[] rsl_pt.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
f_logp(BSCVTY, "Got RSL RF Chan Rel, sending Rel Ack");
rsl.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
f_rslem_unregister(0, g_chan_nr);
rsl_pt.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
f_rslem_unregister(0, g_chan_nr, PT := rsl_proc_pt);
break;
}
}
}
friend function f_perform_clear(RSL_DCHAN_PT rsl, template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
friend function f_perform_clear(RSL_DCHAN_PT rsl_pt := RSL, RSLEM_PROC_PT rsl_proc_pt := RSL_PROC,
template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE)
runs on MSC_ConnHdlr {
f_logp(BSCVTY, "MSC instructs BSC to clear channel");
BSSAP.send(ts_BSSMAP_ClearCommand(0));
interleave {
[] rsl.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
[] rsl_pt.receive(tr_RSL_DATA_REQ(g_chan_nr, ?, decmatch exp_rr_rel_tmpl)) {
f_logp(BSCVTY, "Got RSL RR Release");
}
[] rsl.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
[] rsl_pt.receive(tr_RSL_DEACT_SACCH(g_chan_nr)) {
f_logp(BSCVTY, "Got RSL Deact SACCH");
}
[] BSSAP.receive(tr_BSSMAP_ClearComplete) {
@ -7249,15 +7250,16 @@ runs on MSC_ConnHdlr {
/* Also drop the SCCP connection */
BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
}
[] rsl.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
[] rsl_pt.receive(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL)) {
f_logp(BSCVTY, "Got RSL RF Chan Rel, sending Rel Ack");
rsl.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
f_rslem_unregister(0, g_chan_nr);
rsl_pt.send(ts_RSL_RF_CHAN_REL_ACK(g_chan_nr));
f_rslem_unregister(0, g_chan_nr, PT := rsl_proc_pt);
}
}
}
private function f_perform_compl_l3(RSL_DCHAN_PT rsl, template PDU_ML3_MS_NW l3_info, boolean do_clear := true, boolean expect_bssmap_l3 := true)
private function f_perform_compl_l3(RSL_DCHAN_PT rsl_pt, RSLEM_PROC_PT rsl_proc_pt,
template PDU_ML3_MS_NW l3_info, boolean do_clear := true, boolean expect_bssmap_l3 := true)
runs on MSC_ConnHdlr {
timer T := 10.0;
var octetstring l3_enc := enc_PDU_ML3_MS_NW(valueof(l3_info));
@ -7265,17 +7267,17 @@ runs on MSC_ConnHdlr {
f_logp(BSCVTY, "establish channel, send Complete Layer 3 Info");
f_create_bssmap_exp(l3_enc);
/* RSL_Emulation.f_chan_est() on rsl:
* This is basically code dup with s/RSL/rsl from:
/* RSL_Emulation.f_chan_est() on rsl_pt:
* This is basically code dup with s/RSL/rsl_pt from:
* RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn);
*/
var RSL_Message rx_rsl;
var GsmRrMessage rr;
/* request a channel to be established */
rsl.send(ts_RSLDC_ChanRqd(g_pars.ra, g_pars.fn));
rsl_pt.send(ts_RSLDC_ChanRqd(g_pars.ra, g_pars.fn));
/* expect immediate assignment.
* Code dup with s/RSL/rsl from:
* Code dup with s/RSL/rsl_pt from:
* rx_rsl := f_rx_or_fail(tr_RSL_IMM_ASSIGN);
*/
timer Tt := 10.0;
@ -7283,10 +7285,10 @@ runs on MSC_ConnHdlr {
/* request a channel to be established */
Tt.start;
alt {
[] rsl.receive(tr_RSL_IMM_ASSIGN) -> value rx_rsl {
[] rsl_pt.receive(tr_RSL_IMM_ASSIGN) -> value rx_rsl {
Tt.stop;
}
[] rsl.receive {
[] rsl_pt.receive {
setverdict(fail, "Unexpected RSL message on DCHAN");
mtc.stop;
}
@ -7297,7 +7299,7 @@ runs on MSC_ConnHdlr {
}
rr := dec_GsmRrMessage(rx_rsl.ies[1].body.full_imm_ass_info.payload);
g_chan_nr := rr.payload.imm_ass.chan_desc.chan_nr;
rsl.send(ts_RSL_EST_IND(g_chan_nr, valueof(g_pars.link_id), l3_enc));
rsl_pt.send(ts_RSL_EST_IND(g_chan_nr, valueof(g_pars.link_id), l3_enc));
if (expect_bssmap_l3) {
@ -7328,12 +7330,12 @@ runs on MSC_ConnHdlr {
/* start ciphering, if requested */
if (ispresent(g_pars.encr)) {
f_logp(BSCVTY, "start ciphering");
f_cipher_mode(g_pars.encr);
f_cipher_mode(g_pars.encr, rsl_pt := rsl_pt, rsl_proc_pt := rsl_proc_pt);
}
}
if (do_clear) {
f_perform_clear(rsl);
f_perform_clear(rsl_pt, rsl_proc_pt);
}
setverdict(pass);
f_sleep(1.0);
@ -7342,21 +7344,21 @@ runs on MSC_ConnHdlr {
private function f_tc_mscpool_compl_l3(charstring id) runs on MSC_ConnHdlr {
f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
if (g_pars.mscpool.rsl_idx == 0) {
f_perform_compl_l3(RSL, g_pars.mscpool.l3_info);
f_perform_compl_l3(RSL, RSL_PROC, g_pars.mscpool.l3_info);
} else if (g_pars.mscpool.rsl_idx == 1) {
f_perform_compl_l3(RSL1, g_pars.mscpool.l3_info);
f_perform_compl_l3(RSL1, RSL1_PROC, g_pars.mscpool.l3_info);
} else if (g_pars.mscpool.rsl_idx == 2) {
f_perform_compl_l3(RSL2, g_pars.mscpool.l3_info);
f_perform_compl_l3(RSL2, RSL2_PROC, g_pars.mscpool.l3_info);
}
}
/* Various Complete Layer 3 by IMSI all end up with the first MSC, because the other MSCs are not connected. */
private function f_tc_mscpool_L3Compl_on_1_msc(charstring id) runs on MSC_ConnHdlr {
f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
f_perform_compl_l3(RSL, ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000001'H)), '00F110'O) );
f_perform_compl_l3(RSL, ts_CM_SERV_REQ(CM_TYPE_MO_SMS, valueof(ts_MI_IMSI_LV('001010000000002'H))) );
f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010000000003'H))) );
f_perform_compl_l3(RSL, ts_ML3_MO_MM_IMSI_DET_Ind(valueof(ts_MI_IMSI_LV('001010000000004'H))) );
f_perform_compl_l3(RSL, RSL_PROC, ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000001'H)), '00F110'O) );
f_perform_compl_l3(RSL, RSL_PROC, ts_CM_SERV_REQ(CM_TYPE_MO_SMS, valueof(ts_MI_IMSI_LV('001010000000002'H))) );
f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010000000003'H))) );
f_perform_compl_l3(RSL, RSL_PROC, ts_ML3_MO_MM_IMSI_DET_Ind(valueof(ts_MI_IMSI_LV('001010000000004'H))) );
}
testcase TC_mscpool_L3Compl_on_1_msc() runs on test_CT {
@ -7744,7 +7746,7 @@ private function f_tc_mscpool_paging_imsi(charstring id) runs on MSC_ConnHdlr {
/* Despite the round robin pointing at the second MSC ('roundrobin next 1'), the earlier Paging for the same IMSI
* causes this Paging Response to go to the first MSC (bssap_idx := 0). */
f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(imsi))) );
f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(imsi))) );
f_sleep(1.0);
}
testcase TC_mscpool_paging_and_response_imsi() runs on test_CT {
@ -7796,7 +7798,7 @@ private function f_tc_mscpool_paging_tmsi(charstring id) runs on MSC_ConnHdlr {
/* Despite the NRI matching the second MSC (NRI from 'msc 1' in osmo-bsc.cfg) and round robin pointing at the
* third MSC ('roundrobin next 2'), the earlier Paging for the same TMSI causes this Paging Response to go to
* the first MSC (bssap_idx := 0). */
f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(nri_v))) );
f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(nri_v))) );
f_sleep(1.0);
}
testcase TC_mscpool_paging_and_response_tmsi() runs on test_CT {
@ -8738,7 +8740,7 @@ private function f_lcs_loc_req_for_active_ms(boolean do_ta_request := false) run
/* The LCS was using an active A-interface conn. It should still remain active after this. */
f_mo_l3_transceive();
f_perform_clear(RSL);
f_perform_clear();
f_sleep(2.0);
setverdict(pass);
@ -8847,8 +8849,8 @@ private function f_tc_lcs_loc_req_for_idle_ms(charstring id) runs on MSC_ConnHdl
/* MS requests channel. Since the Paging was for LCS, the Paging Response does not trigger a Complete Layer 3 to
* the MSC, and releases the lchan directly. */
f_perform_compl_l3(RSL, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(g_pars.imsi))), do_clear := false, expect_bssmap_l3 := false);
f_expect_lchan_rel(RSL);
f_perform_compl_l3(RSL, RSL_PROC, ts_PAG_RESP(valueof(ts_MI_IMSI_LV(g_pars.imsi))), do_clear := false, expect_bssmap_l3 := false);
f_expect_lchan_rel(RSL, RSL_PROC);
/* From the Paging Response, the TA is now known to the BSC, and it responds to the SMLC. */
@ -9080,7 +9082,7 @@ private function f_tc_cm_service_during_lcs_loc_req(charstring id) runs on MSC_C
/* As the A-interface conn was established for LCS, the MS coincidentally decides to issue a CM Service Request
* and establish Layer 3. It should use the existing A-interface conn. */
f_perform_compl_l3(RSL, valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV(g_pars.imsi)))),
f_perform_compl_l3(RSL, RSL_PROC, valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV(g_pars.imsi)))),
do_clear := false, expect_bssmap_l3 := true);
/* SMLC wants to ask the TA from the BSC explicitly in a BSSLAP TA Request message */
@ -9097,7 +9099,7 @@ private function f_tc_cm_service_during_lcs_loc_req(charstring id) runs on MSC_C
/* The lchan should still exist, it was from a CM Service Request. */
f_mo_l3_transceive();
f_perform_clear(RSL);
f_perform_clear();
f_sleep(2.0);
setverdict(pass);
@ -9174,7 +9176,7 @@ private function f_tc_ho_during_lcs_loc_req(charstring id) runs on MSC_ConnHdlr
f_mo_l3_transceive(RSL1);
/* MSC decides it is done now. */
f_perform_clear(RSL1);
f_perform_clear(RSL1, RSL1_PROC);
f_sleep(2.0);
setverdict(pass);