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
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 @@
 }
 
 /* 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 @@
 	[] 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; }
 	}
 }