Change in osmo-ttcn3-hacks[master]: BSC_Tests/hopping: add TC_fh_params_handover_cmd

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
Wed Sep 2 12:03:10 UTC 2020


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


Change subject: BSC_Tests/hopping: add TC_fh_params_handover_cmd
......................................................................

BSC_Tests/hopping: add TC_fh_params_handover_cmd

Similar to TC_fh_params_assignment_cmd, this test case verifies
presence and correctness of the hopping parameters in the following
messages and their IEs:

  1. (RR) Handover Command
  1.1. Description of the First Channel, after time IE
  1.2. Cell Channel Description IE (presence)
  1.3. Mobile Allocation, after time IE

The hopping parameters are randomly generated and configured
via the VTY interface in the beginning, and unset in the end.

Since the C0/TS0 (BCCH+SDCCH4+CBCH) shall not be hopping, let's
temporarily re-configure TS0 as BCCH, and TS1 as SDCCH8 on TRX0
of BTS1 (handover tagret).

Change-Id: I0ddea535dce7e5558793be5cddaad0ab46e978ec
Related: SYS#4868, OS#4545
---
M bsc/BSC_Tests.ttcn
1 file changed, 101 insertions(+), 0 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index fb9fa68..04049e8 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -7153,6 +7153,106 @@
 	setverdict(pass);
 }
 
+/* Verify the hopping parameters (HSN, MAIO, MA) in (RR) Handover Command */
+private function f_TC_fh_params_handover_cmd(in FHParamsTrx fhp)
+runs on test_CT {
+	var RSL_Message rsl_msg;
+	var RSL_IE_Body ie;
+	var DchanTuple dt;
+
+	/* Establish a dedicated channel, so we can trigger handover */
+	dt := f_est_dchan(f_rnd_ra_cs(), 23, f_rnd_octstring(16));
+
+	/* Trigger handover from BTS#0 to BTS#1 */
+	f_bts_0_cfg(BSCVTY, { "neighbor bts 1" });
+	f_vty_handover(BSCVTY, 0, 0, dt.rsl_chan_nr, 1);
+
+	/* Expect RSL CHANnel ACTIVation on BTS#1/TRX#0/TS#1 */
+	rsl_msg := f_exp_ipa_rx(1, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+
+	/* ACKnowledge channel activation and expect (RR) Handover Command */
+	f_ipa_tx(1, ts_RSL_CHAN_ACT_ACK(rsl_msg.ies[0].body.chan_nr, 33));
+	rsl_msg := f_exp_ipa_rx(0, tr_RSL_MsgTypeR(RSL_MT_DATA_REQ));
+
+	/* Make sure that L3 Information IE is present */
+	if (not f_rsl_find_ie(rsl_msg, RSL_IE_L3_INFO, ie)) {
+		setverdict(fail, "RSL L3 Information IE is absent");
+		return;
+	}
+
+	/* Decode the L3 message and make sure it is (RR) Handover Command */
+	var GsmRrL3Message l3_msg := dec_GsmRrL3Message(ie.l3_info.payload);
+	if (not match(l3_msg.header, t_RrL3Header(HANDOVER_COMMAND))) {
+		setverdict(fail, "Failed to match Handover Command: ", l3_msg);
+		return;
+	}
+
+	/* Make sure that we've got SDCCH/8 on TS1 (expected to be hopping) */
+	var ChannelDescription chan_desc := l3_msg.payload.ho_cmd.chan_desc;
+	if (not match(chan_desc.chan_nr, t_RslChanNr_SDCCH8(1, ?))) {
+		setverdict(fail, "Unexpected channel number: ", chan_desc.chan_nr);
+		return;
+	}
+
+	/* Make sure that hopping parameters (HSN/MAIO) match */
+	f_TC_fh_params_match_chan_desc(fhp, chan_desc);
+
+	/* Make sure that Cell Channel Description IE is present */
+	if (not ispresent(l3_msg.payload.ho_cmd.cell_chan_desc)) {
+		setverdict(fail, "FH enabled, but Cell Channel Description IE is absent");
+		return;
+	}
+
+	/* Make sure that the Mobile Allocation (after time) IE is present and matches */
+	var boolean ma_present := ispresent(l3_msg.payload.ho_cmd.mobile_allocation);
+	if (ma_present) {
+		f_TC_fh_params_match_ma(fhp, chan_desc.chan_nr.tn,
+					l3_msg.payload.ho_cmd.mobile_allocation.v);
+	} else {
+		setverdict(fail, "FH enabled, but Mobile Allocation IE is absent");
+		return;
+	}
+}
+testcase TC_fh_params_handover_cmd() runs on test_CT {
+	var FHParamsTrx fhp := f_TC_fh_params_gen(tr_tn := 1);
+
+	f_init_vty();
+
+	/* (Re)configure TS0 as BCCH and TS1 as SDCCH8 on BTS#1/TRX#0 */
+	f_vty_enter_cfg_trx(BSCVTY, bts := 1, trx := 0);
+
+	f_vty_transceive(BSCVTY, "timeslot 0");
+	f_vty_transceive(BSCVTY, "phys_chan_config ccch");
+	f_vty_transceive(BSCVTY, "exit"); /* go back */
+
+	f_vty_transceive(BSCVTY, "timeslot 1");
+	f_vty_transceive(BSCVTY, "phys_chan_config sdcch8");
+	f_vty_transceive(BSCVTY, "end"); /* we're done */
+
+	f_TC_fh_params_set(fhp, 1); /* Enable frequency hopping on BTS#1 */
+	f_vty_transceive(BSCVTY, "drop bts connection 1 oml");
+
+	f_init(2);
+
+	f_TC_fh_params_handover_cmd(fhp);
+
+	/* Disable frequency hopping on BTS#1 */
+	f_TC_fh_params_unset(fhp, 1);
+
+	/* (Re)configure TS0 as CCCH+SDCCH4 and TS1 as TCH/F */
+	f_vty_enter_cfg_trx(BSCVTY, bts := 1, trx := 0);
+
+	f_vty_transceive(BSCVTY, "timeslot 0");
+	f_vty_transceive(BSCVTY, "phys_chan_config ccch+sdcch4");
+	f_vty_transceive(BSCVTY, "exit"); /* go back */
+
+	f_vty_transceive(BSCVTY, "timeslot 1");
+	f_vty_transceive(BSCVTY, "phys_chan_config tch/f");
+	f_vty_transceive(BSCVTY, "end"); /* we're done */
+
+	setverdict(pass);
+}
+
 /* Verify the hopping parameters in System Information Type 4 */
 testcase TC_fh_params_si4_cbch() runs on test_CT {
 	var FHParamsTrx fhp := f_TC_fh_params_gen(tr_tn := 1);
@@ -7464,6 +7564,7 @@
 	execute( TC_fh_params_chan_activ() );
 	execute( TC_fh_params_imm_ass() );
 	execute( TC_fh_params_assignment_cmd() );
+	execute( TC_fh_params_handover_cmd() );
 	execute( TC_fh_params_si4_cbch() );
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19943
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: I0ddea535dce7e5558793be5cddaad0ab46e978ec
Gerrit-Change-Number: 19943
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/20200902/96d1bad5/attachment.htm>


More information about the gerrit-log mailing list