bsc: Add CommonID Test: Send CommonID from MSC and check it is processed
Related: OS#2969 Change-Id: I501108bc6c19b17d3fc680211c7290a31770a159
This commit is contained in:
parent
709650980a
commit
eddf0e9e10
|
@ -2777,6 +2777,33 @@ testcase TC_classmark() runs on test_CT {
|
|||
vc_conn.done;
|
||||
}
|
||||
|
||||
/* Send a CommonID from the simulated MSC and verify that the information is used to
|
||||
* fill BSC-internal data structures (specifically, bsc_subscr associated with subscr_conn) */
|
||||
private function f_tc_common_id(charstring id) runs on MSC_ConnHdlr {
|
||||
g_pars := f_gen_test_hdlr_pars();
|
||||
f_MscConnHdlr_init_vty();
|
||||
|
||||
f_create_chan_and_exp();
|
||||
/* we should now have a COMPL_L3 at the MSC */
|
||||
BSSAP.receive(tr_BSSMAP_ComplL3);
|
||||
|
||||
/* Send CommonID */
|
||||
BSSAP.send(ts_BSSMAP_CommonId(g_pars.imsi));
|
||||
|
||||
/* Use VTY to verify that the IMSI of the subscr_conn is set */
|
||||
var charstring regex := "*(IMSI: " & hex2str(g_pars.imsi) & ")*";
|
||||
f_vty_transceive_match_regexp_retry(BSCVTY, "show conns", regex, 0, 4, 1.0);
|
||||
|
||||
setverdict(pass);
|
||||
}
|
||||
testcase TC_common_id() runs on test_CT {
|
||||
var MSC_ConnHdlr vc_conn;
|
||||
f_init(1, true);
|
||||
f_sleep(1.0);
|
||||
vc_conn := f_start_handler(refers(f_tc_common_id));
|
||||
vc_conn.done;
|
||||
}
|
||||
|
||||
private function f_est_single_l3(template PDU_ML3_MS_NW l3) runs on MSC_ConnHdlr {
|
||||
g_pars := f_gen_test_hdlr_pars();
|
||||
f_create_chan_and_exp();
|
||||
|
@ -5206,6 +5233,7 @@ control {
|
|||
execute( TC_oml_unknown_unit_id() );
|
||||
|
||||
execute( TC_classmark() );
|
||||
execute( TC_common_id() );
|
||||
execute( TC_unsol_ass_fail() );
|
||||
execute( TC_unsol_ass_compl() );
|
||||
execute( TC_unsol_ho_fail() );
|
||||
|
|
|
@ -431,9 +431,7 @@ type component MSC_ConnHdlr extends RAN_ConnHdlr, RSL_DchanHdlr, MGCP_ConnHdlr {
|
|||
var boolean g_vty_initialized := false;
|
||||
}
|
||||
|
||||
/* initialize all parameters */
|
||||
function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw, BSSMAP_FIELD_CodecType codecType) runs on MSC_ConnHdlr {
|
||||
f_MediaState_init(g_media, i, bts, mgw, codecType);
|
||||
function f_MscConnHdlr_init_vty() runs on MSC_ConnHdlr {
|
||||
if (not g_vty_initialized) {
|
||||
map(self:BSCVTY, system:BSCVTY);
|
||||
f_vty_set_prompts(BSCVTY);
|
||||
|
@ -442,6 +440,12 @@ function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw, BSSMAP_FIELD_
|
|||
}
|
||||
}
|
||||
|
||||
/* initialize all parameters */
|
||||
function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw, BSSMAP_FIELD_CodecType codecType) runs on MSC_ConnHdlr {
|
||||
f_MediaState_init(g_media, i, bts, mgw, codecType);
|
||||
f_MscConnHdlr_init_vty();
|
||||
}
|
||||
|
||||
private function get_next_trans_id() runs on MSC_ConnHdlr return MgcpTransId {
|
||||
var MgcpTransId tid := int2str(g_trans_id);
|
||||
g_trans_id := g_trans_id + 1;
|
||||
|
|
|
@ -1599,6 +1599,31 @@ modifies tr_BSSAP_BSSMAP := {
|
|||
}
|
||||
}
|
||||
|
||||
template PDU_BSSAP ts_BSSMAP_CommonId(hexstring imsi_digits)
|
||||
modifies ts_BSSAP_BSSMAP := {
|
||||
pdu := {
|
||||
bssmap := {
|
||||
commonID := {
|
||||
messageType := '2F'O,
|
||||
iMSI := ts_BSSMAP_Imsi(imsi_digits),
|
||||
sNAAccessInformation := omit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template PDU_BSSAP tr_BSSMAP_CommonId(template hexstring imsi_digits)
|
||||
modifies tr_BSSAP_BSSMAP := {
|
||||
pdu := {
|
||||
bssmap := {
|
||||
commonID := {
|
||||
messageType := '2F'O,
|
||||
iMSI := tr_BSSMAP_Imsi(imsi_digits),
|
||||
sNAAccessInformation := *
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue