Change in osmo-ttcn3-hacks[master]: gbproxy: Test routing if an SGSN in a pool is down

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

daniel gerrit-no-reply at lists.osmocom.org
Fri May 28 13:16:49 UTC 2021


daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24442 )


Change subject: gbproxy: Test routing if an SGSN in a pool is down
......................................................................

gbproxy: Test routing if an SGSN in a pool is down

If an SGSN in a pool is down we expect the messages to instead be sent
to a different SGSN in the pool. That SGSN will not necessarily know
what to do with those messages, but it should )implicitly) detach that
UE so that it can reattach at the new SGSN. Otherwise UEs on a failed
SGSN would simply stop working as the messages would never be forwarded
anywhere.

This test also adjusts the NS timers so the failed NSVCs are detected
faster.

Change-Id: I46a6b8082441843f428a7681566228e5de375bcb
Related: OS#4952
---
M gbproxy/GBProxy_Tests.ttcn
M gbproxy/osmo-gbproxy.cfg
2 files changed, 53 insertions(+), 3 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index c496ca8..dd33106 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -337,6 +337,8 @@
 	var GbInstances g_pcu;
 	var GbInstances g_sgsn;
 
+	port NS_CTRL_PT NS_CTRL;
+
 	port BSSGP_CT_PROC_PT PROC;
 
 	port BSSGP_BVC_MGMT_PT SGSN_MGMT;
@@ -1130,6 +1132,53 @@
 	f_cleanup();
 }
 
+
+/* send uplink-unitdata of a variety of different sizes; expect it to show up on the only connected SGSN */
+private function f_TC_ul_unitdata_pool_failure(charstring id) runs on BSSGP_ConnHdlr {
+	var integer ran_idx := 0;
+	var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0];
+	var integer i;
+
+	/* All data should arrive at the one SGSN that is still up */
+	g_pars.sgsn_idx := 0;
+
+	for (i := 0; i < max_fr_info_size-4; i := i+4) {
+		var octetstring payload := f_rnd_octstring(i);
+		var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload);
+		/* we cannot use pdu_tx as there are some subtle differences in the length field :/ */
+		var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload);
+
+		log("UL-UNITDATA(payload_size=", i);
+		f_pcu2sgsn(pdu_tx, pdu_rx);
+	}
+	setverdict(pass);
+}
+
+testcase TC_ul_unitdata_pool_failure() runs on test_CT
+{
+	var integer i;
+	var integer j;
+
+	f_init(60.0);
+
+	for (i := 1; i < lengthof(mp_nsconfig_sgsn); i := i+1) {
+		connect(self:NS_CTRL, g_sgsn[i].vc_NS:NS_CTRL);
+		for (j := 0; j < lengthof(mp_nsconfig_sgsn[i].nsvc); j := j+1) {
+			var uint16_t nsvci := mp_nsconfig_sgsn[i].nsvc[j].nsvci;
+			var NsDisableVcRequest tx_disar;
+			tx_disar.nsvci := nsvci;
+			NS_CTRL.send(tx_disar);
+		}
+		disconnect(self:NS_CTRL, g_sgsn[i].vc_NS:NS_CTRL);
+	}
+	/* Wait until gbproxy notices that the NSVCs are down */
+	f_sleep(15.0);
+
+	f_start_handlers(refers(f_TC_ul_unitdata_pool_failure), testcasename(), 1);
+	/* TODO: start multiple handlers (UEs) on various cells on same and other NSEs */
+	f_cleanup();
+}
+
 /* send downlink-unitdata of a variety of different sizes; expect it to show up on PCU */
 private function f_TC_dl_unitdata(charstring id) runs on BSSGP_ConnHdlr {
 	var integer i;
@@ -3461,6 +3510,7 @@
 control {
 	execute( TC_BVC_bringup() );
 	execute( TC_ul_unitdata() );
+	execute( TC_ul_unitdata_pool_failure() );
 	execute( TC_dl_unitdata() );
 	execute( TC_ra_capability() );
 	execute( TC_ra_capability_upd() );
diff --git a/gbproxy/osmo-gbproxy.cfg b/gbproxy/osmo-gbproxy.cfg
index dab4ef3..d269567 100644
--- a/gbproxy/osmo-gbproxy.cfg
+++ b/gbproxy/osmo-gbproxy.cfg
@@ -42,6 +42,6 @@
  timer tns-block-retries 3
  timer tns-reset 3
  timer tns-reset-retries 3
- timer tns-test 30
- timer tns-alive 3
- timer tns-alive-retries 10
+ timer tns-test 5
+ timer tns-alive 2
+ timer tns-alive-retries 3

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24442
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: I46a6b8082441843f428a7681566228e5de375bcb
Gerrit-Change-Number: 24442
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210528/fdf2157e/attachment.htm>


More information about the gerrit-log mailing list