summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-10-03 18:06:06 +0700
committerHarald Welte <laforge@gnumonks.org>2018-10-03 21:37:40 +0000
commit98e03158784ceb4363dc3106f450bdf48b4d5b81 (patch)
tree0b69fa997a584e32142525edbf9de30ce28b7978
parent8f98d3fcc4da46cf772f82089600cf2fd3441a3f (diff)
BTS_Tests.ttcn: extend f_unitdata_mo() with tolerance parameters
The ability to control which kinds of RSL messages are permitted in a given use case (and which are not) makes f_unitdata_mo() function much more flexible. Let's introduce two new parameters, one of which would make its 'alt' statement tolerant to SACCH messages (Measurement Reports), and another to other kinds of RSL messages. Please note that the original behaviour of f_unitdata_mo() went untouched, so it's still tolerant to any other messages. Change-Id: I15782ec93d68a0dc54b2ed7a84cb70d780ba0ce1
-rw-r--r--bts/BTS_Tests.ttcn20
1 files changed, 18 insertions, 2 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index a74b3fe..162bfe6 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3729,7 +3729,12 @@ function f_unitdata_mt(RslLinkId link_id, octetstring l3) runs on ConnHdlr {
}
/* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */
-function f_unitdata_mo(RslLinkId link_id, octetstring l3) runs on ConnHdlr {
+function f_unitdata_mo(
+ RslLinkId link_id,
+ octetstring l3,
+ boolean exp_sacch := true, /* Should tolerate SACCH messages? */
+ boolean exp_any := true /* Should tolerate any other RSL messages? */
+) runs on ConnHdlr {
timer T := 3.0;
f_tx_lapdm(ts_LAPDm_UI(link_id.sapi, cr_MO_CMD, l3), link_id);
T.start;
@@ -3738,11 +3743,22 @@ function f_unitdata_mo(RslLinkId link_id, octetstring l3) runs on ConnHdlr {
[] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3)) {
setverdict(pass);
}
+ /* Expect (or not expect) SACCH messages (Measurement Reports) */
+ [exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) { repeat; }
+ [not exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) {
+ setverdict(fail, "Unexpected (SACCH) UNIT_DATA_IND message!");
+ mtc.stop;
+ }
+ /* Expect (or not expect) other kinds of messages */
+ [exp_any] RSL.receive { repeat; }
+ [not exp_any] RSL.receive {
+ setverdict(fail, "Unexpected RSL message!");
+ mtc.stop;
+ }
[] T.timeout {
setverdict(fail, "Timeout waiting for UNIT_DATA_IND");
mtc.stop;
}
- [] RSL.receive { repeat; }
}
}