<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11210">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BTS_Tests.ttcn: extend f_unitdata_mo() with tolerance parameters<br><br>The ability to control which kinds of RSL messages are permitted<br>in a given use case (and which are not) makes f_unitdata_mo()<br>function much more flexible.<br><br>Let's introduce two new parameters, one of which would make its<br>'alt' statement tolerant to SACCH messages (Measurement Reports),<br>and another to other kinds of RSL messages.<br><br>Please note that the original behaviour of f_unitdata_mo()<br>went untouched, so it's still tolerant to any other messages.<br><br>Change-Id: I15782ec93d68a0dc54b2ed7a84cb70d780ba0ce1<br>---<br>M bts/BTS_Tests.ttcn<br>1 file changed, 18 insertions(+), 2 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/10/11210/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn</span><br><span>index 809a403..b078956 100644</span><br><span>--- a/bts/BTS_Tests.ttcn</span><br><span>+++ b/bts/BTS_Tests.ttcn</span><br><span>@@ -3731,7 +3731,12 @@</span><br><span> }</span><br><span> </span><br><span> /* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */</span><br><span style="color: hsl(0, 100%, 40%);">-function f_unitdata_mo(RslLinkId link_id, octetstring l3) runs on ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+function f_unitdata_mo(</span><br><span style="color: hsl(120, 100%, 40%);">+   RslLinkId link_id,</span><br><span style="color: hsl(120, 100%, 40%);">+    octetstring l3,</span><br><span style="color: hsl(120, 100%, 40%);">+       boolean exp_sacch := true, /* Should tolerate SACCH messages? */</span><br><span style="color: hsl(120, 100%, 40%);">+      boolean exp_any := true /* Should tolerate any other RSL messages? */</span><br><span style="color: hsl(120, 100%, 40%);">+) runs on ConnHdlr {</span><br><span>  timer T := 3.0;</span><br><span>      f_tx_lapdm(ts_LAPDm_UI(link_id.sapi, cr_MO_CMD, l3), link_id);</span><br><span>       T.start;</span><br><span>@@ -3740,11 +3745,22 @@</span><br><span>   [] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3)) {</span><br><span>                setverdict(pass);</span><br><span>            }</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Expect (or not expect) SACCH messages (Measurement Reports) */</span><br><span style="color: hsl(120, 100%, 40%);">+     [exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) { repeat; }</span><br><span style="color: hsl(120, 100%, 40%);">+    [not exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) {</span><br><span style="color: hsl(120, 100%, 40%);">+          setverdict(fail, "Unexpected (SACCH) UNIT_DATA_IND message!");</span><br><span style="color: hsl(120, 100%, 40%);">+              mtc.stop;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Expect (or not expect) other kinds of messages */</span><br><span style="color: hsl(120, 100%, 40%);">+  [exp_any] RSL.receive { repeat; }</span><br><span style="color: hsl(120, 100%, 40%);">+     [not exp_any] RSL.receive {</span><br><span style="color: hsl(120, 100%, 40%);">+           setverdict(fail, "Unexpected RSL message!");</span><br><span style="color: hsl(120, 100%, 40%);">+                mtc.stop;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span>    [] T.timeout {</span><br><span>               setverdict(fail, "Timeout waiting for UNIT_DATA_IND");</span><br><span>             mtc.stop;</span><br><span>            }</span><br><span style="color: hsl(0, 100%, 40%);">-       [] RSL.receive { repeat; }</span><br><span>   }</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11210">change 11210</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/11210"/><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: I15782ec93d68a0dc54b2ed7a84cb70d780ba0ce1 </div>
<div style="display:none"> Gerrit-Change-Number: 11210 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>