This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12933 ) Change subject: gsm0808: Add unit tests for test_create_clear_command2() ...................................................................... gsm0808: Add unit tests for test_create_clear_command2() Change-Id: Ie3f34b78edc91a013152742bebbd839586a787fe Related: OS#3805 --- M tests/gsm0808/gsm0808_test.c M tests/gsm0808/gsm0808_test.ok 2 files changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index f06e8b7..65fef53 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -186,6 +186,28 @@ msgb_free(msg); } +static void test_create_clear_command2() +{ + static const uint8_t res[] = { 0x00, 0x04, 0x20, 0x04, 0x01, 0x23 }; + struct msgb *msg; + + printf("Testing creating Clear Command 2\n"); + msg = gsm0808_create_clear_command2(0x23, false); + VERIFY(msg, res, ARRAY_SIZE(res)); + msgb_free(msg); +} + +static void test_create_clear_command2_csfb() +{ + static const uint8_t res[] = { 0x00, 0x05, 0x20, 0x04, 0x01, 0x23, 0x8F }; + struct msgb *msg; + + printf("Testing creating Clear Command 2 (CSFB)\n"); + msg = gsm0808_create_clear_command2(0x23, true); + VERIFY(msg, res, ARRAY_SIZE(res)); + msgb_free(msg); +} + static void test_create_clear_complete() { static const uint8_t res[] = { 0x00, 0x01, 0x21 }; @@ -2219,6 +2241,8 @@ test_create_reset(); test_create_reset_ack(); test_create_clear_command(); + test_create_clear_command2(); + test_create_clear_command2_csfb(); test_create_clear_complete(); test_create_cipher(); test_create_cipher_complete(); diff --git a/tests/gsm0808/gsm0808_test.ok b/tests/gsm0808/gsm0808_test.ok index aae8959..7819e7a 100644 --- a/tests/gsm0808/gsm0808_test.ok +++ b/tests/gsm0808/gsm0808_test.ok @@ -6,6 +6,8 @@ Testing creating Reset Testing creating Reset Ack Testing creating Clear Command +Testing creating Clear Command 2 +Testing creating Clear Command 2 (CSFB) Testing creating Clear Complete Testing creating Chipher Mode Command Testing creating Cipher Complete -- To view, visit https://gerrit.osmocom.org/12933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie3f34b78edc91a013152742bebbd839586a787fe Gerrit-Change-Number: 12933 Gerrit-PatchSet: 3 Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190218/77b74c60/attachment.htm>