From a42745c93bfe5678303390ea4efe45464db341f4 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 10 Jan 2020 18:03:28 +0100 Subject: msc: Introduce test TC_(iu_)chan_rel_sccp_tiar_timeout Verify SCCP T(iar) timeout triggers release of established channel. Related: OS#4343 Change-Id: Id6488a262e656f5c8fabb4e81f4797b305eb09e2 --- msc/MSC_Tests.ttcn | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'msc/MSC_Tests.ttcn') diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 177c2f8e..bf7f7489 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -113,6 +113,11 @@ type component MTC_CT extends CTRL_Adapter_CT { * handler is not active, which means that also no guard timer is * set up. The following timer will serve as a replacement */ timer Tguard_direct := 60.0; + + /* Configure T(tias) over VTY, seconds */ + var integer g_msc_sccp_timer_ias := 7 * 60; + /* Configure T(tiar) over VTY, seconds */ + var integer g_msc_sccp_timer_iar := 15 * 60; } modulepar { @@ -337,6 +342,8 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr f_vty_config(MSCVTY, "msc", "assign-tmsi"); f_vty_config(MSCVTY, "msc", "check-imei-rqd 0"); f_vty_config(MSCVTY, "network", "encryption a5 0"); + f_vty_config(MSCVTY, "cs7 instance 0", "sccp-timer ias " & int2str(g_msc_sccp_timer_ias)); + f_vty_config(MSCVTY, "cs7 instance 0", "sccp-timer iar " & int2str(g_msc_sccp_timer_iar)); if (mp_enable_osmux_test) { if (osmux) { f_vty_config(MSCVTY, "msc", "osmux on"); @@ -676,6 +683,45 @@ testcase TC_lu_and_mo_call() runs on MTC_CT { vc_conn.done; } +/* Verify T(iar) triggers and releases the channel */ +friend function f_lu_and_mo_call_sccp_tiar_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + timer T_wait_iar := int2float(5 + 1); /* g_msc_sccp_timer_iar + Give extra time (+1 sec) */ + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams); + f_perform_lu(); + f_mo_call_establish(cpars); + + /* Expect the channel cleared upon T(iar) triggered: */ + T_wait_iar.start; + alt { + [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND) { + T_wait_iar.stop + setverdict(pass); + } + [] MGCP.receive(tr_DLCX(?)) { repeat; } + [] T_wait_iar.timeout { + setverdict(fail, "Timeout waiting for T(iar) triggered SCCP RSLD"); + mtc.stop; + } + } + + setverdict(pass); +} +testcase TC_lu_and_mo_call_sccp_tiar_timeout() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + + /* Set T(iar) in MSC low enough that it will trigger before other side + has time to keep alive with a T(ias). Keep recommended ratio of + T(iar) >= T(ias)*2 */ + g_msc_sccp_timer_ias := 2; + g_msc_sccp_timer_iar := 5; + + f_init(); + + vc_conn := f_start_handler(refers(f_lu_and_mo_call_sccp_tiar_timeout), 89); + vc_conn.done; +} + /* Test LU (with authentication enabled), where HLR times out sending SAI response */ friend function f_tc_lu_auth_sai_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { @@ -5816,6 +5862,7 @@ control { execute( TC_lu_imsi_timeout_tmsi_realloc() ); execute( TC_cmserv_imsi_unknown() ); execute( TC_lu_and_mo_call() ); + execute( TC_lu_and_mo_call_sccp_tiar_timeout() ); execute( TC_lu_auth_sai_timeout() ); execute( TC_lu_auth_sai_err() ); execute( TC_lu_clear_request() ); -- cgit v1.2.3