Change in osmo-ttcn3-hacks[master]: pcu/GPRS_Components: return GsmRrMessage from f_pcuif_rx_imm_ass()

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
Thu May 28 14:44:31 UTC 2020


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


Change subject: pcu/GPRS_Components: return GsmRrMessage from f_pcuif_rx_imm_ass()
......................................................................

pcu/GPRS_Components: return GsmRrMessage from f_pcuif_rx_imm_ass()

Change-Id: Ide6a00348b81a637309644be82a523c99f9fd30a
---
M pcu/GPRS_Components.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 8 insertions(+), 16 deletions(-)



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

diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index d576260..a91f8df 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -515,10 +515,10 @@
 // OLD APIs
 ////////////////////////
 
-function f_pcuif_rx_imm_ass(out GsmRrMessage rr_imm_ass,
-			    template PCUIF_Sapi sapi := PCU_IF_SAPI_AGCH,
+function f_pcuif_rx_imm_ass(template PCUIF_Sapi sapi := PCU_IF_SAPI_AGCH,
 			    template GsmRrMessage t_imm_ass := ?)
-runs on MS_BTS_IFACE_CT return boolean {
+runs on MS_BTS_IFACE_CT return GsmRrMessage {
+	var GsmRrMessage rr_imm_ass;
 	var PCUIF_Message pcu_msg;
 	var octetstring data;
 	timer T;
@@ -549,7 +549,6 @@
 		}
 
 		setverdict(pass);
-		return true;
 		}
 	[] BTS.receive { repeat; }
 	[] T.timeout {
@@ -558,19 +557,18 @@
 		}
 	}
 
-	return false;
+	return rr_imm_ass;
 }
 
 /* One phase packet access (see 3GPP TS 44.018, table 9.1.8.1) */
 const BIT8 chan_req_def := '01111000'B;
 
 /* Establish an Uplink TBF by sending RACH.ind towards the PCU */
-function f_establish_tbf(out GsmRrMessage rr_imm_ass,
-			 uint16_t ra := bit2int(chan_req_def),
+function f_establish_tbf(uint16_t ra := bit2int(chan_req_def),
 			 uint8_t is_11bit := 0,
 			 PCUIF_BurstType burst_type := BURST_TYPE_0,
 			 TimingAdvance ta := 0)
-runs on MS_BTS_IFACE_CT return boolean {
+runs on MS_BTS_IFACE_CT return GsmRrMessage {
 	var uint32_t fn;
 
 	/* FIXME: ask the BTS component to give us the current TDMA fn */
@@ -590,8 +588,7 @@
 	if (is_11bit != 0) { ra := 127; }
 
 	/* Expect Immediate (TBF) Assignment on TS0/AGCH */
-	return f_pcuif_rx_imm_ass(rr_imm_ass, PCU_IF_SAPI_AGCH,
-				  tr_IMM_TBF_ASS(false, ra, fn));
+	return f_pcuif_rx_imm_ass(PCU_IF_SAPI_AGCH, tr_IMM_TBF_ASS(false, ra, fn));
 }
 
 /* Enqueue RTS.req, expect DATA.req with UL ACK from the PCU */
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index ca37431..ff5da82 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1635,7 +1635,6 @@
 runs on RAW_PCU_Test_CT {
 	var template ReqRefWaitInd tr_ref;
 	var GsmRrMessage rr_msg;
-	var boolean ok;
 
 	/* Send RACH.ind with malformed EGPRS Packet Channel Request */
 	BTS.send(ts_PCUIF_RACH_IND(bts_nr := 0, trx_nr := 0, ts_nr := 0,
@@ -1644,11 +1643,7 @@
 				   arfcn := 871));
 
 	/* Abuse f_pcuif_rx_imm_ass(): wait for Immediate Assignment Reject */
-	ok := f_pcuif_rx_imm_ass(rr_msg, t_imm_ass := tr_IMM_ASS_REJ);
-	if (not ok) {
-		setverdict(fail, "Failed to match Immediate Assignment Reject");
-		f_shutdown(__BFILE__, __LINE__);
-	}
+	rr_msg := f_pcuif_rx_imm_ass(t_imm_ass := tr_IMM_ASS_REJ);
 
 	/* Just to have a short-name reference to the actual message */
 	var ImmediateAssignmentReject iar := rr_msg.payload.imm_ass_rej;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18547
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: Ide6a00348b81a637309644be82a523c99f9fd30a
Gerrit-Change-Number: 18547
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/20200528/4827a4c5/attachment.htm>


More information about the gerrit-log mailing list