cbc: Introduce test TC_create_nack_bsc

Related: OS#4945
Change-Id: Iabeb3e9d86eaf59b76504edf3976a947ae29b911
This commit is contained in:
Pau Espin 2022-08-05 15:16:48 +02:00
parent 910ef1c74b
commit 6dd5a0f829
2 changed files with 44 additions and 4 deletions

View File

@ -44,7 +44,8 @@ type record BSC_ConnHdlrPars {
boolean tcp_is_client,
void_fn start_fn,
CBS_Message exp_cbs_msg optional,
BSSMAP_FIELD_CellIdentificationList cell_list_success optional
BSSMAP_FIELD_CellIdentificationList cell_list_success optional,
CBSP_FailureListItems tx_fail_list optional
};
function f_BSC_ConnHdlr_main(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
@ -126,11 +127,12 @@ runs on BSC_ConnHdlr {
function f_cbsp_tx_write_fail(CBS_Message msg, integer idx := 0,
template (omit) BSSMAP_FIELD_CellIdentificationList tx_cell_list := omit,
template (omit) CBSP_IE_NumBcastComplList tx_compl_list := omit,
template (omit) CBSP_FailureListItems tx_fail_list := omit)
runs on BSC_ConnHdlr {
var template (value) CBSP_PDU tx;
tx := ts_CBSP_WRITE_CBS_FAIL(msg.msg_id, msg.ser_nr, valueof(tx_fail_list),
omit, tx_cell_list, msg.channel_ind);
tx_compl_list, tx_cell_list, msg.channel_ind);
CBSP[idx].send(ts_CBSP_Send(g_cbsp_conn_id[idx], tx));
}
@ -162,7 +164,7 @@ runs on BSC_ConnHdlr {
if (istemplatekind(tx_fail_list, "omit")) {
f_cbsp_tx_write_compl(msg, idx, tx_cell_list, tx_compl_list);
} else {
f_cbsp_tx_write_fail(msg, idx, tx_cell_list, tx_fail_list);
f_cbsp_tx_write_fail(msg, idx, tx_cell_list, tx_compl_list, tx_fail_list);
}
}
[] as_cbsp_keepalive_ack(idx) { repeat; }

View File

@ -118,7 +118,8 @@ private function f_init_pars_bsc(charstring bsc_host, integer bsc_cbsp_port,
tcp_is_client := tcp_is_client,
start_fn := refers(f_BSC_ConnHdlr_start_fn_void),
exp_cbs_msg := omit,
cell_list_success := omit
cell_list_success := omit,
tx_fail_list := omit
};
return pars;
}
@ -681,6 +682,41 @@ testcase TC_ecbe_create_delete_etws_mme() runs on test_CT {
f_shutdown_helper();
}
/* Test BSC answering WRITE-REPLACE REQUEST with WRITE-REPLACE FAILURE */
private function f_bsc_TC_create_nack_bsc() runs on BSC_ConnHdlr {
f_cbsp_handle_write(g_pars.exp_cbs_msg, 0, g_pars.cell_list_success, g_pars.tx_fail_list);
}
testcase TC_create_nack_bsc() runs on test_CT {
var template (value) BSSMAP_FIELD_CellIdentificationList cell_list_success;
var template (value) CBSP_FailureListItems tx_fail_list;
var CBS_Message msg;
var EcbeCbcMessage ecbe;
msg := valueof(t_CBSmsg(49, 16752));
f_init(num_bsc := 1, num_mme := 0);
cell_list_success := ts_BSSMAP_CIL_CGI({
ts_BSSMAP_CI_CGI('901'H, '70'H, 23, 42),
ts_BSSMAP_CI_CGI('901'H, '70'H, 24, 42)
});
tx_fail_list := {
CBSP_FailureListItem_CGI(ts_BSSMAP_CI_CGI('901'H, '70'H, 24, 48), CBSP_CAUSE_CELL_ID_NOT_VALID),
CBSP_FailureListItem_LAC_CI(ts_BSSMAP_CI_LAC_CI(10001, 50001), CBSP_CAUSE_LAI_OR_LAC_NPT_VALID)
};
g_pars_BSC[0].start_fn := refers(f_bsc_TC_create_nack_bsc);
g_pars_BSC[0].exp_cbs_msg := msg;
g_pars_BSC[0].cell_list_success := valueof(cell_list_success);
g_pars_BSC[0].tx_fail_list := valueof(tx_fail_list);
f_start();
ecbe := f_cbs2ecbe(msg, "TTCN-3");
f_ecbe_tx_post_cbs(ecbe);
f_ecbe_rx_resp(201);
f_shutdown_helper();
}
control {
execute( TC_rx_keepalive() );
execute( TC_rx_keepalive_timeout() );
@ -698,6 +734,8 @@ control {
execute( TC_ecbe_create_delete_etws_bsc() );
execute( TC_ecbe_create_delete_etws_mme() );
execute( TC_create_nack_bsc() );
}
}