aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-05-06 20:07:08 +0200
committerlaforge <laforge@osmocom.org>2021-05-17 20:33:00 +0000
commit436e2bdb4c85f3db686a336b5c3dd006d8ed0fa5 (patch)
tree6605e8dfcab636ec055d515f9e9ec74f7601acce
parent8c74cbbf5a7534f6aa2d28a30a4b6bff7fe8067b (diff)
pcu: Introduce test TC_rim_ran_info_req_single_rep_eutran
-rw-r--r--pcu/PCU_Tests.ttcn85
1 files changed, 56 insertions, 29 deletions
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 333a68d3..4df5515f 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -5569,21 +5569,15 @@ testcase TC_nacc_outbound_pkt_cell_chg_notif_unassigned_dl_tbf() runs on RAW_PCU
f_dl_block_ack_fn(dl_block, dl_fn));
}
-/* 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;
- 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();
+function f_do_inbound_nacc(template (value) RIM_Routing_Information tx_src_addr, template RIM_Routing_Information rx_dst_addr)
+runs on RAW_PCU_Test_CT
+{
+ var template (value) RAN_Information_Request_RIM_Container req_cont;
+ var template (value) PDU_BSSGP bssgp_rim_pdu;
+ var template PDU_BSSGP bssgp_rim_pdu_expect;
+ var template RAN_Information_RIM_Container rim_cont_expect;
+ var RIM_Routing_Address bts_addr;
/* 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_default, 0, 0, 0, 0, 32767);
@@ -5594,16 +5588,7 @@ testcase TC_rim_ran_info_req_single_rep() runs on RAW_PCU_Test_CT {
BTS.send(si13_data_ind);
f_sleep(1.0);
- var RIM_Routing_Address dst_addr;
- var RIM_Routing_Address src_addr;
- var template (value) RAN_Information_Request_RIM_Container req_cont;
- var template (value) 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 := valueof(t_RIM_Routing_Address_cid(src_cid));
- dst_addr := valueof(t_RIM_Routing_Address_cid(mp_gb_cfg.bvc[0].cell_id));
+ bts_addr := valueof(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),
@@ -5611,9 +5596,8 @@ testcase TC_rim_ran_info_req_single_rep() runs on RAW_PCU_Test_CT {
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);
+ bssgp_rim_pdu := ts_RAN_INFORMATION_REQUEST(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, bts_addr),
+ tx_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),
@@ -5622,10 +5606,11 @@ testcase TC_rim_ran_info_req_single_rep() runs on RAW_PCU_Test_CT {
tru_ApplContainer_or_ApplErrContainer_NACC(tru_ApplContainer_NACC(mp_gb_cfg.bvc[0].cell_id, false, 3, si_default)),
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),
+ bssgp_rim_pdu_expect := tr_PDU_BSSGP_RAN_INFORMATION(rx_dst_addr,
+ tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, bts_addr),
rim_cont_expect);
RIM.send(bssgp_rim_pdu);
+ timer T := 2.0;
T.start;
alt {
[] RIM.receive(bssgp_rim_pdu_expect) { }
@@ -5637,6 +5622,47 @@ testcase TC_rim_ran_info_req_single_rep() runs on RAW_PCU_Test_CT {
mtc.stop;
}
}
+}
+/* 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 {
+ /* 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();
+
+ var BssgpCellId src_cid := {ra_id := { lai := { mcc_mnc := '262F42'H, lac := 12345}, rac := 0 }, cell_id := 20962 };
+ var RIM_Routing_Address src_addr := valueof(t_RIM_Routing_Address_cid(src_cid));
+
+ f_do_inbound_nacc(ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr),
+ tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr));
+
+ f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
+/* Same as TC_rim_ran_info_req_single_rep, but using an EUTRAN eNodeB ID as
+ * Routing information, to verify PCU handles that kind of address just fine
+ */
+testcase TC_rim_ran_info_req_single_rep_eutran() runs on RAW_PCU_Test_CT {
+ /* 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();
+
+ var BssgpCellId src_cid := {ra_id := { lai := { mcc_mnc := '262F42'H, lac := 12345}, rac := 0 }, cell_id := 20962 };
+ var RIM_Routing_Address src_addr := valueof(t_RIM_Routing_Address_enbid(src_cid, tac := 3, gnbid := '12345678123456'O));
+
+ f_do_inbound_nacc(ts_RIM_Routing_Information(RIM_ADDR_EUTRAN_NODEB_ID, src_addr),
+ tr_RIM_Routing_Information(RIM_ADDR_EUTRAN_NODEB_ID, src_addr));
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -5812,6 +5838,7 @@ control {
execute( TC_nacc_outbound_pkt_cell_chg_notif_unassigned_dl_tbf() );
execute( TC_rim_ran_info_req_single_rep() );
+ execute( TC_rim_ran_info_req_single_rep_eutran() );
execute( TC_rim_ran_info_req_single_rep_no_si() );
}