Change in osmo-ttcn3-hacks[master]: PCU: revert changes to f_TC_egprs_pkt_chan_req(), fix tests

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
Fri May 29 08:41:20 UTC 2020


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


Change subject: PCU: revert changes to f_TC_egprs_pkt_chan_req(), fix tests
......................................................................

PCU: revert changes to f_TC_egprs_pkt_chan_req(), fix tests

I noticed that TC_egprs_pkt_chan_req_reject_exhaustion has started
to fail since the refactoring change [1]. As it turned out, this
test case does not init a GprsMs instance, which is needed by a
function it depends on - f_TC_egprs_pkt_chan_req().

I don't really see the point of using the GprsMs abstraction for
such small test cases sending just a few messages, which do not
require us to keep any state. Let's just revert those changes,
and keep using the low level API.

[1] Ib3fee37580f0ea0530a659dec83656799bf57288

Change-Id: I4f32c138e7587e68d2d35d13d13c044893fec4b2
---
M pcu/PCU_Tests.ttcn
1 file changed, 5 insertions(+), 17 deletions(-)



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

diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 061b868..5fb4b2b 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1509,20 +1509,17 @@
 }
 
 private function f_TC_egprs_pkt_chan_req(in EGPRSPktChRequest req,
-					 template GsmRrMessage t_imm_ass := ?)
+					 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 GprsMS ms;
-
-	ms := g_ms[0]; /* We only use first MS in this test */
 
 	ra11 := enc_EGPRSPktChRequest2uint(req);
-	f_ms_use_ra(ms, ra11, ra_is_11bit := 1);
 	log("Sending EGPRS Packet Channel Request (", ra11, "): ", req);
 
-	f_ms_establish_ul_tbf(ms);
-
-	if (not match(ms.ul_tbf.rr_imm_ass, t_imm_ass)) {
+	rr_msg := f_establish_tbf(ra := ra11, is_11bit := 1, burst_type := bt);
+	if (not match(rr_msg, t_imm_ass)) {
 		setverdict(fail, "Immediate Assignment does not match");
 		f_shutdown(__BFILE__, __LINE__);
 	}
@@ -1535,9 +1532,6 @@
 	var template IaRestOctets rest;
 	var template EgprsUlAss ul_ass;
 
-	/* Initialize GPRS MS side */
-	f_init_gprs_ms();
-
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename());
 
@@ -1566,9 +1560,6 @@
 	var template IaRestOctets rest;
 	var template EgprsUlAss ul_ass;
 
-	/* Initialize GPRS MS side */
-	f_init_gprs_ms();
-
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename());
 
@@ -1603,9 +1594,6 @@
 	var template IaRestOctets rest;
 	var template EgprsUlAss ul_ass;
 
-	/* Initialize GPRS MS side */
-	f_init_gprs_ms();
-
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename());
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18562
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: I4f32c138e7587e68d2d35d13d13c044893fec4b2
Gerrit-Change-Number: 18562
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200529/98f6808d/attachment.htm>


More information about the gerrit-log mailing list