summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2019-06-17 15:08:57 +0200
committerEric Wild <ewild@sysmocom.de>2019-06-17 15:08:57 +0200
commit095024b5996b4ecc6cd619647c63b661c08bdbe2 (patch)
treee1f89c07922027edf2293d57cad5ba57f0957248
parent280ccb83a07a666175708d46719d60f437c844f5 (diff)
BTS: test that RSL MS POWER does not activate MS power control without PP IE
-rw-r--r--bts/BTS_Tests.ttcn63
1 files changed, 62 insertions, 1 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 9184f6a..9d7b8c2 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2088,7 +2088,8 @@ function f_TC_rsl_ms_pwr_dyn_down(charstring id) runs on ConnHdlr {
}
-/* see if we change the power level without receiving power parameters, which should not happen */
+/* see if we change the power level without receiving power parameters, which should not happen
+rsl chan act WITHOUT power parameters */
function f_TC_rsl_ms_pwr_dyn_active(charstring id) runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
@@ -2128,6 +2129,50 @@ function f_TC_rsl_ms_pwr_dyn_active(charstring id) runs on ConnHdlr {
}
+/* see if we change the power level without receiving power parameters, which should not happen
+ms power control WITHOUT power parameters */
+function f_TC_rsl_ms_pwr_dyn_active2(charstring id) runs on ConnHdlr {
+ var L1ctlDlMessage l1_dl;
+
+ /* set a high value to ensure power decreases */
+ f_trxc_fake_rssi(rxlev2dbm(50));
+ f_l1_tune(L1CTL);
+ RSL.clear;
+
+ var uint5_t pwr_var := 5;
+
+ var template (value) RSL_IE_MS_Power ms_power := ts_RSL_IE_MS_Power(pwr_var);
+ var template (value) RSL_IE pwr := t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power});
+
+ /* establish with fixed power level */
+ f_est_dchan(more_ies :={valueof(pwr)});
+
+ /* check our initial power level */
+ f_wait_for_l1_power_level(pwr_var);
+
+ /* pwr control without power params IE, should NOT activate MS power control*/
+ RSL.send(ts_RSL_MS_PWR_CTRL(g_chan_nr, ms_power));
+
+ /* wait, then check that our power level did not change */
+ timer T1 := 10.0;
+ T1.start;
+ alt {
+ [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl {
+ if ( oct2int(l1_dl.payload.data_ind.payload[0]) != pwr_var) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "BS power control should not be active unless we receive a power parameters IE!");
+ }
+ repeat;
+ }
+ [] L1CTL.receive { repeat; }
+ [] T1.timeout { setverdict(pass); }
+ }
+
+ f_rsl_chan_deact();
+ f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+
+}
+
function f_wait_for_l1_power_level(integer level) runs on ConnHdlr {
var L1ctlDlMessage l1_dl;
timer T0 := 10.0;
@@ -2293,6 +2338,21 @@ testcase TC_rsl_ms_pwr_dyn_active() runs on test_CT {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
+testcase TC_rsl_ms_pwr_dyn_active2() runs on test_CT {
+ var ConnHdlr vc_conn;
+ var ConnHdlrPars pars;
+ f_init();
+ f_vty_config(BTSVTY, "phy 0", "osmotrx ms-power-loop -100");
+ for (var integer tn := 1; tn <= 1; tn := tn+1) {
+ pars := valueof(t_Pars(t_RslChanNr_Bm(tn), ts_RSL_ChanMode_SIGN));
+ pars.bts0_band := f_vty_get_bts0_band();
+ vc_conn := f_start_handler(refers(f_TC_rsl_ms_pwr_dyn_active2), pars, trxc_comp := true);
+ vc_conn.done;
+ }
+ f_vty_config(BTSVTY, "phy 0", "no osmotrx ms-power-loop");
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
testcase TC_meas_res_sign_tchf() runs on test_CT {
var ConnHdlr vc_conn;
var ConnHdlrPars pars;
@@ -5954,6 +6014,7 @@ control {
execute( TC_meas_res_sign_tchh_toa256() );
execute( TC_rsl_ms_pwr_ctrl() );
execute( TC_rsl_ms_pwr_dyn_active() );
+ execute( TC_rsl_ms_pwr_dyn_active2() );
execute( TC_rsl_ms_pwr_dyn_up() );
execute( TC_rsl_ms_pwr_dyn_down() );
execute( TC_rsl_ms_pwr_dyn_ass_updown() );