bsc: Add TC_classmark to test RR CLASSMARK -> BSSMAP CLASSMARK conversion
Related: OS#2902
Change-Id: Idd86b5505e1a4fee666287680a20dc235970be93
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 8b44a25..b9d61dd 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1404,12 +1404,64 @@
vc_conn.done;
}
+/* test if L3 RR CLASSMARK CHANGE is translated to BSSMAP CLASSMARK UPDATE */
+private function f_tc_classmark(charstring id) runs on MSC_ConnHdlr {
+ var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ f_create_chan_and_exp(pars);
+ /* we should now have a COMPL_L3 at the MSC */
+ BSSAP.receive(tr_BSSMAP_ComplL3);
+
+ f_rsl_send_l3(ts_RRM_CM_CHG(valueof(ts_CM2)));
+ BSSAP.receive(tr_BSSMAP_ClassmarkUpd(?, omit));
+ setverdict(pass);
+}
+testcase TC_classmark() 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_classmark), testcasename());
+ vc_conn.done;
+}
+
+/* unsolicited ASSIGNMENT FAIL (without ASSIGN) from MS shouldn't bring BSC down */
+private function f_tc_unsol_ass_fail(charstring id) runs on MSC_ConnHdlr {
+ var TestHdlrParams pars := valueof(t_def_TestHdlrPars);
+ f_create_chan_and_exp(pars);
+ /* we should now have a COMPL_L3 at the MSC */
+ BSSAP.receive(tr_BSSMAP_ComplL3);
+
+ f_rsl_send_l3(ts_RRM_AssignmentFailure('00'O));
+ timer T := 5.0;
+ T.start;
+ alt {
+ [] BSSAP.receive(tr_BSSMAP_AssignmentFail) {
+ setverdict(fail, "Unexpeted BSSMAP Assignment Failure");
+ }
+ [] BSSAP.receive(tr_BSSMAP_ClearRequest) {
+ setverdict(fail, "Unexpected BSSMAP Clear Requst");
+ }
+ [] T.timeout {
+ setverdict(pass);
+ }
+ }
+}
+
+testcase TC_unsol_ass_fail() 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_unsol_ass_fail), testcasename());
+ vc_conn.done;
+}
control {
+ /* CTRL interface testing */
execute( TC_ctrl_msc_connection_status() );
execute( TC_ctrl_msc0_connection_status() );
execute( TC_ctrl() );
+
+ /* RSL DCHAN Channel ACtivation / Deactivation */
execute( TC_chan_act_noreply() );
execute( TC_chan_act_counter() );
execute( TC_chan_act_ack_noest() );
@@ -1424,6 +1476,8 @@
execute( TC_chan_rel_a_reset() );
execute( TC_outbound_connect() );
+
+ /* Assignment related */
execute( TC_assignment_cic_only() );
execute( TC_assignment_csd() );
execute( TC_assignment_ctm() );
@@ -1434,11 +1488,13 @@
execute( TC_assignment_fr_a5_3() );
execute( TC_assignment_fr_a5_4() );
+ /* RLL Establish Indication on inactive DCHAN / SAPI */
execute( TC_rll_est_ind_inact_lchan() );
execute( TC_rll_est_ind_inval_sapi1() );
execute( TC_rll_est_ind_inval_sapi3() );
execute( TC_rll_est_ind_inval_sacch() );
+ /* Paging related tests */
execute( TC_paging_imsi_nochan() );
execute( TC_paging_tmsi_nochan() );
execute( TC_paging_tmsi_any() );
@@ -1460,6 +1516,9 @@
execute( TC_paging_imsi_load() );
execute( TC_rsl_drop_counter() );
+
+ execute( TC_classmark() );
+ execute( TC_unsol_ass_fail() );
}
}
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index b6e6540..a7f4d71 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -301,6 +301,17 @@
f_create_bssmap_exp(l3_enc);
}
+function f_rsl_send_l3(template PDU_ML3_MS_NW l3, template (omit) RslLinkId link_id := omit,
+ template (omit) RslChannelNr chan_nr := omit) runs on MSC_ConnHdlr {
+ if (not isvalue(link_id)) {
+ link_id := ts_RslLinkID_DCCH(0);
+ }
+ if (not isvalue(chan_nr)) {
+ chan_nr := g_chan_nr;
+ }
+ RSL.send(ts_RSL_DATA_IND(valueof(chan_nr), valueof(link_id), enc_PDU_ML3_MS_NW(valueof(l3))));
+}
+
function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr {
var RslChannelNr chan_nr := orig.ies[0].body.chan_nr;
var RslLinkId link_id;
@@ -309,7 +320,7 @@
} else {
link_id := orig.ies[1].body.link_id;
}
- RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3))));
+ f_rsl_send_l3(l3, link_id, chan_nr);
}
function f_cipher_mode(OCT1 alg, OCT8 key, template OCT16 kc128 := omit, boolean exp_fail := false)