[PATCH] osmo-ttcn3-hacks[master]: bts: Add f_rsl_transceive() flag to ignore all unrelated mes...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Mar 12 14:07:46 UTC 2018


Review at  https://gerrit.osmocom.org/7250

bts: Add f_rsl_transceive() flag to ignore all unrelated messages

f_rsl_transceive() is currently using a number of default altsteps,
but those are not applicable in all cases.  Let's make this
configurable, and use that flag during channel release.

Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad
---
M bts/BTS_Tests.ttcn
1 file changed, 8 insertions(+), 6 deletions(-)


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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index b0a2bca..dcdf32b 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -392,7 +392,8 @@
 	fn.apply(id);
 }
 
-function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id)
+function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id,
+			  boolean ignore_other := false)
 runs on ConnHdlr {
 	timer T := 3.0;
 	RSL.send(tx);
@@ -406,12 +407,13 @@
 		setverdict(fail, "Timeout expecting " & id);
 		self.stop;
 		}
-	[] as_l1_sacch();
-	[] as_meas_res();
-	[] as_l1_dcch();
-	[] RSL.receive {
+	[not ignore_other] as_l1_sacch();
+	[not ignore_other] as_meas_res();
+	[not ignore_other] as_l1_dcch();
+	[not ignore_other] RSL.receive {
 		setverdict(fail, "Unexpected RSL message received");
 		}
+	[ignore_other] RSL.receive { repeat; }
 	}
 }
 
@@ -422,7 +424,7 @@
 
 function f_rsl_chan_deact() runs on ConnHdlr {
 	f_rsl_transceive(ts_RSL_RF_CHAN_REL(g_chan_nr), tr_RSL_RF_CHAN_REL_ACK(g_chan_nr),
-			"RF CHAN REL");
+			"RF CHAN REL", true);
 }
 
 private template ConnHdlrPars t_Pars(template RslChannelNr chan_nr,

-- 
To view, visit https://gerrit.osmocom.org/7250
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list