From cbef398fe8c907dd847e7f3c364d27722f1ecf4a Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Mon, 30 Jul 2018 09:22:40 +0200 Subject: BSC_Tests: Avoid race condition between paging cmd and reset ack Sometimes (under heavy load and when the last paging cmd arrives near the reset ack) some messages are not enqueued in the IPA_RSL port after we have received the reset ack from BSSAP. In the failures I have seen wireshark reports that no paging cmd arrived after the reset ack, see jenkins job 285: https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/285/ Adding a sleep is always a bit crude, but since the paging cmd is scheduled through TCP while the reset ack is sent through sctp I don't see another way. Running the test under load in a loop showed improvements where I was not able to reproduce the failure with this patch. Change-Id: Ib2d60e2c59baf98e437e078d844adcc6dbdbfcd8 --- bsc/BSC_Tests.ttcn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bsc/BSC_Tests.ttcn') diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index c802a6b2..5af45732 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1390,6 +1390,10 @@ testcase TC_paging_imsi_a_reset() runs on test_CT { [] BSSAP.receive { repeat; } } + /* Wait to avoid a possible race condition if a paging message is + * received right before the reset ACK. */ + f_sleep(0.2); + /* Clear the queue, it might still contain stuff like BCCH FILLING */ for (var integer i := 0; i < sizeof(IPA_RSL); i := i+1) { IPA_RSL[i].clear; -- cgit v1.2.3