From 74663d97c6677d92ba9ed4338c190b8dc42b537e Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 23 Mar 2018 01:46:42 +0100 Subject: add gsm0808_cell_id_list_add() to combine two cell identifier lists This will be used by the upcoming neighbor_ident API in osmo-bsc, where the vty interface allows composing neihbor BSS cell identifier lists, and we want to allow adding individual items from individual user commands. It will also be useful to accumulate cell identifiers in case a subscriber sees multiple alternative cells from a neighboring BSS, and we want to pass these on to the MSC in a Handover Required. Related: OS#2283 (inter-BSC HO, BSC side) Change-Id: I5781f5fa5339c92ab2e2620489b002829d206925 --- tests/gsm0808/gsm0808_test.ok | 85 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) (limited to 'tests/gsm0808/gsm0808_test.ok') diff --git a/tests/gsm0808/gsm0808_test.ok b/tests/gsm0808/gsm0808_test.ok index e101d657..a049dec5 100644 --- a/tests/gsm0808/gsm0808_test.ok +++ b/tests/gsm0808/gsm0808_test.ok @@ -19,4 +19,89 @@ Testing creating Clear Request Testing creating Paging Request Testing creating DTAP Testing prepend DTAP +------- test_cell_id_list_add + cell_id_list cgi[0] = { + } + +gsm0808_cell_id_list_add(&cil, &lac1) --> rc = 1 + cell_id_list lac[1] = { + 0: 123 + } + +gsm0808_cell_id_list_add(&cil, &lac1) --> rc = 0 + cell_id_list lac[1] = { + 0: 123 + } + +gsm0808_cell_id_list_add(&cil, &lac2) --> rc = 2 + cell_id_list lac[3] = { + 0: 123 + 1: 456 + 2: 789 + } + +gsm0808_cell_id_list_add(&cil, &lac2) --> rc = 0 + cell_id_list lac[3] = { + 0: 123 + 1: 456 + 2: 789 + } + +gsm0808_cell_id_list_add(&cil, &cil) --> rc = 0 + cell_id_list lac[3] = { + 0: 123 + 1: 456 + 2: 789 + } + +gsm0808_cell_id_list_add(&cil, &cgi1) --> rc = -22 + cell_id_list lac[3] = { + 0: 123 + 1: 456 + 2: 789 + } + +can't add to BSS list + cell_id_list bss[0] + +gsm0808_cell_id_list_add(&cil, &lac1) --> rc = -22 + cell_id_list bss[0] + +other types (including NO_CELL) take on new type iff empty + cell_id_list no_cell[0] + +gsm0808_cell_id_list_add(&cil, &cgi1) --> rc = 1 + cell_id_list cgi[1] = { + 0: 001-02-3-4 + } + +gsm0808_cell_id_list_add(&cil, &cgi1) --> rc = 0 + cell_id_list cgi[1] = { + 0: 001-02-3-4 + } + +gsm0808_cell_id_list_add(&cil, &cgi2) --> rc = 2 + cell_id_list cgi[3] = { + 0: 001-02-3-4 + 1: 001-002-3-4 + 2: 005-006-7-8 + } + +gsm0808_cell_id_list_add(&cil, &cgi2) --> rc = 0 + cell_id_list cgi[3] = { + 0: 001-02-3-4 + 1: 001-002-3-4 + 2: 005-006-7-8 + } + +cil.id_list_len = 126 +gsm0808_cell_id_list_add(&cil, &cgi2a) --> rc = 1 +cil.id_list_len = 127 + +cil.id_list_len = 126 +gsm0808_cell_id_list_add(&cil, &cgi3) --> rc = -28 +cil.id_list_len = 127 +gsm0808_cell_id_list_add(&cil, &cgi2a) --> rc = -28 +cil.id_list_len = 127 +------- test_cell_id_list_add done Done -- cgit v1.2.3