Change in osmo-ttcn3-hacks[master]: gbproxy: Fix TC_bvc_reset_sig_from_sgsn

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/.

daniel gerrit-no-reply at lists.osmocom.org
Mon Jan 11 02:41:20 UTC 2021


daniel has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22049 )

Change subject: gbproxy: Fix TC_bvc_reset_sig_from_sgsn
......................................................................

gbproxy: Fix TC_bvc_reset_sig_from_sgsn

The port receive operation only considers the first message in the
queue. We need to drain unrelated status/reset messages, such as those
from PTP BVCs, otherwise the test never completes and times out.

Change-Id: I1f2c76ae9bdc0267bfca60536e321fe88530803c
Related: SYS#5115 OS#4518
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 15 insertions(+), 1 deletion(-)

Approvals:
  lynxis lazus: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 475b647..00f6e2e 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -2305,24 +2305,38 @@
 	f_cleanup();
 }
 
+private altstep as_ignore_mgmt(BSSGP_BVC_MGMT_PT pt) {
+	[] pt.receive {repeat; }
+}
+
 private altstep as_count_bvc0_block(integer pcu_idx, Nsei nsei, inout ro_integer roi)
 runs on test_CT {
 	var BSSGP_CT pcu_ct := g_pcu[pcu_idx].vc_BSSGP;
 	[] PCU_MGMT.receive(BssgpResetIndication:{0}) from pcu_ct {
 		roi := roi & { nsei };
+		repeat;
 	}
 }
+
 /* reset the signaling BVC from the SGSN; expect all signaling BVC on all BSS to be reset */
 testcase TC_bvc_reset_sig_from_sgsn() runs on test_CT {
 
 	f_init();
 	f_sleep(3.0);
 
+	SGSN_MGMT.clear;
+	PCU_MGMT.clear;
+
 	/* Start BVC-RESET procedure for BVCI=0 */
 	SGSN_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to g_sgsn[0].vc_BSSGP;
 
+	/* Defaults match in reverse activation order, this one is a catch-all for Status indications
+	 * and reset indications sent from other components (like the ptp_bvcs). If we don't drain
+	 * the port and a different message sits at the front we wait forever and fail the test.
+	 */
+	var ro_default defaults := { activate(as_ignore_mgmt(PCU_MGMT)) };
+
 	/* Activate altsteps: One for each PCU NSE */
-	var ro_default defaults := {};
 	for (var integer i := 0; i < lengthof(g_pcu); i := i+1) {
 		var NSConfiguration nscfg := mp_nsconfig_pcu[i];
 		var default d := activate(as_count_bvc0_block(i, nscfg.nsei, g_roi));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22049
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: I1f2c76ae9bdc0267bfca60536e321fe88530803c
Gerrit-Change-Number: 22049
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
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/20210111/0a4678b1/attachment.htm>


More information about the gerrit-log mailing list