Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 ) Change subject: SGSN_Tests: test RIM message passing .. SGSN_Tests: test RIM message passing Add a testcase to test if RIM messages can be passed on the SGSN back and forth. Related: SYS#5103 Change-Id: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Related: SYS#5103 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 90 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 8e7d6e4..fe31ffc 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -171,6 +171,9 @@ /* only needed at start to get the per-BVC references */ port BSSGP_CT_PROC_PT PROC; + /* used by RIM related test */ + port BSSGP_PT RIM[NUM_GB]; + var GTP_Emulation_CT vc_GTP; port TELNETasp_PT SGSNVTY; @@ -247,6 +250,8 @@ gb.vc_BSSGP_BVC[i] := f_bssgp_get_bvci_ct(gb.cfg.bvc[i].bvci, PROC); disconnect(self:PROC, gb.vc_BSSGP:PROC); } + /* connect RIM related port */ + connect(gb.vc_BSSGP:RIM, self:RIM[offset]); } private function f_init_gsup(charstring id) runs on test_CT { @@ -3130,9 +3135,92 @@ f_cleanup(); } +private function f_TC_bssgp_rim_dummy(charstring id) runs on BSSGP_ConnHdlr { +} + +/* Run a RIM single report procedure over the sgsn. Since the SGSN will only do a transparent routing of the + * RIM messages this basically tests if the message is correctly transfered from one GB interface to the + * other and vice versa. */ +testcase TC_bssgp_rim_single_report() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_bssgp_rim_dummy), testcasename(), g_gb, 17); + vc_conn.done; + + timer T := 2.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 RAN_Information_RIM_Container res_cont; + var template PDU_BSSGP bssgp_rim_pdu; + var template PDU_BSSGP bssgp_rim_pdu_expect; + + dst_addr := t_RIM_Routing_Address_cid(g_gb[1].cfg.bvc[0].cell_id); + src_addr := t_RIM_Routing_Address_cid(g_gb[0].cfg.bvc[0].cell_id); + /* Send NACC Ran information request to SGSN at GB interface #0. We epect the SGSN to forward this request +* based on the cell id in dst_addr to GB interface #1. */ + 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(g_gb[1].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_expect := tr_RAN_INFORMATION_REQUEST(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr), + tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr), + tr_RAN_Information_Request_RIM_Container); + RIM[0].send(bssgp_rim_pdu); + T.start; + alt { + [] RIM[1].receive(bssgp_rim_pdu_expect) { } + [] RIM[1].receive { + setverdict(fail, "Unexpected BSSGP RIM PDU received"); + } + [] T.timeout { + setverdict(fail, "No BSSGP RIM PDU received"); + mtc.stop; + } + } + /* Now also emulate also the response as well and send it back on GB interface #1. Expect the result on +* GB interface #0 */ + var octetstring si1 := '198fb1792b'O; + var octetstring si3 := '1b753000f110236ec9033c274740793c0b2b2b'O; + var octetstring si13 := '009000185a6fc9e08410ab2b2b2b2b2b2b2b2b2b2b'O; + var octetstring si := si1 & si3 & si13; + + res_cont := ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC), +ts_RIM_Sequence_Number(2), +
Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 ) Change subject: SGSN_Tests: test RIM message passing .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 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: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Gerrit-Change-Number: 21735 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Jan 2021 15:49:48 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 ) Change subject: SGSN_Tests: test RIM message passing .. Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735/2/sgsn/SGSN_Tests.ttcn File sgsn/SGSN_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735/2/sgsn/SGSN_Tests.ttcn@175 PS2, Line 175: port BSSGP_PT RIM[NUM_GB]; > Why not have this into BSSGP_ConnHdlr ? The connHdlr is per TLLI. (of which there can be N:1 per PTP BVC, of which there can be N:1 per NSE). The RIM port exists once per-NSE. So it's really two layers of abstraction away. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 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: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Gerrit-Change-Number: 21735 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Jan 2021 15:38:49 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 ) Change subject: SGSN_Tests: test RIM message passing .. Patch Set 2: (1 comment) I find a bit strange there's no update in osmo-sgsn.cfg. Shouldn't you be setting that new BSSGP conn somehow? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735/2/sgsn/SGSN_Tests.ttcn File sgsn/SGSN_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735/2/sgsn/SGSN_Tests.ttcn@175 PS2, Line 175: port BSSGP_PT RIM[NUM_GB]; Why not have this into BSSGP_ConnHdlr ? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 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: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Gerrit-Change-Number: 21735 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Jan 2021 09:43:00 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 to look at the new patch set (#2). Change subject: SGSN_Tests: test RIM message passing .. SGSN_Tests: test RIM message passing Add a testcase to test if RIM messages can be passed on the SGSN back and forth. Related: SYS#5103 Change-Id: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Related: SYS#5103 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 90 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/21735/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 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: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Gerrit-Change-Number: 21735 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 ) Change subject: SGSN_Tests: test RIM message passing .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 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: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Gerrit-Change-Number: 21735 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 16 Dec 2020 15:41:34 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: SGSN_Tests: test RIM message passing
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21735 ) Change subject: SGSN_Tests: test RIM message passing .. SGSN_Tests: test RIM message passing Add a testcase to test if RIM messages can be passed on the SGSN back and forth. Related: SYS#5103 Change-Id: If0ab08dcdc28819740cc07fd4dc1fea47ba10843 Related: SYS#5103 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 86 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/21735/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 8e7d6e4..9d54c2e 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -171,6 +171,9 @@ /* only needed at start to get the per-BVC references */ port BSSGP_CT_PROC_PT PROC; + /* used by RIM related test */ + port BSSGP_PT RIM[NUM_GB]; + var GTP_Emulation_CT vc_GTP; port TELNETasp_PT SGSNVTY; @@ -247,6 +250,8 @@ gb.vc_BSSGP_BVC[i] := f_bssgp_get_bvci_ct(gb.cfg.bvc[i].bvci, PROC); disconnect(self:PROC, gb.vc_BSSGP:PROC); } + /* connect RIM related port */ + connect(gb.vc_BSSGP:RIM, self:RIM[offset]); } private function f_init_gsup(charstring id) runs on test_CT { @@ -3130,9 +3135,88 @@ f_cleanup(); } +private function f_TC_bssgp_rim_dummy(charstring id) runs on BSSGP_ConnHdlr { +} + +/* Run a RIM single report procedure over the sgsn. Since the SGSN will only do a transparent routing of the + * RIM messages this basically tests if the message is correctly transfered from one GB interface to the + * other and vice versa. */ +testcase TC_bssgp_rim_single_report() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_bssgp_rim_dummy), testcasename(), g_gb, 17); + vc_conn.done; + + timer T := 2.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 RAN_Information_RIM_Container res_cont; + var template PDU_BSSGP bssgp_rim_pdu; + var template PDU_BSSGP bssgp_rim_pdu_expect; + + dst_addr := t_RIM_Routing_Address_cid(g_gb[1].cfg.bvc[0].cell_id); + src_addr := t_RIM_Routing_Address_cid(g_gb[0].cfg.bvc[0].cell_id); + /* Send NACC Ran information request to SGSN at GB interface #0. We epect the SGSN to forward this request +* based on the cell id in dst_addr to GB interface #1. */ + 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(g_gb[1].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_expect := tr_RAN_INFORMATION_REQUEST(tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, dst_addr), + tr_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, src_addr), + tr_RAN_Information_Request_RIM_Container); + RIM[0].send(bssgp_rim_pdu); + T.start; + alt { + [] RIM[1].receive(bssgp_rim_pdu_expect) { } + [] RIM[1].receive { + setverdict(fail, "Unexpected BSSGP RIM PDU received"); + } + [] T.timeout { + setverdict(fail, "No BSSGP RIM PDU received"); + mtc.stop; + } + } + /* Now also emulate also the response as well and send it back on GB interface #1. Expect the result on +* GB interface #0 */ + var octetstring si3 := '1b753000f110236ec9033c274740793c0b2b2b'O + res_cont := ts_RAN_Information_RIM_Container(ts_RIM_Application_Identity(RIM_APP_ID_NACC), +ts_RIM_Sequence_Number(2), + ts_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP), + ts_RIM_Protocol_Version_Number(1), +