<p>daniel has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10272">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BSC_Tests: Avoid race condition between paging cmd and reset ack<br><br>Sometimes (under heavy load and when the last paging cmd arrives near<br>the reset ack) some messages are not enqueued in the IPA_RSL port after<br>we have received the reset ack from BSSAP.<br><br>In the failures I have seen wireshark reports that no paging cmd arrived<br>after the reset ack, see jenkins job 285:<br>https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/285/<br><br>Adding a sleep is always a bit crude, but since the paging cmd is<br>scheduled through TCP while the reset ack is sent through sctp I don't<br>see another way.<br><br>Running the test under load in a loop showed improvements where I was<br>not able to reproduce the failure with this patch.<br><br>Change-Id: Ib2d60e2c59baf98e437e078d844adcc6dbdbfcd8<br>---<br>M bsc/BSC_Tests.ttcn<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/10272/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn</span><br><span>index c802a6b..5af4573 100644</span><br><span>--- a/bsc/BSC_Tests.ttcn</span><br><span>+++ b/bsc/BSC_Tests.ttcn</span><br><span>@@ -1390,6 +1390,10 @@</span><br><span>         [] BSSAP.receive { repeat; }</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Wait to avoid a possible race condition if a paging message is</span><br><span style="color: hsl(120, 100%, 40%);">+      * received right before the reset ACK. */</span><br><span style="color: hsl(120, 100%, 40%);">+    f_sleep(0.2);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>      /* Clear the queue, it might still contain stuff like BCCH FILLING */</span><br><span>        for (var integer i := 0; i < sizeof(IPA_RSL); i := i+1) {</span><br><span>                 IPA_RSL[i].clear;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10272">change 10272</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/10272"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib2d60e2c59baf98e437e078d844adcc6dbdbfcd8 </div>
<div style="display:none"> Gerrit-Change-Number: 10272 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>