pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved
hnbgw: Introduce test TC_{cs,ps}_rua_dt_during_sccp_wait_cc

Related: SYS#7453
Change-Id: I97767db5560edf951202c876726d0c52b5b5b49f
---
M hnbgw/HNBGW_Tests.ttcn
M hnbgw/expected-results.xml
2 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 28b41d2..a123dda 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -1567,6 +1567,56 @@
f_shutdown_helper();
}

+/* scenario: HNB transmits a RUA DirectTransfer after having transmitted a RUA Connect
+ * (with RANAP payload) and conn is still being established on SCCP side (HNBGW sent CR,
+ * waiting for CC from CN). */
+private function f_tc_rua_dt_during_sccp_wait_cc(charstring id) runs on ConnHdlr {
+ /* HNB->MSC: InitialUE */
+ var RANAP_PDU tx_ranap_pdu := f_build_initial_ue(g_pars);
+ f_iuh2iu_connect(f_build_initial_ue(g_pars));
+
+ /* CREQ was received at CN, now UE/HNB decides to transmit RANAP PDU (Iu Release REq).
+ * This has been seen in a production setup on the field, with a high
+ * latency+jitter satellite network between HNB and HNBGW.
+ * We expect HNBGW to queue the msg until the SCCP conn is confirmed. */
+ tx_ranap_pdu := valueof(ts_RANAP_IuReleaseRequest(ts_RanapCause_nas_normal));
+ RUA.send(tx_ranap_pdu);
+
+ /* Let some time for RUA DirectTransfer to reach the HNBGW: */
+ f_sleep(1.0);
+
+ /* Now tx SCCP CC from CN to HNBGW: */
+ BSSAP.send(ts_MSC_CONN_PRIM_CONNECT_RES);
+
+ /* now that SCCP conn is connected, HNBGW should forward the previously queued RANAP PDU: */
+ f_bssap_expect(tx_ranap_pdu);
+
+ /* Validate that we can indeed forward some Downlink data CN may have sent to HNBGW meanwhile.
+ * This would usually be for instance a Attach Accept or similar. */
+ tx_ranap_pdu := valueof(ts_RANAP_DirectTransfer(f_rnd_octstring(10)));
+ f_iu2iuh(tx_ranap_pdu);
+
+ f_cn_iu_release_procedure();
+}
+private function f_TC_rua_dt_during_sccp_wait_cc(boolean is_ps) runs on test_CT {
+ var ConnHdlr vc_conn;
+ g_num_hnbs := 1;
+ /* Instruct RAN_Emulation to avoid accepting the conn, we'll trigger an
+ * SCCP CC by sending a N-CONNECT RESP primitive in ConnHdlr. */
+ g_ran_ops.ranap_connect_ind_auto_res := false;
+ f_init();
+
+ vc_conn := f_start_handler_with_pars(refers(f_tc_rua_dt_during_sccp_wait_cc), f_TestHdlrParams(6, is_ps));
+ vc_conn.done;
+
+ f_shutdown_helper();
+}
+testcase TC_cs_rua_dt_during_sccp_wait_cc() runs on test_CT {
+ f_TC_rua_dt_during_sccp_wait_cc(false);
+}testcase TC_ps_rua_dt_during_sccp_wait_cc() runs on test_CT {
+ f_TC_rua_dt_during_sccp_wait_cc(true);
+}
+
friend function f_tc_ps_rab_assignment(charstring id) runs on ConnHdlr {
var RANAP_PDU tx;

@@ -1578,7 +1628,6 @@

f_cn_iu_release_procedure(pfcp_teardown := g_pars.pfcp_pars.pfcp_enabled);
}
-
testcase TC_ps_rab_assignment() runs on test_CT {
var ConnHdlr vc_conn;
g_num_hnbs := 1;
@@ -2603,6 +2652,8 @@
execute(TC_cs_rua_disconnect_during_sccp_cr_cc());
execute(TC_cs_iu_release_req_rua_disconnect());
execute(TC_ps_iu_release_req_rua_disconnect());
+ execute(TC_cs_rua_dt_during_sccp_wait_cc());
+ execute(TC_ps_rua_dt_during_sccp_wait_cc());
execute(TC_ps_rab_assignment());
execute(TC_ps_rab_assignment_concurrent());

diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml
index 3fca542..3777715 100644
--- a/hnbgw/expected-results.xml
+++ b/hnbgw/expected-results.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<testsuite name='Titan' tests='58' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
+<testsuite name='Titan' tests='60' 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'/>
@@ -29,6 +29,8 @@
<testcase classname='HNBGW_Tests' name='TC_cs_rua_disconnect_during_sccp_cr_cc' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_cs_iu_release_req_rua_disconnect' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_ps_iu_release_req_rua_disconnect' time='MASKED'/>
+ <testcase classname='HNBGW_Tests' name='TC_cs_rua_dt_during_sccp_wait_cc' time='MASKED'/>
+ <testcase classname='HNBGW_Tests' name='TC_ps_rua_dt_during_sccp_wait_cc' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_ps_rab_assignment' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_ps_rab_assignment_concurrent' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_mscpool_L3Compl_on_1_cnlink' time='MASKED'/>

To view, visit change 40184. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I97767db5560edf951202c876726d0c52b5b5b49f
Gerrit-Change-Number: 40184
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>