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
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index f8cb974..1dccfff 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 go 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;