Change in ...osmo-ttcn3-hacks[master]: BTS: test that RSL MS POWER does not activate MS power control withou...

Hoernchen gerrit-no-reply at lists.osmocom.org
Mon Jun 17 13:09:21 UTC 2019


Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14491


Change subject: BTS: test that RSL MS POWER does not activate MS power control without PP IE
......................................................................

BTS: test that RSL MS POWER does not activate MS power control without PP IE

Change-Id: I8776ed4af83dc9f9f32ac14f5d4c9e35f4a286d6
---
M bts/BTS_Tests.ttcn
1 file changed, 62 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/14491/1

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 @@
 
 }
 
-/* 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 @@
 
 }
 
+/* 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 @@
 	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 @@
 	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() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14491
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8776ed4af83dc9f9f32ac14f5d4c9e35f4a286d6
Gerrit-Change-Number: 14491
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190617/2f5b4257/attachment.html>


More information about the gerrit-log mailing list