fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42916?usp=email )
Change subject: bts: TC_pcu_interf_ind: check reporting interval instead of absolute FN ......................................................................
bts: TC_pcu_interf_ind: check reporting interval instead of absolute FN
Recent osmo-bts commit 53f0ec29 broke TC_pcu_interf_ind:
Verdict: fail reason: Odd TDMA frame number := 935
There's no requirement that periodic interference reports must land on a TDMA frame number satisfying 'fn mod 104 == 0' - only that they keep arriving every configured averaging period. Instead, verify that the interval between consecutive reports equals 104 TDMA frames (1 SACCH period), using the new f_gsm_fn_sub() helper.
Change-Id: Ia96f2926400bae8c0a6fb8f81eb56b48ca5f2de9 Related: 53f0ec29 ("l1sap: fix duplicate RF RESOURCE INDICATION on clock bootstrap") --- M bts/BTS_Tests.ttcn 1 file changed, 11 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/42916/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 54238f5..328919b 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -6664,6 +6664,7 @@ var template PCUIF_Message tr_interf_ind; var integer interf_ind_num := 0; var boolean first := true; + var integer prev_fn := -1; var PCUIF_Message msg; timer T;
@@ -6691,6 +6692,7 @@ alt { /* The first interference report may contain unreliable values, so we ignore it */ [first] as_pcuif_msg(msg, tr_PCUIF_INTERF_IND(0, 0)) { + prev_fn := msg.u.interf_ind.fn; /* 4 SACCH periods => 4 reports (plus some guard time) */ T.start(0.480 * 4.0 + 0.480 / 2.0); first := false; @@ -6698,11 +6700,16 @@ } /* Subsequent interference reports shall match our expectations */ [not first] as_pcuif_msg(msg, tr_interf_ind) { - /* Check TDMA frame number period */ - if (msg.u.interf_ind.fn mod 104 != 0) { - setverdict(fail, "Odd TDMA frame number := ", - msg.u.interf_ind.fn); + /* Check the reporting interval: there is no requirement on the absolute + * TDMA frame number a report arrives at, only that reports keep arriving + * every 'avg-period' (here: 1) SACCH period(s), i.e. every 104 frames. */ + var integer fn_diff := f_gsm_fn_sub(msg.u.interf_ind.fn, prev_fn); + if (fn_diff != 104) { + setverdict(fail, "Unexpected TDMA frame number interval := ", + fn_diff, " (fn := ", msg.u.interf_ind.fn, + ", prev_fn := ", prev_fn, ")"); } + prev_fn := msg.u.interf_ind.fn; interf_ind_num := interf_ind_num + 1; if (interf_ind_num < 4) { repeat; }