Change in osmo-ttcn3-hacks[master]: add DTX fill frame BTS tests

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

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Tue Aug 7 16:29:41 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/10372


Change subject: add DTX fill frame BTS tests
......................................................................

add DTX fill frame BTS tests

Add tests TC_tch_sign_l2_fill_frame and TC_tch_sign_l2_fill_frame_dtxd.

TC_tch_sign_l2_fill_frame is already passing and verifies that fill
frames are sent if there is nothing else to transmit on a TCHF
signalling channel where DTX is disabled for downstream.

TC_tch_sign_l2_fill_frame_dtxd is currently failing. It verifies that
only specific fill frames are sent, as required by GSM 05.08 for TCHF
signalling channels with DTX enabled for downstream. At present, our
implementation generates no fill frames in this case, which is one
piece of the problem described in issue OS#1950.

Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Related: OS#1950
---
M bts/BTS_Tests.ttcn
M bts/expected-results.xml
2 files changed, 101 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index fb6137c..8ff2d35 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3794,6 +3794,97 @@
 	f_assert_lapdm('03e00d063505'O, tr_LAPDm_I(0, true, false, 7, 0, '063505'O), "I/7/0");
 }
 
+/***********************************************************************
+ * DTX Related (see GSM 05.08, section 8.3)
+ ***********************************************************************/
+
+ function f_test_l2_fill_frames(boolean dtxd, integer num_fill_frames_expected, float wait_time) runs on ConnHdlr {
+	var L1ctlDlMessage dl;
+	var octetstring l2_fill_frame := '0303012B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B'O;
+	var integer nframes := 0;
+	/* Frames numbers (mod 104) for which a fill frame is expected on TCHF if DTX is enabled. */
+	var Integers required_tdma_frames_dtx_tchf := { 52, 53, 54, 55, 56, 57, 58, 59 };
+	timer T := wait_time;
+
+	f_l1_tune(L1CTL);
+	RSL.clear;
+	L1CTL.clear;
+
+	/* activate TCHF signalling channel */
+	f_est_dchan(false);
+
+	T.start;
+	alt {
+	[] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, ?)) -> value dl {
+		var octetstring l2 := dl.payload.data_ind.payload;
+		if (not match(l2, l2_fill_frame)) {
+			repeat;
+		}
+		nframes := nframes + 1;
+
+		if (dtxd) {
+			var GsmFrameNumber frame_number := dl.dl_info.frame_nr;
+			for (var integer i := 0; i < lengthof(required_tdma_frames_dtx_tchf); i := i + 1) {
+				if (frame_number mod 104 == required_tdma_frames_dtx_tchf[i]) {
+					if (nframes >= num_fill_frames_expected) {
+						T.stop;
+						setverdict(pass);
+					}
+					repeat;
+				}
+			}
+			log("Received DTX TCH fill frame with bad frame number: ", frame_number);
+			setverdict(fail, "Unexpected L2 fill frame received on Um");
+		} else if (nframes >= num_fill_frames_expected) {
+			T.stop;
+			setverdict(pass);
+		} else {
+			repeat;
+		}
+	}
+	[] L1CTL.receive { repeat; }
+	[] T.timeout {
+		setverdict(fail, "Timeout waiting for L2 fill frames on Um");
+		mtc.stop;
+	}
+	}
+}
+
+function f_TC_tch_sign_l2_fill_frame(charstring id) runs on ConnHdlr {
+	/* Expect 104 L2 fill frames to show up on the Um interface within 2.5 seconds. */
+	f_test_l2_fill_frames(false, 104, 2.5);
+}
+
+function f_TC_tch_sign_l2_fill_frame_dtxd(charstring id) runs on ConnHdlr {
+	/* With DTX enabled there are 8 TDMA fill frames per every 104 frames.
+	 * Expect at least 8 L2 fill frames (out of 104 TDMA frames) on the Um interface within 2.5 seconds. */
+	f_test_l2_fill_frames(true, 8, 2.5);
+}
+
+function f_tch_sign_l2_fill_frame(boolean dtxd) runs on test_CT {
+	var ConnHdlr vc_conn;
+	var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN(dtxd)));
+	pars.t_guard := 60.0;
+	f_init(testcasename());
+	if (dtxd) {
+		vc_conn := f_start_handler(refers(f_TC_tch_sign_l2_fill_frame_dtxd), pars);
+	} else {
+		vc_conn := f_start_handler(refers(f_TC_tch_sign_l2_fill_frame), pars);
+	}
+	vc_conn.done;
+}
+
+/* Verify that L2 fill frames are sent on TCH in signaling mode if
+ * there is nothing to transmit while DTX is disabled on downlink. */
+testcase TC_tch_sign_l2_fill_frame() runs on test_CT {
+	f_tch_sign_l2_fill_frame(false);
+}
+
+/* Verify that particular L2 fill frames are sent on TCH in signaling mode if
+ * there is nothing to transmit while DTX is enabled on downlink. */
+testcase TC_tch_sign_l2_fill_frame_dtxd() runs on test_CT {
+	f_tch_sign_l2_fill_frame(true);
+}
 
 /* test generation of RLL ERR IND based on Um errors (TS 48.058 3.9) */
 /*	protocol error as per 44.006 */
@@ -3926,6 +4017,9 @@
 	execute( TC_encr_cmd_a53() );
 
 	execute( TC_lapdm_selftest() );
+
+	execute( TC_tch_sign_l2_fill_frame() );
+	execute( TC_tch_sign_l2_fill_frame_dtxd() );
 }
 
 
diff --git a/bts/expected-results.xml b/bts/expected-results.xml
index d1a65a3..b8f0d68 100644
--- a/bts/expected-results.xml
+++ b/bts/expected-results.xml
@@ -85,4 +85,11 @@
   <testcase classname='BTS_Tests' name='TC_encr_cmd_a52' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_encr_cmd_a53' time='MASKED'/>
   <testcase classname='BTS_Tests' name='TC_lapdm_selftest' time='MASKED'/>
+  <testcase classname='BTS_Tests' name='TC_tch_sign_l2_fill_frame' time='MASKED'/>
+  <testcase classname='BTS_Tests' name='TC_tch_sign_l2_fill_frame_dtxd' time='MASKED'>
+    <failure type='fail-verdict'>"Timeout waiting for L2 fill frames on Um"
+      BTS_Tests.ttcn:MASKED BTS_Tests control part
+      BTS_Tests.ttcn:MASKED TC_tch_sign_l2_fill_frame_dtxd testcase
+    </failure>
+  </testcase>
 </testsuite>

-- 
To view, visit https://gerrit.osmocom.org/10372
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: Id4e0de6e78b62cd408f600a57a28617d91da64af
Gerrit-Change-Number: 10372
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180807/6f340cf2/attachment.htm>


More information about the gerrit-log mailing list