pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38576?usp=email )
Change subject: hnbgw: Introduce test TC_cs_iu_release_req_rua_disconnect
......................................................................
hnbgw: Introduce test TC_cs_iu_release_req_rua_disconnect
Related: SYS#6602
Change-Id: I6782920c4a86d3311eb54239ab13a18e393c1ec0
---
M hnbgw/HNBGW_Tests.ttcn
M hnbgw/expected-results.xml
M library/ranap/RANAP_Templates.ttcn
3 files changed, 56 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 8a263d5..44f0e43 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -1325,6 +1325,58 @@
f_tc_ranap_creq_cref(8, true);
}
+/* Scenario: HNB tears down the RUA/Iu conn by first sending RUA_DATA[RANAP
+ * IuReleaseReq], followed shortly by a RUA Disconnect with no RANAP and
+ * Cause!=Normal. HNBGW should release the SCCP connection through RLSD since it's
+ * impossible to terminate the Iu connection in a normal condition. (SYS#6602) */
+private function f_tc_cs_iu_release_req_rua_disconnect(charstring id) runs on ConnHdlr {
+ var RANAP_PDU tx;
+ timer T := 5.0;
+
+ f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
+
+ tx := f_build_initial_ue(g_pars);
+ f_iuh2iu_connect(tx);
+
+ f_create_rab(g_pars.mgcp_pars);
+
+ RUA.send(ts_RANAP_IuReleaseRequest(ts_RanapCause_radio_rab_preempted));
+ BSSAP.receive(tr_RANAP_IuReleaseRequest(ts_RanapCause_radio_rab_preempted));
+
+ RUA.send(RUA_Disc_Req:{{misc:=unspecified}, omit});
+
+ /* HNBGW tears down related MGW sessions: */
+ T.start;
+ alt {
+ [] as_mgcp_dlcx() {}
+ [] T.timeout {
+ setverdict(fail, "Timeout waiting for DLCX");
+ }
+ }
+ T.stop;
+
+ /* We cannot guarantee we can send Iu-ReleaseCommand at RANAP_Emulation
+ * before it receives the RLSD from HNBGW, hence we don't send it. If we
+ * sent it, it would be ignored by HNBGW since the RUA conn is already
+ * disconnected:
+ * BSSAP.send(ts_RANAP_IuReleaseCommand(ts_RanapCause_radio_rab_preempted));
+ */
+
+ BSSAP.receive(tr_MSC_CONN_PRIM_DISC_IND);
+ /* Let RAN_Emulation some time to answer RLSD with RLC: */
+ f_sleep(1.0);
+}
+testcase TC_cs_iu_release_req_rua_disconnect() runs on test_CT {
+ var ConnHdlr vc_conn;
+ g_num_hnbs := 1;
+ f_init();
+
+ vc_conn := f_start_handler_with_pars(refers(f_tc_cs_iu_release_req_rua_disconnect),
f_TestHdlrParams(9));
+ vc_conn.done;
+
+ f_shutdown_helper();
+}
+
type record FTeid {
HostName addr,
OCT4 teid
@@ -2439,6 +2491,7 @@
execute(TC_ranap_ps_mo_disconnect());
execute(TC_ranap_cs_creq_cref());
execute(TC_ranap_ps_creq_cref());
+ execute(TC_cs_iu_release_req_rua_disconnect());
if (mp_enable_pfcp_tests) {
execute(TC_ps_rab_assignment_with_pfcp());
diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml
index 0b67ec6..7d8bbbf 100644
--- a/hnbgw/expected-results.xml
+++ b/hnbgw/expected-results.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<testsuite name='Titan' tests='42' failures='0'
errors='0' skipped='0' inconc='0' time='MASKED'>
+<testsuite name='Titan' tests='50' failures='0'
errors='0' skipped='0' inconc='0' time='MASKED'>
<testcase classname='HNBGW_Tests' name='TC_hnb_register'
time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_hnb_register_duplicate'
time='MASKED'/>
<testcase classname='HNBGW_Tests'
name='TC_hnb_register_duplicate_reuse_sctp_assoc' time='MASKED'/>
@@ -23,6 +23,7 @@
<testcase classname='HNBGW_Tests' name='TC_ranap_ps_mo_disconnect'
time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_ranap_cs_creq_cref'
time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_ranap_ps_creq_cref'
time='MASKED'/>
+ <testcase classname='HNBGW_Tests'
name='TC_cs_iu_release_req_rua_disconnect' time='MASKED'/>
<testcase classname='HNBGW_Tests'
name='TC_ps_rab_assignment_without_pfcp' time='MASKED'/>
<testcase classname='HNBGW_Tests'
name='TC_mscpool_L3Compl_on_1_cnlink' time='MASKED'/>
<testcase classname='HNBGW_Tests'
name='TC_mscpool_L3Complete_by_imsi_round_robin' time='MASKED'/>
diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn
index 3f9c497..b09d23e 100644
--- a/library/ranap/RANAP_Templates.ttcn
+++ b/library/ranap/RANAP_Templates.ttcn
@@ -13,6 +13,7 @@
template (value) Cause ts_RanapCause_om_intervention := { misc := 113 };
template (value) Cause ts_RanapCause_nas_normal := { nAS := 83 };
+template (value) Cause ts_RanapCause_radio_rab_preempted := { radioNetwork := 1 };
template (value) Cause ts_RanapCause_radio_conn_release := { radioNetwork := 40 };
template (value) Cause ts_RanapCause_radio_conn_lost := { radioNetwork := 46 };
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38576?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6782920c4a86d3311eb54239ab13a18e393c1ec0
Gerrit-Change-Number: 38576
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>