bsc: inter-BSC incoming HO in with empty SCCP CR
Test inter-BSC incoming HO where the Handover Request message is not
included in the initial SCCP N-Connect, but follows in a separate DT1.
Related: SYS#5864
Depends: I535c791fa01e99a2226392eb05f676ba6c3cc16e (osmo-bsc)
Change-Id: I6732153cdd0d529bfaf0925387e765f3403a756b
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 907b436..f203d95 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6009,12 +6009,18 @@
f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", FR_AMR);
activate(as_Media());
- 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,
- cell_id_source := g_pars.cell_id_source,
- oldToNewBSSIEs := oldToNewBSSIEs,
- enc := g_pars.encr)));
- BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND);
+ var PDU_BSSAP ho_req := f_gen_handover_req(aoip_tla := g_pars.host_aoip_tla,
+ cell_id_source := g_pars.cell_id_source,
+ oldToNewBSSIEs := oldToNewBSSIEs,
+ enc := g_pars.encr);
+ if (g_pars.inter_bsc_ho_in__ho_req_in_initial_sccp_cr) {
+ BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, ho_req));
+ BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND);
+ } else {
+ BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_bsc, g_pars.sccp_addr_msc, omit));
+ BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_CONF_IND);
+ BSSAP.send(ho_req);
+ }
alt {
[] BSSAP.receive(tr_BSSMAP_HandoverRequestAcknowledge(?)) -> value rx_bssap {
@@ -6686,6 +6692,16 @@
f_shutdown_helper();
}
+/* An incoming inter-BSC HO can either issue the Handover Request message attached to the initial SCCP N-Connect (as in
+ * the other tests we have so far), or the first CR can be "empty" with the BSSAP request following later. Test the
+ * empty N-Connect case. */
+testcase TC_ho_into_this_bsc_sccp_cr_without_bssap() runs on test_CT {
+ var TestHdlrParams pars := f_gen_test_hdlr_pars();
+ pars.inter_bsc_ho_in__ho_req_in_initial_sccp_cr := false;
+ f_tc_ho_into_this_bsc_main(pars);
+ f_shutdown_helper();
+}
+
type record of charstring Commands;
private function f_bts_0_cfg(TELNETasp_PT pt, Commands cmds := {})
@@ -11347,6 +11363,7 @@
execute( TC_ho_in_fail_msc_clears_after_ho_detect() );
execute( TC_ho_in_fail_no_detect() );
execute( TC_ho_in_fail_no_detect2() );
+ execute( TC_ho_into_this_bsc_sccp_cr_without_bssap() );
execute( TC_ho_neighbor_config_1() );
execute( TC_ho_neighbor_config_2() );
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 29b7783..95cdb7c 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -671,7 +671,8 @@
boolean expect_channel_mode_modify,
uint3_t expect_tsc optional,
BSSMAP_IE_CellIdentifier cell_id_source,
- boolean expect_ho_fail
+ boolean expect_ho_fail,
+ boolean inter_bsc_ho_in__ho_req_in_initial_sccp_cr
};
/* Note: Do not use valueof() to get a value of this template, use
@@ -712,7 +713,8 @@
expect_channel_mode_modify := false,
expect_tsc := omit,
cell_id_source := valueof(ts_CellID_LAC_CI(1, 1)),
- expect_ho_fail := false
+ expect_ho_fail := false,
+ inter_bsc_ho_in__ho_req_in_initial_sccp_cr := true
}
function f_create_chan_and_exp(template (present) PDU_BSSAP exp_l3_compl := ?)
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 295876e..d87ee9c 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -439,9 +439,9 @@
type record BSSAP_Conn_Req {
SCCP_PAR_Address addr_peer,
SCCP_PAR_Address addr_own,
- PDU_BSSAP bssap
+ PDU_BSSAP bssap optional
}
-template BSSAP_Conn_Req ts_BSSAP_Conn_Req(SCCP_PAR_Address peer, SCCP_PAR_Address own, PDU_BSSAP bssap) := {
+template BSSAP_Conn_Req ts_BSSAP_Conn_Req(SCCP_PAR_Address peer, SCCP_PAR_Address own, template (omit) PDU_BSSAP bssap) := {
addr_peer := peer,
addr_own := own,
bssap := bssap