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.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21338 )
Change subject: gbproxy: Add TC_bvc_reset_ptp_from_{bss,sgsn}
......................................................................
gbproxy: Add TC_bvc_reset_ptp_from_{bss,sgsn}
This tests BSS-originated and SGSN-originated BVC-RESET procedure of a PTP BVC.
Change-Id: Ie0a4899b6e793e3d69f117f350c5a2542fc4d402
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 75 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 78eb389..064d1ea 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -1891,6 +1891,79 @@
f_cleanup();
}
+private altstep as_ignore_status(BSSGP_BVC_MGMT_PT pt) {
+[] pt.receive(BssgpStatusIndication:?) { repeat; }
+}
+private function f_get_sgsn_bvc_ct(integer sgsn_idx, BssgpBvci bvci) runs on test_CT return BSSGP_BVC_CT {
+ for (var integer i := 0; i < lengthof(g_sgsn[sgsn_idx].cfg.bvc); i := i+1) {
+ if (g_sgsn[sgsn_idx].cfg.bvc[i].bvci == bvci) {
+ return g_sgsn[sgsn_idx].vc_BSSGP_BVC[i];
+ }
+ }
+ return null;
+}
+private function f_reset_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT
+{
+ var BSSGP_BVC_CT pcu_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;
+ var BSSGP_BVC_CT sgsn_bvc_ct := f_get_sgsn_bvc_ct(0, bvc_cfg.bvci);
+ var default d;
+
+ SGSN_MGMT.clear;
+ PCU_MGMT.clear;
+
+ /* block the PTP BVC from the PCU side */
+ PCU_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to pcu_bvc_ct;
+ /* expect state on both PCU and SGSN side to change */
+ d := activate(as_ignore_status(SGSN_MGMT));
+ interleave {
+ [] PCU_MGMT.receive(tr_BssgpStsInd(nsei_pcu, bvc_cfg.bvci, BVC_S_BLOCKED)) from pcu_bvc_ct;
+ [] SGSN_MGMT.receive(BssgpResetIndication:{bvc_cfg.bvci}) from sgsn_bvc_ct;
+ }
+ deactivate(d);
+ setverdict(pass);
+}
+/* Send a BVC-RESET for a PTP BVC from the BSS side: expect it to propagate */
+testcase TC_bvc_reset_ptp_from_bss() runs on test_CT
+{
+ f_init();
+ f_sleep(3.0);
+ f_reset_ptp_bvc_from_pcu(0, 0);
+ f_cleanup();
+}
+
+private function f_reset_ptp_bvc_from_sgsn(integer pcu_idx, integer bvc_idx) runs on test_CT
+{
+ var BSSGP_BVC_CT pcu_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;
+ var BSSGP_BVC_CT sgsn_bvc_ct := f_get_sgsn_bvc_ct(0, bvc_cfg.bvci);
+ var default d;
+
+ SGSN_MGMT.clear;
+ PCU_MGMT.clear;
+
+ /* block the PTP BVC from the PCU side */
+ SGSN_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to sgsn_bvc_ct;
+ /* expect state on both PCU and SGSN side to change */
+ d := activate(as_ignore_status(PCU_MGMT));
+ interleave {
+ [] SGSN_MGMT.receive(tr_BssgpStsInd(?, bvc_cfg.bvci, BVC_S_BLOCKED)) from sgsn_bvc_ct;
+ [] PCU_MGMT.receive(BssgpResetIndication:{bvc_cfg.bvci}) from pcu_bvc_ct;
+ }
+ deactivate(d);
+ setverdict(pass);
+}
+/* Send a BVC-RESET for a PTP BVC from the SGSN side: expect it to propagate */
+testcase TC_bvc_reset_ptp_from_sgsn() runs on test_CT
+{
+ f_init();
+ f_sleep(3.0);
+ f_reset_ptp_bvc_from_sgsn(0, 0);
+ f_cleanup();
+}
+
control {
execute( TC_BVC_bringup() );
execute( TC_ul_unitdata() );
@@ -1902,6 +1975,8 @@
execute( TC_resume() );
execute( TC_bvc_block_ptp() );
execute( TC_bvc_unblock_ptp() );
+ execute( TC_bvc_reset_ptp_from_bss() );
+ execute( TC_bvc_reset_ptp_from_sgsn() );
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/+/21338
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: Ie0a4899b6e793e3d69f117f350c5a2542fc4d402
Gerrit-Change-Number: 21338
Gerrit-PatchSet: 4
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/20201128/ca6814e8/attachment.htm>