Change in osmo-ttcn3-hacks[master]: bsc: Test tch allocation if sdcch exhausted

pespin gerrit-no-reply at lists.osmocom.org
Thu Jul 22 15:14:26 UTC 2021


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


Change subject: bsc: Test tch allocation if sdcch exhausted
......................................................................

bsc: Test tch allocation if sdcch exhausted

Related: SYS#5548
Change-Id: I0c958de10a3643f8b94479d676dd1ac1b9140802
---
M bsc/BSC_Tests.ttcn
1 file changed, 77 insertions(+), 0 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index ae805e3..23f3164 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4517,6 +4517,68 @@
 	f_shutdown_helper();
 }
 
+/* request a signalling channel with all SDCCH exhausted, it is expected that a TCH will be selected */
+private function f_TC_assignment_sdcch_exhausted_req_signalling(charstring id) runs on MSC_ConnHdlr {
+	g_pars := f_gen_test_hdlr_pars();
+	g_pars.ra := '02'O; /* RA containing reason=LU*/
+
+	var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+	var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
+	var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);
+	var template uint3_t tsc := ?;
+
+	f_MscConnHdlr_init(g_pars.media_nr, host_bts, host_mgw_mgcp, FR_AMR);
+
+	//RSL.send(ts_RSLDC_ChanRqd(g_pars.ra, 32));
+	f_create_bssmap_exp(l3_enc);
+	/* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */
+	RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn, tsc);
+
+	/* we should now have a COMPL_L3 at the MSC */
+	timer T := 10.0;
+	T.start;
+	alt {
+	[] BSSAP.receive(tr_BSSMAP_ComplL3);
+	[] T.timeout {
+		Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for COMPLETE LAYER 3 INFORMATION");
+		}
+	}
+}
+testcase TC_assignment_sdcch_exhausted_req_signalling() runs on test_CT {
+	var MSC_ConnHdlr vc_conn;
+	f_init(1, true);
+	f_sleep(1.0);
+	f_disable_all_sdcch();
+	vc_conn := f_start_handler(refers(f_TC_assignment_sdcch_exhausted_req_signalling));
+	vc_conn.done;
+	f_enable_all_sdcch();
+	f_shutdown_helper();
+}
+
+/* Request a signalling channel with all SDCCH exhausted, it is
+   expected that no TCH will be selected for signalling and assigment will fail
+   because it's dictated by VTY config */
+testcase TC_assignment_sdcch_exhausted_req_signalling_tch_forbiden() runs on test_CT {
+	var RSL_Message rsl_unused, rsl_msg;
+	var GsmRrMessage rr;
+	f_init(1, false);
+	f_sleep(1.0);
+	f_vty_allow_tch_for_signalling(false, 0);
+	f_disable_all_sdcch();
+
+	/* RA containing reason=LU*/
+	f_ipa_tx(0, ts_RSL_CHAN_RQD('02'O, 2342));
+	rsl_msg := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
+	rr := dec_GsmRrMessage(rsl_msg.ies[1].body.full_imm_ass_info.payload);
+	if (rr.header.message_type != IMMEDIATE_ASSIGNMENT_REJECT) {
+		setverdict(fail, "Expected reject");
+	}
+
+	f_vty_allow_tch_for_signalling(true, 0);
+	f_enable_all_sdcch();
+	f_shutdown_helper();
+}
+
 testcase TC_assignment_osmux() runs on test_CT {
 	var TestHdlrParams pars := f_gen_test_hdlr_pars();
 	var MSC_ConnHdlr vc_conn;
@@ -7828,6 +7890,19 @@
 	f_vty_transceive(BSCVTY, "exit");
 }
 
+/* Allow/Forbid TCH for signalling if SDCCH exhausted on a given BTS via VTY */
+private function f_vty_allow_tch_for_signalling(boolean allow, integer bts_nr) runs on test_CT {
+	f_vty_enter_cfg_bts(BSCVTY, bts_nr);
+	if (allow) {
+		f_vty_transceive(BSCVTY, "channel allocator allow-tch-for-signalling 1");
+	} else {
+		f_vty_transceive(BSCVTY, "channel allocator allow-tch-for-signalling 0");
+	}
+	f_vty_transceive(BSCVTY, "exit");
+	f_vty_transceive(BSCVTY, "exit");
+	f_vty_transceive(BSCVTY, "exit");
+}
+
 /* Begin assignmet procedure and send an EMERGENCY SETUP (RR) */
 private function f_assignment_emerg_setup() runs on MSC_ConnHdlr {
 	var PDU_ML3_MS_NW emerg_setup;
@@ -9407,6 +9482,8 @@
 	execute( TC_assignment_codec_hr_exhausted_req_fr_hr() );
 	execute( TC_assignment_codec_req_hr_fr() );
 	execute( TC_assignment_codec_req_fr_hr() );
+	execute( TC_assignment_sdcch_exhausted_req_signalling() );
+	execute( TC_assignment_sdcch_exhausted_req_signalling_tch_forbiden() );
 
 	execute( TC_assignment_osmux() );
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25009
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: I0c958de10a3643f8b94479d676dd1ac1b9140802
Gerrit-Change-Number: 25009
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/20210722/075d709b/attachment.htm>


More information about the gerrit-log mailing list