aboutsummaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-07-08 02:20:16 +0200
committerneels <nhofmeyr@sysmocom.de>2020-07-09 13:27:50 +0000
commitad132f286e160098a089a292755e51bec7f8c84a (patch)
tree606ae25091a287de3c0dcbd3e063faf2e7384650 /bsc
parent16ade7860e60334ecd533da56b14c35d4cc704fa (diff)
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
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn214
1 files changed, 98 insertions, 116 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f1aea75c..cba7e03e 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -61,6 +61,7 @@ import from SCCPasp_Types all;
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 @@ type record SystemInformationConfig {
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 @@ function f_test_si2quater(integer total_earfcns, template SystemInformationConfi
}
}
-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 @@ control {
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() );