pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27230 )
Change subject: gsm0808: Test if we properly decode a SRVCC cell identifier list ......................................................................
gsm0808: Test if we properly decode a SRVCC cell identifier list
We don't handle this correctly, as we decided to overload the meaning of 0b1011 in a cell identifier list (defined by 3GPP as used in SRVCC) with something osmocom proprietary.
Change-Id: I608220e8e5dd5a44f85c6bc5ea04622a2cad24ec --- M tests/gsm0808/gsm0808_test.c 1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/27230/1
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 3fff005..d0560d5 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -1072,6 +1072,18 @@ msgb_free(msg); }
+static void test_gsm0808_dec_cell_id_list_srvcc() +{ + /* taken from a pcap file of a real-world 3rd party MSC (SYS#5838) */ + const uint8_t enc_cil[] = { 0x0b, 0x2, 0xf2, 0x10, 0x4e, 0x20, 0x15, 0xbe}; + struct gsm0808_cell_id_list2 dec_cil; + int rc; + + rc = gsm0808_dec_cell_id_list2(&dec_cil, enc_cil, sizeof(enc_cil)); + /* Not yet supported: */ + OSMO_ASSERT(rc == -EINVAL); +} + static void test_gsm0808_enc_dec_cell_id_list_lac() { struct gsm0808_cell_id_list2 enc_cil; @@ -2490,6 +2502,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_ci(); test_gsm0808_enc_dec_cell_id_list_multi_lac_and_ci(); test_gsm0808_enc_dec_cell_id_list_multi_global(); + test_gsm0808_dec_cell_id_list_srvcc();
test_cell_id_list_add();