Change in osmo-ttcn3-hacks[master]: [VAMOS] BTS: add MODE MODIFY 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/+/24481 )


Change subject: [VAMOS] BTS: add MODE MODIFY test cases
......................................................................

[VAMOS] BTS: add MODE MODIFY test cases

Change-Id: If4202287902442629bab716e41d3e6b2d05d09fb
Related: SYS#4895, OS#4941
---
M bts/BTS_Tests_VAMOS.ttcn
1 file changed, 99 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests_VAMOS.ttcn b/bts/BTS_Tests_VAMOS.ttcn
index 31a7f46..ac7b2d7 100644
--- a/bts/BTS_Tests_VAMOS.ttcn
+++ b/bts/BTS_Tests_VAMOS.ttcn
@@ -161,6 +161,23 @@
 	}
 }
 
+private function f_TC_vamos_exec_sync(in ChanNrModeTest test, void_fn handler)
+runs on test_CT {
+	var ConnHdlrPars pars;
+	var ConnHdlr vc_conn;
+
+	f_init();
+
+	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);
+			vc_conn.done;
+		}
+	}
+}
+
 private function f_TC_vamos_exec_async(in ChanNrModeTest test, void_fn handler)
 runs on test_CT {
 	/* Up to 4 simultenious lchans */
@@ -233,6 +250,79 @@
 	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_act));
 }
 
+private function f_TC_vamos_chan_mode_modify(charstring id)
+runs on ConnHdlr {
+	var RSL_IE tsc_ie := valueof(ts_RSL_IE_OsmoTSC);
+
+	/* CHANnel ACTIVation with Osmocom specific IEs */
+	f_rsl_chan_act(g_pars.chan_mode, more_ies := { tsc_ie });
+
+	/* If we're in signalling mode, modify to speech */
+	if (g_pars.chan_mode.spd_ind == RSL_SPDI_SIGN) {
+		g_pars.chan_mode.spd_ind := RSL_SPDI_SPEECH;
+		g_pars.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM1;
+	} else { /* ... or vice versa */
+		g_pars.chan_mode.spd_ind := RSL_SPDI_SIGN;
+		g_pars.chan_mode.coding_alg_rate := RSL_CMOD_NO_RESOURCE;
+	}
+
+	var RSL_Message rsl := valueof(ts_RSL_MODE_MODIFY_REQ(g_chan_nr, g_pars.chan_mode));
+	rsl.ies := rsl.ies & { tsc_ie };
+	RSL.send(rsl);
+
+	timer T := 1.0;
+	T.start;
+	alt {
+	[] RSL.receive(tr_RSL_MODE_MODIFY_ACK(g_chan_nr)) { setverdict(pass); }
+	[] RSL.receive(tr_RSL_MODE_MODIFY_NACK(g_chan_nr, ?)) {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+					"Rx MODE MODIFY NACK");
+		}
+	[] T.timeout {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+					"Timeout waiting for MODE MODIFY (N)ACK");
+		}
+	}
+
+	/* 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_chan_mode_modify_vff() runs on test_CT { /* TCH/F on TS1 */
+	var ChanNrModeTest test := valueof(ChanNrModeTestVFF(1));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify));
+}
+testcase TC_vamos_chan_mode_modify_dyn_ipa_vff() runs on test_CT { /* TCH/F+PDCH on TS3 */
+	var ChanNrModeTest test := valueof(ChanNrModeTestVFF(3));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify));
+}
+testcase TC_vamos_chan_mode_modify_dyn_osmo_vff() runs on test_CT { /* TCH/F+TCH/H+PDCH on TS4 */
+	var ChanNrModeTest test := valueof(ChanNrModeTestVFF(4));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify));
+}
+
+/* VHH: V0(TCH/H0) & V1(TCH/H0) + V0(TCH/H1) & V1(TCH/H1), 4 channels total */
+testcase TC_vamos_chan_mode_modify_vhh() runs on test_CT {
+	var ChanNrModeTest test := valueof(ChanNrModeTestVHH(5));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify)); /* TCH/H on TS5 */
+}
+testcase TC_vamos_chan_mode_modify_dyn_osmo_vhh() runs on test_CT { /* TCH/F+TCH/H+PDCH on TS4 */
+	var ChanNrModeTest test := valueof(ChanNrModeTestVHH(4));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify));
+}
+
+/* HVHH: TCH/H0 + V0(TCH/H1) & V1(TCH/H1), 3 channels total (mixed) */
+testcase TC_vamos_chan_mode_modify_hvhh() runs on test_CT {
+	var ChanNrModeTest test := valueof(ChanNrModeTestHVHH(5));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify)); /* TCH/H on TS5 */
+}
+testcase TC_vamos_chan_mode_modify_dyn_osmo_hvhh() runs on test_CT { /* TCH/F+TCH/H+PDCH on TS4 */
+	var ChanNrModeTest test := valueof(ChanNrModeTestHVHH(4));
+	f_TC_vamos_exec_async(test, refers(f_TC_vamos_chan_mode_modify));
+}
+
 control {
 	/* CHANnel ACTIVation tests */
 	execute( TC_vamos_chan_act_vff() );
@@ -242,6 +332,15 @@
 	execute( TC_vamos_chan_act_dyn_osmo_vff() );
 	execute( TC_vamos_chan_act_dyn_osmo_vhh() );
 	execute( TC_vamos_chan_act_dyn_osmo_hvhh() );
+
+	/* MODE MODIFY tests */
+	execute( TC_vamos_chan_mode_modify_vff() );
+	execute( TC_vamos_chan_mode_modify_vhh() );
+	execute( TC_vamos_chan_mode_modify_hvhh() );
+	execute( TC_vamos_chan_mode_modify_dyn_ipa_vff() );
+	execute( TC_vamos_chan_mode_modify_dyn_osmo_vff() );
+	execute( TC_vamos_chan_mode_modify_dyn_osmo_vhh() );
+	execute( TC_vamos_chan_mode_modify_dyn_osmo_hvhh() );
 }
 
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24481
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: If4202287902442629bab716e41d3e6b2d05d09fb
Gerrit-Change-Number: 24481
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/fe4e8698/attachment-0001.htm>


More information about the gerrit-log mailing list