Change in osmo-ttcn3-hacks[master]: bsc: add const list of TSC expected per BTS

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

neels gerrit-no-reply at lists.osmocom.org
Mon Oct 4 10:43:08 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25660 )

Change subject: bsc: add const list of TSC expected per BTS
......................................................................

bsc: add const list of TSC expected per BTS

Reduce code (comment) dup by having one const definition for default
TSCs instead of magic numbers.

Will add another use of this in upcoming patch testing correct TSC in
handover.

Related: SYS#4895
Change-Id: I3733ebbbfd74630e095a08b83023974aad177b34
---
M bsc/BSC_Tests.ttcn
1 file changed, 16 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  neels: Looks good to me, approved



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index a4def7b..9e4ddff 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -75,6 +75,8 @@
 import from GSM_RestOctets all;
 import from TCCConversion_Functions all;
 
+type record of integer integer_list;
+
 const integer NUM_BTS := 3;
 const integer NUM_BTS_CFG := 4; /* we have 4 BTS in the osmo-bsc.cfg (for inter-BSC HO tests) but use only 3 */
 const integer NUM_MSC := 3;
@@ -85,6 +87,18 @@
 const integer NUM_TCHF_PER_BTS := 4;
 const integer NUM_SDCCH_PER_BTS := 3;
 
+/* Default Training Sequence Code expected for bts[i]:
+ * BTS 0 has BSIC 10 (and no explicit timeslot training_sequence_code config), so expecting TSC = (BSIC & 7) = 2.
+ * BTS 1 has BSIC 11, TSC = (BSIC & 7) = 3.
+ * BTS 2 has BSIC 12, TSC = (BSIC & 7) = 4.
+ * BTS 2 has BSIC 12, TSC = (BSIC & 7) = 4.
+ */
+const integer_list BTS_TSC := {
+	2,
+	3,
+	4,
+	4
+}
 
 /* per-BTS state which we keep */
 type record BTS_State {
@@ -699,9 +713,7 @@
 	}
 	pars.exp_ms_power_level := mp_exp_ms_power_level;
 	pars.mscpool.bssap_idx := bssap_idx;
-
-	/* BTS 0 has BSIC 10 (and no explicit timeslot training_sequence_code config), so expecting TSC = (BSIC & 7) = 2 */
-	pars.expect_tsc := 2;
+	pars.expect_tsc := BTS_TSC[0];
 
 	return pars;
 }
@@ -9735,9 +9747,7 @@
 	var MSC_ConnHdlr vc_conn2;
 	pars2.imsi := pars1.imsi;
 	pars2.media_nr := 2;
-	/* f_tc_cm_reestablishment_2 uses 'bts 1'.
-	 * BTS 1 has BSIC 11 (and no explicit timeslot training_sequence_code config), so expecting TSC = (BSIC & 7) = 3 */
-	pars2.expect_tsc := 3;
+	pars2.expect_tsc := BTS_TSC[1];
 
 	f_init(2, true, guard_timeout := 40.0);
 	f_sleep(1.0);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25660
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: I3733ebbbfd74630e095a08b83023974aad177b34
Gerrit-Change-Number: 25660
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211004/02245d1f/attachment.htm>


More information about the gerrit-log mailing list