pespin has uploaded this change for review. ( 
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 library/ranap/RANAP_Templates.ttcn
2 files changed, 51 insertions(+), 0 deletions(-)



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

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 5249b8a..9dc8449 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -1327,6 +1327,55 @@
        f_tc_ranap_creq_cref(8, true);
 }

+private function f_tc_cs_iu_release_req_rua_disconnect(charstring id) runs on 
ConnHdlr {
+       var MgcpCommand mgcp_cmd;
+       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));
+       /* Leave small gap between Iu-Release Request and DISCONNECT: */
+       f_sleep(0.1);
+       RUA.send(RUA_Disc_Req:{{misc:=unspecified}, omit});
+
+       /* Make sure RUA DISCONNECT arrives to HNBGW before Iu-ReleaseCmd from 
CN: */
+       
BSSAP.receive(tr_RANAP_IuReleaseRequest(ts_RanapCause_radio_rab_preempted));
+       f_sleep(1.0);
+       
BSSAP.send(ts_RANAP_IuReleaseCommand(ts_RanapCause_radio_rab_preempted));
+
+       T.start;
+       alt {
+       [] as_mgcp_dlcx() {}
+       [] T.timeout {
+               setverdict(fail, "Timeout waiting for DLCX");
+       }
+       }
+       T.stop;
+
+       /* TODO/FIXME: Should HNBGW consider the Iu conn in HNB to be already 
released? or Somehow get a RUA conn to it so it can either:
+        * - Tx Iu-ReleaseCommand
+        * - Tx Iu Reset Resource (IuSigConid)
+        */
+
+       BSSAP.receive(tr_RANAP_IuReleaseComplete());
+}
+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
@@ -2413,6 +2462,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/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: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6782920c4a86d3311eb54239ab13a18e393c1ec0
Gerrit-Change-Number: 38576
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to