Change in osmo-pcu[master]: tests: tbf: Fix dl_tbf polled for data without being in FLOW state

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 26 14:19:42 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25045 )


Change subject: tests: tbf: Fix dl_tbf polled for data without being in FLOW state
......................................................................

tests: tbf: Fix dl_tbf polled for data without being in FLOW state

Prior code was wrong, as in it did stuff diferent to what is expected
and actually done in osmo-pcu. In osmo-pcu code, the function is guarded
and only called in FLOW or FINISHED state by the scheduler.

Change-Id: If8029bee90adceee128ebb20c033756efd50e90e
---
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
2 files changed, 32 insertions(+), 23 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/25045/1

diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index f8cb974..5879a96 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -574,6 +574,12 @@
 
 	OSMO_ASSERT(ms_dl_tbf(ms) != NULL);
 
+	/* Here PCU would answer with data_cnf and trigger
+	 * bts_rcv_imm_ass_cnf(), which would set up the timer X2002. In this
+	 * test we directly to T0 timeout to move it to FLOW state: */
+	ms_dl_tbf(ms)->handle_timeout();
+	OSMO_ASSERT(ms_dl_tbf(ms)->state_is(TBF_ST_FLOW));
+
 	/* Get first BSN */
 	struct msgb *msg;
 	int fn = 0;
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index f2beb1f..84735aa 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1570,31 +1570,34 @@
 TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) TX: START Immediate Assignment Downlink (PCH)
  - TRX=0 (0) TS=4 TA=0
 TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) appending 19 bytes
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==0) mcs_mode_restrict=EGPRS
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Sending new block at BSN 0, CS=CS-1
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Dequeue next LLC (len=19)
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Complete DL frame, len=19
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Dequeue next LLC (len=19)
-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 
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1)
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying 1 RLC blocks, 1 BSNs
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying data unit 0 (BSN 0)
-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 
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) timer 0 expired. cur_fn=2654167
+TBF(DL-TFI_0){ASSIGN}: Received Event ASSIGN_READY_CCCH
+TBF(DL-TFI_0){ASSIGN}: state_chg to FLOW
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==0) mcs_mode_restrict=EGPRS
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Sending new block at BSN 0, CS=CS-1
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Dequeue next LLC (len=19)
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Complete DL frame, len=19
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Dequeue next LLC (len=19)
+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 
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1)
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying 1 RLC blocks, 1 BSNs
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying data unit 0 (BSN 0)
+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 
 MSG = 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==1) mcs_mode_restrict=EGPRS
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Sending new block at BSN 1, CS=CS-1
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Complete DL frame, len=19
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Dequeue next LLC (len=19)
-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 
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) need_padding 0 spb_status 0 spb 0 (BSN1 1 BSN2 -1)
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying 1 RLC blocks, 1 BSNs
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Copying data unit 0 (BSN 1)
-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 
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==1) mcs_mode_restrict=EGPRS
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Sending new block at BSN 1, CS=CS-1
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Complete DL frame, len=19
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Dequeue next LLC (len=19)
+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 
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) need_padding 0 spb_status 0 spb 0 (BSN1 1 BSN2 -1)
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying 1 RLC blocks, 1 BSNs
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Copying data unit 0 (BSN 1)
+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 
 MSG = 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==2) mcs_mode_restrict=EGPRS
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Sending new block at BSN 2, CS=CS-1
-TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Complete DL frame, len=19
-TBF(DL-TFI_0){ASSIGN}: state_chg to FINISHED
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==2) mcs_mode_restrict=EGPRS
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Sending new block at BSN 2, CS=CS-1
+TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FLOW) Complete DL frame, len=19
+TBF(DL-TFI_0){FLOW}: state_chg to FINISHED
 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 
 TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FINISHED) need_padding 0 spb_status 0 spb 0 (BSN1 2 BSN2 -1)
 TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=FINISHED) Copying 1 RLC blocks, 1 BSNs

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25045
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If8029bee90adceee128ebb20c033756efd50e90e
Gerrit-Change-Number: 25045
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210726/cc853f0c/attachment.htm>


More information about the gerrit-log mailing list