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

pespin gerrit-no-reply at lists.osmocom.org
Mon Jun 28 17:58:02 UTC 2021


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


Change subject: bsc: Introduce test TC_dyn_ts_sdcch8_act_deact
......................................................................

bsc: Introduce test TC_dyn_ts_sdcch8_act_deact

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



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index cf6eaf6..31e004b 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6572,6 +6572,7 @@
 private const charstring TCHH_MODE := "TCH/H mode";
 private const charstring PDCH_MODE := "PDCH mode";
 private const charstring NONE_MODE := "NONE mode";
+private const charstring SDCCH8_MODE := "SDCCH8 mode";
 
 /* Test IPA PDCH activation / deactivation triggered by VTY */
 testcase TC_dyn_pdch_ipa_act_deact() runs on test_CT {
@@ -6755,6 +6756,74 @@
 	f_shutdown_helper();
 }
 
+/* Test Osmocom dyn TS SDCCH8 activation / deactivation */
+testcase TC_dyn_ts_sdcch8_act_deact() runs on test_CT {
+	var RSL_Message rsl_unused, rsl_msg;
+	var DchanTuple dt;
+	var BSSAP_N_CONNECT_ind rx_c_ind;
+
+	/* change Timeslot 6 before f_init() starts RSL */
+	f_init_vty();
+	f_ts_set_chcomb(0, 0, 6, "TCH/F_TCH/H_SDCCH8_PDCH");
+	f_vty_transceive(BSCVTY, "drop bts connection 0 oml");
+
+	f_init(1, false);
+	f_sleep(1.0);
+
+	var RslChannelNr pdch_chan_nr := valueof(t_RslChanNr_PDCH(6));
+
+	log("TCH/F_TCH/H_SDCCH8_PDCH pchan starts out in disabled mode:");
+	f_ts_dyn_mode_assert(0, 0, pdch_chan_nr.tn, NONE_MODE);
+	/* The BSC will activate the dynamic PDCH by default, so confirm that */
+	rsl_unused := f_exp_ipa_rx(0, tr_RSL_CHAN_ACT_PDCH(pdch_chan_nr, ?));
+
+	f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(pdch_chan_nr, 2342));
+	f_sleep(1.0);
+	log("TCH/F_TCH/H_SDCCH8_PDC requested to PDCH ACT on startup, which was ACKed, so now in PDCH:");
+	f_ts_dyn_mode_assert(0, 0, pdch_chan_nr.tn, PDCH_MODE);
+
+	/* Fill TS0 SDCCH channels (NOTE: only 3 SDCCH/4 channels are available
+	 * on CCCH+SDCCH4+CBCH) */
+	var integer i;
+	for (i := 0; i < 3; i := i + 1) {
+		dt := f_est_dchan('23'O, i, '00010203040506'O);
+	}
+
+	/* Now the dyn ts is selected. First PDCH is released, then sdcch chan is activated */
+	f_ipa_tx(0, ts_RSL_CHAN_RQD(int2oct(oct2int('23'O) + i, 1), 2342));
+	rsl_unused := f_exp_ipa_rx(0, tr_RSL_RF_CHAN_REL(pdch_chan_nr));
+	f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(pdch_chan_nr));
+
+	rsl_msg := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+	dt.rsl_chan_nr := rsl_msg.ies[0].body.chan_nr;
+
+	f_ts_dyn_mode_assert(0, 0, dt.rsl_chan_nr.tn, SDCCH8_MODE);
+	f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(dt.rsl_chan_nr, 2342));
+	rsl_msg := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
+	f_ts_dyn_mode_assert(0, 0, dt.rsl_chan_nr.tn, SDCCH8_MODE);
+
+	f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, valueof(ts_RslLinkID_DCCH(0)), '1234'O));
+	BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3('1234'O))) -> value rx_c_ind;
+	dt.sccp_conn_id := rx_c_ind.connectionId;
+	BSSAP.send(ts_BSSAP_CONNECT_res(dt.sccp_conn_id));
+
+	/* Instruct BSC to clear channel */
+	var BssmapCause cause := 0;
+	BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_ClearCommand(cause)));
+	f_exp_chan_rel_and_clear(dt, 0);
+
+	/* The BSC will switch the TS back to PDCH once the only lchan using it is released: */
+	rsl_unused := f_exp_ipa_rx(0, tr_RSL_CHAN_ACT_PDCH(pdch_chan_nr, ?));
+	f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(pdch_chan_nr, 2342));
+	f_sleep(1.0);
+	f_ts_dyn_mode_assert(0, 0, pdch_chan_nr.tn, PDCH_MODE);
+
+	/* clean up config */
+	f_ts_set_chcomb(0, 0, 6, "PDCH");
+
+	f_shutdown_helper();
+}
+
 testcase TC_chopped_ipa_ping() runs on test_CT {
 	const Integers bsc_ipa_ports := {mp_bsc_rsl_port, mp_bsc_oml_port, mp_bsc_ctrl_port};
 	for (var integer i := 0; i < lengthof(bsc_ipa_ports); i := i + 1) {
@@ -9199,6 +9268,7 @@
 	execute( TC_dyn_pdch_ipa_act_nack() );
 	execute( TC_dyn_pdch_osmo_act_deact() );
 	execute( TC_dyn_pdch_osmo_act_nack() );
+	execute( TC_dyn_ts_sdcch8_act_deact() );
 
 	execute( TC_chopped_ipa_ping() );
 	execute( TC_chopped_ipa_payload() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24783
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: I1c53c5d280ca07b000b1e951cfe1e9e5f47a2d86
Gerrit-Change-Number: 24783
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/20210628/a54e8f24/attachment.htm>


More information about the gerrit-log mailing list