pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/27212 )

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(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



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();


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27212
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I608220e8e5dd5a44f85c6bc5ea04622a2cad24ec
Gerrit-Change-Number: 27212
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to