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/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue Oct 2 21:16:30 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( 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
ignoring all other other RSL messages (e.g. Measurement Reports).

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, 24 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/11204/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 809a403..a3209b7 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3748,6 +3748,28 @@
 	}
 }
 
+/* Send I-frame from MS and expect it to arrive as RLL DATA IND on Abis */
+function f_data_mo(
+	RslLinkId link_id,
+	boolean p, uint3_t nr, uint3_t ns,
+	octetstring l3
+) 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);
+		}
+	[] T.timeout {
+		setverdict(fail, "Timeout waiting for DATA_IND");
+		mtc.stop;
+		}
+	[] RSL.receive { repeat; }
+	}
+}
+
 /* 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);
@@ -3811,10 +3833,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);
 
 	/* 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: newchange
Gerrit-Change-Id: I08cb28dd9fa23f3ef8b0c9ede3d4c47f5702a1c1
Gerrit-Change-Number: 11204
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181002/047e2e1c/attachment.htm>


More information about the gerrit-log mailing list