Change in osmo-ttcn3-hacks[master]: gbproxy: Add TC_bvc_{block, unblock}_ptp()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Nov 24 22:15:36 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21328 )


Change subject: gbproxy: Add TC_bvc_{block,unblock}_ptp()
......................................................................

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
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 54 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/21328/1

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index bfb0850..66cddc3 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1780,7 +1780,59 @@
 	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() );
@@ -1791,6 +1843,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() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21328
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia2fe867435678cbde44cac2addcaddd174507446
Gerrit-Change-Number: 21328
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201124/49b0d2cf/attachment.htm>


More information about the gerrit-log mailing list