pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40184?usp=email )
Change subject: hnbgw: Introduce test TC_{cs,ps}_rua_dt_during_sccp_wait_cc ......................................................................
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, 46 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/84/40184/1
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 28b41d2..743898b 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -1567,6 +1567,47 @@ 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(tx_ranap_pdu); + + /* CREQ was received at CN, now HNB decides to retransmit the RANAP PDU (ie. L3/DTAP retrans timeout). + * We expect HNBGW to queue the msg until the SCCP conn is confirmed. */ + 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); + f_sleep(1.0); // FIXME: Can probably be dropped. +} +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 +1619,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 +2643,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'/>