Commit Graph

25 Commits

Author SHA1 Message Date
Vadim Yanitskiy ac8acc98a3 call osmo_timer_del() unconditionally, without osmo_timer_pending()
osmo_timer_del() does check if a timer is active internally.

Change-Id: I3e42a74d59b8e8d0d46cc4027676149689cc18a3
2022-07-22 03:39:23 +07:00
Pau Espin 1ddafb3781 bts: Properly free ctr/stat when bts object is freed
This was so far workarounded in tests by manually freeing the fields.
However, in follow-up patch the paging queue will also be properly
freed, so free of the counters needs to be previously fixed too so that
counters are freed at the right point of time.
Otherwise, during paging queue flush, counters are used and would crash
because they were freed before the BTS object in each test's bts_del().

Change-Id: Id213e21cf9bfc5439021e459c22ba4704d8cae2b
2022-05-03 10:25:15 +02:00
Pau Espin dc494caea2 tests/acc: Remove unused var
Change-Id: I1b56b4f8d3c3901cdf9a971e9ed95a6ebbbc1cca
2022-05-03 08:10:58 +00:00
Pau Espin af523cf780 tests: acc_test: Get rid on unrelated logs in expect file
Change-Id: Id509fa1d27b18b5f9ba48f818671c432ff2719ac
2022-04-27 22:21:06 +00:00
Pau Espin 86e7e3cfaf tests: acc_test: fix typo in talloc ctx name
Change-Id: I80cd70ab0597a6d7d7b5445ddab504a38ac86c7b
2022-04-27 22:21:06 +00:00
Pau Espin 8ba95b4d5a Move struct gsm_bts_paging_state to paging.h
Change-Id: I8c058d308fc816828b5e6a86e7c5a1f629a2d7c4
2022-04-25 08:35:57 +00:00
Vadim Yanitskiy c8536c4216 tests: use 'check_PROGRAMS' instead of 'noinst_PROGRAMS'
When using 'check_PROGRAMS', autoconf/automake generates smarter
Makefiles, so that the test programs are not being compiled during
the normal 'make all', but only during 'make check'.

Change-Id: I030c88545cdc71b3ad9e83f9c2ba7b27177c2ac8
2022-04-14 17:21:50 +00:00
Pau Espin eb36819b4d Get rid of lots of stubs [4/4]
These are not needed anymore since we re-introduced libbsc, specially to
avoid all this churn.

Some specific methods are explicitly required to be overwritten by
tests, so we specificially mark those with __attribute__((weak)) in
order to be able to overwrite them.

This is the last step towards fixing interdependency mess of symbols and
stubs, and requires previous patches in order to have tests apssing
fine.

Change-Id: Ic7401b8a6eb903882e30fda1cf091ac99a254ef0
2021-10-07 14:08:29 +02:00
Pau Espin 8e3320ac48 Introduce libbsc to avoid linking long lists of .o files
Every time a new file is added in osmo-bsc, it ends up being a pain
because its .o file has to be included to other tests/util binaries, or
stubs need to be added.
Let's instead bundle all .o files together in an .la file and pass that
around.

Change-Id: If91dc589ea1e476da105b58846d1c3e720a439e1
2021-07-23 13:35:22 +02:00
Pau Espin a23eebb9a2 Support proto IPAC_PROTO_EXT_PCU BSC<->PCU
Related: SYS#5303
Change-Id: I4b3919f3098b9468e5e024db1e45427af24c1ad4
2021-06-30 08:13:37 +00:00
Pau Espin f25a45abea tests: Explicitly drop category from log
Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: I4d48c0c0aa46065560a020369e3b0544385f173e
Related: OS#5034
2021-02-20 17:14:49 +00:00
Alexander Couzens d74bb1e3b0 Introduce NM GPRS NSVC FSM
Related: OS#4870
Change-Id: I381472532c2622a8dba7c81ae00ea873c2e58ae1
2020-12-04 14:44:40 +01:00
Pau Espin aab54b44e4 Introduce NM GPRS CELL FSM
Related: OS#4870
Change-Id: I074f4496aa153b5f84e6ce85f413754efe64d831
2020-12-03 19:56:19 +01:00
Pau Espin ee9f02f2df Introduce NM GPRS NSE FSM
Related: OS#4870
Change-Id: I91a5f40324d5373eac885032295690cec97214a6
2020-12-03 18:46:27 +01:00
Pau Espin 64c422858d Store GPRS MOs directly under BTS SiteMgr object
The only real 1-1 relationship between BTS NM objects is the one between
GPRS Cell and BTS (which is actually a BTS cell).
In our current osmo-bts implementation we don't care much since we only
handle 1-cell BTSses, but let's make the data structure organization
more generic.

Implementation notes:
The gsm_bts_sm is moved to its own file, APIs to allocate are added and
the new public object is hooked correctly in the allocation process of
osmo-bsc.

Change-Id: I06461b7784fa2a78de37383406e35beae85fbad8
2020-12-03 16:31:36 +01:00
Pau Espin 09544ab436 Introduce Radio Channel FSM
Change-Id: Iddc008c5737afb2fddd32c628bc5278056a64d89
2020-10-15 05:55:36 +00:00
Pau Espin d9d105c1f7 Introduce NM RadioCarrier FSM
Change-Id: Ieed61d1fb1e896db42545c2c3421b20cb41ad549
2020-10-15 05:55:36 +00:00
Pau Espin 95486f248a Introduce NM BaseBand Transceiver FSM
Change-Id: Ib4d35316c52eb4c71ea0d352a1e06fd5e600fe08
2020-10-15 05:55:36 +00:00
Pau Espin 6adeb607d0 Introduce NM BTS FSM
Change-Id: I7756a8ce90b6cc8a502b5665889a7987d7f749cb
2020-10-15 05:55:36 +00:00
Pau Espin 4338de5f51 Introduce NM BTS Site Manager FSM
Change-Id: Ic001ce6ebeff6f51470ef58140b0235f4a30265e
2020-10-15 05:55:36 +00:00
Pau Espin c8ec051bde tests: acc_test: Test more rotating scenarios
Change-Id: I8ac8ef362af8222e6b7e302e3763811ba093db62
2020-08-27 14:24:03 +02:00
Pau Espin 88cef63e85 acc: Fix ACC rotate barring highest ACCs too quickly during wraparound
Expected steps (size=4):
6 7 8 9 -> 0 7 8 9 -> 0 1 8 9 -> 0 1 2 9 -> 0 1 2 3 -> 1 2 3 4 -> ...

Befre this patch, for size>2 we got:
6 7 8 9 -> 0 6 7 8 -> 0 1 6 7 -> 0 1 2 6 -> 0 1 2 3 -> 1 2 3 4 -> ...

Which means highest ACCs were barred during more time than others.

Change-Id: I03c298ecb29c4fc5f4c361773f2666588e423ffe
2020-08-27 14:05:14 +02:00
Pau Espin c7b85d3a64 acc_test: Print allowed ACC from t2 and t3
Change-Id: If41e8e41310e2b9e27aaa5fe9d04ea39d7272703
2020-08-27 13:07:44 +02:00
Pau Espin 1e5e7004dc Introduce support for ACC ramping during whole BTS life cycle
Prior to this patch, ACC ramping was only used to go 0->N in the
number of allowed ACCs during BTS startup. It could optionally
dynamically stretch or extend the ramping time based on channel load.

With this patch, ACC ramping is kept alive during the entire time the
BTS is active, and subset of allowed ACCs can now be incresed or
decreased based on channel load. A new VTY command
"access-control-class-ramping-chan-load" is added to configure a lower
and an upper threshold. Channel load under the low threshold will
potentially trigger an increment of the subset size of allowed ACCs,
while a channel load over the upper threshold will potentially trigger
the opposite (a decrease in size).
The time between checks is kept fixed per VTY command (reusing old
"access-control-class-ramping-step-size"), but the "dynamic" option
is deprecated and ignored from now on since it provides nothing valuable
in the new implementation, because the size always dynamically changes
based on channel load (configured thresholds).

Related: SYS#4912
Change-Id: Id17f947c92cdfc0eb9541a9bf066338169caaeb5
2020-07-31 09:56:46 +00:00
Pau Espin deaa6fd624 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
2020-07-29 20:09:47 +00:00