gbproxy: Add TC_bvc_{block,unblock}_ptp()
Test the blocking and unblocking procedure, indirectly via the BSSGP
emulation sending us the related primitives on both PCU and SGSN side.
Change-Id: Ia2fe867435678cbde44cac2addcaddd174507446
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 0bafaa0..df32174 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1834,6 +1834,60 @@
f_cleanup();
}
+private function f_block_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT
+{
+ var BSSGP_BVC_CT bvc_ct := g_pcu[pcu_idx].vc_BSSGP_BVC[bvc_idx];
+ var BssgpBvcConfig bvc_cfg := g_pcu[pcu_idx].cfg.bvc[bvc_idx];
+ var Nsei nsei_pcu := g_pcu[pcu_idx].cfg.nsei;
+
+ SGSN_MGMT.clear;
+ PCU_MGMT.clear;
+
+ /* block the PTP BVC from the PCU side */
+ PCU_MGMT.send(BssgpBlockRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to bvc_ct;
+ /* expect state on both PCU and SGSN side to change */
+ interleave {
+ [] PCU_MGMT.receive(tr_BssgpStsInd(nsei_pcu, bvc_cfg.bvci, BVC_S_BLOCKED)) from bvc_ct;
+ [] SGSN_MGMT.receive(tr_BssgpStsInd(*, bvc_cfg.bvci, BVC_S_BLOCKED));
+ }
+ setverdict(pass);
+}
+testcase TC_bvc_block_ptp() runs on test_CT
+{
+ f_init();
+ f_sleep(1.0);
+ f_block_ptp_bvc_from_pcu(0, 0);
+ f_cleanup();
+}
+
+private function f_unblock_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT
+{
+ var BSSGP_BVC_CT bvc_ct := g_pcu[pcu_idx].vc_BSSGP_BVC[bvc_idx];
+ var BssgpBvcConfig bvc_cfg := g_pcu[pcu_idx].cfg.bvc[bvc_idx];
+ var Nsei nsei_pcu := g_pcu[pcu_idx].cfg.nsei;
+
+ SGSN_MGMT.clear;
+ PCU_MGMT.clear;
+
+ /* block the PTP BVC from the PCU side */
+ PCU_MGMT.send(BssgpUnblockRequest:{}) to bvc_ct;
+ /* expect state on both PCU and SGSN side to change */
+ interleave {
+ [] PCU_MGMT.receive(tr_BssgpStsInd(nsei_pcu, bvc_cfg.bvci, BVC_S_UNBLOCKED)) from bvc_ct;
+ [] SGSN_MGMT.receive(tr_BssgpStsInd(*, bvc_cfg.bvci, BVC_S_UNBLOCKED));
+ }
+ setverdict(pass);
+}
+testcase TC_bvc_unblock_ptp() runs on test_CT
+{
+ f_init();
+ f_sleep(1.0);
+ f_block_ptp_bvc_from_pcu(0, 0);
+ f_sleep(1.0);
+ f_unblock_ptp_bvc_from_pcu(0, 0);
+ f_cleanup();
+}
+
control {
execute( TC_BVC_bringup() );
execute( TC_ul_unitdata() );
@@ -1843,6 +1897,8 @@
execute( TC_radio_status() );
execute( TC_suspend() );
execute( TC_resume() );
+ execute( TC_bvc_block_ptp() );
+ execute( TC_bvc_unblock_ptp() );
if (false) {
/* don't enable this by default, as we don't yet have any automatic test setup for FR with 4 NS-VC */
execute( TC_load_sharing_dl() );