<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11204">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BTS_Tests.ttcn: fix: properly expect I-frames in f_TC_encr_cmd()<br><br>For some reason, in f_TC_encr_cmd() it was expected / assumed that<br>when a ciphered I-frame is sent from MS on L1CTL, nothing else<br>than this frame would arrive. But since we have fixed Measurement<br>Reporting in trxcon (see OS#2988), the MR related messages do<br>appear on A-bis interface now!<br><br>This change introduces a new function f_data_mo(), which should<br>be used to send I-frames from MS, and expect them on A-bis<br>ignoring all other other RSL messages (e.g. Measurement Reports).<br><br>So, the following test cases:<br><br>  - TC_encr_cmd_a51;<br>  - TC_encr_cmd_a52;<br>  - TC_encr_cmd_a53;<br><br>should pass with both trxcon and Calypso PHY now :)<br><br>Change-Id: I08cb28dd9fa23f3ef8b0c9ede3d4c47f5702a1c1<br>---<br>M bts/BTS_Tests.ttcn<br>1 file changed, 24 insertions(+), 4 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/04/11204/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..a3209b7 100644</span><br><span>--- a/bts/BTS_Tests.ttcn</span><br><span>+++ b/bts/BTS_Tests.ttcn</span><br><span>@@ -3748,6 +3748,28 @@</span><br><span>      }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Send I-frame from MS and expect it to arrive as RLL DATA IND on Abis */</span><br><span style="color: hsl(120, 100%, 40%);">+function f_data_mo(</span><br><span style="color: hsl(120, 100%, 40%);">+   RslLinkId link_id,</span><br><span style="color: hsl(120, 100%, 40%);">+    boolean p, uint3_t nr, uint3_t ns,</span><br><span style="color: hsl(120, 100%, 40%);">+    octetstring l3</span><br><span style="color: hsl(120, 100%, 40%);">+) runs on ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+  timer T := 3.0;</span><br><span style="color: hsl(120, 100%, 40%);">+       f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, p, nr, ns, l3), link_id);</span><br><span style="color: hsl(120, 100%, 40%);">+      T.start;</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Expect RLL DATA IND on RSL side */</span><br><span style="color: hsl(120, 100%, 40%);">+ alt {</span><br><span style="color: hsl(120, 100%, 40%);">+ [] RSL.receive(tr_RSL_DATA_IND(g_chan_nr, link_id, l3)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     [] T.timeout {</span><br><span style="color: hsl(120, 100%, 40%);">+                setverdict(fail, "Timeout waiting for DATA_IND");</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%);">+     [] RSL.receive { repeat; }</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Test channel activation with A5/n right from the beginning (like in assignment + hand-over) */</span><br><span> function f_TC_chan_act_encr(charstring id) runs on ConnHdlr {</span><br><span>         f_l1_tune(L1CTL);</span><br><span>@@ -3811,10 +3833,8 @@</span><br><span>   var uint8_t alg_id := f_alg_id_to_l1ctl(g_pars.encr.alg_id);</span><br><span>         f_L1CTL_CRYPTO_REQ(L1CTL, g_pars.chan_nr, alg_id, g_pars.encr.key);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* send first ciphered I-frame in response */</span><br><span style="color: hsl(0, 100%, 40%);">-   l3 := '0a0b0c0d'O;</span><br><span style="color: hsl(0, 100%, 40%);">-      f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, true, 1, 0, l3), link_id);</span><br><span style="color: hsl(0, 100%, 40%);">-       RSL.receive(tr_RSL_DATA_IND(g_chan_nr, link_id, l3));</span><br><span style="color: hsl(120, 100%, 40%);">+ /* send first ciphered I-frame in response and expect it on RSL */</span><br><span style="color: hsl(120, 100%, 40%);">+    f_data_mo(link_id, true, 1, 0, '0a0b0c0d'O);</span><br><span> </span><br><span>     /* now the BTS code should have detected the first properly encrypted uplink I-frame,</span><br><span>         * and hence enable encryption also on the downlink */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11204">change 11204</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/11204"/><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: I08cb28dd9fa23f3ef8b0c9ede3d4c47f5702a1c1 </div>
<div style="display:none"> Gerrit-Change-Number: 11204 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>