Change in osmo-ttcn3-hacks[master]: bsc: more SI2quater EUTRAN ARFCN tests

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:50 UTC 2020


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

Change subject: bsc: more SI2quater EUTRAN ARFCN tests
......................................................................

bsc: more SI2quater EUTRAN ARFCN tests

Add more EUTRAN ARFCNs, reaching the maximum allowed amount.

Add tests with 12, 23, 42 EARFCNs, just for the sake of testing some arbitrary
numbers.

Add tests with 32 and 33 EARFCNs because before osmo-bsc
Iabeed10053ee5899b4def3509aedd25abb2410a9, only 32 EARFCNs could be stored by
osmo-bsc.

Add a test with 48 EARFCNs to verify the maximum amount of EARFCNs and maximum
amount of SI2quater multiplexes works as expected.

Add a test with 49 EARFCNs to verify the VTY error response when adding too
many EARFCNs, and showing that osmo-bsc still sends 16 SI2quater with 48
EARFCNs.

Depends: Iabeed10053ee5899b4def3509aedd25abb2410a9 (osmo-bsc)
Change-Id: I99bf9b3381812d1db6fd0757f65995bae48da776
---
M bsc/BSC_Tests.ttcn
M library/GSM_RestOctets.ttcn
2 files changed, 99 insertions(+), 116 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f1aea75..cba7e03 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -61,6 +61,7 @@
 
 import from GSM_SystemInformation all;
 import from GSM_RestOctets all;
+import from TCCConversion_Functions all;
 
 const integer NUM_BTS := 3;
 const integer NUM_MSC := 3;
@@ -96,7 +97,7 @@
 	SystemInformationType2 si2 optional,
 	SystemInformationType2bis si2bis optional,
 	SystemInformationType2ter si2ter optional,
-	record of SI2quaterRestOctets si2quater optional,
+	SI2quaterRestOctetsList si2quater optional,
 	SystemInformationType3 si3 optional,
 	SystemInformationType4 si4 optional,
 	/* TODO: replace with proper decoding of SI13, implement SI13 in GSM_SystemInformation.ttcn */
@@ -1726,135 +1727,109 @@
 	}
 }
 
-testcase TC_si2quater_2_earfcns() runs on test_CT {
+private function f_tr_si2quater_earfcns(integer count) return template SI2quaterRestOctetsList
+{
+	var template SI2quaterRestOctetsList si2quater := {};
+	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 index := i / 3;
+		var integer earfcn_index := i mod 3;
+		if (index >= lengthof(si2quater)) {
+			si2quater[index] := tr_SI2quaterRestOctets_EUTRAN(index := index, count := si2quater_count - 1);
+		}
+		si2quater[index].rel_additions.rel5.rel6.rel7.rel8.prio_eutran_params_desc.desc.eutran_params_desc.desc.repeated_neigh_cells[0].cell_desc_list[earfcn_index] := tr_EUTRAN_CellDesc_default(e_arfcn := earfcn);
+	}
+
+	return si2quater;
+}
+
+private function f_tc_si2quater_n_earfcns(integer n) runs on test_CT
+{
 	var template SystemInformationConfig sic := SystemInformationConfig_default;
-	sic.si2quater := {
-		tr_SI2quaterRestOctets_EUTRAN(
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 111),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 23)
-					}
-				)
-			}
-		)
-	};
-	f_test_si2quater(2, sic);
+        sic.si2quater := f_tr_si2quater_earfcns(n);
+	f_test_si2quater(n, sic);
+}
+
+testcase TC_si2quater_2_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(2);
 }
 
 testcase TC_si2quater_3_earfcns() runs on test_CT {
-	var template SystemInformationConfig sic := SystemInformationConfig_default;
-	sic.si2quater := {
-		tr_SI2quaterRestOctets_EUTRAN(
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 111),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 23),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 24)
-					}
-				)
-			}
-		)
-	};
-	f_test_si2quater(3, sic);
+	f_tc_si2quater_n_earfcns(3);
 }
 
 testcase TC_si2quater_4_earfcns() runs on test_CT {
-	var template SystemInformationConfig sic := SystemInformationConfig_default;
-	sic.si2quater := {
-		tr_SI2quaterRestOctets_EUTRAN(
-			index := 0,
-			count := 1,
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 111),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 23),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 24)
-					}
-				)
-			}
-		),
-		tr_SI2quaterRestOctets_EUTRAN(
-			index := 1,
-			count := 1,
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 25)
-					}
-				)
-			}
-		)
-	};
-	f_test_si2quater(4, sic);
+	f_tc_si2quater_n_earfcns(4);
 }
 
 testcase TC_si2quater_5_earfcns() runs on test_CT {
-	var template SystemInformationConfig sic := SystemInformationConfig_default;
-	sic.si2quater := {
-		tr_SI2quaterRestOctets_EUTRAN(
-			index := 0,
-			count := 1,
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 111),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 23),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 24)
-					}
-				)
-			}
-		),
-		tr_SI2quaterRestOctets_EUTRAN(
-			index := 1,
-			count := 1,
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 25),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 26)
-					}
-				)
-			}
-		)
-	};
-	f_test_si2quater(5, sic);
+	f_tc_si2quater_n_earfcns(5);
 }
 
 testcase TC_si2quater_6_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(6);
+}
+
+testcase TC_si2quater_12_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(12);
+}
+
+testcase TC_si2quater_23_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(23);
+}
+
+testcase TC_si2quater_32_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(32);
+}
+
+testcase TC_si2quater_33_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(33);
+}
+
+testcase TC_si2quater_42_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(42);
+}
+
+testcase TC_si2quater_48_earfcns() runs on test_CT {
+	f_tc_si2quater_n_earfcns(48);
+}
+
+/* verify the VTY error response when adding too many EARFCNs, and showing that osmo-bsc still sends 16 SI2quater with
+ * 48 EARFCNs. */
+testcase TC_si2quater_49_earfcns() runs on test_CT {
 	var template SystemInformationConfig sic := SystemInformationConfig_default;
-	sic.si2quater := {
-		tr_SI2quaterRestOctets_EUTRAN(
-			index := 0,
-			count := 1,
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 111),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 23),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 24)
-					}
-				)
-			}
-		),
-		tr_SI2quaterRestOctets_EUTRAN(
-			index := 1,
-			count := 1,
-			repeated_neigh_cells := {
-				tr_EUTRAN_NeighbourCells_default(
-					cell_desc_list := {
-						tr_EUTRAN_CellDesc_default(e_arfcn := 25),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 26),
-						tr_EUTRAN_CellDesc_default(e_arfcn := 27)
-					}
-				)
-			}
-		)
-	};
-	f_test_si2quater(6, sic);
+	sic.si2quater := f_tr_si2quater_earfcns(48); /* 48, not 49! */
+	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"});
+	}
+
+	/* The 49th EARFCN no longer fits, expect VTY error */
+	f_vty_enter_cfg_bts(BSCVTY, 0);
+	var charstring vty_error;
+	vty_error := f_vty_transceive_ret(BSCVTY,
+		"si2quater neighbor-list add earfcn 70 thresh-hi 20 thresh-lo 10 prio 3 qrxlv 22 meas 3")
+	f_vty_transceive(BSCVTY, "end");
+
+	if (f_strstr(vty_error, "Unable to add ARFCN 70") >= 0) {
+		log("Got expected VTY error: ", vty_error);
+		setverdict(pass);
+	} else {
+		setverdict(fail, "Expected the 49th EUTRAN ARFCN to be rejected by vty config, got: ", vty_error);
+	}
+
+	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)});
+	}
 }
 
 
@@ -5825,6 +5800,13 @@
 	execute( TC_si2quater_4_earfcns() );
 	execute( TC_si2quater_5_earfcns() );
 	execute( TC_si2quater_6_earfcns() );
+	execute( TC_si2quater_12_earfcns() );
+	execute( TC_si2quater_23_earfcns() );
+	execute( TC_si2quater_32_earfcns() );
+	execute( TC_si2quater_33_earfcns() );
+	execute( TC_si2quater_42_earfcns() );
+	execute( TC_si2quater_48_earfcns() );
+	execute( TC_si2quater_49_earfcns() );
 
 	/* RSL DCHAN Channel ACtivation / Deactivation */
 	execute( TC_chan_act_noreply() );
diff --git a/library/GSM_RestOctets.ttcn b/library/GSM_RestOctets.ttcn
index 2b43751..d47e510 100644
--- a/library/GSM_RestOctets.ttcn
+++ b/library/GSM_RestOctets.ttcn
@@ -52,6 +52,7 @@
 	 * so we should make sure that unused bits contain proper padding. */
 	variant "PADDING(yes), PADDING_PATTERN('00101011'B)"
 };
+type record of SI2quaterRestOctets SI2quaterRestOctetsList;
 
 /* Measurement Parameters Description */
 private type record MeasParamsDescOpt {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19181
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: I99bf9b3381812d1db6fd0757f65995bae48da776
Gerrit-Change-Number: 19181
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20200709/8e65803d/attachment.htm>


More information about the gerrit-log mailing list