bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync

Those two new tests test the subtle rules related to how the presence
of certain IEs in the RSL CHAN ACT influence when exactly DL SACCH
transmission should start during hand-over related channel activation.

Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81
Related: OS#3570
Related: OS#4008
Related: OS#4009
This commit is contained in:
Harald Welte 2019-05-19 22:51:25 +02:00
parent 1028017e14
commit 8b01c794f0
1 changed files with 152 additions and 4 deletions

View File

@ -497,9 +497,9 @@ runs on ConnHdlr {
var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other);
}
function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {})
runs on ConnHdlr {
var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode));
function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {},
RSL_IE_ActivationType act_type := t_RSL_IE_ActType_IA) runs on ConnHdlr {
var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode, act_type));
if (encr_enable) {
/* append encryption related IEs, if requested */
var RSL_IE_EncryptionInfo encr_info;
@ -1007,7 +1007,153 @@ testcase TC_sacch_chan_act() runs on test_CT {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
/* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */
/* verify that SACCH DL transmission is started only if MS power IE present
* see section 4.1.3 of 3GPP TS 48.058 */
private function f_TC_sacch_chan_act_ho_async(charstring id) runs on ConnHdlr {
var octetstring si5 := f_rnd_octstring(19);
f_l1_tune(L1CTL);
RSL.clear;
/* Step 1: Activate ASYNC HO channel without MS power IE */
/* Activate channel on BTS side */
f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_ASYNC);
/* don't perform immediate assignment here, as we're testing non-IA case */
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7);
/* Verify that no DL SACCH is being received */
f_sacch_missing(?);
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
/* Step 2: Activate ASYNC HO channel with MS power IE */
/* Activate channel on BTS side */
var RSL_IE_List addl_ies := {
valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)}))
};
f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_ASYNC);
/* don't perform immediate assignment here, as we're testing non-IA case */
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7);
/* Verify that DL SACCH is being received */
f_sacch_present(si5);
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
}
testcase TC_sacch_chan_act_ho_async() runs on test_CT {
var ConnHdlr vc_conn;
var ConnHdlrPars pars;
f_init();
for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) {
pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN));
log(testcasename(), ": Starting for ", g_AllChannels[i]);
vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_async), pars);
vc_conn.done;
}
/* TODO: do the above in parallel, rather than sequentially? */
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
/* verify that SACCH DL transmission is started only if TA + MS power IEs present,
* see section 4.1.4 of 3GPP TS 48.058 */
private function f_TC_sacch_chan_act_ho_sync(charstring id) runs on ConnHdlr {
var octetstring si5 := f_rnd_octstring(19);
var RSL_IE_List addl_ies;
f_l1_tune(L1CTL);
RSL.clear;
/* Step 1: Activate SYNC HO channel without MS power IE */
/* Activate channel on BTS side */
f_rsl_chan_act(g_pars.chan_mode, act_type := t_RSL_IE_ActType_HO_SYNC);
/* don't perform immediate assignment here, as we're testing non-IA case */
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7);
/* Verify that no DL SACCH is being received */
f_sacch_missing(?);
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
/* Step 2a: Activate SYNC HO channel with only MS power IE */
/* Activate channel on BTS side */
addl_ies := {
valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)}))
};
f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC);
/* don't perform immediate assignment here, as we're testing non-IA case */
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7);
/* Verify that no DL SACCH is being received */
f_sacch_missing(?);
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
/* Step 2b: Activate SYNC HO channel with TA IE */
/* Activate channel on BTS side */
addl_ies := {
valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := 0}))
};
f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC);
/* don't perform immediate assignment here, as we're testing non-IA case */
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7);
/* Verify that no DL SACCH is being received */
f_sacch_missing(?);
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
/* Step 3: Activate SYNC HO channel with MS power IE and TA IE */
/* Activate channel on BTS side */
addl_ies := {
valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, RSL_IE_Body:{timing_adv := 0})),
valueof(t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(0)}))
};
f_rsl_chan_act(g_pars.chan_mode, more_ies := addl_ies, act_type := t_RSL_IE_ActType_HO_SYNC);
/* don't perform immediate assignment here, as we're testing non-IA case */
/* enable dedicated mode */
f_L1CTL_DM_EST_REQ(L1CTL, {false, mp_trx0_arfcn }, g_pars.chan_nr, 7);
/* Verify that DL SACCH is being received */
f_sacch_present(si5);
f_rsl_chan_deact();
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
}
testcase TC_sacch_chan_act_ho_sync() runs on test_CT {
var ConnHdlr vc_conn;
var ConnHdlrPars pars;
f_init();
for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) {
pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN));
log(testcasename(), ": Starting for ", g_AllChannels[i]);
vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_sync), pars);
vc_conn.done;
}
/* TODO: do the above in parallel, rather than sequentially? */
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
/***********************************************************************
@ -4465,6 +4611,8 @@ control {
execute( TC_sacch_multi() );
execute( TC_sacch_multi_chg() );
execute( TC_sacch_chan_act() );
execute( TC_sacch_chan_act_ho_async() );
execute( TC_sacch_chan_act_ho_sync() );
execute( TC_rach_content() );
execute( TC_rach_count() );
execute( TC_rach_max_ta() );