lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2022

  • 3 participants
  • 2402 discussions
Change in osmo-pcu[master]: tests/rlcmac: use ARRAY_SIZE macro
by laforge 06 Aug '22

06 Aug '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/28955 ) Change subject: tests/rlcmac: use ARRAY_SIZE macro ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/28955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I6e9d95ef007e984d25403eb64f8aeab02e3fa8e7 Gerrit-Change-Number: 28955 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Aug 2022 17:02:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-trx[master]: threshold_timer_update_intv(): call osmo_timer_del() unconditionally
by laforge 06 Aug '22

06 Aug '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/28956 ) Change subject: threshold_timer_update_intv(): call osmo_timer_del() unconditionally ...................................................................... threshold_timer_update_intv(): call osmo_timer_del() unconditionally osmo_timer_del() does check if a timer is active internally. Change-Id: Icaf6f31a3235a3fb6993fa2bb35190150e35c2c2 --- M CommonLibs/trx_rate_ctr.cpp 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/CommonLibs/trx_rate_ctr.cpp b/CommonLibs/trx_rate_ctr.cpp index a7467c1..3806268 100644 --- a/CommonLibs/trx_rate_ctr.cpp +++ b/CommonLibs/trx_rate_ctr.cpp @@ -312,8 +312,7 @@ return; if (llist_empty(&threshold_list)) { - if (osmo_timer_pending(&threshold_timer)) - osmo_timer_del(&threshold_timer); + osmo_timer_del(&threshold_timer); return; } -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/28956 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Icaf6f31a3235a3fb6993fa2bb35190150e35c2c2 Gerrit-Change-Number: 28956 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-trx[master]: threshold_timer_update_intv(): call osmo_timer_del() unconditionally
by laforge 06 Aug '22

06 Aug '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/28956 ) Change subject: threshold_timer_update_intv(): call osmo_timer_del() unconditionally ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/28956 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Icaf6f31a3235a3fb6993fa2bb35190150e35c2c2 Gerrit-Change-Number: 28956 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Aug 2022 17:02:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tests: make target 'check-local' depend on 'atconfig'
by laforge 06 Aug '22

06 Aug '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/28957 ) Change subject: tests: make target 'check-local' depend on 'atconfig' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/28957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id9bf06392ad31e1ecc66a5bd13069a915183a76b Gerrit-Change-Number: 28957 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Aug 2022 17:02:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tests: target 'check-local' does not depend on BUILT_SOURCES
by laforge 06 Aug '22

06 Aug '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/28958 ) Change subject: tests: target 'check-local' does not depend on BUILT_SOURCES ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/28958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I6cef8024cc10998b29e2bf7fc64c4c98fed7d8dd Gerrit-Change-Number: 28958 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Aug 2022 17:01:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tests: make target 'check-local' depend on 'atconfig'
by laforge 06 Aug '22

06 Aug '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/28957 ) Change subject: tests: make target 'check-local' depend on 'atconfig' ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/28957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id9bf06392ad31e1ecc66a5bd13069a915183a76b Gerrit-Change-Number: 28957 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Aug 2022 17:01:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tests: target 'check-local' does not depend on BUILT_SOURCES
by laforge 06 Aug '22

06 Aug '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/28958 ) Change subject: tests: target 'check-local' does not depend on BUILT_SOURCES ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/28958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I6cef8024cc10998b29e2bf7fc64c4c98fed7d8dd Gerrit-Change-Number: 28958 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 06 Aug 2022 17:01:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: cbsp: Fix decoding of Fail List
by laforge 06 Aug '22

06 Aug '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28941 ) Change subject: cbsp: Fix decoding of Fail List ...................................................................... cbsp: Fix decoding of Fail List The decoding pointer was not increased correctly, ending up in reading by 1 byte offset for each item in the list. Change-Id: I16ed9bd65109a7ce32ff43c5789b4544479838e7 --- M src/gsm/cbsp.c M tests/Makefile.am A tests/smscb/cbsp_test.c A tests/smscb/cbsp_test.ok M tests/testsuite.at 5 files changed, 125 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index 81ba81e..7411056 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -537,8 +537,8 @@ struct osmo_cbsp_fail_ent *ent = talloc_zero(ctx, struct osmo_cbsp_fail_ent); unsigned int len_remain = len - (cur - buf); OSMO_ASSERT(ent); - ent->id_discr = cur[0]; - rc = gsm0808_decode_cell_id_u(&ent->cell_id, ent->id_discr, cur+1, len_remain-1); + ent->id_discr = *cur++; + rc = gsm0808_decode_cell_id_u(&ent->cell_id, ent->id_discr, cur, len_remain-1); if (rc < 0) { osmo_cbsp_errstr = "fail list: error decoding cell_id_union"; return rc; diff --git a/tests/Makefile.am b/tests/Makefile.am index b5448c0..8c7e40a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -48,6 +48,7 @@ iuup/iuup_test \ smscb/smscb_test \ smscb/gsm0341_test \ + smscb/cbsp_test \ $(NULL) if ENABLE_MSGFILE @@ -171,6 +172,9 @@ smscb_gsm0341_test_SOURCES = smscb/gsm0341_test.c smscb_gsm0341_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la +smscb_cbsp_test_SOURCES = smscb/cbsp_test.c +smscb_cbsp_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la + sms_sms_test_SOURCES = sms/sms_test.c sms_sms_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la @@ -430,6 +434,7 @@ iuup/iuup_test.ok \ smscb/smscb_test.ok \ smscb/gsm0341_test.ok \ + smscb/cbsp_test.ok \ $(NULL) if ENABLE_LIBSCTP @@ -486,6 +491,8 @@ >$(srcdir)/smscb/smscb_test.ok smscb/gsm0341_test \ >$(srcdir)/smscb/gsm0341_test.ok + smscb/cbsp_test \ + >$(srcdir)/smscb/cbsp_test.ok ussd/ussd_test \ >$(srcdir)/ussd/ussd_test.ok auth/milenage_test \ diff --git a/tests/smscb/cbsp_test.c b/tests/smscb/cbsp_test.c new file mode 100644 index 0000000..d530798 --- /dev/null +++ b/tests/smscb/cbsp_test.c @@ -0,0 +1,108 @@ +/* + * (C) 2022 by sysmocom - s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Pau Espin Pedrol <pespin(a)sysmocom.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <string.h> +#include <stdio.h> +#include <stdlib.h> + +#include <osmocom/core/utils.h> +#include <osmocom/core/msgb.h> + +#include <osmocom/gsm/protocol/gsm_48_049.h> +#include <osmocom/gsm/cbsp.h> + +/* +CBSP WRITE-REPLACE FAILURE + Message Type: WRITE-REPLACE FAILURE (3) + Message Length: 44 + IE: Message Identifier: 0x0031 + Information Element Identifier: Message Identifier (14) + Message Identifier: 0x0031 + IE: New Serial Number: 0x4170 + Information Element Identifier: New Serial Number (3) + New Serial Number: 0x4170 + IE: Failure List: 2 items + Information Element Identifier: Failure List (9) + Information Element Length: 15 + Failure List Item: MCC 901 International Mobile, shared code, MNC 70 Clementvale Baltic OÜ, LAC 0x0018, CI 0x0030: Cause Cell-identity-not-valid + Cell ID Discriminator: CGI (0) + Mobile Country Code (MCC): International Mobile, shared code (901) + Mobile Network Code (MNC): Clementvale Baltic OÜ (70) + Location Area Code (LAC): 0x0018 + Cell Identifier (CI): 0x0030 + Cause: Cell-identity-not-valid (0x03) + Failure List Item: LAC 02711, CI 0xc351: Cause LAI-or-LAC-not-valid + Cell ID Discriminator: LAC+CI (1) + Location Area Code (LAC): 0x2711 + Cell Identifier (CI): 0xc351 + Cause: LAI-or-LAC-not-valid (0x0f) + IE: Cell List (CGI): 2 items + Information Element Identifier: Cell List (4) + Information Element Length: 15 + Cell ID Discriminator: CGI (0) + Cell List Item: MCC 901 International Mobile, shared code, MNC 70 Clementvale Baltic OÜ, LAC 0x0017, CI 0x002a + Mobile Country Code (MCC): International Mobile, shared code (901) + Mobile Network Code (MNC): Clementvale Baltic OÜ (70) + Location Area Code (LAC): 0x0017 + Cell Identifier (CI): 0x002a + Cell List Item: MCC 901 International Mobile, shared code, MNC 70 Clementvale Baltic OÜ, LAC 0x0018, CI 0x002a + Mobile Country Code (MCC): International Mobile, shared code (901) + Mobile Network Code (MNC): Clementvale Baltic OÜ (70) + Location Area Code (LAC): 0x0018 + Cell Identifier (CI): 0x002a + IE: Channel Indicator: basic channel + Information Element Identifier: Channel Indicator (18) + Channel Indicator: basic channel (0x00) +*/ +static const char write_repl_fail_with_failure_list[] = + "0300002c0e003103417009000f0009f1070018003003012711c3510f04000f0009f1070017002a09f1070018002a1200"; + +static struct msgb *msgb_from_hex(unsigned int size, const char *hex) +{ + struct msgb *msg = msgb_alloc(size, "test_cbsp"); + OSMO_ASSERT(msg); + msg->l1h = msgb_put(msg, osmo_hexparse(hex, msg->data, msgb_tailroom(msg))); + msg->l2h = msg->l1h + sizeof(struct cbsp_header); + return msg; +} + +static void test_decode() +{ + struct msgb *msg; + struct osmo_cbsp_decoded *cbsp_dec; + + printf("=== %s start ===\n", __func__); + + msg = msgb_from_hex(sizeof(write_repl_fail_with_failure_list), + write_repl_fail_with_failure_list); + + cbsp_dec = osmo_cbsp_decode(NULL, msg); + OSMO_ASSERT(cbsp_dec); + + talloc_free(cbsp_dec); + msgb_free(msg); + + printf("=== %s end ===\n", __func__); +} + +int main(int argc, char **argv) +{ + test_decode(); + + return EXIT_SUCCESS; +} diff --git a/tests/smscb/cbsp_test.ok b/tests/smscb/cbsp_test.ok new file mode 100644 index 0000000..a837de5 --- /dev/null +++ b/tests/smscb/cbsp_test.ok @@ -0,0 +1,2 @@ +=== test_decode start === +=== test_decode end === diff --git a/tests/testsuite.at b/tests/testsuite.at index cc0b8c3..6b2e75f 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -108,6 +108,12 @@ AT_CHECK([$abs_top_builddir/tests/smscb/gsm0341_test], [0], [expout]) AT_CLEANUP +AT_SETUP([smscb_cbsp]) +AT_KEYWORDS([smscb_cbsp]) +cat $abs_srcdir/smscb/cbsp_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/smscb/cbsp_test], [0], [expout]) +AT_CLEANUP + AT_SETUP([ussd]) AT_KEYWORDS([ussd]) cat $abs_srcdir/ussd/ussd_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I16ed9bd65109a7ce32ff43c5789b4544479838e7 Gerrit-Change-Number: 28941 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: cbsp: Guard against malformed msgb without l1h,l2h being passed
by laforge 06 Aug '22

06 Aug '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28940 ) Change subject: cbsp: Guard against malformed msgb without l1h,l2h being passed ...................................................................... cbsp: Guard against malformed msgb without l1h,l2h being passed Change-Id: Ie8854c780cfd96e67df10c1fc38c6b99ec07422f --- M src/gsm/cbsp.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index c2a1b8d..81ba81e 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -1261,6 +1261,7 @@ * \returns callee-allocated decoded representation of CBSP message; NULL on error */ struct osmo_cbsp_decoded *osmo_cbsp_decode(void *ctx, struct msgb *in) { + OSMO_ASSERT(in->l1h != NULL && in->l2h != NULL); struct osmo_cbsp_decoded *out = talloc_zero(ctx, struct osmo_cbsp_decoded); const struct cbsp_header *h = msgb_l1(in); struct tlv_parsed tp[16]; /* max. number of pages in a given CBS message */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie8854c780cfd96e67df10c1fc38c6b99ec07422f Gerrit-Change-Number: 28940 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: tests: Run smscb/gsm0341_test during make check
by laforge 06 Aug '22

06 Aug '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28939 ) Change subject: tests: Run smscb/gsm0341_test during make check ...................................................................... tests: Run smscb/gsm0341_test during make check Some initial testing for that module was writen to apparently do some manual tests (rand()) but were never added to testsuite.at. Let's make sure they run during make check (make the test deterministic by removing rand()). Change-Id: Icd4feced06afb749de994195c6b338df006749ad --- M tests/Makefile.am M tests/smscb/gsm0341_test.c A tests/smscb/gsm0341_test.ok M tests/testsuite.at 4 files changed, 22 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/Makefile.am b/tests/Makefile.am index 7d62615..b5448c0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -9,13 +9,13 @@ endif check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \ - smscb/smscb_test bits/bitrev_test a5/a5_test \ + bits/bitrev_test a5/a5_test \ conv/conv_test auth/milenage_test lapd/lapd_test \ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gprs/gprs_test kasumi/kasumi_test gea/gea_test \ logging/logging_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ - comp128/comp128_test smscb/gsm0341_test \ + comp128/comp128_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ bits/bitfield_test \ tlv/tlv_test gsup/gsup_test oap/oap_test \ @@ -46,6 +46,8 @@ gsm48/rest_octets_test \ base64/base64_test \ iuup/iuup_test \ + smscb/smscb_test \ + smscb/gsm0341_test \ $(NULL) if ENABLE_MSGFILE @@ -352,7 +354,7 @@ EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \ timer/timer_test.ok sms/sms_test.ok ussd/ussd_test.ok \ - smscb/smscb_test.ok bits/bitrev_test.ok a5/a5_test.ok \ + bits/bitrev_test.ok a5/a5_test.ok \ conv/conv_test.ok auth/milenage_test.ok ctrl/ctrl_test.ok \ lapd/lapd_test.ok \ gsm0408/gsm0408_test.ok gsm0408/gsm0408_test.err \ @@ -426,6 +428,8 @@ gsm48/rest_octets_test.ok \ base64/base64_test.ok \ iuup/iuup_test.ok \ + smscb/smscb_test.ok \ + smscb/gsm0341_test.ok \ $(NULL) if ENABLE_LIBSCTP @@ -480,6 +484,8 @@ >$(srcdir)/sms/sms_test.ok smscb/smscb_test \ >$(srcdir)/smscb/smscb_test.ok + smscb/gsm0341_test \ + >$(srcdir)/smscb/gsm0341_test.ok ussd/ussd_test \ >$(srcdir)/ussd/ussd_test.ok auth/milenage_test \ diff --git a/tests/smscb/gsm0341_test.c b/tests/smscb/gsm0341_test.c index d11336f..966a00f 100644 --- a/tests/smscb/gsm0341_test.c +++ b/tests/smscb/gsm0341_test.c @@ -25,7 +25,7 @@ #include <osmocom/core/utils.h> #include <osmocom/core/msgb.h> -struct gsm341_ms_message *gen_msg_from_text(uint16_t msg_id, const char *text) +struct gsm341_ms_message *gen_msg_from_text(uint16_t msg_id, uint8_t msg_code, const char *text) { struct gsm341_ms_message *cbmsg; int text_len = strlen(text); @@ -34,11 +34,11 @@ uint8_t payload[text_len]; int payload_octets; - srand(time(NULL)); + //srand(time(NULL)); gsm_7bit_encode_n(payload, sizeof(payload), text, &payload_octets); //cbmsg = gsm0341_build_msg(NULL, 0, rand(), 0, msg_id, 0x0f, 1, 1, payload, payload_octets); - cbmsg = gsm0341_build_msg(NULL, 0, rand(), 0, msg_id, 0x00, 1, 1, payload, payload_octets); + cbmsg = gsm0341_build_msg(NULL, 0, msg_code, 0, msg_id, 0x00, 1, 1, payload, payload_octets); printf("%s\n", osmo_hexdump_nospc((uint8_t *)cbmsg, sizeof(*cbmsg)+payload_octets)); @@ -50,6 +50,7 @@ uint16_t msg_id = GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST; char *text = "Mahlzeit!"; char tbuf[GSM341_MAX_CHARS+1]; + struct gsm341_ms_message *cbmsg; if (argc > 1) msg_id = atoi(argv[1]); @@ -63,7 +64,8 @@ sizeof(tbuf)-strlen(text)); tbuf[GSM341_MAX_CHARS] = 0; - gen_msg_from_text(msg_id, tbuf); + cbmsg = gen_msg_from_text(msg_id, 1, tbuf); + talloc_free(cbmsg); return EXIT_SUCCESS; } diff --git a/tests/smscb/gsm0341_test.ok b/tests/smscb/gsm0341_test.ok new file mode 100644 index 0000000..600797c --- /dev/null +++ b/tests/smscb/gsm0341_test.ok @@ -0,0 +1 @@ +0010111c0011cd309aad2fa7e9a146a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d100 diff --git a/tests/testsuite.at b/tests/testsuite.at index 44ae539..cc0b8c3 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -102,6 +102,12 @@ AT_CHECK([$abs_top_builddir/tests/smscb/smscb_test], [0], [expout]) AT_CLEANUP +AT_SETUP([smscb_gsm0341]) +AT_KEYWORDS([smscb_gsm0341]) +cat $abs_srcdir/smscb/gsm0341_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/smscb/gsm0341_test], [0], [expout]) +AT_CLEANUP + AT_SETUP([ussd]) AT_KEYWORDS([ussd]) cat $abs_srcdir/ussd/ussd_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icd4feced06afb749de994195c6b338df006749ad Gerrit-Change-Number: 28939 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • ...
  • 241
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.