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
Fri Nov 27 18:19:13 UTC 2020


laforge has submitted this change. ( 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, 56 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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() );

-- 
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: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201127/f20d92de/attachment.htm>


More information about the gerrit-log mailing list