Similar to chan act handling, clarify and safeguard HO Request handling.
Ensure that each HO Request is handled by the test script.
Place unhandled HO Requests in new_ho_req pointer, moving to last_ho_req
upon handling it. Instead of the got_ho_req flag and additional
ho_req_lchan pointer, just keep a last_ho_req pointer.
Drop a bunch of utterly useless RSL message parsing code.
Fix unhandled HO Request in test_max_handovers.ho_vty.
Change-Id: I0a664f24d7dd3d7b254b29675fdc49cd70a1a480
Do not clear pending chan act requests when sending a measurement report
or starting congestion check. This potentially left channel activations
unnoticed and dangling, e.g. for repeated meas-rep.
A typical test should indeed handle pending channel activation requests
before potentially triggering more, safeguard against this by asserting
that only one channel activation is pending.
Place unhandled channel activations in new_chan_req pointer, moving to
last_chan_req upon handling it. Instead of the got_chan_req flag and
additional chan_req_lchan pointer, just keep a last_chan_req pointer.
Change-Id: If06587058798d96afca86358030dc0c1c3c6df39
Fix flaws in picking a candidate for congestion resolution, shown in
recently added tests.
- For TCH/H->TCH/F upgrading, do not favor moving to a weaker neighbor
cell.
- When comparing dynamic timeslots on the same cell, favor a dynamic
timeslot that frees an entire dyn TS even though the target rxlev
differs.
Do not separate the passes for inter-cell and intra-cell candidates:
before, the inter-cell pass would already pick a candidate and start
handover, even though the subsequent intra-cell pass would have revealed
a better candidate. Join the intra-cell considerations into
pick_better_lchan_to_move().
The intra-cell pass was separate, because it would find the *weakest*
current rxlev, to give a TCH/H to TCH/F upgrade to the currently weakest
lchan.
Instead of the separate pass for weakest rxlev, in addition to the
target cell's rxlev, also consider the rxlev *change* in
pick_better_lchan_to_move(): For candidates that do not change the rxlev
(usually those that stay in the same cell) and that upgrade to TCH/F,
favor a candidate with weaker current rxlev.
Completely revisit the conditions in pick_better_lchan_to_move() to
yield the desired prioritization of candidate preferences.
In three handover tests, remove the "FAIL" comments and adjust to now
expect the actually desired behavior.
Related: SYS#5032
Change-Id: I2704899c85c35dfd4eba43468452483f40016ca2
Instead of passing the TCH/H -> TCH/F bias (AFS bias) in local
variables, rather store it in the ho_candidate struct next to the other
rxlev related values.
Add the AFS bias to the compared rxlev in pick_better_lchan_to_move().
Modify pick_better_lchan_to_move() to simpler semantics of returning
either a or b.
No functional change.
Change-Id: I73860abdf2a77270ca4851ad58c09767d1bb08f1
Store the rxlev of the current lchan and the target BTS in the
ho_candidate, to clarify the code.
No functional change, cosmetically prepare for
I2704899c85c35dfd4eba43468452483f40016ca2.
Change-Id: Ie6c165e17bb3c99eebc967a6bb02529db8bdfc98
In handover decision 2, choosing an lchan to move so far takes into
account only the absolute current rxlev, and it fails to look at the
*difference* in rxlev between source and target cell.
My recent feature to favor freeing half-used TCH/H does in fact not work
well. The main reason why the test for that feature passes is that all
lchans in the test get identical measurements -- which is unrealistic.
A test with differing ratings uncovers the flaw in comparing intra-cell
candidates.
Related: SYS#5032
Change-Id: Iabce1ab44b496833c19d999fc3f2903d835c357f
The aim is to pin the current basic behavior of handover decision 2,
before modifying the algorithm conditions to fix some bugs in upcoming
patches -- so far no test ensures this particular detail.
Change-Id: I68cdda21ef59c464f0af3c2eee356623e58ea1cd
Some tests want to repeat the same measurement report, typically 10
times to fill the averaging window. Instead of 10 lines saying
'meas-rep ...', allow 'meas-rep repeat 10 ...'.
Change-Id: Ib2fa81a449fb73ec7c458b0e6877d6561c79a846
In handover_decision_2.c, instead of repeating a similar loop four
times, put that loop in a function and parameterize it.
Prepare for a fix of two problems in handover decision 2, see
I2704899c85c35dfd4eba43468452483f40016ca2.
Change-Id: I7c32d08e490a88a7f044b0a71dc4b07d748dd572
An upcoming test that uses set-ts-use to release used lchans uncovered
an incomplete release, keeping the lchans occupied due to a missing
release ack. Always ack the release.
Change-Id: Ia22906bfbfcc48b7bd08473a2b17f6b0554687d3
We decided not to keep the handover_test script expected outputs
(osmo-bsc's logging output) in the source tree. Hence do not fail the
handover_tests when the output differs, just show a diff (if at all).
Change-Id: I3e9e123b41be71d1fcd9576b0bd38d2fd32353b4
We decided not to keep the handover_test script expected outputs
(osmo-bsc's logging output) in the source tree. For manual comparison,
they are still produced by 'handover_tests.sh -u', ignore them.
Change-Id: I5dda03f21b568e07cf26501ba2e0683108d408b6
Adding SMSCB messages to a BTS so far only worked if there were
existing messages with a lower scheduling period than the new message.
Before this patch, it fails for new messages if they are of equal or
lower scheduling period than the existing messages.
Change-Id: I69a05b22200b3a1ee406b0673553e135603d723b
None of those commands apply immediately, they only affect newly
established logical channels. The reason is that the related
IEs are only getting sent on channel activation / assignment.
Change-Id: I06c7851115fb31d1eb92c400d9724f4f051bd171
Related: SYS#5114
Both commands are basically doing the same thing, so we can merge
them into a single command by adding a parameter to the command
string. The VTY syntax remains the same:
do-something foo
do-something bar
becomes:
do-something (foo|bar)
This change reduces code duplication.
Change-Id: Ibe98718d8f4933926eed0e622109c9c82537f526
Related: SYS#5114
Presence of these lines in the config file does not necessarily mean
that the BTS will not perform measurement pre-processing. It actually
means that the BSC would not include the optional IEs related to the
measurement pre-processing, so the BTS may still apply its default
averaging algorythm with default parameters.
In order to avoid potential confusion, let's avoid printing them.
Change-Id: I585b5bf4fde93d66e47666e0fa9903f21a268b51
Related: SYS#4918
This fixes the following heap overflow in the SMSCB scheduler:
==109051==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60d00003a9a0 at pc 0x55d77e4bedf1 bp 0x7fff8cdc4240 sp 0x7fff8cdc4238
READ of size 8 at 0x60d00003a9a0 thread T0
#0 0x55d77e4bedf0 in bts_smscb_sched_add_before /space/home/laforge/projects/git/osmo-bsc/src/osmo-bsc/cbch_scheduler.c:64
Change-Id: If529aa905336a1b9e7a36e931c165df0ba9899ad
The existing code uses short-lived FSMs which are allocated straight
before START, and which are free'd after DONE state is reached.
While that works, it makes state introspection a bit hard, as one
cannot show the FSM states, etc.
Let's change to a different model where the per-OM2k-MO FSMs are
always around (in state INIT after object creation). While at it,
also introduce a RESET event that can reset each FSM instance back
to INIT state, i.e. in case of OML link failure.
Change-Id: Ia37cffff5c451e1d79a52ccae41ab5718b4661d4
There is only one parameter in command:
repeat dl-facch (command|all)
so indeed argv[0] must be used instead of argv[1].
Change-Id: I01efff109a33791e13b0149fc47c792d3266da71
Related: SYS#5114
For several years now we are using line lengths longer than 80chars,
let's re-format this code more in-line with our new style.
Change-Id: I8143280358c0e23ca7e32b882e952eac991e105b
This allows a given BTS model driver to initialize data structures
specific cor this BTS instance (or a TRX for this BTS instance).
Change-Id: Icbad9cdc12221c9ad997267d77e5414edcbac538
Before the recent changes, the MS Power Parameters IE would always
be included empty in RSL CHANnel ACTIVation messages iff the BTS
type is 'osmo-bts'. Then this behavior was changed, so the user
would need to enable dynamic power control explicitly.
This is a regression, let's revert it back to the old behaviour.
Change-Id: Idb453fc894584ccf4f5f8b45a24421db958e9478
Related: SYS#4918
According to 3GPP TS 45.008, section A.3.2.1:
c) Comparison of RXQUAL_XX with L_RXQUAL_XX_P (XX = DL or UL):
Increase XX_TXPWR if at least P3 averaged values out of N3
averaged values are greater (worse quality) than L_RXQUAL_XX_P.
d) Comparison of RXQUAL_XX with U_RXQUAL_XX_P (XX = DL or UL):
Decrease XX_TXPWR if at least P4 averaged values out of N4
averaged values are lower (better quality) than U_RXQUAL_XX_P.
Given that RxQual is a value in range 0 .. 7, where 0 is the best
and 7 is the worst: L_RXQUAL_XX_P must define the worst quality,
while U_RXQUAL_XX_P must define the best quality value.
Change-Id: I0f37b23ed360782f3c1f4275234c4e18a17aa89b
Related: SYS#4918
The meaningful names expose that some of those tests are apparently
quite similar.
With names like this it is far easier to see whether a specific scenario
is already tested or not, and find a test when looking for a specific
scenario.
Change-Id: I6f6d65d818fd1265e8ff94a2e0afba6392c50eb9
The handover_fsm activates voice on a target lchan only when the source
lchan has an osmo_mgcpc_ep_ci pointer for the BTS side. Since that
struct is opaque, set a fake pointer and override the
osmo_mgcpc_ep_ci_name() function so that the pointer is never
dereferenced.
This more accurately models the RTP stream setup events during handover.
Change-Id: Ibc22001bf9e9874dd3f44f0acac8b6a4c1069aa7
Do not show source file and line numbers in the log, so that the log
output remains unchanged for unrelated changes.
Also show the log level.
Change-Id: I8ebcaf16cd14881a3a41616dcff175e173db9ae8
So far we skipped the HO Detection message, because the FSM also accepts
a handover when the Handover Complete arrives without a Detection.
Rather model the real behavior.
Also send the EST IND message and RTP-ready events from the ho
detection.
Change-Id: Ib676e74f23ef9cd1b55262117822b0e110013bdc
Drop the string arrays, and move the 32 handover tests to separate
script files. Instead of the peculiar implementation and instead of
cryptic commands, implement the handover test scripts as a VTY.
handover_test.c now sets up a VTY with handover testing VTY commands. It
also features the complete and unabridged VTY configuration nodes of
osmo-bsc itself. That allows dropping various ho script commands.
Before:
static char *test_case_14[] = {
"Handover to congested cell, if RX level is below minimum\n\n"
"The better neighbor cell is congested, so no handover is performed.\n"
"If the RX level of the current cell drops below minimum acceptable\n"
"level, the handover is performed.\n",
"create-n-bts", "2",
"create-ms", "0", "TCH/F", "AMR",
"expect-ts-use", "0", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
"set-min-free", "1", "TCH/F", "4",
"set-min-free", "1", "TCH/H", "4",
"meas-rep", "0","0","1","0", "10","0", "1","0","30",
"expect-no-chan",
"meas-rep", "0","0","1","0", "9","0", "1","0","30",
"expect-chan", "1", "1",
"ack-chan",
"expect-ho", "0", "1",
"ho-complete",
"expect-ts-use", "0", "0", "*", "-", "-", "-", "-", "-", "-", "-",
"expect-ts-use", "1", "0", "*", "TCH/F", "-", "-", "-", "-", "-", "-",
}
After:
# Handover to congested cell, if RX level is below minimum
# The better neighbor cell is congested, so no handover is performed.
# If the RX level of the current cell drops below minimum acceptable
# level, the handover is performed.
create-n-bts 2
set-ts-use trx 0 0 states * TCH/F - - - - - -
network
bts 1
handover2 min-free-slots tch/f 4
handover2 min-free-slots tch/h 4
meas-rep lchan 0 0 1 0 rxlev 10 rxqual 0 ta 0 neighbors 30
expect-no-chan
meas-rep lchan 0 0 1 0 rxlev 9 rxqual 0 ta 0 neighbors 30
expect-ho from lchan 0 0 1 0 to lchan 1 0 1 0
expect-ts-use trx 0 0 states * - - - - - - -
expect-ts-use trx 1 0 states * TCH/F - - - - - -
Note how osmo-bsc's stock vty config nodes seamlessly integrate in the
test steps: just enter a configuration node, modify some values, and
indenting trivially takes care of exiting nodes correctly.
Running a test manually:
./handover_test test_0123.ho_vty
Instead of calling each test separately in testsuite.at, have a
handover_tests.sh script that picks up new tests just by presence of
files named test*.ho_vty.
Rationale:
It was considered to move handover tests to the TTCN suite, but there is
an advantage in having these C tests: they run super fast and catch bugs
even in the gerrit verification job, potentially saving a lot of time.
It is a reality that I need more of these tests, for dynamic timeslots
and TCH/F <-> TCH/H switches. The way the handover tests are written, as
arrays of strings containing cryptic fixed-argument script commands, has
been a pain to work with from the start, and now I am no longer willing
to endure that pain.
Change-Id: Ie238ebe41039d3fa44c9699937589e000883e052