Change in osmo-ttcn3-hacks[master]: pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Mar 27 11:17:52 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13383 )

Change subject: pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing
......................................................................

pcu: Add TC_pcuif_suspend() to test PCU->BSSGP SUSPEND processing

The PCU is supposed to forward any RR SUSPEND received by the BTS
on dedicated channels and pass it to the SGSN via BSSGP.  This provides
knowledge to the SGSN that the MS is not reachable via PS/TBF anymore
until it completes its CC dedicated mode transaction and RESUMEs.

Change-Id: Iaf35e0c1087413db1dc7d169fa716df14c78f5db
---
M pcu/PCU_Tests.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 66 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 80a1bd1..4dce7dd 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -663,6 +663,46 @@
 	f_sleep(10.0);
 }
 
+/* FIXME: merge this into BSSGP_Client_CT ? */
+type component bssgp_CT extends BSSGP_Client_CT {
+	var NS_CT ns_component;
+	var BSSGP_CT bssgp_component;
+	var boolean g_initialized := false;
+}
+
+/* FIXME: merge this into BSSGP_Client_CT ? */
+function f_init_bssgp() runs on bssgp_CT {
+	var MmContext mmctx := {
+		imsi := '262420000000001'H,
+		tlli := 'FFFFFFFF'O,
+		n_u := 0
+	};
+
+
+	if (g_initialized == true) {
+		return;
+	}
+	g_initialized := true;
+
+	/* create a new NS component */
+	ns_component := NS_CT.create;
+	bssgp_component := BSSGP_CT.create;
+	/* connect our BSSGP port to the BSSGP Emulation */
+	connect(self:BSSGP[0], bssgp_component:BSSGP_SP);
+	connect(self:BSSGP_SIG[0], bssgp_component:BSSGP_SP_SIG);
+	connect(self:BSSGP_PROC[0], bssgp_component:BSSGP_PROC);
+	/* connect lower-end of BSSGP with BSSGP_CODEC_PORT (maps to NS_PT*/
+	connect(bssgp_component:BSCP, ns_component:NS_SP);
+	/* connect lower-end of NS emulation to NS_CODEC_PORT (on top of IPl4) */
+	map(ns_component:NSCP, system:NS_CODEC_PORT);
+	ns_component.start(NSStart(mp_nsconfig));
+	bssgp_component.start(BssgpStart(mp_gb_cfg));
+
+	f_bssgp_client_register(mmctx.imsi, mmctx.tlli, mp_gb_cfg.cell_id);
+	f_bssgp_establish();
+}
+
+
 
 control {
 	execute(TC_selftest_ns());
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 3e38fa8..96a3f86 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -8,6 +8,9 @@
 
 import from General_Types all;
 import from Osmocom_Types all;
+import from GSM_Types all;
+import from GSM_RR_Types all;
+
 import from NS_Types all;
 import from BSSGP_Types all;
 import from Osmocom_Gb_Types all;
@@ -405,6 +408,27 @@
 	setverdict(pass);
 }
 
+/* Test component with PCUIF + BSSGP/NS Emulation (no L1CTL) */
+type component bssgp_pcuif_CT extends bssgp_CT, RAW_PCU_CT {
+}
+
+testcase TC_pcuif_suspend() runs on bssgp_pcuif_CT {
+	var OCT6 ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id);
+	var GprsTlli tlli := 'FFFFFFFF'O;
+
+	/* Initialize PCU interface side */
+	f_init_pcuif();
+
+	/* Initialize NS/BSSGP side */
+	f_init_bssgp();
+
+	f_sleep(1.0);
+	f_pcuif_tx(ts_PCUIF_SUSP_REQ(0, tlli, ra_id, 0));
+	BSSGP_SIG[0].receive(tr_BD_BSSGP(tr_BSSGP_SUSPEND(tlli, mp_gb_cfg.cell_id.ra_id)));
+
+	setverdict(pass);
+}
+
 
 control {
 	execute( TC_ns_reset() );
@@ -415,6 +439,8 @@
 	execute( TC_ns_unblock_retrans() );
 	execute( TC_ns_full_bringup() );
 	execute( TC_ns_so_block() );
+
+	execute( TC_pcuif_suspend() );
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/13383
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf35e0c1087413db1dc7d169fa716df14c78f5db
Gerrit-Change-Number: 13383
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190327/79e29dc7/attachment.html>


More information about the gerrit-log mailing list