summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-01-19 18:21:44 +0100
committerHarald Welte <laforge@osmocom.org>2021-01-19 18:21:44 +0100
commitb2686908b40d4404f688427c0fab01dec2b9bc84 (patch)
tree4e435d748e4a833ca12c68be81fe57a94f369ddd
parent505f8f28d63b214867de5a1c730ce42f5adf8eb8 (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 e3e61f4..acad71b 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -336,6 +336,9 @@ type component test_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;
@@ -442,6 +445,8 @@ private function f_init_gb_pcu(inout GbInstance gb, charstring id, integer offse
gb.vc_BSSGP := BSSGP_CT.create(bssgp_id);
/* 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));
@@ -465,6 +470,8 @@ private function f_init_gb_sgsn(inout GbInstance gb, charstring id, integer offs
gb.vc_BSSGP := BSSGP_CT.create(bssgp_id);
/* 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));
@@ -3246,6 +3253,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() );
execute( TC_ul_unitdata() );