Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_rim_ran_info_req_single_rep_eutran

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu May 6 18:24:28 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24170 )


Change subject: pcu: Introduce test TC_rim_ran_info_req_single_rep_eutran
......................................................................

pcu: Introduce test TC_rim_ran_info_req_single_rep_eutran

Related: SYS#5314
Change-Id: I87f3daba1521d2dc8eed78ffdc6de5744484ba7a
---
M pcu/PCU_Tests.ttcn
1 file changed, 56 insertions(+), 29 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/70/24170/1

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index f42a85b..3825bf8 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -5569,21 +5569,15 @@
 			 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 @@
 	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 @@
 							     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 @@
 							    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 @@
 			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 @@
 	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() );
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24170
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I87f3daba1521d2dc8eed78ffdc6de5744484ba7a
Gerrit-Change-Number: 24170
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210506/9febea1d/attachment.htm>


More information about the gerrit-log mailing list