Change in osmo-ttcn3-hacks[master]: [VAMOS] BTS: add MODE MODIFY test cases

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jun 1 14:34:40 UTC 2021


fixeria has submitted this change. ( 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, 82 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/bts/BTS_Tests_VAMOS.ttcn b/bts/BTS_Tests_VAMOS.ttcn
index aa532da..413892d 100644
--- a/bts/BTS_Tests_VAMOS.ttcn
+++ b/bts/BTS_Tests_VAMOS.ttcn
@@ -233,6 +233,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 +315,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: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/0eaa35b4/attachment.htm>


More information about the gerrit-log mailing list