Change in osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: properly expect I-frames in f_TC_encr_cmd()

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
Thu Oct 4 06:37:54 UTC 2018


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

Change subject: BTS_Tests.ttcn: fix: properly expect I-frames in f_TC_encr_cmd()
......................................................................

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
---
M bts/BTS_Tests.ttcn
1 file changed, 27 insertions(+), 4 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 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 */

-- 
To view, visit https://gerrit.osmocom.org/11204
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: I08cb28dd9fa23f3ef8b0c9ede3d4c47f5702a1c1
Gerrit-Change-Number: 11204
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181004/8fe62e36/attachment.htm>


More information about the gerrit-log mailing list