daniel has uploaded this change for review. ( 
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(-)



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

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: 1
Gerrit-Owner: daniel <dwillm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to