Change in osmo-ttcn3-hacks[master]: BTS_Tests: add TC_meas_res_speech_{tchf, tchh}_sapi3()

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

fixeria gerrit-no-reply at lists.osmocom.org
Tue Oct 26 18:46:35 UTC 2021


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


Change subject: BTS_Tests: add TC_meas_res_speech_{tchf,tchh}_sapi3()
......................................................................

BTS_Tests: add TC_meas_res_speech_{tchf,tchh}_sapi3()

The idea behind these test cases is to make sure that osmo-bts
does send RSL MEASurement RESult messages regardless of what
was received on SACCH: RR Measurement Report or SAPI=3 data.

Change-Id: I7d17d6e5f413f2de78db944f23ad731b81ad24cf
---
M bts/BTS_Tests.ttcn
1 file changed, 82 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 03519d9..d7419a9 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3310,6 +3310,86 @@
 	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }
 
+/* Make sure that we always get RSL MEASurement RESult messages regardless
+ * of what is sent on SACCH: (RR) Measurement Report or SAPI=3 data (SMS). */
+private function f_TC_meas_res_sapi3(charstring id) runs on ConnHdlr {
+	timer Texec := 8.0;
+	timer Timpf := 2.0;
+	timer Tmr;
+
+	f_l1_tune(L1CTL);
+	RSL.clear;
+
+	f_est_dchan();
+	L1CTL.clear;
+
+	/* Establish the main SAPI=0 link on DCCH first */
+	f_tx_lapdm(ts_LAPDm_SABM(0, cr_MO_CMD, true, ''O), ts_RslLinkID_DCCH(0));
+
+	/* Give more time for the first RSL MEASurement RESult */
+	Tmr.start(0.480 * 2.0);
+	Texec.start; /* EXECution timer */
+	Timpf.start; /* IMPFung timer  */
+
+	alt {
+	/* We expect RSL MEASurement RESult messages every ~480ms (plus some guard) */
+	[] RSL.receive(tr_RSL_MEAS_RES(g_pars.chan_nr)) {
+		/* Reschedule the MEAS RES timer */
+		Tmr.start(0.480 + 0.120);
+		repeat;
+		}
+	[] RSL.receive { repeat; }
+	[] Tmr.timeout {
+		setverdict(fail, "Timeout waiting for RSL MEAS RES");
+		}
+	/* Inject some SAPI=3 traffic on SACCH every 2 seconds */
+	[] Timpf.timeout {
+		f_tx_lapdm(ts_LAPDm_SABM(3, cr_MO_CMD, true, ''O), ts_RslLinkID_SACCH(3));
+		log("Injected SAPI=3 traffic on SACCH");
+		Timpf.start;
+		repeat;
+		}
+	/* We're good if survived so far */
+	[] Texec.timeout {
+		setverdict(pass);
+		}
+	}
+
+	f_rsl_chan_deact();
+	f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+	f_rslem_unregister(0, g_chan_nr);
+}
+testcase TC_meas_res_speech_tchf_sapi3() runs on test_CT {
+	var template RSL_IE_ChannelMode ch_mode;
+	var template ConnHdlrPars pars;
+	var ConnHdlr vc_conn;
+
+	f_init();
+
+	ch_mode := ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM1);
+	pars := t_Pars(t_RslChanNr_Bm(1), ch_mode);
+
+	vc_conn := f_start_handler(refers(f_TC_meas_res_sapi3), valueof(pars));
+	vc_conn.done;
+
+	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+testcase TC_meas_res_speech_tchh_sapi3() runs on test_CT {
+	var template RSL_IE_ChannelMode ch_mode;
+	var template ConnHdlrPars pars;
+	var ConnHdlr vc_conn;
+
+	f_init();
+
+	ch_mode := ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM1);
+	pars := t_Pars(t_RslChanNr_Lm(5, 0), ch_mode);
+
+	vc_conn := f_start_handler(refers(f_TC_meas_res_sapi3), valueof(pars));
+	vc_conn.done;
+
+	Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
 /* establish DChan, and send MS POWER CONTROL messages via RSL, verify that
  * the BTS is forwarding those values to the MS via the SACCH L1 header. */
 private function f_tc_rsl_ms_pwr_ctrl(charstring id) runs on ConnHdlr {
@@ -7890,6 +7970,8 @@
 	execute( TC_meas_res_sign_sdcch4() );
 	execute( TC_meas_res_sign_sdcch8() );
 	execute( TC_meas_res_sign_tchh_toa256() );
+	execute( TC_meas_res_speech_tchf_sapi3() );
+	execute( TC_meas_res_speech_tchh_sapi3() );
 	execute( TC_tx_power_start_ramp_up_bcch() );
 	execute( TC_tx_power_start_ramp_down_bcch() );
 	execute( TC_tx_power_ramp_adm_state_change() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25968
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: I7d17d6e5f413f2de78db944f23ad731b81ad24cf
Gerrit-Change-Number: 25968
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/20211026/fda9fc4a/attachment.htm>


More information about the gerrit-log mailing list