Change in osmo-ttcn3-hacks[master]: [VAMOS] BTS: add RLL ESTablish REQuest test cases

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jun 1 02:17:27 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24482 )


Change subject: [VAMOS] BTS: add RLL ESTablish REQuest test cases
......................................................................

[VAMOS] BTS: add RLL ESTablish REQuest test cases

Change-Id: I98aa6f77c39e0ef68f232a42c1096a2526d14c5b
Related: SYS#4895, OS#4941
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_VAMOS.ttcn
2 files changed, 63 insertions(+), 6 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ee5258c..eacea3f 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2211,7 +2211,7 @@
 }
 
 /* Establish dedicated channel: L1CTL + RSL side */
-private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr {
+friend function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr {
 	var GsmFrameNumber fn;
 	var ImmediateAssignment imm_ass;
 	var ChannelDescription ch_desc;
diff --git a/bts/BTS_Tests_VAMOS.ttcn b/bts/BTS_Tests_VAMOS.ttcn
index ac7b2d7..570fffa 100644
--- a/bts/BTS_Tests_VAMOS.ttcn
+++ b/bts/BTS_Tests_VAMOS.ttcn
@@ -161,7 +161,8 @@
 	}
 }
 
-private function f_TC_vamos_exec_sync(in ChanNrModeTest test, void_fn handler)
+private function f_TC_vamos_exec_sync(in ChanNrModeTest test, void_fn handler,
+				      template (omit) TestSpecUnion spec := omit)
 runs on test_CT {
 	var ConnHdlrPars pars;
 	var ConnHdlr vc_conn;
@@ -171,14 +172,17 @@
 	for (var integer i := 0; i < lengthof(test); i := i + 1) {
 		/* Start a ConnHdlr component for each logical channel */
 		for (var integer ch := 0; ch < lengthof(test[i]); ch := ch + 1) {
-			pars := valueof(t_Pars(test[i][ch].chan_nr, test[i][ch].chan_mode));
-			vc_conn := f_start_handler(handler, pars, l1ctl := false);
+			pars := valueof(t_Pars(test[i][ch].chan_nr,
+					       test[i][ch].chan_mode,
+					       spec := spec));
+			vc_conn := f_start_handler(handler, pars);
 			vc_conn.done;
 		}
 	}
 }
 
-private function f_TC_vamos_exec_async(in ChanNrModeTest test, void_fn handler)
+private function f_TC_vamos_exec_async(in ChanNrModeTest test, void_fn handler,
+				       template (omit) TestSpecUnion spec := omit)
 runs on test_CT {
 	/* Up to 4 simultenious lchans */
 	var ConnHdlrPars pars[4];
@@ -190,7 +194,8 @@
 		/* Start a ConnHdlr component for each logical channel */
 		for (var integer ch := 0; ch < lengthof(test[i]); ch := ch + 1) {
 			pars[ch] := valueof(t_Pars(test[i][ch].chan_nr,
-						   test[i][ch].chan_mode));
+						   test[i][ch].chan_mode,
+						   spec := spec));
 			vc_conn[ch] := f_start_handler(handler, pars[ch], l1ctl := false);
 		}
 
@@ -323,6 +328,58 @@
 	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify));
 }
 
+private function f_TC_vamos_rll_est_req(charstring id)
+runs on ConnHdlr {
+	var RSL_IE tsc_ie := valueof(ts_RSL_IE_OsmoTSC);
+	var RllTestCase tc := g_pars.spec.rll;
+	timer T := 3.0;
+
+	f_l1_tune(L1CTL);
+	L1CTL.clear;
+
+	/* CHANnel ACTIVation with Osmocom specific IEs */
+	f_est_dchan(more_ies := { tsc_ie });
+
+	log("f_TC_vamos_rll_est_req(): sending EST REQ");
+
+	/* Establish a logical link towards the MS */
+	RSL.send(ts_RSL_EST_REQ(g_chan_nr, tc.link_id));
+	T.start;
+	alt {
+	[] as_l1_exp_lapdm(tr_LAPDm_SABM(tc.sapi, cr_MT_CMD, true, ''O));
+	[] T.timeout {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+					"Timeout waiting for LAPDm func=SABM");
+		}
+	}
+
+	log("f_TC_vamos_rll_est_req(): got EST REQ!");
+
+	/* DEACTivate the channel */
+	f_rsl_chan_deact();
+	f_rslem_unregister(0, g_chan_nr);
+}
+
+/* VFF: V0(TCH/F) & V1(TCH/F), 2 channels total */
+testcase TC_vamos_rll_est_req_vff() runs on test_CT { /* TCH/F on TS1 */
+	var RllTestCase rll := valueof(t_EITC(0, ts_RslLinkID_DCCH(0), ''O, true));
+	var ChanNrModeTest test := valueof(ChanNrModeTestVFF(1));
+	f_TC_vamos_exec_sync(test, refers(f_TC_vamos_rll_est_req),
+			     TestSpecUnion:{ rll := rll });
+}
+testcase TC_vamos_rll_est_req_dyn_ipa_vff() runs on test_CT { /* TCH/F+PDCH on TS3 */
+	var RllTestCase rll := valueof(t_EITC(0, ts_RslLinkID_DCCH(0), ''O, true));
+	var ChanNrModeTest test := valueof(ChanNrModeTestVFF(3));
+	f_TC_vamos_exec_sync(test, refers(f_TC_vamos_rll_est_req),
+			     TestSpecUnion:{ rll := rll });
+}
+testcase TC_vamos_rll_est_req_dyn_osmo_vff() runs on test_CT { /* TCH/F+TCH/H+PDCH on TS4 */
+	var RllTestCase rll := valueof(t_EITC(0, ts_RslLinkID_DCCH(0), ''O, true));
+	var ChanNrModeTest test := valueof(ChanNrModeTestVFF(4));
+	f_TC_vamos_exec_sync(test, refers(f_TC_vamos_rll_est_req),
+			     TestSpecUnion:{ rll := rll });
+}
+
 control {
 	/* CHANnel ACTIVation tests */
 	execute( TC_vamos_chan_act_vff() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24482
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I98aa6f77c39e0ef68f232a42c1096a2526d14c5b
Gerrit-Change-Number: 24482
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/bd6074ea/attachment-0001.htm>


More information about the gerrit-log mailing list