--- testing NULL neighbor_ident_list neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=-ENOMEM, got -12 (empty) neighbor_ident_get(k(0, 1, 2)) --> NULL neighbor_ident_del(k(0, 1, 2)) --> nothing deleted (empty) --- adding entries, test that no two identical entries are added neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_get(k(0, 1, 2)) --> entry returned cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_add(k(0, 1, 2), &cgi2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[2] = { 0: 001-02-3-4 1: 005-006-7-8 } neighbor_ident_add(k(0, 1, 2), &cgi2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[2] = { 0: 001-02-3-4 1: 005-006-7-8 } neighbor_ident_del(k(0, 1, 2)) --> entry deleted (empty) --- Cannot mix cell identifier types for one entry neighbor_ident_add(k(0, 1, 2), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_add(k(0, 1, 2), &lac1) --> expect rc=-EINVAL, got -22 0: BTS 0 to ARFCN 1 BSIC 2 cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_del(k(0, 1, 2)) --> entry deleted (empty) --- BTS matching: specific BTS is stronger neighbor_ident_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, 2), &lac1) --> expect rc=1, got 1 0: BTS * to ARFCN 1 BSIC 2 cell_id_list lac[1] = { 0: 123 } neighbor_ident_add(k(3, 1, 2), &lac2) --> expect rc=2, got 2 0: BTS * to ARFCN 1 BSIC 2 cell_id_list lac[1] = { 0: 123 } 1: BTS 3 to ARFCN 1 BSIC 2 cell_id_list lac[2] = { 0: 456 1: 789 } neighbor_ident_get(k(2, 1, 2)) --> entry returned cell_id_list lac[1] = { 0: 123 } neighbor_ident_get(k(3, 1, 2)) --> entry returned cell_id_list lac[2] = { 0: 456 1: 789 } neighbor_ident_get(k(4, 1, 2)) --> entry returned cell_id_list lac[1] = { 0: 123 } neighbor_ident_get(k(NEIGHBOR_IDENT_KEY_ANY_BTS, 1, 2)) --> entry returned cell_id_list lac[1] = { 0: 123 } --- BSIC matching: 6bit and 9bit are different realms, and wildcard match is weaker neighbor_ident_add(k(0, 1, BSIC_ANY), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_add(k(0, 1, 2), &lac1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 1 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } 1: BTS 0 to ARFCN 1 BSIC 2 cell_id_list lac[1] = { 0: 123 } neighbor_ident_add(k(0, 1, 2), &lac2) --> expect rc=2, got 3 ERROR 0: BTS 0 to ARFCN 1 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } 1: BTS 0 to ARFCN 1 BSIC 2 cell_id_list lac[3] = { 0: 123 1: 456 2: 789 } neighbor_ident_get(k(0, 1, 2)) --> entry returned cell_id_list lac[3] = { 0: 123 1: 456 2: 789 } neighbor_ident_get(k(0, 1, 2)) --> entry returned cell_id_list lac[3] = { 0: 123 1: 456 2: 789 } --- Value ranges neighbor_ident_add(k(0, 6, 1 << 6), &lac1) --> expect rc=-ERANGE, got -34 (empty) neighbor_ident_add(k(0, 6, BSIC_ANY - 1), &lac1) --> expect rc=-ERANGE, got -34 (empty) neighbor_ident_add(k(NEIGHBOR_IDENT_KEY_ANY_BTS - 1, 1, BSIC_ANY), &cgi2) --> expect rc=-ERANGE, got -34 (empty) neighbor_ident_add(k(256, 1, BSIC_ANY), &cgi2) --> expect rc=-ERANGE, got -34 (empty) neighbor_ident_add(k(0, 0, BSIC_ANY), &cgi1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } neighbor_ident_add(k(255, 65535, BSIC_ANY), &lac1) --> expect rc=1, got 1 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } 1: BTS 255 to ARFCN 65535 (any BSIC) cell_id_list lac[1] = { 0: 123 } neighbor_ident_add(k(0, 0, 0), &cgi2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } 1: BTS 255 to ARFCN 65535 (any BSIC) cell_id_list lac[1] = { 0: 123 } 2: BTS 0 to ARFCN 0 BSIC 0 cell_id_list cgi[2] = { 0: 001-02-3-4 1: 005-006-7-8 } neighbor_ident_add(k(255, 65535, 0x3f), &lac2) --> expect rc=2, got 2 0: BTS 0 to ARFCN 0 (any BSIC) cell_id_list cgi[1] = { 0: 001-02-3-4 } 1: BTS 255 to ARFCN 65535 (any BSIC) cell_id_list lac[1] = { 0: 123 } 2: BTS 0 to ARFCN 0 BSIC 0 cell_id_list cgi[2] = { 0: 001-02-3-4 1: 005-006-7-8 } 3: BTS 255 to ARFCN 65535 BSIC 63 cell_id_list lac[2] = { 0: 456 1: 789 } --- size limits Added first cell identifier list (added 127) --> rc = 127 Added second cell identifier list (tried to add 1) --> rc = -28