Change in osmo-ttcn3-hacks[master]: bsc: Introduce test TC_si_acc_rotate

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

pespin gerrit-no-reply at lists.osmocom.org
Wed Jul 29 11:54:07 UTC 2020


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

Change subject: bsc: Introduce test TC_si_acc_rotate
......................................................................

bsc: Introduce test TC_si_acc_rotate

Related: SYS#4911
Change-Id: I18d0243353fce547d126d62c34415628a21cb52b
---
M bsc/BSC_Tests.ttcn
1 file changed, 76 insertions(+), 0 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index cc7346f..ac6b356 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1854,6 +1854,81 @@
 	}
 }
 
+private function f_acc09_count_allowed(AccessControlClass acc) return uint8_t
+{
+	var uint8_t count := 0;
+	for (var integer i := 5; i < 16; i := i + 1) {
+		if (acc[i] == '0'B) { /* the list marks barred, we count allowed */
+			count := count + 1;
+		}
+	}
+	return count;
+}
+
+/* verify ACC rotate feature */
+testcase TC_si_acc_rotate() runs on test_CT {
+	var template SystemInformationConfig sic := SystemInformationConfig_default;
+	var SystemInformationConfig last_si;
+	var AccessControlClass acc;
+	var ASP_RSL_Unitdata rx_rsl_ud;
+	var uint8_t count;
+	var integer times_allowed[10] := { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+	f_init(0, guard_timeout := 60.0);
+
+	f_bts_0_cfg(BSCVTY, {"rach access-control-class 5 barred",
+			     "access-control-class-rotate 3",
+			     "access-control-class-rotate-quantum 1"});
+
+	/* Init and get first sysinfo */
+	f_init_bts_and_check_sysinfo(0, expect_si := ?);
+
+	var integer i := 0;
+	while (i < 20) {
+		IPA_RSL[0].receive(tr_ASP_RSL_UD((tr_RSL_NO_BCCH_INFO,
+						     tr_RSL_BCCH_INFO,
+						     tr_RSL_NO_SACCH_FILL,
+						     tr_RSL_SACCH_FILL))
+				  ) -> value rx_rsl_ud;
+
+		f_sysinfo_seen(0, rx_rsl_ud.rsl);
+		last_si := g_system_information[0];
+		if (last_si.si1 == omit) {
+			continue;
+		}
+
+		g_system_information[0].si1 := omit;
+		acc := last_si.si1.rach_control.acc;
+		count := f_acc09_count_allowed(acc);
+		log("RSL: GOT SI1 ACC len=", count, ": ", acc);
+
+		if (count != 3) {
+			log("RSL: EXPECTED SI ACC len=3");
+			setverdict(fail, "received SI does not match expectations");
+			break;
+		}
+
+		for (var integer j := 0; j < 10; j := j + 1) {
+			if (acc[16 - 1 - j] == '0'B) { /* the list marks barred, we count allowed */
+				times_allowed[j] := times_allowed[j] + 1;
+			}
+		}
+
+		i := i + 1;
+	}
+
+	for (var integer j := 0; j < 10; j := j + 1) {
+		log("ACC", j, " allowed ", times_allowed[j], " times" );
+		if (j != 5 and times_allowed[j] < 3) {
+			setverdict(fail, "ACC", j, " ERROR: allowed ", times_allowed[j], " < 1 times");
+		} else if (j == 5 and times_allowed[j] > 0) {
+			setverdict(fail, "ACC", j, " ERROR: allowed ", times_allowed[j], " > 0 times");
+		}
+	}
+
+	f_bts_0_cfg(BSCVTY, {"access-control-class-rotate 10",
+			     "rach access-control-class 5 allowed"});
+}
 
 testcase TC_ctrl_msc_connection_status() runs on test_CT {
 	var charstring ctrl_resp;
@@ -5829,6 +5904,7 @@
 	execute( TC_si2quater_42_earfcns() );
 	execute( TC_si2quater_48_earfcns() );
 	execute( TC_si2quater_49_earfcns() );
+	execute( TC_si_acc_rotate() );
 
 	/* RSL DCHAN Channel ACtivation / Deactivation */
 	execute( TC_chan_act_noreply() );

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19359
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: I18d0243353fce547d126d62c34415628a21cb52b
Gerrit-Change-Number: 19359
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20200729/2de15b52/attachment.htm>


More information about the gerrit-log mailing list