Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11222 )

Change subject: BTS_Tests.ttcn: share as_rsl_sacch_ind() and as_rsl_any_ind()
......................................................................

BTS_Tests.ttcn: share as_rsl_sacch_ind() and as_rsl_any_ind()

Change-Id: I7ace54643c10df38a3ea941242f8b65264ef1322
---
M bts/BTS_Tests.ttcn
1 file changed, 19 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 162bfe6..c95f48a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3728,6 +3728,23 @@
        }
 }

+/* Expect (or not expect) SACCH messages (Measurement Reports) */
+private altstep as_rsl_sacch_ind(boolean exp_sacch) runs on ConnHdlr {
+       [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 */
+private altstep as_rsl_any_ind(boolean exp_any) runs on ConnHdlr {
+       [exp_any] RSL.receive { repeat; }
+       [not exp_any] RSL.receive {
+               setverdict(fail, "Unexpected RSL message!");
+               mtc.stop;
+               }
+}
+
 /* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */
 function f_unitdata_mo(
        RslLinkId link_id,
@@ -3743,18 +3760,8 @@
        [] 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;
-               }
+       [] as_rsl_sacch_ind(exp_sacch);
+       [] as_rsl_any_ind(exp_any);
        [] T.timeout {
                setverdict(fail, "Timeout waiting for UNIT_DATA_IND");
                mtc.stop;

--
To view, visit https://gerrit.osmocom.org/11222
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ace54643c10df38a3ea941242f8b65264ef1322
Gerrit-Change-Number: 11222
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)

Reply via email to