Change in osmo-ttcn3-hacks[master]: BSC_Tests/hopping: add TC_fh_params_assignment_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
Mon Aug 31 23:26:59 UTC 2020


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


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

BSC_Tests/hopping: add TC_fh_params_assignment_cmd

Change-Id: Id12509385b444c426f4af7a0cf0d46efe2cb0eda
---
M bsc/BSC_Tests.ttcn
1 file changed, 80 insertions(+), 0 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 53c133b..578b207 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -7069,6 +7069,85 @@
 	setverdict(pass);
 }
 
+/* Verify the hopping parameters (HSN, MAIO, MA) in (RR) Assignment Command */
+testcase TC_fh_params_assignment_cmd() runs on test_CT {
+	var FHParamsTrx fhp := f_TC_fh_params_gen();
+	var RSL_Message rsl_msg;
+	var RSL_IE_Body ie;
+
+	f_init_vty();
+
+	f_TC_fh_params_set(fhp); /* Enable frequency hopping */
+	f_vty_transceive(BSCVTY, "drop bts connection 0 oml");
+
+	f_init(1);
+
+	/* HACK: work around "Couldn't find Expect for CRCX" */
+	vc_MGCP.stop;
+
+	var template PDU_BSSAP ass_cmd := f_gen_ass_req();
+	ass_cmd.pdu.bssmap.assignmentRequest.codecList := ts_BSSMAP_IE_CodecList({ts_CodecFR});
+
+	/* CS domain (TCH): 4 (TCH/F) + 2 (TCH/H) channels available
+	 * NOTE: only 3 SDCCH/4 channels are available on CCCH+SDCCH4+CBCH */
+	for (var integer i := 0; i < 3; i := i + 1) {
+		/* Establish a dedicated channel, so we can trigger (late) TCH assignment */
+		var DchanTuple dt := f_est_dchan(f_rnd_ra_cs(), 23, f_rnd_octstring(16));
+
+		/* Send a BSSMAP Assignment Command, expect CHANnel ACTIVation */
+		BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ass_cmd));
+		rsl_msg := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+
+		/* ACKnowledge CHANnel ACTIVation, expect RSL DATA REQuest */
+		f_ipa_tx(0, 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");
+			continue;
+		}
+
+		/* Decode the L3 message and make sure it is (RR) Assignment Command */
+		var GsmRrL3Message l3_msg := dec_GsmRrL3Message(ie.l3_info.payload);
+		if (not match(l3_msg.header, t_RrL3Header(ASSIGNMENT_COMMAND))) {
+			setverdict(fail, "Failed to match Assignment Command: ", l3_msg);
+			continue;
+		}
+
+		/* Make sure that hopping parameters (HSN/MAIO) match */
+		var ChannelDescription chan_desc := l3_msg.payload.ass_cmd.chan_desc;
+		f_TC_fh_params_match_chan_desc(fhp, chan_desc);
+
+		/* Make sure that Cell Channel Description IE is present if FH is enabled */
+		if (chan_desc.h and not ispresent(l3_msg.payload.ass_cmd.cell_chan_desc)) {
+			setverdict(fail, "FH enabled, but Mobile Allocation IE is absent");
+			continue;
+		}
+
+		/* Make sure that the Mobile Allocation IE matches (if present) */
+		var boolean ma_present := ispresent(l3_msg.payload.ass_cmd.mobile_allocation);
+		if (chan_desc.h and ma_present) {
+			f_TC_fh_params_match_ma(fhp, chan_desc.chan_nr.tn,
+						l3_msg.payload.ass_cmd.mobile_allocation.v);
+		} else if (chan_desc.h and not ma_present) {
+			setverdict(fail, "FH enabled, but Mobile Allocation IE is absent");
+			continue;
+		} else if (not chan_desc.h and ma_present) {
+			setverdict(fail, "FH disabled, but Mobile Allocation IE is present");
+			continue;
+		}
+	}
+
+	/* Give the IUT some time to release all channels */
+	f_sleep(3.0);
+
+	/* Disable frequency hopping */
+	f_TC_fh_params_unset(fhp);
+
+	setverdict(pass);
+}
+
 /* Dyn PDCH todo:
    * activate OSMO as TCH/F
    * activate OSMO as TCH/H
@@ -7300,6 +7379,7 @@
 	/* Frequency hopping parameters handling */
 	execute( TC_fh_params_chan_activ() );
 	execute( TC_fh_params_imm_ass() );
+	execute( TC_fh_params_assignment_cmd() );
 }
 
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19926
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: Id12509385b444c426f4af7a0cf0d46efe2cb0eda
Gerrit-Change-Number: 19926
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/20200831/071bace3/attachment.htm>


More information about the gerrit-log mailing list