pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39121?usp=email )
Change subject: hnbgw: Introduce test TC_{cs,ps}_rua_disconnect_during_sccp_cr_cc ......................................................................
hnbgw: Introduce test TC_{cs,ps}_rua_disconnect_during_sccp_cr_cc
Related: SYS#7208 Change-Id: Ie4fe4aaf77017f7191cf000331e452cded56cf25 --- M hnbgw/HNBGW_Tests.ttcn M hnbgw/expected-results.xml 2 files changed, 45 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/39121/1
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index ab6a09e..939a608 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -1429,6 +1429,46 @@ f_tc_ranap_creq_cref(8, true); }
+/* scenario: HNB transmits RUA Disconnect while conn is still being established + * on SCCP side (HNBGW sent CR, waiting for CC from CN). */ +private function f_tc_rua_disconnect_during_sccp_cr_cc(charstring id) runs on ConnHdlr { + /* HNB->MSC: InitialUE */ + f_iuh2iu_connect(f_build_initial_ue(g_pars)); + + /* CREQ was received at CN, now HNB decides to disconnect the RUA conn: */ + RUA.send(RUA_Disc_Req:{{misc:=unspecified}, omit}); + + /* Let some time for RUA Disconnect 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 tear it down because the RUA conn was released in previous step: */ + BSSAP.receive(tr_MSC_CONN_PRIM_DISC_IND); + /* Let RAN_Emulation some time to answer RLSD with RLC: */ + f_sleep(1.0); +} +private function f_TC_rua_disconnect_during_sccp_cr_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 CREF by sending a DISC REQ 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_disconnect_during_sccp_cr_cc), f_TestHdlrParams(6, is_ps)); + vc_conn.done; + + f_shutdown_helper(); +} +testcase TC_cs_rua_disconnect_during_sccp_cr_cc() runs on test_CT { + f_TC_rua_disconnect_during_sccp_cr_cc(false); +} +testcase TC_ps_rua_disconnect_during_sccp_cr_cc() runs on test_CT { + f_TC_rua_disconnect_during_sccp_cr_cc(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 @@ -2450,6 +2490,8 @@ execute(TC_ranap_ps_mo_disconnect()); execute(TC_ranap_cs_creq_cref()); execute(TC_ranap_ps_creq_cref()); + execute(TC_ps_rua_disconnect_during_sccp_cr_cc()); + 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_ps_rab_assignment()); diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml index ad5a0f5..655db84 100644 --- a/hnbgw/expected-results.xml +++ b/hnbgw/expected-results.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<testsuite name='Titan' tests='56' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> +<testsuite name='Titan' tests='58' 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'/> @@ -25,6 +25,8 @@ <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_ps_rua_disconnect_during_sccp_cr_cc' time='MASKED'/> + <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_ps_rab_assignment' time='MASKED'/>