bsc: Introduce test TC_srvcc_eutran_to_geran_ho_out

Related: SYS#5337
Change-Id: Id34924bbf0a5cf08b4b6f5ea56a10cef6b69c877
This commit is contained in:
Pau Espin 2021-04-19 13:03:20 +02:00 committed by laforge
parent d004631c82
commit 35801c3edc
2 changed files with 87 additions and 22 deletions

View File

@ -4767,19 +4767,12 @@ private function f_expect_dlcx_conns() runs on MSC_ConnHdlr {
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 { private function f_ho_out_of_this_bsc(template (omit) BSSMAP_oldToNewBSSIEs exp_oldToNewBSSIEs := omit) runs on MSC_ConnHdlr {
g_pars := f_gen_test_hdlr_pars();
var PDU_BSSAP ass_req := f_gen_ass_req();
ass_req.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
ass_req.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
f_establish_fully(ass_req, exp_compl);
f_bts_0_cfg(BSCVTY, {"neighbor lac 99 arfcn 123 bsic any"}); f_bts_0_cfg(BSCVTY, {"neighbor lac 99 arfcn 123 bsic any"});
f_vty_transceive(BSCVTY, "handover any to arfcn 123 bsic any"); f_vty_transceive(BSCVTY, "handover any to arfcn 123 bsic any");
BSSAP.receive(tr_BSSMAP_HandoverRequired); BSSAP.receive(tr_BSSMAP_HandoverRequired(exp_oldToNewBSSIEs));
f_sleep(0.5); f_sleep(0.5);
/* The MSC negotiates Handover Request and Handover Request Ack with /* The MSC negotiates Handover Request and Handover Request Ack with
@ -4820,6 +4813,17 @@ private function f_tc_ho_out_of_this_bsc(charstring id) runs on MSC_ConnHdlr {
f_expect_dlcx_conns(); f_expect_dlcx_conns();
setverdict(pass); setverdict(pass);
}
private function f_tc_ho_out_of_this_bsc(charstring id) runs on MSC_ConnHdlr {
g_pars := f_gen_test_hdlr_pars();
var PDU_BSSAP ass_req := f_gen_ass_req();
ass_req.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
ass_req.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
f_establish_fully(ass_req, exp_compl);
f_ho_out_of_this_bsc();
f_sleep(1.0); f_sleep(1.0);
} }
testcase TC_ho_out_of_this_bsc() runs on test_CT { testcase TC_ho_out_of_this_bsc() runs on test_CT {
@ -5105,14 +5109,12 @@ testcase TC_ho_out_fail_no_result_after_ho_cmd() runs on test_CT {
f_shutdown_helper(); f_shutdown_helper();
} }
private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr { private function f_ho_into_this_bsc(charstring id, template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit) runs on MSC_ConnHdlr {
/* Hack: the proper way would be to wait for the BSSMAP Handover Request ACK and extract the /* Hack: the proper way would be to wait for the BSSMAP Handover Request ACK and extract the
* actual assigned chan_nr from its L3 (RR Handover Command) message. But osmo-bsc starts acting * actual assigned chan_nr from its L3 (RR Handover Command) message. But osmo-bsc starts acting
* on the lchan even before we get a chance to evaluate the BSSMAP Handover Request ACK. So we * on the lchan even before we get a chance to evaluate the BSSMAP Handover Request ACK. So we
* need to assume that osmo-bsc will activate TS 1 and already set up this lchan's RSL emulation * need to assume that osmo-bsc will activate TS 1 and already set up this lchan's RSL emulation
* before we get started. */ * before we get started. */
var template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit;
var template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE;
var RslChannelNr new_chan_nr := valueof(t_RslChanNr0(1, RSL_CHAN_NR_Bm_ACCH)); var RslChannelNr new_chan_nr := valueof(t_RslChanNr0(1, RSL_CHAN_NR_Bm_ACCH));
f_rslem_register(0, new_chan_nr); f_rslem_register(0, new_chan_nr);
g_chan_nr := new_chan_nr; g_chan_nr := new_chan_nr;
@ -5122,11 +5124,6 @@ private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr {
f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR); f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
activate(as_Media()); activate(as_Media());
if (not istemplatekind(g_pars.last_used_eutran_plmn, "omit")) {
oldToNewBSSIEs := f_ts_BSSMAP_oldToNewBSSIEs(ts_BSSMAP_LastUsedEUTRANPLMNId(g_pars.last_used_eutran_plmn));
exp_rr_rel_tmpl := tr_RRM_RR_RELEASE_CellSelectInd;
}
BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc,
f_gen_handover_req(aoip_tla := g_pars.host_aoip_tla, f_gen_handover_req(aoip_tla := g_pars.host_aoip_tla,
oldToNewBSSIEs := oldToNewBSSIEs))); oldToNewBSSIEs := oldToNewBSSIEs)));
@ -5174,7 +5171,17 @@ private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr {
enc_PDU_ML3_MS_NW(l3_tx))); enc_PDU_ML3_MS_NW(l3_tx)));
BSSAP.receive(tr_BSSMAP_HandoverComplete); BSSAP.receive(tr_BSSMAP_HandoverComplete);
setverdict(pass);
}
private function f_tc_ho_into_this_bsc(charstring id) runs on MSC_ConnHdlr {
var template PDU_ML3_NW_MS exp_rr_rel_tmpl := tr_RRM_RR_RELEASE;
var template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit;
if (not istemplatekind(g_pars.last_used_eutran_plmn, "omit")) {
oldToNewBSSIEs := f_ts_BSSMAP_oldToNewBSSIEs(ts_BSSMAP_LastUsedEUTRANPLMNId(g_pars.last_used_eutran_plmn));
exp_rr_rel_tmpl := tr_RRM_RR_RELEASE_CellSelectInd;
}
f_ho_into_this_bsc(id, oldToNewBSSIEs);
f_perform_clear(RSL, exp_rr_rel_tmpl); f_perform_clear(RSL, exp_rr_rel_tmpl);
setverdict(pass); setverdict(pass);
} }
@ -5213,7 +5220,7 @@ testcase TC_ho_into_this_bsc_tla_v6() runs on test_CT {
} }
/* Similar to TC_ho_into_this_bsc, but when in SRVCC, HO Req contains "Old BSS /* Similar to TC_ho_into_this_bsc, but when in SRVCC, HO Req contains "Old BSS
to New BSS Information" IE with "Last Used E-UTRAN PLMN Id", whihch, when the to New BSS Information" IE with "Last Used E-UTRAN PLMN Id", which, when the
channel is later released (RR CHannel Release), should trigger inclusion of channel is later released (RR CHannel Release), should trigger inclusion of
IE "Cell Selection Indicator after Release of all TCH and SDCCH" with E-UTRAN IE "Cell Selection Indicator after Release of all TCH and SDCCH" with E-UTRAN
neighbors. */ neighbors. */
@ -5224,6 +5231,43 @@ testcase TC_srvcc_eutran_to_geran() runs on test_CT {
f_shutdown_helper(); f_shutdown_helper();
} }
private function f_tc_srvcc_eutran_to_geran_ho_out(charstring id) runs on MSC_ConnHdlr {
var template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs;
oldToNewBSSIEs := f_ts_BSSMAP_oldToNewBSSIEs(ts_BSSMAP_LastUsedEUTRANPLMNId(g_pars.last_used_eutran_plmn));
f_ho_into_this_bsc(id, oldToNewBSSIEs);
f_ho_out_of_this_bsc(oldToNewBSSIEs);
setverdict(pass);
}
/* First, HO into BSC from EUTRAN (SRVCC): HO Request contains "Old BSS to New
BSS Information" IE with "Last Used E-UTRAN PLMN Id".
Second, HO to another BSC: HO Required contains "Old BSS to New BSS Information"
IE with "Last Used E-UTRAN PLMN Id" from first step. */
testcase TC_srvcc_eutran_to_geran_ho_out() runs on test_CT {
var MSC_ConnHdlr vc_conn;
var TestHdlrParams pars := f_gen_test_hdlr_pars();
f_init(1, true);
f_sleep(1.0);
f_ctrs_bsc_and_bts_init();
pars.last_used_eutran_plmn := '323454'O;
pars.sccp_addr_msc := g_bssap[0].sccp_addr_own;
pars.sccp_addr_bsc := g_bssap[0].sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_srvcc_eutran_to_geran_ho_out), pars);
vc_conn.done;
f_ctrs_bsc_and_bts_add(0, "handover:attempted", 2);
f_ctrs_bsc_and_bts_add(0, "handover:completed", 2);
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:attempted", 1);
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_in:completed", 1);
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted", 1);
f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:completed", 1);
f_ctrs_bsc_and_bts_verify();
f_shutdown_helper();
}
private function f_tc_ho_in_fail_msc_clears(charstring id) runs on MSC_ConnHdlr { private function f_tc_ho_in_fail_msc_clears(charstring id) runs on MSC_ConnHdlr {
var RslChannelNr new_chan_nr := valueof(t_RslChanNr0(1, RSL_CHAN_NR_Bm_ACCH)); var RslChannelNr new_chan_nr := valueof(t_RslChanNr0(1, RSL_CHAN_NR_Bm_ACCH));
f_rslem_register(0, new_chan_nr); f_rslem_register(0, new_chan_nr);
@ -8673,6 +8717,7 @@ control {
execute( TC_ho_into_this_bsc_tla_v6() ); execute( TC_ho_into_this_bsc_tla_v6() );
} }
execute( TC_srvcc_eutran_to_geran() ); execute( TC_srvcc_eutran_to_geran() );
execute( TC_srvcc_eutran_to_geran_ho_out() );
execute( TC_ho_in_fail_msc_clears() ); execute( TC_ho_in_fail_msc_clears() );
execute( TC_ho_in_fail_msc_clears_after_ho_detect() ); execute( TC_ho_in_fail_msc_clears_after_ho_detect() );
execute( TC_ho_in_fail_no_detect() ); execute( TC_ho_in_fail_no_detect() );

View File

@ -232,6 +232,24 @@ function f_ts_BSSMAP_IE_OldToNewBSSInfo(template (omit) BSSMAP_oldToNewBSSIEs va
} }
} }
template BSSMAP_IE_OldToNewBSSInfo tr_BSSMAP_IE_OldToNewBSSInfo(template (value) BSSMAP_oldToNewBSSIEs val) := {
elementIdentifier := '3A'O,
lengthIndicator := ?, /* overwritten by codec */
oldToNewBSSIEs := enc_BSSMAP_oldToNewBSSIEs(valueof(val))
}
function f_tr_BSSMAP_IE_OldToNewBSSInfo(template BSSMAP_oldToNewBSSIEs val := *)
return template BSSMAP_IE_OldToNewBSSInfo {
if (istemplatekind(val, "*")) {
return *;
} else if (istemplatekind(val, "?")) {
return ?;
} else if (istemplatekind(val, "omit")) {
return omit;
} else {
return tr_BSSMAP_IE_OldToNewBSSInfo(val);
}
}
template (value) BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := { template (value) BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := {
elementIdentifier := 'F0'O elementIdentifier := 'F0'O
} }
@ -815,7 +833,8 @@ template PDU_BSSAP tr_BSSMAP_ClearRequest modifies tr_BSSAP_BSSMAP := {
} }
template PDU_BSSAP ts_BSSMAP_HandoverRequired(BssmapCause cause, template PDU_BSSAP ts_BSSMAP_HandoverRequired(BssmapCause cause,
template BSSMAP_FIELD_CellIdentificationList cid_list) template BSSMAP_FIELD_CellIdentificationList cid_list,
template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit)
modifies ts_BSSAP_BSSMAP := { modifies ts_BSSAP_BSSMAP := {
pdu := { pdu := {
bssmap := { bssmap := {
@ -828,7 +847,7 @@ modifies ts_BSSAP_BSSMAP := {
currentChannelType1 := omit, currentChannelType1 := omit,
speechVersion := omit, speechVersion := omit,
queueingIndicator := omit, queueingIndicator := omit,
oldToNewBSSInfo := omit, oldToNewBSSInfo := f_ts_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs),
sourceToTargetRNCTransparentInfo := omit, sourceToTargetRNCTransparentInfo := omit,
sourceToTargetRNCTransparentInfoCDMA := omit, sourceToTargetRNCTransparentInfoCDMA := omit,
gERANClassmark := omit, gERANClassmark := omit,
@ -841,11 +860,12 @@ modifies ts_BSSAP_BSSMAP := {
} }
template PDU_BSSAP tr_BSSMAP_HandoverRequired modifies tr_BSSAP_BSSMAP := { template PDU_BSSAP tr_BSSMAP_HandoverRequired(template BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := *) modifies tr_BSSAP_BSSMAP := {
pdu := { pdu := {
bssmap := { bssmap := {
handoverRequired := { handoverRequired := {
messageType := '11'O messageType := '11'O,
oldToNewBSSInfo := f_tr_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs)
} }
} }
} }