Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: refactor TC_pcuif_suspend: use the RAW PCU compon...

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Sep 29 13:36:54 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15619 )

Change subject: PCU_Tests_RAW.ttcn: refactor TC_pcuif_suspend: use the RAW PCU components
......................................................................

PCU_Tests_RAW.ttcn: refactor TC_pcuif_suspend: use the RAW PCU components

This change is a step towards getting rid of the old test case
infrastructure. Note that a call to f_bssgp_establish() is moved
out of f_init_bssgp() to the test case's body.

Change-Id: If15339f02c5188e60fcb47ae6dc0ac289efa2896
---
M pcu/PCU_Tests.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 27 insertions(+), 22 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 838b6e1..4288061 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -692,7 +692,6 @@
 	bssgp_component.start(BssgpStart(mp_gb_cfg));
 
 	f_bssgp_client_register(mmctx.imsi, mmctx.tlli, mp_gb_cfg.cell_id);
-	f_bssgp_establish();
 }
 
 
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 7e6611d..15a9cf6 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -422,27 +422,6 @@
 	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_BSSGP_SUSPEND(tlli, mp_gb_cfg.cell_id.ra_id));
-
-	setverdict(pass);
-}
-
 type component RAW_PCU_Test_CT extends bssgp_CT {
 	/* Connection to the BTS component (one for now) */
 	port RAW_PCU_MSG_PT BTS;
@@ -573,6 +552,33 @@
 	return false;
 }
 
+testcase TC_pcuif_suspend() runs on RAW_PCU_Test_CT {
+	var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id);
+	var GprsTlli tlli := 'FFFFFFFF'O;
+	timer T;
+
+	/* Initialize NS/BSSGP side */
+	f_init_bssgp();
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	/* Establish BSSGP connection to the PCU */
+	f_bssgp_establish();
+
+	BTS.send(ts_PCUIF_SUSP_REQ(0, tlli, ra_id, 0));
+
+	T.start(2.0);
+	alt {
+	[] BSSGP_SIG[0].receive(tr_BSSGP_SUSPEND(tlli, mp_gb_cfg.cell_id.ra_id)) {
+		setverdict(pass);
+		}
+	[] T.timeout {
+		setverdict(fail, "Timeout waiting for BSSGP SUSPEND");
+		}
+	}
+}
+
 /* Test of correct Timing Advance at the time of TBF establishment
  * (derived from timing offset of the Access Burst). */
 testcase TC_ta_rach_imm_ass() runs on RAW_PCU_Test_CT {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15619
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: If15339f02c5188e60fcb47ae6dc0ac289efa2896
Gerrit-Change-Number: 15619
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190929/a30f32a9/attachment.htm>


More information about the gerrit-log mailing list