summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-10-02 12:58:24 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-10-02 13:10:58 +0200
commitbf7202046d4f4ab4f15478080720242bc94377aa (patch)
treee6627aa5477724fbb9b8cfae909a733d14c4266f
parent92cfa1c45ae1cb52d5aefb774f93468fef607417 (diff)
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
-rw-r--r--bsc/BSC_Tests.ttcn22
1 files changed, 16 insertions, 6 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index a4def7b1..9e4ddfff 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -75,6 +75,8 @@ import from GSM_SystemInformation all;
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_TCHH_PER_BTS := 2;
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 @@ friend function f_gen_test_hdlr_pars(integer bssap_idx := 0) return TestHdlrPara
}
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 @@ testcase TC_cm_reestablishment() runs on test_CT {
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);