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
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());