aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-10-11 18:17:25 +0200
committerlaforge <laforge@osmocom.org>2020-10-12 13:13:04 +0000
commitc87d81f916aebc9580efc338da488cc3572a39da (patch)
tree0a4a9595c897e645d6395fd87a6ef04ff33d2bf3
parentc935fad594822c63e390ce168b56db0148485885 (diff)
bts: Avoid race condition in TC_pcu_deact_req
When our emulated PCU sends a DEACT.req to the BTS, there is no way of knowing when exactly that command will have been completed: There is no confirmation sent in response. Let's introduce a f_sleep(1.0) to give the BTS sufficient time for deactivating the channel. This will make TC_pcu_deact_req pass reliably. It currently fails in about one third of all test executions on jenkins. Change-Id: Id9a559b8b208a60f71c3eb9a23830e4d2dbc5df9
-rw-r--r--bts/BTS_Tests.ttcn4
1 files changed, 3 insertions, 1 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index e24356a9..b381893c 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4379,7 +4379,9 @@ runs on test_CT {
/* Send PDCH activate request for known PDCH timeslot */
PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_DEACT_REQ(bts_nr, trx_nr, ts_nr)));
-
+ /* wait for some time as there is no PCUIF_DEACT_RESP or the like, so we don't know
+ * when it will actually have been executed in the BTS */
+ f_sleep(1.0);
PCU.clear;
/* we now expect no RTS.req for this timeslot */
T.start;