<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24417">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">PCU_Tests: new test case TC_ta_ul_ack_nack_first_block()<br><br>In a busy network, there can be a significant delay between resource<br>allocation (Packet Uplink Assignment above) and the actual time when<br>the MS is allowed to transmit the first Uplink data block.<br><br>Verify Timing Advance value indicated in Packet Uplink ACK/NACK message<br>sent in response to the first Uplink block after resource allocation.<br><br>Change-Id: I30f82c51b3e9a167af4dbce3e74697dd79ff15bf<br>---<br>M pcu/PCU_Tests.ttcn<br>1 file changed, 54 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/17/24417/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn</span><br><span>index 3d374d0..a8b809a 100644</span><br><span>--- a/pcu/PCU_Tests.ttcn</span><br><span>+++ b/pcu/PCU_Tests.ttcn</span><br><span>@@ -496,6 +496,59 @@</span><br><span>     f_shutdown(__BFILE__, __LINE__, final := true);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Verify Timing Advance value indicated in Packet Uplink ACK/NACK message</span><br><span style="color: hsl(120, 100%, 40%);">+ * sent in response to the first Uplink block after resource allocation. */</span><br><span style="color: hsl(120, 100%, 40%);">+testcase TC_ta_ul_ack_nack_first_block() runs on RAW_PCU_Test_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+ var GprsMS ms := valueof(t_GprsMS_def);</span><br><span style="color: hsl(120, 100%, 40%);">+       var PacketUlAckNack ul_ack_nack;</span><br><span style="color: hsl(120, 100%, 40%);">+      var PacketTimingAdvance pkt_ta;</span><br><span style="color: hsl(120, 100%, 40%);">+       var RlcmacDlBlock dl_block;</span><br><span style="color: hsl(120, 100%, 40%);">+   var uint32_t sched_fn;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Initialize NS/BSSGP side */</span><br><span style="color: hsl(120, 100%, 40%);">+        f_init_bssgp();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Initialize the PCU interface abstraction */</span><br><span style="color: hsl(120, 100%, 40%);">+        f_init_raw(testcasename());</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Establish BSSGP connection to the PCU */</span><br><span style="color: hsl(120, 100%, 40%);">+   f_bssgp_establish();</span><br><span style="color: hsl(120, 100%, 40%);">+  f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Establish an Uplink TBF */</span><br><span style="color: hsl(120, 100%, 40%);">+ f_ms_establish_ul_tbf(ms);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* In a busy network, there can be a significant delay between resource</span><br><span style="color: hsl(120, 100%, 40%);">+        * allocation (Packet Uplink Assignment above) and the actual time when</span><br><span style="color: hsl(120, 100%, 40%);">+        * the MS is allowed to transmit the first Uplink data block. */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* Simulate a random TA in range 8..16 */</span><br><span style="color: hsl(120, 100%, 40%);">+     ms.ta := 8 + f_rnd_int(9);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* We're in One-Phase Access contention resoultion, include TLLI */</span><br><span style="color: hsl(120, 100%, 40%);">+       f_ms_tx_ul_data_block_multi(ms, 1, with_tlli := true, fn := ms.ul_tbf.start_time_fn);</span><br><span style="color: hsl(120, 100%, 40%);">+ f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      ul_ack_nack := dl_block.ctrl.payload.u.ul_ack_nack;</span><br><span style="color: hsl(120, 100%, 40%);">+   if (ispresent(ul_ack_nack.gprs.pkt_ta)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             pkt_ta := ul_ack_nack.gprs.pkt_ta;</span><br><span style="color: hsl(120, 100%, 40%);">+    } else if (ispresent(ul_ack_nack.egprs.pkt_ta)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             pkt_ta := ul_ack_nack.egprs.pkt_ta;</span><br><span style="color: hsl(120, 100%, 40%);">+   } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              setverdict(fail, "PacketTimingAdvance IE is not present");</span><br><span style="color: hsl(120, 100%, 40%);">+          f_shutdown(__BFILE__, __LINE__);</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%);">+   if (not ispresent(pkt_ta.val)) {</span><br><span style="color: hsl(120, 100%, 40%);">+              setverdict(fail, "Timing Advance value is not present");</span><br><span style="color: hsl(120, 100%, 40%);">+            f_shutdown(__BFILE__, __LINE__);</span><br><span style="color: hsl(120, 100%, 40%);">+      } else if (pkt_ta.val != ms.ta) {</span><br><span style="color: hsl(120, 100%, 40%);">+             setverdict(fail, "Timing Advance mismatch: expected ",</span><br><span style="color: hsl(120, 100%, 40%);">+                         ms.ta, ", but received ", pkt_ta.val);</span><br><span style="color: hsl(120, 100%, 40%);">+           f_shutdown(__BFILE__, __LINE__);</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> /* Verify Timing Advance value(s) indicated during the packet Downlink assignment</span><br><span>  * procedure as per 3GPP TS 44.018, section 3.5.3. There seems to be a bug in the</span><br><span>  * IUT that causes it to send an unreasonable Timing Advance value > 0 despite</span><br><span>@@ -5850,6 +5903,7 @@</span><br><span>        execute( TC_pcuif_suspend_active_tbf() );</span><br><span>    execute( TC_ta_ptcch_idle() );</span><br><span>       execute( TC_ta_rach_imm_ass() );</span><br><span style="color: hsl(120, 100%, 40%);">+      execute( TC_ta_ul_ack_nack_first_block() );</span><br><span>  execute( TC_ta_idle_dl_tbf_ass() );</span><br><span>  execute( TC_ta_ptcch_ul_multi_tbf() );</span><br><span>       execute( TC_cs_lqual_ul_tbf() );</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24417">change 24417</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/c/osmo-ttcn3-hacks/+/24417"/><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-Change-Id: I30f82c51b3e9a167af4dbce3e74697dd79ff15bf </div>
<div style="display:none"> Gerrit-Change-Number: 24417 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>