aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-01-19 18:21:44 +0100
committerHarald Welte <laforge@osmocom.org>2022-01-27 10:32:39 +0100
commit8853cf1b337a4d2d4ee44b16239da27d26283546 (patch)
treefee98f70c90098e5a45304dbb0f416a8da4ff3cb
parentc3c6ee6c63c714c48e60ac678b80ae0b4afedbdc (diff)
WIP: gbproxy: simulate ns-vc outagelaforge/os4959
-rw-r--r--gbproxy/GBProxy_Tests.ttcn25
1 files changed, 25 insertions, 0 deletions
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 3f822c2a..fe231832 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -344,6 +344,9 @@ type component test_CT extends CTRL_Adapter_CT {
port BSSGP_BVC_MGMT_PT SGSN_MGMT;
port BSSGP_BVC_MGMT_PT PCU_MGMT;
+ port NS_CTRL_PT SGSN_NS_CTRL[NUM_SGSN];
+ port NS_CTRL_PT PCU_NS_CTRL[NUM_PCU];
+
port TELNETasp_PT GBPVTY;
var boolean g_initialized := false;
@@ -451,6 +454,8 @@ private function f_init_gb_pcu(inout GbInstance gb, charstring id, integer offse
gb.vc_BSSGP := BSSGP_CT.create(bssgp_id) alive;
/* connect lower end of BSSGP emulation with NS upper port */
connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP);
+ /* connect ourselves to the NS CTRL port */
+ connect(gb.vc_NS:NS_CTRL, self:PCU_NS_CTRL[offset]);
gb.vc_NS.start(NSStart(mp_nsconfig_pcu[offset], ns_id));
gb.vc_BSSGP.start(BssgpStart(gb.cfg, bssgp_id));
@@ -474,6 +479,8 @@ private function f_init_gb_sgsn(inout GbInstance gb, charstring id, integer offs
gb.vc_BSSGP := BSSGP_CT.create(bssgp_id) alive;
/* connect lower end of BSSGP emulation with NS upper port */
connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP);
+ /* connect ourselves to the NS CTRL port */
+ connect(gb.vc_NS:NS_CTRL, self:SGSN_NS_CTRL[offset]);
gb.vc_NS.start(NSStart(mp_nsconfig_sgsn[offset], ns_id));
gb.vc_BSSGP.start(BssgpStart(gb.cfg, bssgp_id));
@@ -3701,6 +3708,24 @@ testcase TC_status_ptp_dl_bvci() runs on GlobalTest_CT
/* TODO: test case for DL-STATUS(SUSPEND/RESUME) containing RA-ID; expect routing by RA-ID */
/* TODO: test case for UL-STATUS(PAGING-by-IMSI) after sending an actual PAGIN-by-IMSI in DL first */
+private function f_TC_nsvc_loss(charstring id) runs on BSSGP_ConnHdlr {
+ f_sleep(10.0);
+ setverdict(pass);
+}
+
+testcase TC_nsvc_loss() runs on test_CT {
+ f_init(1000.0);
+ //f_start_handlers(refers(f_TC_nsvc_loss), testcasename(), 51, 1000.0);
+ f_sleep(10.0);
+ log("===========> Now Disabling one NS-VC");
+ SGSN_NS_CTRL[0].send(NsDisableVcRequest:{nsvci := 101})
+ f_sleep(60.0);
+ log("===========> Now Re-Enabling one NS-VC");
+ SGSN_NS_CTRL[0].send(NsEnableVcRequest:{nsvci := 101})
+ f_sleep(30.0);
+ f_cleanup();
+}
+
control {
execute( TC_BVC_bringup() );
/* Depends on osmo-gbproxy > 0.2.0 */