diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 035a47d60..f569eafd3 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -1158,6 +1158,21 @@ private function f_TC_ul_unitdata_pool_failure(charstring id) runs on BSSGP_Conn setverdict(pass); } +private function f_disable_ns_pcu(integer pcu_idx) runs on test_CT +{ + var integer i; + + connect(self:NS_CTRL, g_pcu[pcu_idx].vc_NS:NS_CTRL); + for (i := 0; i < lengthof(mp_nsconfig_pcu[pcu_idx].nsvc); i := i + 1) { + var uint16_t nsvci := mp_nsconfig_pcu[pcu_idx].nsvc[i].nsvci; + var NsDisableVcRequest tx_disar; + tx_disar.nsvci := nsvci; + log(tx_disar); + NS_CTRL.send(tx_disar); + } + disconnect(self:NS_CTRL, g_pcu[pcu_idx].vc_NS:NS_CTRL); +} + testcase TC_ul_unitdata_pool_failure() runs on test_CT { var integer i; @@ -2707,6 +2722,7 @@ private function f_reset_ptp_bvc_from_sgsn(integer pcu_idx, integer bvc_idx) run 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 { @@ -2716,6 +2732,41 @@ testcase TC_bvc_reset_ptp_from_sgsn() runs on test_CT f_cleanup(); } +/* Send a BVC-RESET for a blocked PTP BVC from the SGSN side: expect NS-STATUS with cause BVCI unknown */ +testcase TC_bvc_reset_blocked_ptp_from_sgsn() runs on GlobalTest_CT +{ + f_init(); + f_global_init(); + f_sleep(3.0); + /* Make sure NS for BVC is down and try again */ + f_disable_ns_pcu(0); + f_sleep(10.0); + + var BssgpBvcConfig bvc_cfg := g_pcu[0].cfg.bvc[0]; + SGSN_MGMT.send(BssgpResetRequest:{cause:=BSSGP_CAUSE_OM_INTERVENTION}) to f_get_sgsn_bvc_ct(0, bvc_cfg.bvci); + + /* Check for NS-STATUS with BVCI unknown, ignore other messages */ + var template (present) PDU_BSSGP exp_rx := + tr_BSSGP_STATUS(bvc_cfg.bvci, BSSGP_CAUSE_BVCI_UNKNOWN, ?); + + alt { + [] G_SGSN[0].receive(exp_rx) { + setverdict(pass); + } + [] SGSN_MGMT.receive(BssgpStatusIndication:{*, bvc_cfg.bvci, BVC_S_UNBLOCKED}) { + setverdict(fail, "BVC unblocked that should be gone on BSS side"); + } + [] SGSN_MGMT.receive { + repeat; + } + [] G_SGSN[0].receive { + repeat; + } + } + + f_cleanup(); +} + private altstep as_ignore_mgmt(BSSGP_BVC_MGMT_PT pt) { [] pt.receive {repeat; } } @@ -3531,6 +3582,7 @@ control { execute( TC_bvc_reset_ptp_from_bss() ); execute( TC_bvc_reset_sig_from_bss() ); execute( TC_bvc_reset_ptp_from_sgsn() ); + execute( TC_bvc_reset_blocked_ptp_from_sgsn() ); execute( TC_bvc_reset_sig_from_sgsn() ); if (mp_enable_bss_load_sharing) { /* don't enable this by default, as we don't yet have any automatic test setup for FR with 4 NS-VC */ diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp index 593abd8da..8d27fd19a 100644 --- a/library/BSSGP_Emulation.ttcnpp +++ b/library/BSSGP_Emulation.ttcnpp @@ -323,7 +323,9 @@ altstep as_sig_unblocked() runs on BSSGP_CT { /* Messages with BVCI = 0 (Signaling) in BVCI field of NS */ [] BSCP.receive(f_BnsUdInd(tr_GLOBAL_SIG, 0)) -> value udi { - GLOBAL.send(udi.bssgp); + if (GLOBAL.checkstate("Connected")) { + GLOBAL.send(udi.bssgp); + } } [] BSCP.receive(f_BnsUdInd(tr_RIM, 0)) -> value udi { if (RIM.checkstate("Connected")) {