aboutsummaryrefslogtreecommitdiffstats
path: root/gbproxy
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-01-28 21:43:16 +0100
committerlaforge <laforge@osmocom.org>2021-01-30 19:18:36 +0000
commit14d3a8e7c39e2f8d93c7bff2e1a3ec1e6af0b4ec (patch)
tree90ee8a25b164eea4e9677af23804993d67f10654 /gbproxy
parent77783caf8429957bcb6a2923419fb610fef5a703 (diff)
GBProxy_Tests: fix TC_rim_* tests
The TC_rim tests do not use the RIM templates from Osmocom_Gb_Types as intended. Change-Id: Ie484f288aa0515ef4df4a3cf7f8a347a3f3cf587 Related: SYS#5103
Diffstat (limited to 'gbproxy')
-rw-r--r--gbproxy/GBProxy_Tests.ttcn230
1 files changed, 157 insertions, 73 deletions
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 48795212..506ed389 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -2901,20 +2901,35 @@ private function f_TC_rim_info_req(integer sgsn_idx, integer pcu_idx, integer bv
runs on GlobalTest_CT
{
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
- var template (value) RIM_Routing_Information ri_pcu;
- var template (value) RIM_Routing_Information ri_sgsn;
- var template (value) RAN_Information_Request_RIM_Container cont;
-
- ri_sgsn := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id_sgsn));
- ri_pcu := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id));
- cont := ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
- ts_RIM_Sequence_Number(0),
- ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
- f_rim_pcu2sgsn(ts_RAN_INFORMATION_REQUEST(dst := ri_sgsn, src := ri_pcu, cont := cont),
- tr_RAN_INFORMATION_REQUEST(dst := ri_sgsn, src := ri_pcu, cont := cont),
- pcu_idx);
- f_rim_sgsn2pcu(ts_RAN_INFORMATION_REQUEST(dst := ri_pcu, src := ri_sgsn, cont := cont),
- tr_RAN_INFORMATION_REQUEST(dst := ri_pcu, src := ri_sgsn, cont := cont),
+ var template (value) RAN_Information_Request_RIM_Container cont_tx;
+ var template RAN_Information_Request_RIM_Container cont_rx;
+ var template RIM_Routing_Address ra_pcu;
+ var template RIM_Routing_Address ra_sgsn;
+
+ ra_pcu := t_RIM_Routing_Address_cid(cell_id);
+ ra_sgsn := t_RIM_Routing_Address_cid(cell_id_sgsn);
+
+ cont_tx := ts_RAN_Information_Request_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(0),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+ cont_rx := tr_RAN_Information_Request_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(0),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+
+ f_rim_pcu2sgsn(ts_RAN_INFORMATION_REQUEST(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_tx),
+ tr_RAN_INFORMATION_REQUEST(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_rx),
+ pcu_idx);
+
+ f_rim_sgsn2pcu(ts_RAN_INFORMATION_REQUEST(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_tx),
+ tr_RAN_INFORMATION_REQUEST(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_rx),
sgsn_idx, pcu_idx);
}
testcase TC_rim_info_req() runs on GlobalTest_CT
@@ -2930,20 +2945,36 @@ private function f_TC_rim_info(integer sgsn_idx, integer pcu_idx, integer bvc_id
runs on GlobalTest_CT
{
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
- var template (value) RIM_Routing_Information ri_pcu;
- var template (value) RIM_Routing_Information ri_sgsn;
- var template (value) RAN_Information_RIM_Container cont;
-
- ri_sgsn := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id_sgsn));
- ri_pcu := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id));
- cont := ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
- ts_RIM_Sequence_Number(0),
- ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
- f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION(dst := ri_sgsn, src := ri_pcu, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION(dst := ri_sgsn, src := ri_pcu, cont := cont),
- pcu_idx);
- f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION(dst := ri_pcu, src := ri_sgsn, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION(dst := ri_pcu, src := ri_sgsn, cont := cont),
+ var template (value) RAN_Information_RIM_Container cont_tx;
+ var template RAN_Information_RIM_Container cont_rx;
+ var template RIM_Routing_Address ra_pcu;
+ var template RIM_Routing_Address ra_sgsn;
+
+ ra_pcu := t_RIM_Routing_Address_cid(cell_id);
+ ra_sgsn := t_RIM_Routing_Address_cid(cell_id_sgsn);
+
+ cont_tx := ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(0),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+
+ cont_rx := tr_RAN_Information_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(0),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP));
+
+ f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_rx),
+ pcu_idx);
+
+ f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_rx),
sgsn_idx, pcu_idx);
}
testcase TC_rim_info() runs on GlobalTest_CT
@@ -2959,19 +2990,34 @@ private function f_TC_rim_info_ack(integer sgsn_idx, integer pcu_idx, integer bv
runs on GlobalTest_CT
{
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
- var template (value) RIM_Routing_Information ri_pcu;
- var template (value) RIM_Routing_Information ri_sgsn;
- var template (value) RAN_Information_Ack_RIM_Container cont;
-
- ri_sgsn := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id_sgsn));
- ri_pcu := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id));
- cont := ts_RAN_Information_Ack_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
- ts_RIM_Sequence_Number(0));
- f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION_ACK(dst := ri_sgsn, src := ri_pcu, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION_ACK(dst := ri_sgsn, src := ri_pcu, cont := cont),
- pcu_idx);
- f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION_ACK(dst := ri_pcu, src := ri_sgsn, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION_ACK(dst := ri_pcu, src := ri_sgsn, cont := cont),
+ var template (value) RAN_Information_Ack_RIM_Container cont_tx;
+ var template RAN_Information_Ack_RIM_Container cont_rx;
+ var template RIM_Routing_Address ra_pcu;
+ var template RIM_Routing_Address ra_sgsn;
+
+ ra_pcu := t_RIM_Routing_Address_cid(cell_id);
+ ra_sgsn := t_RIM_Routing_Address_cid(cell_id_sgsn);
+
+ cont_tx := ts_RAN_Information_Ack_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(0));
+
+ cont_rx := tr_RAN_Information_Ack_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(0));
+
+ f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION_ACK(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION_ACK(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_rx),
+ pcu_idx);
+
+ f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION_ACK(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION_ACK(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_rx),
sgsn_idx, pcu_idx);
}
testcase TC_rim_info_ack() runs on GlobalTest_CT
@@ -2987,20 +3033,36 @@ private function f_TC_rim_info_error(integer sgsn_idx, integer pcu_idx, integer
runs on GlobalTest_CT
{
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
- var template (value) RIM_Routing_Information ri_pcu;
- var template (value) RIM_Routing_Information ri_sgsn;
- var template (value) RAN_Information_Error_RIM_Container cont;
-
- ri_sgsn := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id_sgsn));
- ri_pcu := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id));
- cont := ts_RAN_Information_Error_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
- ts_BSSGP_CAUSE(BSSGP_CAUSE_EQUIMENT_FAILURE),
- omit, valueof(t_BVC_UNBLOCK(23)));
- f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := ri_sgsn, src := ri_pcu, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := ri_sgsn, src := ri_pcu, cont := cont),
- pcu_idx);
- f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := ri_pcu, src := ri_sgsn, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := ri_pcu, src := ri_sgsn, cont := cont),
+ var template (value) RAN_Information_Error_RIM_Container cont_tx;
+ var template RAN_Information_Error_RIM_Container cont_rx;
+ var template RIM_Routing_Address ra_pcu;
+ var template RIM_Routing_Address ra_sgsn;
+
+ ra_pcu := t_RIM_Routing_Address_cid(cell_id);
+ ra_sgsn := t_RIM_Routing_Address_cid(cell_id_sgsn);
+
+ cont_tx := ts_RAN_Information_Error_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_BSSGP_CAUSE(BSSGP_CAUSE_EQUIMENT_FAILURE),
+ omit, valueof(t_BVC_UNBLOCK(23)));
+
+ cont_rx := tr_RAN_Information_Error_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ t_BSSGP_CAUSE(BSSGP_CAUSE_EQUIMENT_FAILURE),
+ omit, enc_PDU_BSSGP(valueof(t_BVC_UNBLOCK(23))));
+
+ f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_rx),
+ pcu_idx);
+
+ f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION_ERROR(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_rx),
sgsn_idx, pcu_idx);
}
testcase TC_rim_info_error() runs on GlobalTest_CT
@@ -3011,29 +3073,51 @@ testcase TC_rim_info_error() runs on GlobalTest_CT
f_cleanup();
}
+//////////////////
/* RAN-INFORMATION-APPLICATION-ERROR */
private function f_TC_rim_info_app_error(integer sgsn_idx, integer pcu_idx, integer bvc_idx := 0)
runs on GlobalTest_CT
{
var BssgpCellId cell_id := g_pcu[pcu_idx].cfg.bvc[bvc_idx].cell_id;
- var template (value) RIM_Routing_Information ri_pcu;
- var template (value) RIM_Routing_Information ri_sgsn;
- var template (value) Application_Error_Container app_cont;
- var template (value) RAN_Information_Application_Error_RIM_Container cont;
-
- ri_sgsn := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id_sgsn));
- ri_pcu := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, t_RIM_Routing_Address_cid(cell_id));
- app_cont := tsu_Application_Error_Container_NACC(cell_id, 23,
- tsu_Application_Container_IE_NACC_req(cell_id));
- cont := ts_RAN_Information_Application_Error_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
- ts_RIM_Sequence_Number(0),
- ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP),
- omit, app_cont);
- f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := ri_sgsn, src := ri_pcu, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := ri_sgsn, src := ri_pcu, cont := cont),
- pcu_idx);
- f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := ri_pcu, src := ri_sgsn, cont := cont),
- tr_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := ri_pcu, src := ri_sgsn, cont := cont),
+ var template (value) Application_Error_Container app_cont_tx;
+ var template Application_Error_Container app_cont_rx;
+ var template (value) RAN_Information_Application_Error_RIM_Container cont_tx;
+ var template RAN_Information_Application_Error_RIM_Container cont_rx;
+ var template RIM_Routing_Address ra_pcu;
+ var template RIM_Routing_Address ra_sgsn;
+
+ ra_pcu := t_RIM_Routing_Address_cid(cell_id);
+ ra_sgsn := t_RIM_Routing_Address_cid(cell_id_sgsn);
+
+ app_cont_tx := tsu_Application_Error_Container_NACC(cell_id, 23,
+ tsu_Application_Container_IE_NACC_req(cell_id));
+
+ app_cont_rx := rsu_Application_Error_Container_NACC(cell_id, 23,
+ rsu_Application_Container_IE_NACC_req(cell_id));
+
+ cont_tx := ts_RAN_Information_Application_Error_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC),
+ ts_RIM_Sequence_Number(0),
+ ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP),
+ omit, app_cont_tx);
+ cont_rx := tr_RAN_Information_Application_Error_RIM_Container(tr_RIM_Application_Identity(RIM_APP_ID_NACC),
+ tr_RIM_Sequence_Number(0),
+ tr_RIM_PDU_Indications(false, RIM_PDU_TYPE_STOP),
+ omit, app_cont_rx);
+
+ f_rim_pcu2sgsn(ts_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ cont := cont_rx),
+ pcu_idx);
+
+ f_rim_sgsn2pcu(ts_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := ts_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_tx),
+ tr_PDU_BSSGP_RAN_INFORMATION_APPLICATION_ERROR(dst := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_pcu),
+ src := tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, ra_sgsn),
+ cont := cont_rx),
sgsn_idx, pcu_idx);
}
testcase TC_rim_info_app_error() runs on GlobalTest_CT