PCU_Tests: add testcase TC_rim_ran_info_req_single_rep and _no_si
Perform a full RAN information request (single report) against the PCU
and check the results. Also test what happens when the request is issued
at a time where osmo-bts has no system information available.
Depends: osmo-pcu Id72118120c14984d2fb1b918b41fac4868150d41
Change-Id: I9054ab0e969c0fbfdc671c92d44cc61360959adc
Related: SYS#5103
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index e44e204..c44f50a 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -4152,6 +4152,158 @@
f_shutdown(__BFILE__, __LINE__, final := true);
}
+/* Send a RIM RAN info request to the PCU and verify the response, we expect
+ * getting the system information back which we have transfered to the PCU via
+ * PCUIF on startup. */
+testcase TC_rim_ran_info_req_single_rep() runs on RAW_PCU_Test_CT {
+ const BssgpBvci bvci := mp_gb_cfg.bvc[0].bvci;
+ var octetstring si1_expect := '198fb100000000000000000000000000007900002b'O;
+ var octetstring si3_expect := '1b753000f110236ec9033c2747407900003c0b2b2b'O;
+ var octetstring si13_expect := '009000185a6fc9e08410ab2b2b2b2b2b2b2b2b2b2b'O;
+ timer T := 2.0;
+
+ /* Initialize NS/BSSGP side */
+ f_init_bssgp();
+
+ /* Initialize the PCU interface abstraction */
+ f_init_raw(testcasename());
+
+ /* Establish BSSGP connection to the PCU */
+ f_bssgp_establish();
+
+ /* Send sysinfo to the PCU */
+ var template PCUIF_Message si1_data_ind := ts_PCUIF_DATA_IND(0, 0, 0, 0, PCU_IF_SAPI_BCCH, '5506'O & si1_expect, 0, 0, 0, 0, 32767);
+ BTS.send(si1_data_ind);
+ var template PCUIF_Message si3_data_ind := ts_PCUIF_DATA_IND(0, 0, 0, 0, PCU_IF_SAPI_BCCH, '4906'O & si3_expect, 0, 0, 0, 0, 32767);
+ BTS.send(si3_data_ind);
+ var template PCUIF_Message si16_data_ind := ts_PCUIF_DATA_IND(0, 0, 0, 0, PCU_IF_SAPI_BCCH, '0106'O & si13_expect, 0, 0, 0, 0, 32767);
+ BTS.send(si16_data_ind);
+ f_sleep(1.0);
+
+ var template RIM_Routing_Address dst_addr;
+ var template RIM_Routing_Address src_addr;
+ var template RAN_Information_Request_RIM_Container req_cont;
+ var template PDU_BSSGP bssgp_rim_pdu;
+ var template PDU_BSSGP bssgp_rim_pdu_expect;
+ var template RAN_Information_RIM_Container rim_cont_expect;
+
+ var BssgpCellId src_cid := {ra_id := { lai := { mcc_mnc := '262F42'H, lac := 12345}, rac := 0 }, cell_id := 20962 };
+ src_addr := t_RIM_Routing_Address_cid(src_cid);
+ dst_addr := t_RIM_Routing_Address_cid(mp_gb_cfg.bvc[0].cell_id);
+
+
+ var octetstring si_expect := si1_expect & si3_expect & si13_expect;
+
+ req_cont := ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(1),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ ts_RIM_Protocol_Version_Number(1),
+ tsu_RAN_Information_Request_Application_Container_NACC(mp_gb_cfg.bvc[0].cell_id),
+ omit);
+ bssgp_rim_pdu := ts_RAN_INFORMATION_REQUEST(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ req_cont);
+
+ rim_cont_expect := tr_RAN_Information_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(1),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ tr_RIM_Protocol_Version_Number(1),
+ tru_ApplContainer_or_ApplErrContainer_NACC(tru_ApplContainer_NACC(mp_gb_cfg.bvc[0].cell_id, false, 3, si_expect)),
+ omit);
+
+ bssgp_rim_pdu_expect := tr_PDU_BSSGP_RAN_INFORMATION(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ rim_cont_expect);
+ RIM.send(bssgp_rim_pdu);
+ T.start;
+ alt {
+ [] RIM.receive(bssgp_rim_pdu_expect) { }
+ [] RIM.receive {
+ setverdict(fail, "Unexpected BSSGP RIM PDU received");
+ }
+ [] T.timeout {
+ setverdict(fail, "No BSSGP RIM PDU received");
+ mtc.stop;
+ }
+ }
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
+/* Same as above, but in this case we simulate the rare case in which the PCU
+ * has no system information available. We expect getting a response back but
+ * with no system information inside. */
+testcase TC_rim_ran_info_req_single_rep_no_si() runs on RAW_PCU_Test_CT {
+ var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+ var PCUIF_Message pcu_msg;
+ timer T := 2.0;
+
+ /* Initialize NS/BSSGP side */
+ f_init_bssgp();
+
+ /* Initialize the PCU interface abstraction */
+ f_init_raw(testcasename(), info_ind);
+
+ /* Establish BSSGP connection to the PCU */
+ f_bssgp_establish();
+
+ /* Clear sysinfo from the PCU */
+ var template PCUIF_Message si1_data_ind := ts_PCUIF_DATA_IND(0, 0, 0, 0, PCU_IF_SAPI_BCCH, '01'O, 0, 0, 0, 0, 32767);
+ BTS.send(si1_data_ind);
+ var template PCUIF_Message si3_data_ind := ts_PCUIF_DATA_IND(0, 0, 0, 0, PCU_IF_SAPI_BCCH, '03'O, 0, 0, 0, 0, 32767);
+ BTS.send(si3_data_ind);
+ var template PCUIF_Message si16_data_ind := ts_PCUIF_DATA_IND(0, 0, 0, 0, PCU_IF_SAPI_BCCH, '0b'O, 0, 0, 0, 0, 32767);
+ BTS.send(si16_data_ind);
+ f_sleep(1.0);
+
+ var template RIM_Routing_Address dst_addr;
+ var template RIM_Routing_Address src_addr;
+ var template RAN_Information_Request_RIM_Container req_cont;
+ var template PDU_BSSGP bssgp_rim_pdu;
+ var template PDU_BSSGP bssgp_rim_pdu_expect;
+ var template RAN_Information_RIM_Container rim_cont_expect;
+
+ var BssgpCellId src_cid := {ra_id := { lai := { mcc_mnc := '262F42'H, lac := 12345}, rac := 0 }, cell_id := 20962 };
+ src_addr := t_RIM_Routing_Address_cid(src_cid);
+ dst_addr := t_RIM_Routing_Address_cid(mp_gb_cfg.bvc[0].cell_id);
+
+ req_cont := ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(1),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ ts_RIM_Protocol_Version_Number(1),
+ tsu_RAN_Information_Request_Application_Container_NACC(mp_gb_cfg.bvc[0].cell_id),
+ omit);
+ bssgp_rim_pdu := ts_RAN_INFORMATION_REQUEST(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ req_cont);
+
+
+ rim_cont_expect := tr_RAN_Information_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(1),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
+ tr_RIM_Protocol_Version_Number(1),
+ tru_ApplContainer_or_ApplErrContainer_NACC(tru_ApplContainer_NACC(mp_gb_cfg.bvc[0].cell_id, false, 0, ''O)),
+ omit);
+
+ bssgp_rim_pdu_expect := tr_PDU_BSSGP_RAN_INFORMATION(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr),
+ rim_cont_expect);
+ RIM.send(bssgp_rim_pdu);
+ T.start;
+ alt {
+ [] RIM.receive(bssgp_rim_pdu_expect) { }
+ [] RIM.receive {
+ setverdict(fail, "Unexpected BSSGP RIM PDU received");
+ }
+ [] T.timeout {
+ setverdict(fail, "No BSSGP RIM PDU received");
+ mtc.stop;
+ }
+ }
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
control {
execute( TC_pcuif_suspend() );
execute( TC_pcuif_suspend_active_tbf() );
@@ -4232,6 +4384,9 @@
execute( TC_nacc_outbound_rac_ci_resolve_timeout() );
execute( TC_nacc_outbound_rac_ci_resolve_fail_parse_response() );
execute( TC_nacc_outbound_si_resolve_timeout() );
+
+ execute( TC_rim_ran_info_req_single_rep() );
+ execute( TC_rim_ran_info_req_single_rep_no_si() );
}
}