<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/25045">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tests: tbf: Fix dl_tbf polled for data without being in FLOW state<br><br>Prior code was wrong, as in it did stuff diferent to what is expected<br>and actually done in osmo-pcu. In osmo-pcu code, the function is guarded<br>and only called in FLOW or FINISHED state by the scheduler.<br><br>Change-Id: If8029bee90adceee128ebb20c033756efd50e90e<br>---<br>M tests/tbf/TbfTest.cpp<br>M tests/tbf/TbfTest.err<br>2 files changed, 32 insertions(+), 23 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/25045/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp</span><br><span>index f8cb974..5879a96 100644</span><br><span>--- a/tests/tbf/TbfTest.cpp</span><br><span>+++ b/tests/tbf/TbfTest.cpp</span><br><span>@@ -574,6 +574,12 @@</span><br><span> </span><br><span>  OSMO_ASSERT(ms_dl_tbf(ms) != NULL);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       /* Here PCU would answer with data_cnf and trigger</span><br><span style="color: hsl(120, 100%, 40%);">+     * bts_rcv_imm_ass_cnf(), which would set up the timer X2002. In this</span><br><span style="color: hsl(120, 100%, 40%);">+  * test we directly to T0 timeout to move it to FLOW state: */</span><br><span style="color: hsl(120, 100%, 40%);">+        ms_dl_tbf(ms)->handle_timeout();</span><br><span style="color: hsl(120, 100%, 40%);">+   OSMO_ASSERT(ms_dl_tbf(ms)->state_is(TBF_ST_FLOW));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      /* Get first BSN */</span><br><span>  struct msgb *msg;</span><br><span>    int fn = 0;</span><br><span>diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err</span><br><span>index f2beb1f..84735aa 100644</span><br><span>--- a/tests/tbf/TbfTest.err</span><br><span>+++ b/tests/tbf/TbfTest.err</span><br><span>@@ -1570,31 +1570,34 @@</span><br><span> TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) TX: START Immediate Assignment Downlink (PCH)</span><br><span>  - TRX=0 (0) TS=4 TA=0</span><br><span> TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) appending 19 bytes</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==0) mcs_mode_restrict=EGPRS</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Sending new block at BSN 0, CS=CS-1</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Dequeue next LLC (len=19)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Complete DL frame, len=19</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Dequeue next LLC (len=19)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) data block (BSN 0, CS-1): 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 </span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying 1 RLC blocks, 1 BSNs</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying data unit 0 (BSN 0)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) msg block (BSN 0, CS-1): 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 </span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) timer 0 expired. cur_fn=2654167</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(DL-TFI_0){ASSIGN}: Received Event ASSIGN_READY_CCCH</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(DL-TFI_0){ASSIGN}: state_chg to FLOW</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==0) mcs_mode_restrict=EGPRS</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Sending new block at BSN 0, CS=CS-1</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Dequeue next LLC (len=19)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Complete DL frame, len=19</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Dequeue next LLC (len=19)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) data block (BSN 0, CS-1): 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 </span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying 1 RLC blocks, 1 BSNs</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying data unit 0 (BSN 0)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) msg block (BSN 0, CS-1): 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 </span><br><span> MSG = 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 </span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==1) mcs_mode_restrict=EGPRS</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Sending new block at BSN 1, CS=CS-1</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Complete DL frame, len=19</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Dequeue next LLC (len=19)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) data block (BSN 1, CS-1): 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 </span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) need_padding 0 spb_status 0 spb 0 (BSN1 1 BSN2 -1)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying 1 RLC blocks, 1 BSNs</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying data unit 0 (BSN 1)</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) msg block (BSN 1, CS-1): 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 </span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==1) mcs_mode_restrict=EGPRS</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Sending new block at BSN 1, CS=CS-1</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Complete DL frame, len=19</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Dequeue next LLC (len=19)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) data block (BSN 1, CS-1): 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 </span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) need_padding 0 spb_status 0 spb 0 (BSN1 1 BSN2 -1)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying 1 RLC blocks, 1 BSNs</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying data unit 0 (BSN 1)</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) msg block (BSN 1, CS-1): 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 </span><br><span> MSG = 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 </span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==2) mcs_mode_restrict=EGPRS</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Sending new block at BSN 2, CS=CS-1</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Complete DL frame, len=19</span><br><span style="color: hsl(0, 100%, 40%);">-TBF(DL-TFI_0){ASSIGN}: state_chg to FINISHED</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==2) mcs_mode_restrict=EGPRS</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Sending new block at BSN 2, CS=CS-1</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Complete DL frame, len=19</span><br><span style="color: hsl(120, 100%, 40%);">+TBF(DL-TFI_0){FLOW}: state_chg to FINISHED</span><br><span> TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FINISHED) data block (BSN 2, CS-1): 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 </span><br><span> TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FINISHED) need_padding 0 spb_status 0 spb 0 (BSN1 2 BSN2 -1)</span><br><span> TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FINISHED) Copying 1 RLC blocks, 1 BSNs</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/25045">change 25045</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-pcu/+/25045"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If8029bee90adceee128ebb20c033756efd50e90e </div>
<div style="display:none"> Gerrit-Change-Number: 25045 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>