Change in osmo-ttcn3-hacks[master]: fixup PCU_Tests: add TC_pcuif_fh_ass_ul

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

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jul 20 20:31:29 UTC 2020


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


Change subject: fixup PCU_Tests: add TC_pcuif_fh_ass_ul
......................................................................

fixup PCU_Tests: add TC_pcuif_fh_ass_ul

Change-Id: Ic57f0a8eb029a19c33ac1355bb37181dd5c69d36
---
M pcu/PCU_Tests.ttcn
1 file changed, 71 insertions(+), 0 deletions(-)



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

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 76a2aa7..4611883 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -2190,6 +2190,77 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+/* Make sure that Uplink Assignment contains hopping parameters */
+testcase TC_pcuif_fh_ass_ul() runs on RAW_PCU_Test_CT {
+	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
+	var GprsMS ms := valueof(t_GprsMS_def);
+	var uint32_t poll_fn;
+
+	/* Enable frequency hopping of TRX0/TS7 */
+	info_ind.trx.v10[0].ts[7] := ts_PCUIF_InfoTrxTsH1(
+		tsc := f_rnd_int(7),
+		hsn := f_rnd_int(63),
+		maio := f_rnd_int(63),
+		ma := '1010101'B); // FIXME: f_rnd_bitstring(7));
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename(), info_ind);
+
+	/* Establish an Uplink TBF */
+	f_ms_establish_ul_tbf(ms);
+
+	/* Send Packet Resource Request, so the network will allocate an Uplink resource */
+	f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, omit)));
+
+	/* Expect an RLC/MAC block with Packet Uplink Assignment on PACCH (see 11.2.29) */
+	var RlcmacDlBlock blk := f_ms_rx_pkt_ass_pacch(ms, poll_fn, tr_RLCMAC_UL_PACKET_ASS);
+	var PacketUlAssignment ua := blk.ctrl.payload.u.ul_assignment;
+
+	/* 3GPP TS 44.060, section 12.8 "Frequency Parameters" */
+	var template (omit) FrequencyParameters fp;
+	if (ua.is_egprs == '1'B) {
+		fp := ua.egprs.freq_par;
+	} else {
+		fp := ua.gprs.freq_par;
+	}
+
+	/* This is an optional IE, so it's worth to check its presence */
+	if (istemplatekind(fp, "omit")) {
+		setverdict(fail, "Frequency Parameters IE is not present");
+		f_shutdown(__BFILE__, __LINE__);
+	}
+
+	/* Table 12.8.1: Frequency Parameters information elements */
+	var template (omit) FrequencyParameters tr_fp := {
+		tsc := info_ind.trx.v10[0].ts[7].tsc,
+		presence := '10'B, /* Direct encoding 1 */
+		arfcn := omit,
+		indirect := omit,
+		direct1 := {
+			maio := info_ind.trx.v10[0].ts[7].maio,
+			/* Table 12.10a.1: GPRS Mobile Allocation information elements */
+			mobile_allocation := {
+				hsn := info_ind.trx.v10[0].ts[7].hsn,
+				rfl_number_list_present := '0'B,
+				rfl_number_list := omit,
+				ma_present := '0'B,
+				ma_length := 7, /* FIXME: hard-coded */
+				ma_bitmap := '1010101'B /* FIXME: hard-coded */
+			}
+		},
+		direct2 := omit
+	};
+
+	/* This is an optional IE, so it's worth to check its presence */
+	if (not match(valueof(fp), tr_fp)) {
+		setverdict(fail, "Frequency Parameters IE does not match: ",
+			   valueof(fp), " vs ", tr_fp);
+		f_shutdown(__BFILE__, __LINE__);
+	}
+
+	f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 control {
 	execute( TC_pcuif_suspend() );
 	execute( TC_ta_ptcch_idle() );

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


More information about the gerrit-log mailing list