Harald Welte has submitted this change and it was merged.

Change subject: bts: Ignore first MEAS REP as it often contains bogus values
......................................................................


bts: Ignore first MEAS REP as it often contains bogus values

The first measurement report typically has bad performance as
it contains measurements taken before the MS actually started
to transmit on it.  Let's make sure we only validate all but
the first MEAS REP

Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c
---
M bts/BTS_Tests.ttcn
1 file changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index a50d3f6..e97c6d9 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -108,6 +108,7 @@
 
        var ConnHdlrPars g_pars;
        var uint8_t g_next_meas_res_nr := 0;
+       var boolean g_first_meas_res := true;
 }
 
 function f_init_rsl(charstring id) runs on test_CT {
@@ -858,8 +859,15 @@
                repeat;
                }
        [] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value 
rsl {
-               setverdict(fail, "Received unspecific MEAS RES ", rsl);
-               self.stop;
+               /* increment counter of next to-be-expected meas rep */
+               g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256;
+               if (g_first_meas_res) {
+                       g_first_meas_res := false;
+                       repeat;
+               } else {
+                       setverdict(fail, "Received unspecific MEAS RES ", rsl);
+                       self.stop;
+               }
                }
        [] RSL.receive(tr_RSL_MEAS_RES(?)) -> value rsl {
                setverdict(fail, "Received unexpected MEAS RES ", rsl);
@@ -904,6 +912,8 @@
        ia_um := f_L1CTL_WAIT_IMM_ASS(L1CTL, ra, fn);
        /* enable dedicated mode */
        f_L1CTL_DM_EST_REQ_IA(L1CTL, ia_um);
+
+       g_first_meas_res := true;
 }
 
 /* establish DChan, verify existance + contents of measurement reports */

-- 
To view, visit https://gerrit.osmocom.org/7244
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to