BTS_Tests.ttcn: fix: properly expect I-frames in f_TC_encr_cmd()
For some reason, in f_TC_encr_cmd() it was expected / assumed that
when a ciphered I-frame is sent from MS on L1CTL, nothing else
than this frame would arrive. But since we have fixed Measurement
Reporting in trxcon (see OS#2988), the MR related messages do
appear on A-bis interface now!
This change introduces a new function f_data_mo(), which should
be used to send I-frames from MS and expect them on A-bis.
So, the following test cases:
- TC_encr_cmd_a51;
- TC_encr_cmd_a52;
- TC_encr_cmd_a53;
should pass with both trxcon and Calypso PHY now :)
Change-Id: I08cb28dd9fa23f3ef8b0c9ede3d4c47f5702a1c1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ea75937..0b8decd 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3769,6 +3769,31 @@
}
}
+/* Send I-frame from MS and expect it to arrive as RLL DATA IND on Abis */
+private function f_data_mo(
+ RslLinkId link_id,
+ boolean p, uint3_t nr, uint3_t ns,
+ 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_I(link_id.sapi, cr_MO_CMD, p, nr, ns, l3), link_id);
+ T.start;
+ /* Expect RLL DATA IND on RSL side */
+ alt {
+ [] RSL.receive(tr_RSL_DATA_IND(g_chan_nr, link_id, l3)) {
+ setverdict(pass);
+ }
+ [] as_rsl_sacch_ind(exp_sacch);
+ [] as_rsl_any_ind(exp_any);
+ [] T.timeout {
+ setverdict(fail, "Timeout waiting for DATA_IND");
+ mtc.stop;
+ }
+ }
+}
+
/* Test channel activation with A5/n right from the beginning (like in assignment + hand-over) */
function f_TC_chan_act_encr(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
@@ -3832,10 +3857,8 @@
var uint8_t alg_id := f_alg_id_to_l1ctl(g_pars.encr.alg_id);
f_L1CTL_CRYPTO_REQ(L1CTL, g_pars.chan_nr, alg_id, g_pars.encr.key);
- /* send first ciphered I-frame in response */
- l3 := '0a0b0c0d'O;
- f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, true, 1, 0, l3), link_id);
- RSL.receive(tr_RSL_DATA_IND(g_chan_nr, link_id, l3));
+ /* send first ciphered I-frame in response and expect it on RSL */
+ f_data_mo(link_id, true, 1, 0, '0a0b0c0d'O, exp_sacch := true);
/* now the BTS code should have detected the first properly encrypted uplink I-frame,
* and hence enable encryption also on the downlink */