aboutsummaryrefslogtreecommitdiffstats
path: root/tests/acc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-16 20:53:21 +0200
committerlaforge <laforge@osmocom.org>2020-07-29 20:09:47 +0000
commitdeaa6fd624903c60a6d83bd02b430376203dcee8 (patch)
treeb278930231d4241541d571724e4d971b06e8ce92 /tests/acc
parent3e2e820d52ad0c60f8eba226750b0355e6538664 (diff)
Introduce support for ACC subset rotation
See updated documentation section in manuals/chapters/bts.adoc regarding an explanation on how the system works. Related: SYS#4911 Change-Id: I952c9eeae02809c7184078c655574ec817902e06
Diffstat (limited to 'tests/acc')
-rw-r--r--tests/acc/Makefile.am37
-rw-r--r--tests/acc/acc_test.c493
-rw-r--r--tests/acc/acc_test.ok620
3 files changed, 1150 insertions, 0 deletions
diff --git a/tests/acc/Makefile.am b/tests/acc/Makefile.am
new file mode 100644
index 000000000..4726ddc72
--- /dev/null
+++ b/tests/acc/Makefile.am
@@ -0,0 +1,37 @@
+AM_CPPFLAGS = \
+ $(all_includes) \
+ -I$(top_srcdir)/include \
+ $(NULL)
+
+AM_CFLAGS = \
+ -Wall \
+ -ggdb3 \
+ $(LIBOSMOCORE_CFLAGS) \
+ $(LIBOSMOABIS_CFLAGS) \
+ $(LIBOSMOGSM_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
+ $(NULL)
+
+EXTRA_DIST = \
+ acc_test.ok \
+ $(NULL)
+
+noinst_PROGRAMS = \
+ acc_test \
+ $(NULL)
+
+acc_test_SOURCES = \
+ acc_test.c \
+ $(NULL)
+
+acc_test_LDADD = \
+ $(top_builddir)/src/osmo-bsc/abis_nm.o \
+ $(top_builddir)/src/osmo-bsc/acc.o \
+ $(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_trx.o \
+ $(top_builddir)/src/osmo-bsc/gsm_data.o \
+ $(top_builddir)/src/osmo-bsc/net_init.o \
+ $(LIBOSMOCORE_LIBS) \
+ $(LIBOSMOABIS_LIBS) \
+ $(LIBOSMOGSM_LIBS) \
+ $(NULL)
diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c
new file mode 100644
index 000000000..54f3de1fa
--- /dev/null
+++ b/tests/acc/acc_test.c
@@ -0,0 +1,493 @@
+/*
+ * (C) 2020 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+
+#include <osmocom/core/application.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/gsm/protocol/gsm_12_21.h>
+#include <osmocom/gsm/gsm23003.h>
+
+#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/abis_nm.h>
+#include <osmocom/bsc/debug.h>
+
+static void clock_debug(char* str)
+{
+ struct timespec ts;
+ struct timeval tv;
+ osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
+ osmo_gettimeofday(&tv, NULL);
+ fprintf(stderr, "sys={%lu.%06lu}: %s\n",
+ tv.tv_sec, tv.tv_usec, str);
+}
+
+#define bts_init(net) _bts_init(net, __func__)
+static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg)
+{
+ struct gsm_bts *bts = gsm_bts_alloc(net, 0);
+ if (!bts) {
+ fprintf(stderr, "BTS allocation failure in %s()\n", msg);
+ exit(1);
+ }
+ fprintf(stderr, "BTS allocation OK in %s()\n", msg);
+
+ bts->network = net;
+
+ return bts;
+}
+
+#define bts_del(bts) _bts_del(bts, __func__)
+static inline void _bts_del(struct gsm_bts *bts, const char *msg)
+{
+ osmo_stat_item_group_free(bts->bts_statg);
+ rate_ctr_group_free(bts->bts_ctrs);
+ if (osmo_timer_pending(&bts->acc_mgr.rotate_timer))
+ osmo_timer_del(&bts->acc_mgr.rotate_timer);
+ /* no need to llist_del(&bts->list), we never registered the bts there. */
+ talloc_free(bts);
+ fprintf(stderr, "BTS deallocated OK in %s()\n", msg);
+}
+
+static void do_allowed_len_adm_loop(struct acc_mgr *acc_mgr, uint8_t jump)
+{
+ int i;
+ fprintf(stderr, "%s(%" PRIu8 ")\n", __func__, jump);
+ /* Test decreasing the administrative (VTY) max subset size */
+ for (i = 10; i >= 0; i -= jump) {
+ acc_mgr_set_len_allowed_adm(acc_mgr, i);
+ }
+ if (i != 0)
+ acc_mgr_set_len_allowed_adm(acc_mgr, 0);
+ /* Test increasing the administrative (VTY) max subset size */
+ for (i = 0; i <= 10; i += jump) {
+ acc_mgr_set_len_allowed_adm(acc_mgr, i);
+ }
+ if (i != 10)
+ acc_mgr_set_len_allowed_adm(acc_mgr, 10);
+}
+
+static void do_allowed_len_ramp_loop(struct acc_mgr *acc_mgr, uint8_t jump)
+{
+ int i;
+ fprintf(stderr, "%s(%" PRIu8 ")\n", __func__, jump);
+ /* Test decreasing the administrative (VTY) max subset size */
+ for (i = 10; i >= 0; i -= jump) {
+ acc_mgr_set_len_allowed_ramp(acc_mgr, i);
+ }
+ if (i != 0)
+ acc_mgr_set_len_allowed_ramp(acc_mgr, 0);
+ /* Test increasing the administrative (VTY) max subset size */
+ for (i = 0; i <= 10; i += jump) {
+ acc_mgr_set_len_allowed_ramp(acc_mgr, i);
+ }
+ if (i != 10)
+ acc_mgr_set_len_allowed_ramp(acc_mgr, 10);
+}
+
+static void test_acc_mgr_no_ramp(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_mgr_get_len_allowed_adm(acc_mgr) == 10);
+ OSMO_ASSERT(acc_mgr_get_len_allowed_ramp(acc_mgr) == 10);
+ OSMO_ASSERT(acc_mgr->rotation_time_sec == ACC_MGR_QUANTUM_DEFAULT);
+ OSMO_ASSERT(acc_mgr->allowed_subset_mask == 0x3ff);
+ OSMO_ASSERT(acc_mgr->allowed_subset_mask_count == 10);
+ OSMO_ASSERT(acc_mgr->allowed_permanent_count == 10);
+
+
+ do_allowed_len_adm_loop(acc_mgr, 1);
+ do_allowed_len_adm_loop(acc_mgr, 4);
+
+ /* Now permantenly barr some ACC */
+ fprintf(stderr, "*** Barring some ACCs ***\n");
+ bts->si_common.rach_control.t2 |= 0x02;
+ bts->si_common.rach_control.t3 |= 0xa5;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+ do_allowed_len_adm_loop(acc_mgr, 1);
+ do_allowed_len_adm_loop(acc_mgr, 4);
+
+ fprintf(stderr, "*** Barring ALL ACCs ***\n");
+ bts->si_common.rach_control.t2 |= 0x03;
+ bts->si_common.rach_control.t3 |= 0xff;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+ fprintf(stderr, "*** Barring zero ACCs ***\n");
+ bts->si_common.rach_control.t2 = 0xfc;
+ bts->si_common.rach_control.t3 = 0x00;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+ bts_del(bts);
+}
+
+static void test_acc_mgr_manual_ramp(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_mgr_get_len_allowed_adm(acc_mgr) == 10);
+ OSMO_ASSERT(acc_mgr_get_len_allowed_ramp(acc_mgr) == 10);
+ OSMO_ASSERT(acc_mgr->rotation_time_sec == ACC_MGR_QUANTUM_DEFAULT);
+ OSMO_ASSERT(acc_mgr->allowed_subset_mask == 0x3ff);
+ OSMO_ASSERT(acc_mgr->allowed_subset_mask_count == 10);
+ OSMO_ASSERT(acc_mgr->allowed_permanent_count == 10);
+
+ do_allowed_len_ramp_loop(acc_mgr, 1);
+ do_allowed_len_ramp_loop(acc_mgr, 4);
+
+ /* Now permantenly barr some ACC */
+ fprintf(stderr, "*** Barring some ACCs ***\n");
+ bts->si_common.rach_control.t2 |= 0x01;
+ bts->si_common.rach_control.t3 |= 0xb3;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+ do_allowed_len_ramp_loop(acc_mgr, 1);
+ do_allowed_len_ramp_loop(acc_mgr, 4);
+
+ fprintf(stderr, "*** Barring ALL ACCs ***\n");
+ bts->si_common.rach_control.t2 |= 0x03;
+ bts->si_common.rach_control.t3 |= 0xff;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+ do_allowed_len_ramp_loop(acc_mgr, 1);
+ do_allowed_len_ramp_loop(acc_mgr, 4);
+
+ fprintf(stderr, "*** Barring zero ACCs ***\n");
+ bts->si_common.rach_control.t2 = 0xfc;
+ bts->si_common.rach_control.t3 = 0x00;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+ do_allowed_len_ramp_loop(acc_mgr, 1);
+ do_allowed_len_ramp_loop(acc_mgr, 4);
+
+ fprintf(stderr, "*** Barring some ACCs + adm len 4 ***\n");
+ acc_mgr_set_len_allowed_adm(acc_mgr, 4);
+ bts->si_common.rach_control.t2 = 0xfd;
+ bts->si_common.rach_control.t3 = 0xb3;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+ do_allowed_len_ramp_loop(acc_mgr, 1);
+ do_allowed_len_ramp_loop(acc_mgr, 4);
+
+ bts_del(bts);
+}
+
+static void test_acc_mgr_rotate(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ int i;
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_mgr_get_len_allowed_adm(acc_mgr) == 10);
+ OSMO_ASSERT(acc_mgr_get_len_allowed_ramp(acc_mgr) == 10);
+ OSMO_ASSERT(acc_mgr->rotation_time_sec == ACC_MGR_QUANTUM_DEFAULT);
+ OSMO_ASSERT(acc_mgr->allowed_subset_mask == 0x3ff);
+ OSMO_ASSERT(acc_mgr->allowed_subset_mask_count == 10);
+ OSMO_ASSERT(acc_mgr->allowed_permanent_count == 10);
+
+ /* Test that rotation won't go over permanently barred ACC*/
+ fprintf(stderr, "*** Barring one ACC ***\n");
+ bts->si_common.rach_control.t2 |= 0x02;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+
+ acc_mgr_set_rotation_time(acc_mgr, 2);
+ acc_mgr_set_len_allowed_adm(acc_mgr, 4);
+
+ for (i = 0; i < 20; i++) {
+ osmo_gettimeofday_override_time.tv_sec += 2;
+ clock_debug("select()");
+ osmo_select_main(0);
+ }
+
+ bts_del(bts);
+}
+
+static void test_acc_ramp_fixed(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ int i;
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+ struct acc_ramp *acc_ramp = &bts->acc_ramp;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false);
+ OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT);
+ OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN);
+ OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true);
+
+ /* Set super high rotation time so it doesn't interfer here: */
+ acc_mgr_set_rotation_time(acc_mgr, 5000);
+
+ //acc_ramp_set_step_interval_dynamic(acc_ramp);
+ OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 1) == -ERANGE);
+ OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 50) == 0);
+ acc_ramp_set_step_size(acc_ramp, 1);
+ acc_ramp_set_enabled(acc_ramp, true);
+
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+ acc_ramp_trigger(acc_ramp);
+
+ for (i = 0; i < 9; i++) {
+ osmo_gettimeofday_override_time.tv_sec += 50;
+ clock_debug("select()");
+ osmo_select_main(0);
+ }
+
+ bts_del(bts);
+}
+
+static void test_acc_ramp_fixed2(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ int i;
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+ struct acc_ramp *acc_ramp = &bts->acc_ramp;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false);
+ OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT);
+ OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN);
+ OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true);
+
+ /* Set super high rotation time so it doesn't interfer here: */
+ acc_mgr_set_rotation_time(acc_mgr, 5000);
+ /* Set adm len to test that ramping won't go over it */
+ acc_mgr_set_len_allowed_adm(acc_mgr, 7);
+
+ acc_ramp_set_step_size(acc_ramp, 3);
+ acc_ramp_set_enabled(acc_ramp, true);
+
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+ acc_ramp_trigger(acc_ramp);
+
+ for (i = 0; i < 3; i++) {
+ osmo_gettimeofday_override_time.tv_sec += ACC_RAMP_STEP_INTERVAL_MIN;
+ clock_debug("select()");
+ osmo_select_main(0);
+ }
+
+ bts_del(bts);
+}
+
+static void test_acc_ramp_fixed3(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ int i;
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+ struct acc_ramp *acc_ramp = &bts->acc_ramp;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false);
+ OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT);
+ OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN);
+ OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true);
+
+ /* Set super high rotation time so it doesn't interfer here: */
+ acc_mgr_set_rotation_time(acc_mgr, 5000);
+ /* Test that ramping won't go over permanently barred ACC*/
+ fprintf(stderr, "*** Barring some ACCs ***\n");
+ bts->si_common.rach_control.t2 |= 0x02;
+ bts->si_common.rach_control.t3 |= 0xa5;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+ acc_ramp_set_step_size(acc_ramp, 1);
+ acc_ramp_set_enabled(acc_ramp, true);
+
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+ acc_ramp_trigger(acc_ramp);
+
+ for (i = 0; i < 9; i++) {
+ osmo_gettimeofday_override_time.tv_sec += ACC_RAMP_STEP_INTERVAL_MIN;
+ clock_debug("select()");
+ osmo_select_main(0);
+ }
+
+ bts_del(bts);
+}
+
+static void test_acc_ramp_dynamic(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ char buf[128];
+ unsigned int step_sec;
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+ struct acc_ramp *acc_ramp = &bts->acc_ramp;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false);
+ OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT);
+ OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN);
+ OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true);
+
+ /* Set super high rotation time so it doesn't interfer here: */
+ acc_mgr_set_rotation_time(acc_mgr, 5000);
+
+ acc_ramp_set_step_interval_dynamic(acc_ramp);
+ acc_ramp_set_step_size(acc_ramp, 1);
+ acc_ramp_set_enabled(acc_ramp, true);
+
+ bts->chan_load_avg = 0; /*set 70% channel load */
+
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+ acc_ramp_trigger(acc_ramp);
+
+ while (osmo_timer_pending(&acc_ramp->step_timer)) {
+ bts->chan_load_avg += 10;
+ step_sec = ((bts->chan_load_avg * ACC_RAMP_STEP_INTERVAL_MAX) / 100);
+ osmo_gettimeofday_override_time.tv_sec += step_sec;
+ snprintf(buf, sizeof(buf), "select(): load=%" PRIu8 " -> step_sec=%u",
+ bts->chan_load_avg, step_sec);
+ clock_debug(buf);
+ osmo_select_main(0);
+ }
+
+ bts_del(bts);
+}
+
+static void test_acc_ramp_fixed_rotate(struct gsm_network *net)
+{
+ fprintf(stderr, "===%s===\n", __func__);
+ struct gsm_bts *bts = bts_init(net);
+ struct acc_mgr *acc_mgr = &bts->acc_mgr;
+ struct acc_ramp *acc_ramp = &bts->acc_ramp;
+
+ /* Validate are all allowed by default after allocation: */
+ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false);
+ OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT);
+ OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN);
+ OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true);
+
+ OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 250) == 0);
+ acc_mgr_set_rotation_time(acc_mgr, 100);
+ /* Test that ramping + rotation won't go over permanently barred ACC*/
+ fprintf(stderr, "*** Barring one ACC ***\n");
+ bts->si_common.rach_control.t2 |= 0x02;
+ acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control);
+
+ acc_ramp_set_step_size(acc_ramp, 1);
+ acc_ramp_set_enabled(acc_ramp, true);
+
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+ acc_ramp_trigger(acc_ramp);
+
+ while (true) {
+ if (osmo_timer_pending(&acc_mgr->rotate_timer)) {
+ if ((osmo_gettimeofday_override_time.tv_sec + 50) % 250 == 0)
+ osmo_gettimeofday_override_time.tv_sec += 50;
+ else
+ osmo_gettimeofday_override_time.tv_sec += 100;
+ } else if (osmo_timer_pending(&acc_ramp->step_timer)) {
+ osmo_gettimeofday_override_time.tv_sec -= osmo_gettimeofday_override_time.tv_sec % 250;
+ osmo_gettimeofday_override_time.tv_sec += 250;
+ } else {
+ /* Once ramping is done, adm level is big enough and hence
+ * rotation is not needed and will be disabled. We are then done
+ */
+ break;
+ }
+ clock_debug("select()");
+ osmo_select_main(0);
+ }
+
+ bts_del(bts);
+}
+
+static const struct log_info_cat log_categories[] = {
+ [DRSL] = {
+ .name = "DRSL",
+ .description = "A-bis Radio Signalling Link (RSL)",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+};
+
+static const struct log_info log_info = {
+ .cat = log_categories,
+ .num_cat = ARRAY_SIZE(log_categories),
+};
+
+int main(int argc, char **argv)
+{
+ struct gsm_network *net;
+
+ osmo_gettimeofday_override = true;
+ osmo_gettimeofday_override_time = (struct timeval) {0, 0};
+
+ tall_bsc_ctx = talloc_named_const(NULL, 0, "gsm0408_test");
+ osmo_init_logging2(tall_bsc_ctx, &log_info);
+ log_set_log_level(osmo_stderr_target, LOGL_INFO);
+ log_set_print_category_hex(osmo_stderr_target, false);
+ log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
+ log_set_use_color(osmo_stderr_target, 0);
+
+ net = gsm_network_init(tall_bsc_ctx);
+ if (!net) {
+ fprintf(stderr, "Network init failure.\n");
+ return EXIT_FAILURE;
+ }
+
+ test_acc_mgr_no_ramp(net);
+ test_acc_mgr_manual_ramp(net);
+ test_acc_mgr_rotate(net);
+ test_acc_ramp_fixed(net);
+ test_acc_ramp_fixed2(net);
+ test_acc_ramp_fixed3(net);
+ test_acc_ramp_dynamic(net);
+ test_acc_ramp_fixed_rotate(net);
+
+ return EXIT_SUCCESS;
+}
+
+/* Whenever ACC code changes the set of barred ACCs, gsm_bts_set_system_infos()
+ * is called which ends up calling pcu_info_update */
+void pcu_info_update(struct gsm_bts *bts) {
+ struct gsm48_rach_control rach_control = {0};
+
+ acc_mgr_apply_acc(&bts->acc_mgr, &rach_control);
+ fprintf(stderr, "%s(): t2=0x%02" PRIx8 " t3=0x%02" PRIx8 "\n",
+ __func__, rach_control.t2, rach_control.t3);
+}
+
+
+struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net) {
+ OSMO_ASSERT(0);
+}
+
+bool on_gsm_ts_init(struct gsm_bts_trx_ts *ts) { return true; }
+void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {}
+int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; }
+int rsl_sacch_filling(struct gsm_bts_trx *trx, uint8_t type, const uint8_t *data, int len) { return 0; }
+int rsl_bcch_info(const struct gsm_bts_trx *trx, enum osmo_sysinfo_type si_type, const uint8_t *data, int len)
+{ return 0; }
+int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type si_type) { return 0; }
diff --git a/tests/acc/acc_test.ok b/tests/acc/acc_test.ok
new file mode 100644
index 000000000..f377651ef
--- /dev/null
+++ b/tests/acc/acc_test.ok
@@ -0,0 +1,620 @@
+===test_acc_mgr_no_ramp===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_mgr_no_ramp()
+do_allowed_len_adm_loop(1)
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3fe (active_len=9, ramp_len=10, adm_len=9, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x01
+(bts=0) ACC: update ACC allowed active subset 0x3fe -> 0x3fc (active_len=8, ramp_len=10, adm_len=8, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x03
+(bts=0) ACC: update ACC allowed active subset 0x3fc -> 0x3f8 (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x07
+(bts=0) ACC: update ACC allowed active subset 0x3f8 -> 0x3f0 (active_len=6, ramp_len=10, adm_len=6, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x0f
+(bts=0) ACC: update ACC allowed active subset 0x3f0 -> 0x3e0 (active_len=5, ramp_len=10, adm_len=5, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x1f
+(bts=0) ACC: update ACC allowed active subset 0x3e0 -> 0x3c0 (active_len=4, ramp_len=10, adm_len=4, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x3f
+(bts=0) ACC: update ACC allowed active subset 0x3c0 -> 0x380 (active_len=3, ramp_len=10, adm_len=3, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x7f
+(bts=0) ACC: update ACC allowed active subset 0x380 -> 0x300 (active_len=2, ramp_len=10, adm_len=2, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x300 -> 0x200 (active_len=1, ramp_len=10, adm_len=1, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x200 -> 0x000 (active_len=0, ramp_len=10, adm_len=0, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=10, adm_len=1, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfe
+(bts=0) ACC: update ACC allowed active subset 0x001 -> 0x003 (active_len=2, ramp_len=10, adm_len=2, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfc
+(bts=0) ACC: update ACC allowed active subset 0x003 -> 0x007 (active_len=3, ramp_len=10, adm_len=3, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf8
+(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x00f (active_len=4, ramp_len=10, adm_len=4, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=10, adm_len=5, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe0
+(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=10, adm_len=6, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x80
+(bts=0) ACC: update ACC allowed active subset 0x07f -> 0x0ff (active_len=8, ramp_len=10, adm_len=8, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=9, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+do_allowed_len_adm_loop(4)
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f0 (active_len=6, ramp_len=10, adm_len=6, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x0f
+(bts=0) ACC: update ACC allowed active subset 0x3f0 -> 0x300 (active_len=2, ramp_len=10, adm_len=2, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x300 -> 0x000 (active_len=0, ramp_len=10, adm_len=0, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x00f (active_len=4, ramp_len=10, adm_len=4, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x0ff (active_len=8, ramp_len=10, adm_len=8, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+*** Barring some ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x02 t3=0xa5
+do_allowed_len_adm_loop(1)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=9, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=8, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=7, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=6, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x158 (active_len=4, ramp_len=10, adm_len=4, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x02 t3=0xa7
+(bts=0) ACC: update ACC allowed active subset 0x158 -> 0x150 (active_len=3, ramp_len=10, adm_len=3, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x02 t3=0xaf
+(bts=0) ACC: update ACC allowed active subset 0x150 -> 0x140 (active_len=2, ramp_len=10, adm_len=2, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x02 t3=0xbf
+(bts=0) ACC: update ACC allowed active subset 0x140 -> 0x100 (active_len=1, ramp_len=10, adm_len=1, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x02 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x100 -> 0x000 (active_len=0, ramp_len=10, adm_len=0, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x002 (active_len=1, ramp_len=10, adm_len=1, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfd
+(bts=0) ACC: update ACC allowed active subset 0x002 -> 0x00a (active_len=2, ramp_len=10, adm_len=2, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf5
+(bts=0) ACC: update ACC allowed active subset 0x00a -> 0x01a (active_len=3, ramp_len=10, adm_len=3, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe5
+(bts=0) ACC: update ACC allowed active subset 0x01a -> 0x05a (active_len=4, ramp_len=10, adm_len=4, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xa5
+(bts=0) ACC: update ACC allowed active subset 0x05a -> 0x15a (active_len=5, ramp_len=10, adm_len=5, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x02 t3=0xa5
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=6, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=7, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=8, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=9, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off)
+do_allowed_len_adm_loop(4)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=6, perm_len=5, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x140 (active_len=2, ramp_len=10, adm_len=2, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x02 t3=0xbf
+(bts=0) ACC: update ACC allowed active subset 0x140 -> 0x000 (active_len=0, ramp_len=10, adm_len=0, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x05a (active_len=4, ramp_len=10, adm_len=4, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xa5
+(bts=0) ACC: update ACC allowed active subset 0x05a -> 0x15a (active_len=5, ramp_len=10, adm_len=8, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x02 t3=0xa5
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off)
+*** Barring ALL ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=10, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+*** Barring zero ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+BTS deallocated OK in test_acc_mgr_no_ramp()
+===test_acc_mgr_manual_ramp===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_mgr_manual_ramp()
+do_allowed_len_ramp_loop(1)
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3fe (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x01
+(bts=0) ACC: update ACC allowed active subset 0x3fe -> 0x3fc (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x03
+(bts=0) ACC: update ACC allowed active subset 0x3fc -> 0x3f8 (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x07
+(bts=0) ACC: update ACC allowed active subset 0x3f8 -> 0x3f0 (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x0f
+(bts=0) ACC: update ACC allowed active subset 0x3f0 -> 0x3e0 (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x1f
+(bts=0) ACC: update ACC allowed active subset 0x3e0 -> 0x3c0 (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x3f
+(bts=0) ACC: update ACC allowed active subset 0x3c0 -> 0x380 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x7f
+(bts=0) ACC: update ACC allowed active subset 0x380 -> 0x300 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x300 -> 0x200 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x200 -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfe
+(bts=0) ACC: update ACC allowed active subset 0x001 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfc
+(bts=0) ACC: update ACC allowed active subset 0x003 -> 0x007 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf8
+(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe0
+(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x80
+(bts=0) ACC: update ACC allowed active subset 0x07f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+do_allowed_len_ramp_loop(4)
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f0 (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x0f
+(bts=0) ACC: update ACC allowed active subset 0x3f0 -> 0x300 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x300 -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+*** Barring some ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x24c (active_len=4, ramp_len=10, adm_len=10, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x01 t3=0xb3
+do_allowed_len_ramp_loop(1)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=9, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=8, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=7, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=6, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=5, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x248 (active_len=3, ramp_len=3, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xb7
+(bts=0) ACC: update ACC allowed active subset 0x248 -> 0x240 (active_len=2, ramp_len=2, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xbf
+(bts=0) ACC: update ACC allowed active subset 0x240 -> 0x200 (active_len=1, ramp_len=1, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x200 -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfb
+(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf3
+(bts=0) ACC: update ACC allowed active subset 0x00c -> 0x04c (active_len=3, ramp_len=3, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xb3
+(bts=0) ACC: update ACC allowed active subset 0x04c -> 0x24c (active_len=4, ramp_len=4, adm_len=10, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x01 t3=0xb3
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=5, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=6, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=7, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=8, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=9, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=10, adm_len=10, perm_len=4, rotation=off)
+do_allowed_len_ramp_loop(4)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=6, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x240 (active_len=2, ramp_len=2, adm_len=10, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xbf
+(bts=0) ACC: update ACC allowed active subset 0x240 -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x24c (active_len=4, ramp_len=4, adm_len=10, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x01 t3=0xb3
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=8, adm_len=10, perm_len=4, rotation=off)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x24c (active_len=4, ramp_len=10, adm_len=10, perm_len=4, rotation=off)
+*** Barring ALL ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=10, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+do_allowed_len_ramp_loop(1)
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=9, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=8, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=7, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=6, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=5, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=4, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=3, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=2, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=1, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=1, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=2, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=3, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=4, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=5, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=6, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=7, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=8, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=9, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=10, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+do_allowed_len_ramp_loop(4)
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=6, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=2, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=4, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=8, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x000 (active_len=0, ramp_len=10, adm_len=10, perm_len=0, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+*** Barring zero ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+do_allowed_len_ramp_loop(1)
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3fe (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x01
+(bts=0) ACC: update ACC allowed active subset 0x3fe -> 0x3fc (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x03
+(bts=0) ACC: update ACC allowed active subset 0x3fc -> 0x3f8 (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x07
+(bts=0) ACC: update ACC allowed active subset 0x3f8 -> 0x3f0 (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x0f
+(bts=0) ACC: update ACC allowed active subset 0x3f0 -> 0x3e0 (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x1f
+(bts=0) ACC: update ACC allowed active subset 0x3e0 -> 0x3c0 (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x3f
+(bts=0) ACC: update ACC allowed active subset 0x3c0 -> 0x380 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x7f
+(bts=0) ACC: update ACC allowed active subset 0x380 -> 0x300 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x300 -> 0x200 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x200 -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfe
+(bts=0) ACC: update ACC allowed active subset 0x001 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfc
+(bts=0) ACC: update ACC allowed active subset 0x003 -> 0x007 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf8
+(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe0
+(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x80
+(bts=0) ACC: update ACC allowed active subset 0x07f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+do_allowed_len_ramp_loop(4)
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f0 (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x0f
+(bts=0) ACC: update ACC allowed active subset 0x3f0 -> 0x300 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x300 -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+*** Barring some ACCs + adm len 4 ***
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3c0 (active_len=4, ramp_len=10, adm_len=4, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x3f
+(bts=0) ACC: New ACC allowed subset 0x24c (active_len=4, ramp_len=10, adm_len=4, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x01 t3=0xb3
+do_allowed_len_ramp_loop(1)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x248 (active_len=3, ramp_len=3, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xb7
+(bts=0) ACC: update ACC allowed active subset 0x248 -> 0x240 (active_len=2, ramp_len=2, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xbf
+(bts=0) ACC: update ACC allowed active subset 0x240 -> 0x200 (active_len=1, ramp_len=1, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xff
+(bts=0) ACC: update ACC allowed active subset 0x200 -> 0x000 (active_len=0, ramp_len=0, adm_len=4, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x004 (active_len=1, ramp_len=1, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfb
+(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf3
+(bts=0) ACC: update ACC allowed active subset 0x00c -> 0x04c (active_len=3, ramp_len=3, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xb3
+(bts=0) ACC: update ACC allowed active subset 0x04c -> 0x24c (active_len=4, ramp_len=4, adm_len=4, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x01 t3=0xb3
+do_allowed_len_ramp_loop(4)
+(bts=0) ACC: update ACC allowed active subset 0x24c -> 0x240 (active_len=2, ramp_len=2, adm_len=4, perm_len=4, rotation=on)
+pcu_info_update(): t2=0x01 t3=0xbf
+(bts=0) ACC: update ACC allowed active subset 0x240 -> 0x000 (active_len=0, ramp_len=0, adm_len=4, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x24c (active_len=4, ramp_len=4, adm_len=4, perm_len=4, rotation=off)
+pcu_info_update(): t2=0x01 t3=0xb3
+BTS deallocated OK in test_acc_mgr_manual_ramp()
+===test_acc_mgr_rotate===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_mgr_rotate()
+*** Barring one ACC ***
+(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off)
+pcu_info_update(): t2=0x02 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1e0 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x1f
+sys={2.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1e0 -> 0x1c1 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x3e
+sys={4.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x3c
+sys={6.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0c3 -> 0x047 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xb8
+sys={8.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x047 -> 0x00f (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+sys={10.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x00f -> 0x01e (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe1
+sys={12.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x01e -> 0x03c (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc3
+sys={14.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x03c -> 0x078 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x87
+sys={16.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x078 -> 0x0f0 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x0f
+sys={18.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0f0 -> 0x1e0 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x1f
+sys={20.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1e0 -> 0x1c1 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x3e
+sys={22.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x3c
+sys={24.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0c3 -> 0x047 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xb8
+sys={26.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x047 -> 0x00f (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+sys={28.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x00f -> 0x01e (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe1
+sys={30.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x01e -> 0x03c (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc3
+sys={32.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x03c -> 0x078 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x87
+sys={34.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x078 -> 0x0f0 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x0f
+sys={36.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0f0 -> 0x1e0 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x1f
+sys={38.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1e0 -> 0x1c1 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x3e
+sys={40.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x3c
+BTS deallocated OK in test_acc_mgr_rotate()
+===test_acc_ramp_fixed===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_ramp_fixed()
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfe
+sys={50.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x001 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfc
+sys={100.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x003 -> 0x007 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf8
+sys={150.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+sys={200.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe0
+sys={250.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+sys={300.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x80
+sys={350.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x07f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+sys={400.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x00
+sys={450.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+BTS deallocated OK in test_acc_ramp_fixed()
+===test_acc_ramp_fixed2===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_ramp_fixed2()
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f8 (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x00 t3=0x07
+(bts=0) ACC: update ACC allowed active subset 0x3f8 -> 0x000 (active_len=0, ramp_len=0, adm_len=7, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x007 (active_len=3, ramp_len=3, adm_len=7, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf8
+sys={30.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x03f (active_len=6, ramp_len=6, adm_len=7, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+sys={60.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=9, adm_len=7, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x80
+sys={90.000000}: select()
+BTS deallocated OK in test_acc_ramp_fixed2()
+===test_acc_ramp_fixed3===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_ramp_fixed3()
+*** Barring some ACCs ***
+(bts=0) ACC: New ACC allowed subset 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x02 t3=0xa5
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfd
+sys={30.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x002 -> 0x00a (active_len=2, ramp_len=2, adm_len=10, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf5
+sys={60.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x00a -> 0x01a (active_len=3, ramp_len=3, adm_len=10, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe5
+sys={90.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x01a -> 0x05a (active_len=4, ramp_len=4, adm_len=10, perm_len=5, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xa5
+sys={120.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x05a -> 0x15a (active_len=5, ramp_len=5, adm_len=10, perm_len=5, rotation=off)
+pcu_info_update(): t2=0x02 t3=0xa5
+sys={150.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=6, adm_len=10, perm_len=5, rotation=off)
+sys={180.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=7, adm_len=10, perm_len=5, rotation=off)
+sys={210.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=8, adm_len=10, perm_len=5, rotation=off)
+sys={240.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=9, adm_len=10, perm_len=5, rotation=off)
+sys={270.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off)
+BTS deallocated OK in test_acc_ramp_fixed3()
+===test_acc_ramp_dynamic===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_ramp_dynamic()
+(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfe
+sys={60.000000}: select(): load=10 -> step_sec=60
+(bts=0) ACC: update ACC allowed active subset 0x001 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfc
+sys={180.000000}: select(): load=20 -> step_sec=120
+(bts=0) ACC: update ACC allowed active subset 0x003 -> 0x007 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf8
+sys={360.000000}: select(): load=30 -> step_sec=180
+(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf0
+sys={600.000000}: select(): load=40 -> step_sec=240
+(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe0
+sys={900.000000}: select(): load=50 -> step_sec=300
+(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+sys={1260.000000}: select(): load=60 -> step_sec=360
+(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x80
+sys={1680.000000}: select(): load=70 -> step_sec=420
+(bts=0) ACC: update ACC allowed active subset 0x07f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+sys={2160.000000}: select(): load=80 -> step_sec=480
+(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x00
+sys={2700.000000}: select(): load=90 -> step_sec=540
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+pcu_info_update(): t2=0x00 t3=0x00
+BTS deallocated OK in test_acc_ramp_dynamic()
+===test_acc_ramp_fixed_rotate===
+(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
+BTS allocation OK in test_acc_ramp_fixed_rotate()
+*** Barring one ACC ***
+(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off)
+pcu_info_update(): t2=0x02 t3=0x00
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off)
+pcu_info_update(): t2=0x03 t3=0xff
+(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfe
+sys={100.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfd
+sys={200.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xfb
+sys={250.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xf3
+sys={350.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe7
+sys={450.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x018 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xcf
+sys={500.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x030 -> 0x070 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x8f
+sys={600.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x070 -> 0x0e0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x1f
+sys={700.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0e0 -> 0x1c0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x3f
+sys={750.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x1c0 -> 0x1c1 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x3e
+sys={850.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x3c
+sys={950.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0c3 -> 0x047 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xb8
+sys={1000.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x047 -> 0x0c7 (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x38
+sys={1100.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0c7 -> 0x04f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xb0
+sys={1200.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x04f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xe0
+sys={1250.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0xc0
+sys={1350.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x03f -> 0x07e (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x81
+sys={1450.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x07e -> 0x0fc (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x03
+sys={1500.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x0fc -> 0x1fc (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x03
+sys={1600.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1fc -> 0x1f9 (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x06
+sys={1700.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1f9 -> 0x0fb (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x04
+sys={1750.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x0fb -> 0x1fb (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x04
+sys={1850.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x1fb -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x03 t3=0x00
+sys={1950.000000}: select()
+(bts=0) ACC: rotate ACC allowed active subset 0x0ff -> 0x1fe (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on)
+pcu_info_update(): t2=0x02 t3=0x01
+sys={2000.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x1fe -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=9, rotation=off)
+pcu_info_update(): t2=0x02 t3=0x00
+sys={2250.000000}: select()
+(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off)
+BTS deallocated OK in test_acc_ramp_fixed_rotate()