aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-03-09 17:10:18 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2021-03-24 10:02:29 +0100
commitd88f9a538408c69c3a39b5370197aedc8492c3fc (patch)
treeabed300bdb92553a1e503d1b6c6c47d1db55d5ad /tests
parent3ac1278dcfba946c67329060341385854ddd31a5 (diff)
refactor handover penalty timers
So far the list of penalty timers was stored for an opaque target pointer. That was either a gsm_bts pointer for a local BTS, or a cell identifier list pointer for a remote-BSS cell. Reasons to refactor penalty timers: - The cell identifier list pointer came from the neighbor configuration storage, but the way cell neighbor config is stored will change in a subsequent patch. There will be no more cell identifier lists there. - Storing object pointers is inherently unsafe -- if an object gets removed and another gets allocated, the penalty timer could theoretically remain in force for an unrelated object. Rather store penalty timers for specific Cell IDs. Since remote-BSS neighbors can be requested by a cell identifier *list*, use a gsm0808_cell_id_list2 as key in the list of penalty timers. Fix handover_test.c: have different CI for each local BTS. So far it was the same LAC+CI for all BTSes, which now would make the test fail, because any penalty timer would appear to apply to all local cells. Related: OS#5018 Change-Id: I72dd6226a6d69c3f653a3174c6f55bf4eecc6885
Diffstat (limited to 'tests')
-rw-r--r--tests/handover/handover_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index dff1390d8..332c94cd1 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -205,6 +205,7 @@ const char * const bts_default_ts[] = {
static struct gsm_bts *_create_bts(int num_trx, const char * const *ts_args, int ts_args_count)
{
static int arfcn = 870;
+ static int ci = 0;
struct gsm_bts *bts;
struct e1inp_sign_link *rsl_link;
int i;
@@ -220,6 +221,7 @@ static struct gsm_bts *_create_bts(int num_trx, const char * const *ts_args, int
}
bts->location_area_code = 23;
+ bts->cell_identity = ci++;
bts->c0->arfcn = arfcn++;
bts->codec.efr = 1;