diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2021-01-08 00:43:56 +0100 |
---|---|---|
committer | daniel <dwillmann@sysmocom.de> | 2021-01-11 02:41:20 +0000 |
commit | ef7015f3219d22ad37889a7450a5e6939a8c6d18 (patch) | |
tree | e97c469daa7165efcc3082e666e8d0943ff1b14f | |
parent | 4c534bbf1831b2f17825a976c908386bc1849b4d (diff) |
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
-rw-r--r-- | gbproxy/GBProxy_Tests.ttcn | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 475b6473..00f6e2ef 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -2305,24 +2305,38 @@ testcase TC_bvc_reset_ptp_from_sgsn() runs on test_CT 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)); |