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

September 2024

  • 1 participants
  • 1983 discussions
[M] Change in ...pyosmocom[master]: Introduce a new 'hexstr' type to represent hex-strings
by laforge 11 Sep '24

11 Sep '24
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38023?usp=email ) Change subject: Introduce a new 'hexstr' type to represent hex-strings ...................................................................... Patch Set 3: (1 comment) Patchset: PS3: mh. now this change broke the master build. Somehow both of the last two builds did not report back here via comments 😞 -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38023?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I16c0df809bc11ec0f98e8ade404f9b82072e3a06 Gerrit-Change-Number: 38023 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 11 Sep 2024 11:39:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[S] Change in osmo-upf[master]: pfcp-tool: n-sessions [1/4]: add generators for TEID and UE IP
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: neels, pespin. laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-upf/+/37757?usp=email ) Change subject: pfcp-tool: n-sessions [1/4]: add generators for TEID and UE IP ...................................................................... Patch Set 2: (1 comment) File src/osmo-pfcp-tool/pfcp_tool.h: https://gerrit.osmocom.org/c/osmo-upf/+/37757/comment/116489de_70e78fcf?usp… : PS2, Line 124: uint32_t pfcp_tool_new_teid(void); > Acknowledged I'd love to see this move ahead. But it's been sitting just over a week for something that looks like a very trivial renaming task? -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37757?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Iec164a222782d382aefe8d0342f398ebba1eac05 Gerrit-Change-Number: 37757 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:21:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-hnbgw[master]: on RUA DT for unknown context, respond with RUA Disconnect
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: neels, pespin. laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37808?usp=email ) Change subject: on RUA DT for unknown context, respond with RUA Disconnect ...................................................................... Patch Set 2: (1 comment) File src/osmo-hnbgw/hnbgw_rua.c: https://gerrit.osmocom.org/c/osmo-hnbgw/+/37808/comment/aacfd01e_21baf59f?u… : PS2, Line 292: goto tx_disconnect; > I see you are now using it twice, but now we end up with a mixture of early returns and gotos. […] Acknowledged -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37808?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: If0b9a999649c9822f55b42b0cae8408af668e1b8 Gerrit-Change-Number: 37808 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:19:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-hnbgw[master]: on RUA Connect failure, respond with RUA Disconnect
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: neels, pespin. laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37807?usp=email ) Change subject: on RUA Connect failure, respond with RUA Disconnect ...................................................................... Patch Set 2: (1 comment) File src/osmo-hnbgw/hnbgw_rua.c: https://gerrit.osmocom.org/c/osmo-hnbgw/+/37807/comment/cf1845c8_d247512f?u… : PS2, Line 313: tx_disconnect: > I find this goto here not really useful and adding complexity to the code, since it's only used in o […] Acknowledged -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/37807?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Iafb30c31a4c5db53ecdda99a0e0b5937b71e362c Gerrit-Change-Number: 37807 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:18:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in ...pyosmocom[master]: Introduce a new 'hexstr' type to represent hex-strings
by laforge 11 Sep '24

11 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38023?usp=email ) Change subject: Introduce a new 'hexstr' type to represent hex-strings ...................................................................... Introduce a new 'hexstr' type to represent hex-strings hexstr differs from str in that comparisons are case-insensitive, and it offers encoding-free conversion from hexstr to bytes and vice-versa. Change-Id: I16c0df809bc11ec0f98e8ade404f9b82072e3a06 --- M src/osmocom/utils.py A tests/test_utils.py 2 files changed, 88 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified fixeria: Looks good to me, but someone else must approve diff --git a/src/osmocom/utils.py b/src/osmocom/utils.py index cbcdd46..183bbb8 100644 --- a/src/osmocom/utils.py +++ b/src/osmocom/utils.py @@ -138,6 +138,36 @@ except: return False +class hexstr(str): + """Class derived from 'str', represeting a string of hexadecimal digits. It differs in that + comparisons are case-insensitive, and it offers encoding-free conversion from hexstr to bytes + and vice-versa.""" + def __new__(cls, s: str): + if not all(c in string.hexdigits for c in s): + raise ValueError('Input must be hexadecimal digits only') + # store as lower case digits + return super().__new__(cls, s.lower()) + + def __eq__(self, other: str) -> bool: + # make sure comparison is done case-insensitive + return str(self) == other.lower() + + def __getitem__(self, val) -> 'hexstr': + # make sure slicing a hexstr will return a hexstr + return hexstr(super().__getitem__(val)) + + def to_bytes(self) -> bytes: + """return hex-string converted to bytes""" + s = str(self) + if len(s) & 1: + raise ValueError('Cannot convert hex string with odd number of digits') + return h2b(s) + + @classmethod + def from_bytes(cls, bt: bytes) -> 'hexstr': + """instantiate hex-string from bytes""" + return cls(b2h(bt)) + ######################################################################### # ARGPARSE HELPERS ######################################################################### diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100755 index 0000000..8e4732f --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 + +# (C) 2022 by Harald Welte <laforge(a)osmocom.org> +# All Rights Reserved +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import unittest + +from osmocom.utils import * + +class TestHexstr(unittest.TestCase): + def test_cmp(self): + s = hexstr('aBcD') + self.assertEqual(s, 'abcd') + self.assertEqual(s, 'ABCD') + self.assertEqual(s, 'AbCd') + self.assertEqual(s, hexstr('AbCd')) + + def test_tobytes(self): + s = hexstr('aBcDeF') + self.assertEqual(s.to_bytes(), b'\xab\xcd\xef') + + def test_tobytes_odd(self): + s2 = hexstr('aBc') + with self.assertRaises(ValueError): + s2.to_bytes() + + def test_frombytes(self): + s = hexstr.from_bytes(b'\x01\x02\xaa') + self.assertEqual(s, '0102aa') + + def test_slice(self): + s = hexstr('abcdef') + slice1 = s[-2:] + self.assertTrue(isinstance(slice1, hexstr)) + self.assertEqual(slice1, 'ef') + slice2 = s[1] + self.assertTrue(isinstance(slice2, hexstr)) + self.assertEqual(slice2, 'b') + + def test_str_lower(self): + self.assertEqual(str(hexstr('ABCD')), 'abcd') + + +if __name__ == "__main__": + unittest.main() -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38023?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I16c0df809bc11ec0f98e8ade404f9b82072e3a06 Gerrit-Change-Number: 38023 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder
1 0
0 0
[M] Change in ...pyosmocom[master]: Introduce a new 'hexstr' type to represent hex-strings
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: pespin. laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38023?usp=email ) Change subject: Introduce a new 'hexstr' type to represent hex-strings ...................................................................... Patch Set 3: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38023?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I16c0df809bc11ec0f98e8ade404f9b82072e3a06 Gerrit-Change-Number: 38023 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:17:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ci[master]: jobs/osmo-gsm-tester-build: fix Missing parameter
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: osmith. laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/38088?usp=email ) Change subject: jobs/osmo-gsm-tester-build: fix Missing parameter ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38088?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3b6b16964a4d8a51fd3ecc0d670805182a8c6586 Gerrit-Change-Number: 38088 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:16:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ci[master]: scripts/manuals: ignore pyosmocom 0.0.1, 0.0.2
by laforge 11 Sep '24

11 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/38089?usp=email ) Change subject: scripts/manuals: ignore pyosmocom 0.0.1, 0.0.2 ...................................................................... scripts/manuals: ignore pyosmocom 0.0.1, 0.0.2 These tags don't have scripts to generate and publish manuals yet. Change-Id: I1dc9eec3fff836c507686e61657ca1b69d43c845 --- M scripts/manuals/publish-manuals-for-tags.sh 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/scripts/manuals/publish-manuals-for-tags.sh b/scripts/manuals/publish-manuals-for-tags.sh index 3e3baf3..8ca34a6 100755 --- a/scripts/manuals/publish-manuals-for-tags.sh +++ b/scripts/manuals/publish-manuals-for-tags.sh @@ -200,6 +200,9 @@ osmo-trx:0.4.0, pysim:1.0, + + pyosmocom:0.0.1, + pyosmocom:0.0.2, " mkdir -p \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38089?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1dc9eec3fff836c507686e61657ca1b69d43c845 Gerrit-Change-Number: 38089 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in osmo-ci[master]: scripts/manuals: ignore pyosmocom 0.0.1, 0.0.2
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: osmith. laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/38089?usp=email ) Change subject: scripts/manuals: ignore pyosmocom 0.0.1, 0.0.2 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38089?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1dc9eec3fff836c507686e61657ca1b69d43c845 Gerrit-Change-Number: 38089 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:15:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-bsc[master]: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
by laforge 11 Sep '24

11 Sep '24
Attention is currently required from: dexter, fixeria, pespin. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38091?usp=email ) Change subject: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: I'm really not hapyp with *again* incrementing the PCU interface version and *again* creating incompatibility, forcing everyone to update BTS+PCU or BSC+PCU at the same time. At the same time, I don't understand right now fully if we have any alternatives that would not break compatibility, so I won't veto it. But let me say I'm strongly advising against it. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38091?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ie92f5833a80b06e78c6cec8f03f054e2e2625fad Gerrit-Change-Number: 38091 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Sep 2024 11:14:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.