fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42068?usp=email )


Change subject: bts: fix TC_rsl_ms_pwr_dyn_ass_updown: adjust the timers
......................................................................

bts: fix TC_rsl_ms_pwr_dyn_ass_updown: adjust the timers

This testcase predates major changes to the MS power control logic
in osmo-bts and was passing thanks to a coincidence (broken UL SACCH
cache in trxcon).  Specifically, the MS power loop is now using
P_Con_INTERVAL=4 by default.  This means that the power control
decision is intentionally delayed and a change may occur only once
in a period of 4 SACCH blocks (N=4 is ~1.92s).

Adjust the timer values to take this into account.  Take a chance
to move comments in-place and expand them with more details.

This patch makes TC_rsl_ms_pwr_dyn_ass_updown pass again.

Change-Id: I36d87c12f49ec13003b708d768285aa6840e81eb
Related: OS#6945
---
M bts/BTS_Tests.ttcn
1 file changed, 12 insertions(+), 8 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index c975944..41a2b57 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3134,9 +3134,7 @@
        Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }

-/* Target level -100, first rssi -90, ms power 7, expected increase to 7+6 
within 6 seconds,
- * second rssi -110, ms power 7+6, expected decrease to 7 within 6 seconds.
- * These power levels are valid for all bands and require no special handling. 
*/
+/* Test if dynamic MS power control can reduce and increase MS power based on 
UL RxLev */
 private function f_TC_rsl_ms_pwr_dyn_ass_updown(charstring id) runs on 
ConnHdlr {
        var uint5_t pwr_var := 7;
        var SacchL1Header l1h;
@@ -3156,13 +3154,16 @@
                valueof(t_RSL_IE(RSL_IE_MS_POWER_PARAM, 
RSL_IE_Body:{ms_power_params := pp}))
        };

-       /* establish with power parameters */
+       /* Establish a dchan with power parameters, enabling dynamic MS power 
control */
        f_est_dchan(more_ies := addl_ies);

-       /* set a high value to ensure L1 power control level increases */
+       /* 1) Simulate a higher UL RxLev value (-90 dBm) than the target (-100 
dBm).
+        *    The MS power loop is expected to reduce Tx power (by raising MS 
power level).
+        *    Given the default P_Con_INTERVAL=4 (~1.92s) and 
Pow_Red_Step_Size=2 dB,
+        *    change from 7 (16 dBm) to 13 (4 dBm) should take 6 steps or 
~11.52s. */
        f_trxc_fake_rssi(rxlev2dbm(20));

-       timer T2 := 6.0;
+       timer T2 := 6.0 * 1.92 + 0.5; /* +0.5 is a safety margin */
        T2.start;
        alt {
        [] as_l1_sacch_l1h(l1h) {
@@ -3180,10 +3181,13 @@
                }
        }

-       /* set a low value to ensure L1 power control level decreases */
+       /* 2) Simulate a low UL RxLev value (-110 dBm).
+        *    The MS power loop is expected to increase Tx power (by lowering 
MS power level).
+        *    Given the default P_Con_INTERVAL=4 (~1.92s) and 
Pow_Incr_Step_Size=4 dB,
+        *    change from 13 (4 dBm) to 7 (16 dBm) should take 3 steps or 
~5.76s. */
        f_trxc_fake_rssi(rxlev2dbm(0));

-       timer T4 := 6.0;
+       timer T4 := 3.0 * 1.92 + 0.5; /* +0.5 is a safety margin */
        T4.start;
        alt {
        [] as_l1_sacch_l1h(l1h) {

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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I36d87c12f49ec13003b708d768285aa6840e81eb
Gerrit-Change-Number: 42068
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to