Change in osmo-ttcn3-hacks[master]: bsc: SI2quater EARFCNs: span entire value range of EARFCNs

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
Thu Jul 9 13:27:51 UTC 2020


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

Change subject: bsc: SI2quater EARFCNs: span entire value range of EARFCNs
......................................................................

bsc: SI2quater EARFCNs: span entire value range of EARFCNs

Change-Id: I992771826d57669d06887c776303f85ef22f6c71
---
M bsc/BSC_Tests.ttcn
1 file changed, 31 insertions(+), 9 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index cba7e03..cc7346f 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1711,19 +1711,44 @@
 	f_init_bts_and_check_sysinfo(0, expect_si := SystemInformationConfig_default);
 }
 
+/* We're testing SI2quater with lists of EARFCNs. Instead of just incrementing EARFCNs, also pick some from the edges of
+ * the entire value range. This function provides the same EARFCN numbers for the same earfcn_index  */
+private function f_test_si2quater_earfcn_by_idx(integer earfcn_index) return uint16_t
+{
+	select (earfcn_index) {
+	case (0) {
+		/* E-ARFCN 111 is already added in the osmo-bsc.cfg */
+		return 111;
+	}
+	case (1) {
+		return 1;
+	}
+	case (2) {
+		return 0;
+	}
+	case (3) {
+		return 65535;
+	}
+	case else {
+		return 23 * (earfcn_index - 3);
+	}
+	}
+}
+
 function f_test_si2quater(integer total_earfcns, template SystemInformationConfig expect_si) runs on test_CT {
 
 	f_init(0);
 
 	/* E-ARFCN 111 is already added in the osmo-bsc.cfg, so only add more arfcns if total_earfcns > 1 */
 	for (var integer i := 1; i < total_earfcns; i := i + 1) {
-		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list add earfcn " & int2str(22 + i) & " thresh-hi 20 thresh-lo 10 prio 3 qrxlv 22 meas 3"});
+		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list add earfcn " & int2str(f_test_si2quater_earfcn_by_idx(i))
+				     & " thresh-hi 20 thresh-lo 10 prio 3 qrxlv 22 meas 3"});
 	}
 
 	f_init_bts_and_check_sysinfo(0, expect_si := expect_si);
 
 	for (var integer i := 1; i < total_earfcns; i := i + 1) {
-		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list del earfcn " & int2str(22 + i)});
+		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list del earfcn " & int2str(f_test_si2quater_earfcn_by_idx(i))});
 	}
 }
 
@@ -1733,11 +1758,7 @@
 	var integer si2quater_count := (count + 2) / 3;
 
 	for (var integer i := 0; i < count; i := i + 1) {
-		var integer earfcn := 22 + i;
-		/* First earfcn is 111 from osmo-bsc.cfg */
-		if (i == 0) {
-			earfcn := 111;
-		}
+		var integer earfcn := f_test_si2quater_earfcn_by_idx(i);
 		var integer index := i / 3;
 		var integer earfcn_index := i mod 3;
 		if (index >= lengthof(si2quater)) {
@@ -1808,7 +1829,8 @@
 	f_init(0);
 
 	for (var integer i := 1; i < 48; i := i + 1) {
-		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list add earfcn " & int2str(22 + i) & " thresh-hi 20 thresh-lo 10 prio 3 qrxlv 22 meas 3"});
+		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list add earfcn " & int2str(f_test_si2quater_earfcn_by_idx(i))
+				     & " thresh-hi 20 thresh-lo 10 prio 3 qrxlv 22 meas 3"});
 	}
 
 	/* The 49th EARFCN no longer fits, expect VTY error */
@@ -1828,7 +1850,7 @@
 	f_init_bts_and_check_sysinfo(0, expect_si := sic);
 
 	for (var integer i := 1; i < 48; i := i + 1) {
-		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list del earfcn " & int2str(22 + i)});
+		f_bts_0_cfg(BSCVTY, {"si2quater neighbor-list del earfcn " & int2str(f_test_si2quater_earfcn_by_idx(i))});
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19200
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: I992771826d57669d06887c776303f85ef22f6c71
Gerrit-Change-Number: 19200
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200709/5c85ac6a/attachment.htm>


More information about the gerrit-log mailing list