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/+/22361 )
Change subject: gbproxy: Fix pooling expectations of TC_bvc_reset_*_from_bss
......................................................................
gbproxy: Fix pooling expectations of TC_bvc_reset_*_from_bss
With pooling enabled these tests now need to verify that the reset/block
is propagated to all SGSNs in the pool.
Change-Id: I34ed4bffce564dbaf08f9388bd5247351dd0725e
Fixes: OS#4964
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 61 insertions(+), 16 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index e3e61f4..ddcd9cb 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -342,6 +342,7 @@
var boolean g_use_echo := false;
var ro_integer g_roi := {};
+ var roro_integer g_roroi := {};
timer g_Tguard;
};
@@ -2464,7 +2465,14 @@
/***********************************************************************
* BVC-RESET procedure
***********************************************************************/
-
+private altstep as_count_bvc_reset(integer sgsn_idx, BssgpBvci bvci, inout roro_integer roroi)
+runs on test_CT {
+ var BSSGP_BVC_CT sgsn_bvc_ct := f_get_sgsn_bvc_ct(sgsn_idx, bvci);
+ [] SGSN_MGMT.receive(BssgpResetIndication:{bvci}) from sgsn_bvc_ct {
+ roroi[sgsn_idx] := roroi[sgsn_idx] & { bvci };
+ repeat;
+ }
+}
private altstep as_ignore_status(BSSGP_BVC_MGMT_PT pt) {
[] pt.receive(BssgpStatusIndication:?) { repeat; }
}
@@ -2481,22 +2489,51 @@
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;
+ var ro_default defaults;
+ var integer i;
SGSN_MGMT.clear;
PCU_MGMT.clear;
+ for (i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) {
+ g_roroi[i] := {};
+ }
+
/* 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;
+ defaults := { activate(as_ignore_status(SGSN_MGMT)) };
+
+ /* Activate altsteps: One for each SGSN */
+ for (i := 0; i < lengthof(g_sgsn); i := i+1) {
+ var default d := activate(as_count_bvc_reset(i, bvc_cfg.bvci, g_roroi));
+ defaults := defaults & { d };
}
- deactivate(d);
+
+ timer T := 3.0;
+ T.start;
+ alt {
+ [] PCU_MGMT.receive(tr_BssgpStsInd(nsei_pcu, bvc_cfg.bvci, BVC_S_BLOCKED)) from pcu_bvc_ct {
+ g_roi := g_roi & { bvc_cfg.bvci };
+ repeat;
+ }
+ [] T.timeout;
+ }
+
+ for (i := 0; i < lengthof(defaults); i := i+1) {
+ deactivate(defaults[i]);
+ }
+
+ /* Check if BVC-RESET was received at all SGSNs */
+ for (i := 0; i < lengthof(g_sgsn); i := i+1) {
+ if (not ro_integer_contains(g_roroi[i], bvc_cfg.bvci)) {
+ setverdict(fail, "Missing SGSN[", i, "] BVC-BLOCK of BVCI=", bvc_cfg.bvci);
+ }
+ }
+
setverdict(pass);
+ f_cleanup();
}
/* 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
@@ -2507,11 +2544,11 @@
f_cleanup();
}
-private altstep as_count_bvc_block(integer sgsn_idx, BssgpBvci bvci, inout ro_integer roi)
+private altstep as_count_bvc_block(integer sgsn_idx, BssgpBvci bvci, inout roro_integer roroi)
runs on test_CT {
var BSSGP_BVC_CT sgsn_bvc_ct := f_get_sgsn_bvc_ct(sgsn_idx, bvci);
[] SGSN_MGMT.receive(tr_BssgpStsInd(?, bvci, BVC_S_BLOCKED)) from sgsn_bvc_ct {
- roi := roi & { bvci };
+ roroi[sgsn_idx] := roroi[sgsn_idx] & { bvci };
repeat;
}
}
@@ -2521,15 +2558,21 @@
f_init();
f_sleep(3.0);
+ for (var integer i := 0; i < lengthof(mp_nsconfig_sgsn); i := i+1) {
+ g_roroi[i] := {};
+ }
+
/* Start BVC-RESET procedure for BVCI=0 */
PCU_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to g_pcu[0].vc_BSSGP;
- /* Activate altsteps: One for each PTP BVC within that PCUs NSE */
+ /* Activate altsteps: One for each PTP BVC and SGSN within that PCUs NSE */
var ro_default defaults := {};
for (var integer i := 0; i < lengthof(g_pcu[0].cfg.bvc); i := i+1) {
var BssgpBvcConfig bvcc := g_pcu[0].cfg.bvc[i];
- var default d := activate(as_count_bvc_block(0, bvcc.bvci, g_roi));
- defaults := defaults & { d };
+ for (var integer j := 0; j < lengthof(g_sgsn); j := j+1) {
+ var default d := activate(as_count_bvc_block(j, bvcc.bvci, g_roroi));
+ defaults := defaults & { d };
+ }
}
timer T := 3.0;
@@ -2545,11 +2588,13 @@
deactivate(defaults[i]);
}
- /* check if BVC-block was received on all expected BVC */
+ /* check if BVC-block was received on all expected BVC/SGSN */
for (var integer i := 0; i < lengthof(g_pcu[0].cfg.bvc); i := i+1) {
var BssgpBvcConfig bvcc := g_pcu[0].cfg.bvc[i];
- if (not ro_integer_contains(g_roi, bvcc.bvci)) {
- setverdict(fail, "Missing SGSN-side BVC-BLOCK of BVCI=", bvcc.bvci);
+ for (var integer j := 0; j < lengthof(g_sgsn); j := j+1) {
+ if (not ro_integer_contains(g_roroi[j], bvcc.bvci)) {
+ setverdict(fail, "Missing SGSN[", j, "] BVC-BLOCK of BVCI=", bvcc.bvci);
+ }
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22361
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: I34ed4bffce564dbaf08f9388bd5247351dd0725e
Gerrit-Change-Number: 22361
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210122/8485537e/attachment.htm>