<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22100">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pcu: Introduce test TC_pcuif_suspend_active_tbf<br><br>Related: OS#4761<br>Change-Id: I9538fbdc806eb26e93a0421b520c8d34de61f91f<br>---<br>M pcu/PCU_Tests.ttcn<br>1 file changed, 75 insertions(+), 0 deletions(-)<br><br></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 528ee25..13b33b2 100644</span><br><span>--- a/pcu/PCU_Tests.ttcn</span><br><span>+++ b/pcu/PCU_Tests.ttcn</span><br><span>@@ -338,6 +338,80 @@</span><br><span>  f_shutdown(__BFILE__, __LINE__, final := true);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Make sure TBF is released and no data is sent for in after reciving a Suspend Request from that MS. See OS#4761 */</span><br><span style="color: hsl(120, 100%, 40%);">+testcase TC_pcuif_suspend_active_tbf() runs on RAW_PCU_Test_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+     var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.bvc[0].cell_id.ra_id);</span><br><span style="color: hsl(120, 100%, 40%);">+       var RlcmacDlBlock dl_block;</span><br><span style="color: hsl(120, 100%, 40%);">+   var octetstring data := f_rnd_octstring(10);</span><br><span style="color: hsl(120, 100%, 40%);">+  var uint32_t sched_fn;</span><br><span style="color: hsl(120, 100%, 40%);">+        var uint32_t dl_fn;</span><br><span style="color: hsl(120, 100%, 40%);">+   var GprsMS ms;</span><br><span style="color: hsl(120, 100%, 40%);">+        timer T;</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%);">+       /* Initialize GPRS MS side */</span><br><span style="color: hsl(120, 100%, 40%);">+ f_init_gprs_ms();</span><br><span style="color: hsl(120, 100%, 40%);">+     ms := g_ms[0]; /* We only use first MS in this test */</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(), ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));</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%);">+  /* Send one UL block (with TLLI since we are in One-Phase Access</span><br><span style="color: hsl(120, 100%, 40%);">+         contention resoultion) and make sure it is ACKED fine */</span><br><span style="color: hsl(120, 100%, 40%);">+   f_ms_tx_ul_data_block_multi(ms, 1, with_tlli := true);</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%);">+        /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */</span><br><span style="color: hsl(120, 100%, 40%);">+        f_ms_tx_ul_block(ms, ts_RLCMAC_CTRL_ACK(ms.tlli), sched_fn);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* UL block should be received in SGSN */</span><br><span style="color: hsl(120, 100%, 40%);">+     BSSGP[0].receive(tr_BSSGP_UL_UD(ms.tlli, mp_gb_cfg.bvc[0].cell_id));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Now SGSN sends some DL data, PCU will page on CCCH (PCH) */</span><br><span style="color: hsl(120, 100%, 40%);">+        BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data));</span><br><span style="color: hsl(120, 100%, 40%);">+ f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      /* Wait timer X2002 and DL block is available after CCCH IMM ASS: */</span><br><span style="color: hsl(120, 100%, 40%);">+  f_sleep(X2002);</span><br><span style="color: hsl(120, 100%, 40%);">+       f_rx_rlcmac_dl_block_exp_data(dl_block, dl_fn, data, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* MS has moved to CS, it sent SUSP REQ to BTS and PCU gets it, TBF is freed: */</span><br><span style="color: hsl(120, 100%, 40%);">+      BTS.send(ts_PCUIF_SUSP_REQ(0, ms.tlli, ra_id, 0));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  T.start(2.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ alt {</span><br><span style="color: hsl(120, 100%, 40%);">+ [] BSSGP_GLOBAL[0].receive(tr_BSSGP_SUSPEND(ms.tlli, mp_gb_cfg.bvc[0].cell_id.ra_id)) {</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 BSSGP SUSPEND");</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 style="color: hsl(120, 100%, 40%);">+   /* Make sure we don't receive data for that TBF since it was released</span><br><span style="color: hsl(120, 100%, 40%);">+      * before. Also check our TBF is not polled for UL. */</span><br><span style="color: hsl(120, 100%, 40%);">+        f_rx_rlcmac_dl_block_exp_dummy(dl_block);</span><br><span style="color: hsl(120, 100%, 40%);">+     if (dl_block.ctrl.mac_hdr.usf != USF_UNUSED) {</span><br><span style="color: hsl(120, 100%, 40%);">+                setverdict(fail, "Unexpected USF ", dl_block.ctrl.mac_hdr.usf);</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%);">+   /* New data arrives, PCU should page the MS since no TBF active exists: */</span><br><span style="color: hsl(120, 100%, 40%);">+    /* Send some more data, it will never reach the MS */</span><br><span style="color: hsl(120, 100%, 40%);">+ BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data));</span><br><span style="color: hsl(120, 100%, 40%);">+ f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      f_shutdown(__BFILE__, __LINE__, final := true);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Test of correct Timing Advance at the time of TBF establishment</span><br><span>  * (derived from timing offset of the Access Burst). */</span><br><span> testcase TC_ta_rach_imm_ass() runs on RAW_PCU_Test_CT {</span><br><span>@@ -3494,6 +3568,7 @@</span><br><span> </span><br><span> control {</span><br><span>    execute( TC_pcuif_suspend() );</span><br><span style="color: hsl(120, 100%, 40%);">+        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>     execute( TC_ta_idle_dl_tbf_ass() );</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22100">change 22100</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/+/22100"/><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: I9538fbdc806eb26e93a0421b520c8d34de61f91f </div>
<div style="display:none"> Gerrit-Change-Number: 22100 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>