bsc: Introduce test TC_chan_rel_sccp_tiar_timeout

Verify SCCP T(iar) timeout triggers release of established channel.

Change-Id: Ic2724f62689b99c33e2e5c3a0c2fd022178a788c
This commit is contained in:
Pau Espin 2020-01-09 19:55:40 +01:00 committed by laforge
parent d0575c2fd8
commit c675b6119c
3 changed files with 41 additions and 0 deletions

View File

@ -97,6 +97,11 @@ type component test_CT extends CTRL_Adapter_CT {
/* Osmux is enabled through VTY */
var boolean g_osmux_enabled := false;
/*Configure T(tias) over VTY, seconds */
var integer g_bsc_sccp_timer_ias := 7 * 60;
/*Configure T(tiar) over VTY, seconds */
var integer g_bsc_sccp_timer_iar := 15 * 60;
/* global test case guard timer */
timer T_guard := 30.0;
@ -332,6 +337,8 @@ function f_init_vty(charstring id := "foo") runs on test_CT {
map(self:BSCVTY, system:BSCVTY);
f_vty_set_prompts(BSCVTY);
f_vty_transceive(BSCVTY, "enable");
f_cs7_inst_0_cfg(BSCVTY, {"sccp-timer ias " & int2str(g_bsc_sccp_timer_ias),
"sccp-timer iar " & int2str(g_bsc_sccp_timer_iar)});
}
/* global initialization function
@ -1064,6 +1071,23 @@ testcase TC_chan_rel_a_reset() runs on test_CT {
setverdict(pass);
}
/* Verify T(iar) triggers and releases the channel */
testcase TC_chan_rel_sccp_tiar_timeout() runs on test_CT {
var DchanTuple dt;
/* Set T(iar) in BSC 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_bsc_sccp_timer_ias := 2;
g_bsc_sccp_timer_iar := 5;
f_init(1);
dt := f_est_dchan('23'O, 23, '00010203040506'O);
f_expect_chan_rel(0, dt.rsl_chan_nr, expect_rll_rel_req := false);
setverdict(pass);
}
/* Test behavior if RSL EST IND for non-active channel */
testcase TC_rll_est_ind_inact_lchan() runs on test_CT {
timer T := 2.0;
@ -3632,6 +3656,15 @@ private function f_bts_0_cfg(Commands cmds := {}) runs on MSC_ConnHdlr
f_vty_transceive(BSCVTY, "end");
}
private function f_cs7_inst_0_cfg(TELNETasp_PT pt, Commands cmds := {})
{
f_vty_enter_cfg_cs7_inst(pt, 0);
for (var integer i := 0; i < sizeof(cmds); i := i+1) {
f_vty_transceive(pt, cmds[i]);
}
f_vty_transceive(pt, "end");
}
private function f_probe_for_handover(charstring log_label,
charstring log_descr,
charstring handover_vty_cmd,
@ -4419,6 +4452,7 @@ control {
execute( TC_chan_rel_hard_rlsd() );
execute( TC_chan_rel_hard_rlsd_ms_dead() );
execute( TC_chan_rel_a_reset() );
execute( TC_chan_rel_sccp_tiar_timeout() );
execute( TC_outbound_connect() );

View File

@ -19,6 +19,7 @@
<testcase classname='BSC_Tests' name='TC_chan_rel_hard_rlsd' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_chan_rel_hard_rlsd_ms_dead' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_chan_rel_a_reset' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_chan_rel_sccp_tiar_timeout' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_outbound_connect' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_assignment_cic_only' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_assignment_csd' time='MASKED'/>

View File

@ -102,6 +102,7 @@ module Osmocom_VTY_Functions {
type integer BtsTrxNr (0..255);
type integer BtsTimeslotNr (0..7);
type integer MscNr (0..255);
type integer Cs7Nr (0..255);
type charstring BtsGprsMode ("none", "gprs", "egrps");
@ -135,6 +136,11 @@ module Osmocom_VTY_Functions {
f_vty_transceive(pt, "msc " & int2str(msc));
}
function f_vty_enter_cfg_cs7_inst(TELNETasp_PT pt, Cs7Nr cs7_inst := 0) {
f_vty_enter_config(pt);
f_vty_transceive(pt, "cs7 instance " & int2str(cs7_inst));
}
type record of charstring rof_charstring;
function f_vty_config2(TELNETasp_PT pt, rof_charstring config_nodes, charstring cmd)
{