Change in ...osmo-ttcn3-hacks[master]: BTS: add another failing power control test

laforge gerrit-no-reply at lists.osmocom.org
Mon Jun 17 15:10:12 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14485 )

Change subject: BTS: add another failing power control test
......................................................................

BTS: add another failing power control test

Change-Id: I8b3bdf374c96fa3368f90ae524859f30ceefa5f5
---
M bts/BTS_Tests.ttcn
1 file changed, 56 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2d2ae0b..9184f6a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2088,6 +2088,46 @@
 
 }
 
+/* see if we change the power level without receiving power parameters, which should not happen */
+function f_TC_rsl_ms_pwr_dyn_active(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);
+
+	/* 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;
@@ -2238,6 +2278,21 @@
 	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }
 
+testcase TC_rsl_ms_pwr_dyn_active() 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_active), 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;
@@ -5898,6 +5953,7 @@
 	execute( TC_meas_res_sign_sdcch8() );
 	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_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/+/14485
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: I8b3bdf374c96fa3368f90ae524859f30ceefa5f5
Gerrit-Change-Number: 14485
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190617/bd711ff3/attachment.html>


More information about the gerrit-log mailing list