fixeria has uploaded this change for review.

View Change

bts: TC_nr_seq_error: handle occasional func=RR

TC_nr_seq_error() deliberately sends an I frame with a bad N(R) to
trigger a sequence error on the BTS side. In response, the BTS both
raises the sequence error (leading to a DISC once RSL requests link
release) and, independently, sends a routine func=RR ack, since it
considers itself "not busy" with no pending data at that point.

'''
((bts=0,trx=0,ts=1,ss=0)[DCCH][0]) we are not busy and have no pending data, send RR
'''

Whether that RR actually reaches the air depends on how soon the
channel gets its next Tx opportunity relative to the RSL RELEASE
REQ: on TCH/F (FACCH can steal almost any burst) the RR is typically
transmitted well before DISC is even queued, while on other channel
types it is usually superseded by DISC before ever being sent.
So the RR shows up on air intermittently, most reliably on TCH/F.

The test's alt only expects func=DISC, so an unexpected func=RR
stalls the queue and results in a failure "Missing DISC from BTS".
This problem did not manifest with fake_trx.py; the test only started
failing sporadically after migrating to osmo-trx-proxy, likely due
to its Tx queueing scheduling latency.

Change-Id: I49cb6dcfa66208df246f8da7116d9fc8cba1f11e
Related: OS#6638, OS#6672
---
M bts/BTS_Tests_LAPDm.ttcn
1 file changed, 2 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/43690/1
diff --git a/bts/BTS_Tests_LAPDm.ttcn b/bts/BTS_Tests_LAPDm.ttcn
index fef2383..f091df9 100644
--- a/bts/BTS_Tests_LAPDm.ttcn
+++ b/bts/BTS_Tests_LAPDm.ttcn
@@ -814,6 +814,8 @@
T1.start;
alt{
[] LAPDM.receive(t_PH_DATA(0, false, tr_LAPDm_DISC(sapi, c_r:=cr_MT_CMD, p:=true)));
+ /* prior to func=DISC, the BTS may send a func=RR frame - ignore it */
+ [] LAPDM.receive(t_PH_DATA(0, is_sacch, tr_LAPDm_RR(sapi, c_r:=cr_MT_RSP, p:=?, nr:=?))) { repeat; }
[] T1.timeout{ setverdict(fail, "Missing DISC from BTS")}
}


To view, visit change 43690. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I49cb6dcfa66208df246f8da7116d9fc8cba1f11e
Gerrit-Change-Number: 43690
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>