pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40272?usp=email )
Change subject: hnbgw: Introduce tests TC_ps_rab_release(_abnormal) ...................................................................... hnbgw: Introduce tests TC_ps_rab_release(_abnormal) Same as their existing CS counterparts TC_rab_release(_abnormal). Related: SYS#7451 Change-Id: Ia25efc2d6bf01d4a13e7fd1ce0563d20dd2e321e --- M hnbgw/HNBGW_Tests.ttcn M hnbgw/expected-results.xml 2 files changed, 80 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/40272/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 2ce36d5..e968e63 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -1660,6 +1660,81 @@ f_shutdown_helper(); } +/* PS RAB release with Cause NAS/Normal (successful/orderly release). + * This can happen when MS sent a "SM Deactivate PDP Context Request", then CN answers with + * "SM Deactivate PDP Context Accept" followed by a "RAB Assign Req (ReleaseList)" */ +friend function f_ps_tc_rab_release(charstring id) runs on ConnHdlr { + var charstring hnb0_ctr_prefix := f_hnb_ctr_prefix(g_pars.hnb); + var MgcpCommand mgcp_cmd; + var RANAP_PDU tx; + timer T := 15.0; + + f_statsd_reset(); + + tx := f_build_initial_ue(g_pars); + f_iuh2iu_connect(tx); + + f_create_rab_ps(); + + var charstring ctr_name; + if (g_pars.rab_rel_cause == valueof(ts_RanapCause_nas_normal)) { + ctr_name := "ranap.ps.rab_rel.req.normal"; + } else { + ctr_name := "ranap.ps.rab_rel.req.abnormal"; + } + + /* Expect stats to be 0 */ + var StatsDExpects expect := { + {name := hnb0_ctr_prefix & ctr_name, mtype := "c", min := 0, max := 0} + }; + f_statsd_expect(expect); + + /* Send RAB Release */ + tx := valueof(ts_RANAP_RabAssReq(rab_rl := ts_RAB_RL(t_RAB_id(23), g_pars.rab_rel_cause))); + BSSAP.send(tx); + + if (g_pars.pfcp_pars.pfcp_enabled) { + T.start; + alt { + [] as_pfcp_handle_del_req() {} + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Timeout waiting for PFCP Sess Del Req"); + } + } + T.stop; + } + + f_rua_expect(tx); + + expect := { + {name := hnb0_ctr_prefix & ctr_name, mtype := "c", min := 1, max := 1} + }; + f_statsd_expect(expect); +} +testcase TC_ps_rab_release() runs on test_CT { + var ConnHdlr vc_conn; + g_num_hnbs := 1; + f_init(); + + vc_conn := f_start_handler_with_pars(refers(f_ps_tc_rab_release), f_TestHdlrParams(5, true)); + vc_conn.done; + + f_shutdown_helper(); +} +/* PS RAB release with Cause abnormal */ +testcase TC_ps_rab_release_abnormal() runs on test_CT { + var ConnHdlr vc_conn; + g_num_hnbs := 1; + f_init(); + + vc_conn := f_start_handler_with_pars(refers(f_ps_tc_rab_release), + f_TestHdlrParams(8, true, rab_rel_cause := ts_RanapCause_radio_conn_lost)); + vc_conn.done; + + f_shutdown_helper(); +} + /* Default list of counters for a 'cn' entity to test the cnpool feature. */ const CounterNameVals counternames_cnpool := { { "cnpool:subscr:new", 0 }, @@ -2655,6 +2730,8 @@ execute(TC_ps_rua_dt_during_sccp_wait_cc()); execute(TC_ps_rab_assignment()); execute(TC_ps_rab_assignment_concurrent()); + execute(TC_ps_rab_release()); + execute(TC_ps_rab_release_abnormal()); execute( TC_mscpool_L3Compl_on_1_cnlink() ); execute( TC_mscpool_L3Complete_by_imsi_round_robin() ); diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml index 3777715..c04876d 100644 --- a/hnbgw/expected-results.xml +++ b/hnbgw/expected-results.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<testsuite name='Titan' tests='60' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> +<testsuite name='Titan' tests='62' 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'/> @@ -33,6 +33,8 @@ <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_ps_rab_release' time='MASKED'/> + <testcase classname='HNBGW_Tests' name='TC_ps_rab_release_abnormal' 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'/> <testcase classname='HNBGW_Tests' name='TC_mscpool_LU_by_tmsi_null_nri_0_round_robin' time='MASKED'/> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40272?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: Ia25efc2d6bf01d4a13e7fd1ce0563d20dd2e321e Gerrit-Change-Number: 40272 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pes...@sysmocom.de>