Change in osmo-ttcn3-hacks[master]: start implementing the TC_paging() PCU test

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

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Tue May 29 18:55:44 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/9374


Change subject: start implementing the TC_paging() PCU test
......................................................................

start implementing the TC_paging() PCU test

Implement a basic paging test for the PCU. This test currently
does not verify the payload of the paging sent by osmo-pcu.
However, it does verify that the frame type is "PAGING REQUEST 1".

Previously, the test contained a debugging loop which never terminated.

Change-Id: Id0384e0742ab91983615e4f1c883bb044c1c8b18
Related: OS#2404
---
M pcu/PCU_Tests.ttcn
1 file changed, 32 insertions(+), 13 deletions(-)



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

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 6e36f68..8aafedf 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -194,6 +194,26 @@
 		log("BSSGP successfully initialized");
 	}
 
+	function f_wait_paging_req_type1() runs on dummy_CT {
+		var LAPDm_ph_data ph_data;
+		var GsmRrMessage rr;
+		timer T := 5.0;
+
+		T.start;
+		alt {
+			[] L1.receive(LAPDm_ph_data:{sacch:=?,sapi:=0,lapdm:={bbis:=?}}) -> value ph_data {
+				rr := dec_GsmRrMessage(ph_data.lapdm.bbis.payload);
+				if (match(rr.header, t_RrHeader(PAGING_REQUEST_TYPE_1, ?))) {
+					/* TODO: verify PTIMSI in payload */
+					return;
+				}
+				repeat;
+			}
+			[] L1.receive { repeat; }
+			[] T.timeout { setverdict(fail); }
+		}
+	}
+
 	/* Send PS-PAGING via BSSGP to PCU, expect it to show up on L1/Um */
 	testcase TC_paging() runs on dummy_CT {
 		var GsmTmsi tmsi := hex2int('01234567'H);
@@ -201,20 +221,19 @@
 		g_mmctx.tlli := f_random_tlli();
 		f_init();
 
-		/* Send paging on signalling BVCI 0 since osmo-pcu does not support paging on PTP yet. */
-		BSSGP_SIG.send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
-		BSSGP_SIG.send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, tmsi));
+		var BCCH_tune_req tune_req := { { false, 871 }, true };
+		L1.send(tune_req);
+		/* FIXME: wait for confirm */
 
-		while (true) {
-			var BssgpDecoded bd;
-			alt {
-				[] BSSGP.receive(tr_BD_L3_MT(?)) -> value bd {
-					log("BSSGP Rx: ", bd);
-				}
-				[] BSSGP.receive(t_BssgpStsInd(?, ?, BVC_S_UNBLOCKED)) { repeat; }
-				[] BSSGP.receive { repeat; }
-			}
-		}
+		/* Send paging on signalling BVCI 0 since osmo-pcu does not support paging on PTP yet. */
+
+		BSSGP_SIG.send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
+		f_wait_paging_req_type1();
+
+		BSSGP_SIG.send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, tmsi));
+		f_wait_paging_req_type1();
+
+		setverdict(pass);
 	}
 
 	/* Establish an UL TBF: Tune to ARFCN, send RACH, receive AGCH, enable TBF Rx */

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0384e0742ab91983615e4f1c883bb044c1c8b18
Gerrit-Change-Number: 9374
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180529/cccf7fc8/attachment.htm>


More information about the gerrit-log mailing list