cbc: Test sending Unknown TAI List to osmo-cbc
Related: OS#4945
Change-Id: I7d8cf5e6498d03ad340b8f843ce93a20171e9fca
diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn
index 406baed..9beaddf 100644
--- a/cbc/CBC_Tests.ttcn
+++ b/cbc/CBC_Tests.ttcn
@@ -160,6 +160,7 @@
start_fn := refers(f_MME_ConnHdlr_start_fn_void),
exp_cbs_msg := omit,
write_replace_warning_ind_cause := omit,
+ write_repl_unknown_TAIs := omit,
bcast_cell_id_list := omit
};
return pars;
@@ -498,6 +499,25 @@
f_shutdown_helper();
}
+/* Create and delete message with MME available. MME reports
+ * Write-Replace-Response with Unknown TAI IE.
+ */
+testcase TC_ecbe_create_delete_mme_unknown_tai() runs on test_CT {
+ var template (value) List_of_TAIs write_repl_unknown_TAIs;
+ var template (value) CBS_Message msg := t_CBSmsg(48, 16752);
+
+ f_init(num_bsc := 0, num_mme := 1);
+
+ write_repl_unknown_TAIs := {{ts_SBCAP_TAI(f_enc_mcc_mnc('901'H, '70'H), 1234)}};
+ g_pars_MME[0].start_fn := refers(f_mme_create_and_delete);
+ g_pars_MME[0].exp_cbs_msg := valueof(msg);
+ g_pars_MME[0].write_replace_warning_ind_cause := SBC_AP_Cause_message_accepted;
+ g_pars_MME[0].write_repl_unknown_TAIs := valueof(write_repl_unknown_TAIs);
+ f_start();
+ f_create_and_delete(valueof(msg));
+ f_shutdown_helper();
+}
+
/* Create and delete message with both BSC and MME available */
testcase TC_ecbe_create_delete_bsc_and_mme() runs on test_CT {
f_init(num_bsc := 1, num_mme := 1);
@@ -585,6 +605,7 @@
execute( TC_ecbe_create_delete_ci() );
execute( TC_ecbe_create_delete_lai() );
execute( TC_ecbe_create_delete_mme_indication() );
+ execute( TC_ecbe_create_delete_mme_unknown_tai() );
execute( TC_ecbe_create_delete_bsc_and_mme() );
execute( TC_ecbe_create_delete_bsc_server() );
execute( TC_ecbe_create_delete_mme_server() );
diff --git a/cbc/MME_ConnectionHandler.ttcn b/cbc/MME_ConnectionHandler.ttcn
index ed0502e..4bcc853 100644
--- a/cbc/MME_ConnectionHandler.ttcn
+++ b/cbc/MME_ConnectionHandler.ttcn
@@ -45,6 +45,7 @@
void_fn start_fn,
CBS_Message exp_cbs_msg optional,
SBC_AP_Cause write_replace_warning_ind_cause optional,
+ List_of_TAIs write_repl_unknown_TAIs optional,
CellId_Broadcast_List bcast_cell_id_list optional
};
@@ -64,9 +65,16 @@
function f_sbcap_tx_write_replace_warn_resp(CBS_Message msg, integer idx := 0)
runs on MME_ConnHdlr {
var template (value) SBC_AP_PDU tx;
- /* TODO: pass Unknown Tracking Area List as parameter above (omit by default) */
- tx := ts_SBCAP_WRITE_WARNING_RESP(int2bit(msg.msg_id, 16),
- int2bit(msg.ser_nr, 16));
+ if (ispresent(g_pars.write_repl_unknown_TAIs)) {
+ tx := ts_SBCAP_WRITE_WARNING_RESP_UNKNOWN_TAI(
+ int2bit(msg.msg_id, 16),
+ int2bit(msg.ser_nr, 16),
+ SBC_AP_Cause_message_accepted,
+ g_pars.write_repl_unknown_TAIs);
+ } else {
+ tx := ts_SBCAP_WRITE_WARNING_RESP(int2bit(msg.msg_id, 16),
+ int2bit(msg.ser_nr, 16));
+ }
f_SBC_AP_send(tx, idx);
}