<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21328">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gbproxy: Add TC_bvc_{block,unblock}_ptp()<br><br>Test the blocking and unblocking procedure, indirectly via the BSSGP<br>emulation sending us the related primitives on both PCU and SGSN side.<br><br>Change-Id: Ia2fe867435678cbde44cac2addcaddd174507446<br>---<br>M gbproxy/GBProxy_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/28/21328/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn</span><br><span>index bfb0850..66cddc3 100644</span><br><span>--- a/gbproxy/GBProxy_Tests.ttcn</span><br><span>+++ b/gbproxy/GBProxy_Tests.ttcn</span><br><span>@@ -1780,7 +1780,59 @@</span><br><span>      f_cleanup();</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+private function f_block_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ var BSSGP_BVC_CT bvc_ct := g_pcu[pcu_idx].vc_BSSGP_BVC[bvc_idx];</span><br><span style="color: hsl(120, 100%, 40%);">+      var BssgpBvcConfig bvc_cfg := g_pcu[pcu_idx].cfg.bvc[bvc_idx];</span><br><span style="color: hsl(120, 100%, 40%);">+        var Nsei nsei_pcu := g_pcu[pcu_idx].cfg.nsei;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     SGSN_MGMT.clear;</span><br><span style="color: hsl(120, 100%, 40%);">+      PCU_MGMT.clear;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* block the PTP BVC from the PCU side */</span><br><span style="color: hsl(120, 100%, 40%);">+     PCU_MGMT.send(BssgpBlockRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to bvc_ct;</span><br><span style="color: hsl(120, 100%, 40%);">+      /* expect state on both PCU and SGSN side to change */</span><br><span style="color: hsl(120, 100%, 40%);">+        interleave {</span><br><span style="color: hsl(120, 100%, 40%);">+  [] PCU_MGMT.receive(tr_BssgpStsInd(nsei_pcu, bvc_cfg.bvci, BVC_S_BLOCKED)) from bvc_ct;</span><br><span style="color: hsl(120, 100%, 40%);">+       [] SGSN_MGMT.receive(tr_BssgpStsInd(*, bvc_cfg.bvci, BVC_S_BLOCKED));</span><br><span style="color: hsl(120, 100%, 40%);">+ }</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%);">+testcase TC_bvc_block_ptp() runs on test_CT</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  f_init();</span><br><span style="color: hsl(120, 100%, 40%);">+     f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ f_block_ptp_bvc_from_pcu(0, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+       f_cleanup();</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%);">+private function f_unblock_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   var BSSGP_BVC_CT bvc_ct := g_pcu[pcu_idx].vc_BSSGP_BVC[bvc_idx];</span><br><span style="color: hsl(120, 100%, 40%);">+      var BssgpBvcConfig bvc_cfg := g_pcu[pcu_idx].cfg.bvc[bvc_idx];</span><br><span style="color: hsl(120, 100%, 40%);">+        var Nsei nsei_pcu := g_pcu[pcu_idx].cfg.nsei;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       SGSN_MGMT.clear;</span><br><span style="color: hsl(120, 100%, 40%);">+      PCU_MGMT.clear;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* block the PTP BVC from the PCU side */</span><br><span style="color: hsl(120, 100%, 40%);">+     PCU_MGMT.send(BssgpUnblockRequest:{}) to bvc_ct;</span><br><span style="color: hsl(120, 100%, 40%);">+      /* expect state on both PCU and SGSN side to change */</span><br><span style="color: hsl(120, 100%, 40%);">+        interleave {</span><br><span style="color: hsl(120, 100%, 40%);">+  [] PCU_MGMT.receive(tr_BssgpStsInd(nsei_pcu, bvc_cfg.bvci, BVC_S_UNBLOCKED)) from bvc_ct;</span><br><span style="color: hsl(120, 100%, 40%);">+     [] SGSN_MGMT.receive(tr_BssgpStsInd(*, bvc_cfg.bvci, BVC_S_UNBLOCKED));</span><br><span style="color: hsl(120, 100%, 40%);">+       }</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%);">+testcase TC_bvc_unblock_ptp() runs on test_CT</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        f_init();</span><br><span style="color: hsl(120, 100%, 40%);">+     f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ f_block_ptp_bvc_from_pcu(0, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+       f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ f_unblock_ptp_bvc_from_pcu(0, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+     f_cleanup();</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span> </span><br><span> control {</span><br><span>     execute( TC_BVC_bringup() );</span><br><span>@@ -1791,6 +1843,8 @@</span><br><span>         execute( TC_radio_status() );</span><br><span>        execute( TC_suspend() );</span><br><span>     execute( TC_resume() );</span><br><span style="color: hsl(120, 100%, 40%);">+       execute( TC_bvc_block_ptp() );</span><br><span style="color: hsl(120, 100%, 40%);">+        execute( TC_bvc_unblock_ptp() );</span><br><span>     if (false) {</span><br><span>                 /* don't enable this by default, as we don't yet have any automatic test setup for FR with 4 NS-VC */</span><br><span>                execute( TC_load_sharing_dl() );</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21328">change 21328</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/+/21328"/><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: Ia2fe867435678cbde44cac2addcaddd174507446 </div>
<div style="display:none"> Gerrit-Change-Number: 21328 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>