Change in osmo-ttcn3-hacks[master]: bsc: Introduce test TC_dyn_ts_sdcch8_all_subslots_used

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

pespin gerrit-no-reply at lists.osmocom.org
Mon Oct 25 12:26:09 UTC 2021


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


Change subject: bsc: Introduce test TC_dyn_ts_sdcch8_all_subslots_used
......................................................................

bsc: Introduce test TC_dyn_ts_sdcch8_all_subslots_used

Related: OS#5278
Related: SYS#5309
Change-Id: Iee37eef2012ce2c2e2f0a0db4c26abb75a947d84
---
M bsc/BSC_Tests.ttcn
1 file changed, 79 insertions(+), 0 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index cebd634..d3a66b7 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1672,6 +1672,36 @@
 	return dt;
 }
 
+function f_est_dchan_dyn(OCT1 ra, GsmFrameNumber fn, octetstring l3)
+runs on test_CT return DchanTuple {
+	var BSSAP_N_CONNECT_ind rx_c_ind;
+	var DchanTuple dt;
+
+	/* Send CHAN RQD */
+	var RSL_Message rx_rsl;
+	f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn));
+
+	/* The dyn TS first deactivates PDCH */
+	rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX);
+	dt.rsl_chan_nr := rx_rsl.ies[0].body.chan_nr;
+	f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr));
+
+	rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+	dt.rsl_chan_nr := rx_rsl.ies[0].body.chan_nr;
+
+	/* Now activates the signalling channel */
+	f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(dt.rsl_chan_nr, fn+10));
+	rx_rsl := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
+
+	f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
+
+	BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) -> value rx_c_ind;
+	dt.sccp_conn_id := rx_c_ind.connectionId;
+	BSSAP.send(ts_BSSAP_CONNECT_res(dt.sccp_conn_id));
+
+	return dt;
+}
+
 /* expect RF CAN REL from BTS, acknowledge it and clear the MSC side */
 private function f_exp_chan_rel_and_clear(DchanTuple dt, integer bts_nr := 0) runs on test_CT {
 	var RSL_Message rx_rsl;
@@ -7241,6 +7271,54 @@
 	f_shutdown_helper();
 }
 
+/* Validate all 8 subslots of a dynamics TS configured as SDCCH8 are used */
+testcase TC_dyn_ts_sdcch8_all_subslots_used() runs on test_CT {
+	var ASP_RSL_Unitdata rsl_ud;
+	var integer i;
+	var integer chreq_total, chreq_nochan;
+
+	f_init_vty();
+	for (i := 1; i < 8; i := i + 1) {
+		if (i == 2) {
+			f_ts_set_chcomb(0, 0, i, "TCH/F_TCH/H_SDCCH8_PDCH");
+		} else {
+			f_ts_set_chcomb(0, 0, i, "PDCH");
+		}
+	}
+	f_vty_transceive(BSCVTY, "drop bts connection 0 oml");
+
+	f_init(1);
+
+	/* The dyn TS want to activate PDCH mode, ACK that. */
+	var RslChannelNr chan_nr;
+	chan_nr := valueof(t_RslChanNr_PDCH(2));
+	f_exp_ipa_rx(0, tr_RSL_CHAN_ACT_PDCH(chan_nr, ?));
+	f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 2342));
+
+	f_sleep(1.0);
+
+	/* Exhaust all dedicated SDCCH lchans.
+	/* GSM 44.018 Table 9.1.8.2:
+	 * RA = '13'O -> Establishment cause = 0001xxxx (MS dual rate capable and asks for "SDCCH").
+	 */
+	for (i := 0; i < NUM_SDCCH_PER_BTS; i := i+1) {
+		f_est_dchan('13'O, NUM_SDCCH_PER_BTS + i, '00010203040506'O);
+	}
+
+	/* Three dyn TS as well as one static TCH/F and one TCH/H timeslot are available.
+	 * The first dyn TS gets converted to SDCCH8 */
+	f_est_dchan_dyn('33'O, NUM_SDCCH_PER_BTS + i, '00010203040506'O);
+	/* Also occupy the seven other SDCCH of the dyn TS */
+	for (i := 0; i < 7; i := i+1) {
+		f_est_dchan('33'O, NUM_SDCCH_PER_BTS + i, '00010203040506'O);
+	}
+
+	/* clean up config */
+	f_ts_reset_chcomb(0);
+
+	f_shutdown_helper();
+}
+
 /* Test Osmocom dyn TS SDCCH8 activation / deactivation: If activating dyn TS as
    SDCCH8 would end up in having no free TCH, then BSC should decide to activate
    it as TCH directly instead. SYS#5309. */
@@ -10517,6 +10595,7 @@
 	execute( TC_dyn_pdch_osmo_act_nack() );
 	if (mp_enable_dyn_sdcch8_test) {
 		execute( TC_dyn_ts_sdcch8_act_deact() );
+		execute( TC_dyn_ts_sdcch8_all_subslots_used() );
 		execute( TC_dyn_ts_sdcch8_tch_call_act_deact() );
 		execute( TC_dyn_ts_sdcch8_act_nack() );
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25938
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: Iee37eef2012ce2c2e2f0a0db4c26abb75a947d84
Gerrit-Change-Number: 25938
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211025/7162244c/attachment.htm>


More information about the gerrit-log mailing list