Change in osmo-ttcn3-hacks[master]: PCU: add test cases for EGPRS Packet Channel Request

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

pespin gerrit-no-reply at lists.osmocom.org
Tue Apr 28 11:18:50 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17706 )

Change subject: PCU: add test cases for EGPRS Packet Channel Request
......................................................................

PCU: add test cases for EGPRS Packet Channel Request

This change introduces three similar test cases:

  - TC_egprs_pkt_chan_req_signalling,
  - TC_egprs_pkt_chan_req_one_phase,
  - TC_egprs_pkt_chan_req_two_phase,

which basically send several 11 bit RACH.ind messages to the IUT
containing different variations of EGPRS Packet Channel Request.

Depending on the establisment cause, for each RACH.ind we expect
to receive an Immediate Assignment containing an EGPRS Packet
Uplink Assignment in its Rest Octets.

All test cases make sure that Request Reference in the received
Immediate Assignment messages is set to 127 as required by 3GPP
TS 44.018 (see table 9.1.8.1, note 2b), and the Extended RA IE in
the Rest Octets matches 5 LSBs of the RA value that was sent.

Change-Id: Ib5732956ea160f93d82f06bf82bea45501f439d2
Related: OS#1548
---
M library/GSM_RR_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 154 insertions(+), 0 deletions(-)

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



diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index a7d927a..d8bf595 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -908,6 +908,37 @@
 		}
 	};
 
+	template EgprsUlAss tr_EgprsUlAssDynamic(template (present) BIT5 ext_ra := ?,
+						 template EgprsUlAssignDyn dyn_ass := ?) := {
+		ext_ra := ext_ra,
+		ats_present := ?,
+		ats := *,
+		presence := '1'B,
+		dynamic := dyn_ass,
+		multiblock := omit
+	};
+	template EgprsUlAss tr_EgprsUlAssMultiblock(template (present) BIT5 ext_ra := ?,
+						    template EgprsUlAssignMultiblock mb_ass := ?) := {
+		ext_ra := ext_ra,
+		ats_present := ?,
+		ats := *,
+		presence := '0'B,
+		dynamic := omit,
+		multiblock := mb_ass
+	};
+
+	template IaRestOctets tr_IaRestOctets_EGPRSULAss(template EgprsUlAss ul_ass) := {
+		presence := '01'B, /* LH */
+		ll := omit,
+		lh := {
+			presence := '00'B,
+			egprs_ul := ul_ass,
+			multiblock_dl_ass := omit
+		},
+		hl := omit,
+		hh := omit
+	};
+
 	template (value) GsmRrMessage ts_IMM_ASS(uint8_t ra, GsmFrameNumber fn, TimingAdvance ta,
 						ChannelDescription ch_desc, MobileAllocation ma) := {
 		header := t_RrHeader(IMMEDIATE_ASSIGNMENT, 0),
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 8e1d349..0e3597b 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -287,6 +287,11 @@
 				   fn := fn, arfcn := 871,
 				   qta := ta * 4));
 
+	/* 3GPP TS 44.018, table 9.1.8.1, note 2b: Request Reference shall be set to 127
+	 * when Immediate Assignment is triggered by EGPRS Packet Channel Request. Here
+	 * we assume that 11 bit RA always contains EGPRS Packet Channel Request. */
+	if (is_11bit != 0) { ra := 127; }
+
 	/* Expect Immediate (TBF) Assignment on TS0/AGCH */
 	return f_pcuif_rx_imm_ass(rr_imm_ass, tr_IMM_TBF_ASS(?, ra, fn), bts_nr);
 }
@@ -1562,6 +1567,119 @@
 	f_tc_paging_ps_from_sgsn(mp_gb_cfg.bvci);
 }
 
+private function f_TC_egprs_pkt_chan_req(in EGPRSPktChRequest req,
+					 template GsmRrMessage t_imm_ass := ?,
+					 PCUIF_BurstType bt := BURST_TYPE_1)
+runs on RAW_PCU_Test_CT {
+	var GsmRrMessage rr_msg;
+	var uint16_t ra11;
+	var boolean ok;
+
+	ra11 := enc_EGPRSPktChRequest2uint(req);
+	log("Sending EGPRS Packet Channel Request (", ra11, "): ", req);
+
+	ok := f_establish_tbf(rr_msg, ra := ra11, is_11bit := 1, burst_type := bt);
+	if (not ok) {
+		setverdict(fail, "Failed to establush an Uplink TBF");
+		mtc.stop;
+	}
+
+	if (not match(rr_msg, t_imm_ass)) {
+		setverdict(fail, "Immediate Assignment does not match");
+		mtc.stop;
+	}
+
+	setverdict(pass);
+}
+
+testcase TC_egprs_pkt_chan_req_signalling() runs on RAW_PCU_Test_CT {
+	var template GsmRrMessage imm_ass;
+	var template IaRestOctets rest;
+	var template EgprsUlAss ul_ass;
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	var EGPRSPktChRequest req := {
+		/* NOTE: other fields are set in the loop */
+		signalling := { tag := '110011'B }
+	};
+
+	for (var integer i := 0; i < 6; i := i + 1) {
+		var BIT5 ext_ra := int2bit(f_rnd_int(32), 5);
+		req.signalling.random_bits := ext_ra;
+
+		/* For signalling, do we expect Multiblock UL TBF Assignment? */
+		ul_ass  := tr_EgprsUlAssMultiblock(ext_ra := ext_ra);
+		rest    := tr_IaRestOctets_EGPRSULAss(ul_ass);
+		imm_ass := tr_IMM_TBF_ASS(dl := false, rest := rest);
+
+		f_TC_egprs_pkt_chan_req(req, imm_ass);
+	}
+}
+
+testcase TC_egprs_pkt_chan_req_one_phase() runs on RAW_PCU_Test_CT {
+	var template GsmRrMessage imm_ass;
+	var template IaRestOctets rest;
+	var template EgprsUlAss ul_ass;
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	var EGPRSPktChRequest req := {
+		/* NOTE: other fields are set in the loop */
+		one_phase := { tag := '0'B }
+	};
+
+	for (var integer i := 0; i < 6; i := i + 1) {
+		var BIT5 ext_ra := int2bit(f_rnd_int(32), 5);
+		var BIT5 mslot_class := int2bit(f_rnd_int(32), 5);
+		var BIT2 priority := substr(ext_ra, 0, 2);
+		var BIT3 rand := substr(ext_ra, 2, 3);
+
+		req.one_phase.multislot_class := mslot_class;
+		req.one_phase.priority := priority;
+		req.one_phase.random_bits := rand;
+
+		/* For one phase access, do we expect Dynamic UL TBF Assignment? */
+		ul_ass  := tr_EgprsUlAssDynamic(ext_ra := ext_ra);
+		rest    := tr_IaRestOctets_EGPRSULAss(ul_ass);
+		imm_ass := tr_IMM_TBF_ASS(dl := false, rest := rest);
+
+		f_TC_egprs_pkt_chan_req(req, imm_ass);
+	}
+}
+
+testcase TC_egprs_pkt_chan_req_two_phase() runs on RAW_PCU_Test_CT {
+	var template GsmRrMessage imm_ass;
+	var template IaRestOctets rest;
+	var template EgprsUlAss ul_ass;
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	var EGPRSPktChRequest req := {
+		/* NOTE: other fields are set in the loop */
+		two_phase := { tag := '110000'B }
+	};
+
+	for (var integer i := 0; i < 6; i := i + 1) {
+		var BIT5 ext_ra := int2bit(f_rnd_int(32), 5);
+		var BIT2 priority := substr(ext_ra, 0, 2);
+		var BIT3 rand := substr(ext_ra, 2, 3);
+
+		req.two_phase.priority := priority;
+		req.two_phase.random_bits := rand;
+
+		/* For two phase access, do we expect Multiblock UL TBF Assignment? */
+		ul_ass  := tr_EgprsUlAssMultiblock(ext_ra := ext_ra);
+		rest    := tr_IaRestOctets_EGPRSULAss(ul_ass);
+		imm_ass := tr_IMM_TBF_ASS(dl := false, rest := rest);
+
+		f_TC_egprs_pkt_chan_req(req, imm_ass);
+	}
+}
+
 control {
 	execute( TC_pcuif_suspend() );
 	execute( TC_ta_ptcch_idle() );
@@ -1583,6 +1701,11 @@
 	execute( TC_paging_ps_from_sgsn_sign_ptmsi() );
 	execute( TC_paging_ps_from_sgsn_sign() );
 	execute( TC_paging_ps_from_sgsn_ptp() );
+
+	/* EGPRS specific test cases */
+	execute( TC_egprs_pkt_chan_req_signalling() );
+	execute( TC_egprs_pkt_chan_req_one_phase() );
+	execute( TC_egprs_pkt_chan_req_two_phase() );
 }
 
 

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


More information about the gerrit-log mailing list