Attention is currently required from: fixeria, laforge, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39158?usp=email )
Change subject: pcap-server: Make rotate-localtime feature configurable through VTY
......................................................................
Patch Set 3:
(5 comments)
File configure.ac:
https://gerrit.osmocom.org/c/osmo-pcap/+/39158/comment/2fcc87ea_b9b4ffa1?us… :
PS3, Line 65: dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang
put the configure.ac and .gitignore changes into an extra commit?
File doc/manuals/chapters/server.adoc:
https://gerrit.osmocom.org/c/osmo-pcap/+/39158/comment/2590661c_f1a8c82c?us… :
PS3, Line 117:
Maybe worth document what happens if the system's localtime goes backward (daylight savings time or drifting and getting adjusted?)
Actually I'm wondering if that could lead to overwriting previous files, if going backwards 1h because of DST and you have e.g. "rotate-localtime minute". That could happen if the timestamp is part of the filename instead of an ever increasing number (not sure if that is the case, maybe also worth documenting here if it isn't in the docs yet).
File src/osmo_server_network.c:
https://gerrit.osmocom.org/c/osmo-pcap/+/39158/comment/082cef03_26f31753?us… :
PS3, Line 231: /* Checks if we are in a new record period since last time we wrote to a pcap, to know (return true) whether a new pcap file needs to be opened.
cosmetic: very long line
File src/osmo_server_vty.c:
https://gerrit.osmocom.org/c/osmo-pcap/+/39158/comment/f903f301_613af12d?us… :
PS3, Line 219: frecuency
frequency
https://gerrit.osmocom.org/c/osmo-pcap/+/39158/comment/f5948c45_38536a53?us… :
PS3, Line 246: max_mod = 4294967295;
(that will take a while :D)
is there some constant we could use instead of this magic number? Same in DEFUN(cfg_server_rotate_localtime_mod_n.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39158?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Idf17a161c17050bb62793a82e39179a093b35f73
Gerrit-Change-Number: 39158
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 18 Dec 2024 10:41:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/39162?usp=email )
Change subject: construct: add length steps to StripTrailerAdapter
......................................................................
construct: add length steps to StripTrailerAdapter
The class StripTrailerAdapter allows to remove trailing bytes that
match a specified value from the encoding result of a sub-construct.
The result is always the shortest possible remainder of bytes that
do not match the secified value.
Unfortunately there are specifications that explicitly require the
length of the result to fit into a limited set of possible length
values. For example: A result may be either one byte or three byte
long. To cover those cases as well, let's add an array parameter
where we can configure the allowed length values of the encoding
result.
Related: OS#6679
Change-Id: I86df064fa41db85923eeb0d83cc399504fdd4488
---
M src/osmocom/construct.py
M tests/test_construct.py
2 files changed, 41 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/62/39162/1
diff --git a/src/osmocom/construct.py b/src/osmocom/construct.py
index c69b44f..1f5bd45 100644
--- a/src/osmocom/construct.py
+++ b/src/osmocom/construct.py
@@ -413,16 +413,20 @@
Encoder removes all trailing bytes matching the default_value
Decoder pads input data up to total_length with default_value
+ In case the encoding restricts the length of the result to specific values, the API user may set those restrictions
+ using the steps parameter. (e.g. encoded result must be either 1 or 3 byte long, steps would be set to [1,3])
+
This is used in constellations like "FlagsEnum(StripTrailerAdapter(GreedyBytes, 3), ..."
where you have a bit-mask that may have 1, 2 or 3 bytes, depending on whether or not any
of the LSBs are actually set.
"""
- def __init__(self, subcon, total_length:int, default_value=b'\x00', min_len=1):
+ def __init__(self, subcon, total_length:int, default_value=b'\x00', min_len=1, steps:[int]=[]):
super().__init__(subcon)
assert len(default_value) == 1
self.total_length = total_length
self.default_value = default_value
self.min_len = min_len
+ self.steps = steps
def _decode(self, obj, context, path):
assert isinstance(obj, bytes)
@@ -435,9 +439,17 @@
assert isinstance(obj, int)
obj = obj.to_bytes(self.total_length, 'big')
# remove trailing bytes if they are zero
+
+ obj_step_aligned = obj
while len(obj) > self.min_len and obj[-1] == self.default_value[0]:
obj = obj[:-1]
- return obj
+ if len(obj) in self.steps:
+ obj_step_aligned = obj
+
+ if self.steps == []:
+ return obj
+ else:
+ return obj_step_aligned;
def filter_dict(d, exclude_prefix='_'):
diff --git a/tests/test_construct.py b/tests/test_construct.py
index bcb2cf8..e4234db 100755
--- a/tests/test_construct.py
+++ b/tests/test_construct.py
@@ -90,13 +90,39 @@
final_application=0x0200, global_service=0x0100,
receipt_generation=0x80, ciphered_load_file_data_block=0x40,
contactless_activation=0x20, contactless_self_activation=0x10)
+ PrivilegesSteps = FlagsEnum(StripTrailerAdapter(GreedyBytes, 3, steps = [1,3]), security_domain=0x800000,
+ dap_verification=0x400000,
+ delegated_management=0x200000, card_lock=0x100000,
+ card_terminate=0x080000, card_reset=0x040000,
+ cvm_management=0x020000, mandated_dap_verification=0x010000,
+ trusted_path=0x8000, authorized_management=0x4000,
+ token_management=0x2000, global_delete=0x1000,
+ global_lock=0x0800, global_registry=0x0400,
+ final_application=0x0200, global_service=0x0100,
+ receipt_generation=0x80, ciphered_load_file_data_block=0x40,
+ contactless_activation=0x20, contactless_self_activation=0x10)
examples = ['00', '80', '8040', '400010']
- def test_examples(self):
+ def test_encdec(self):
for e in self.examples:
dec = self.Privileges.parse(h2b(e))
reenc = self.Privileges.build(dec)
self.assertEqual(e, b2h(reenc))
+ def test_enc(self):
+ enc = self.Privileges.build({'dap_verification' : True})
+ self.assertEqual(b2h(enc), '40')
+ enc = self.Privileges.build({'dap_verification' : True, 'global_service' : True})
+ self.assertEqual(b2h(enc), '4001')
+ enc = self.Privileges.build({'dap_verification' : True, 'global_service' : True, 'contactless_self_activation' : True})
+ self.assertEqual(b2h(enc), '400110')
+
+ enc = self.PrivilegesSteps.build({'dap_verification' : True})
+ self.assertEqual(b2h(enc), '40')
+ enc = self.PrivilegesSteps.build({'dap_verification' : True, 'global_service' : True})
+ self.assertEqual(b2h(enc), '400100')
+ enc = self.PrivilegesSteps.build({'dap_verification' : True, 'global_service' : True, 'contactless_self_activation' : True})
+ self.assertEqual(b2h(enc), '400110')
+
class TestAdapters(unittest.TestCase):
def test_dns_adapter(self):
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/39162?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I86df064fa41db85923eeb0d83cc399504fdd4488
Gerrit-Change-Number: 39162
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, osmith, pespin.
Hello Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcap/+/39158?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: pcap-server: Make rotate-localtime feature configurable through VTY
......................................................................
pcap-server: Make rotate-localtime feature configurable through VTY
Related: SYS#7100
Change-Id: Idf17a161c17050bb62793a82e39179a093b35f73
---
M .gitignore
M configure.ac
M doc/manuals/chapters/server.adoc
M include/osmo-pcap/osmo_pcap_server.h
M src/osmo_server_main.c
M src/osmo_server_network.c
M src/osmo_server_vty.c
M tests/Makefile.am
A tests/rotate_localtime/Makefile.am
A tests/rotate_localtime/rotate_localtime_test.c
A tests/rotate_localtime/rotate_localtime_test.err
A tests/rotate_localtime/rotate_localtime_test.ok
M tests/testsuite.at
13 files changed, 1,704 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/58/39158/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39158?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Idf17a161c17050bb62793a82e39179a093b35f73
Gerrit-Change-Number: 39158
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39158?usp=email )
Change subject: pcap-server: Make rotate-localtime feature configurable through VTY
......................................................................
Patch Set 2:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39158?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: Idf17a161c17050bb62793a82e39179a093b35f73
Gerrit-Change-Number: 39158
Gerrit-PatchSet: 2
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-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 17 Dec 2024 15:13:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libgtpnl/+/39160?usp=email )
Change subject: dev_create: support returning -EEXIST
......................................................................
Patch Set 2:
(1 comment)
File src/gtp-rtnl.c:
https://gerrit.osmocom.org/c/libgtpnl/+/39160/comment/b2efcac9_cd66cfd9?usp… :
PS1, Line 149: if (rc < 0 && errno == EEXIST)
> why not doing this for any kind of error returned from netlink?
Done
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/39160?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: Ib99bd8eed854014a5c9118c23e4058a41f3145f2
Gerrit-Change-Number: 39160
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 17 Dec 2024 14:09:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge, osmith, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libgtpnl/+/39160?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by pespin, Verified+1 by Jenkins Builder
Change subject: dev_create: support returning -EEXIST
......................................................................
dev_create: support returning -EEXIST
Check if netlink has set errno to EEXIST and return -EEXIST in
gtp_dev_create() and gtp_dev_create_sgsn(). Users of the function can
use this to delete the GTP device and try creating it again.
Related: SYS#7240
Change-Id: Ib99bd8eed854014a5c9118c23e4058a41f3145f2
---
M src/gtp-rtnl.c
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/60/39160/2
--
To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/39160?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libgtpnl
Gerrit-Branch: master
Gerrit-Change-Id: Ib99bd8eed854014a5c9118c23e4058a41f3145f2
Gerrit-Change-Number: 39160
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge, osmith, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/39161?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by pespin, Verified+1 by Jenkins Builder
Change subject: upf_gtp: automatically delete old gtp devices
......................................................................
upf_gtp: automatically delete old gtp devices
If osmo-upf crashes without running the destructor, we may have a
leftover gtp device. This can be simulated with "killall -9 osmo-upf".
Clean it up automatically.
Related: SYS#7240
Depends: libgtpnl Ib99bd8eed854014a5c9118c23e4058a41f3145f2
Change-Id: I7bb5c1ed51f4e05964688ee77b8de77fd3c0f345
---
M src/osmo-upf/upf_gtp.c
1 file changed, 14 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/61/39161/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/39161?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I7bb5c1ed51f4e05964688ee77b8de77fd3c0f345
Gerrit-Change-Number: 39161
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/39155?usp=email )
Change subject: jobs/ttcn3-testsuites: adjust timer for bts
......................................................................
jobs/ttcn3-testsuites: adjust timer for bts
BTS testsuites tend to fail with timeouts on heavy loads. Group them in
a timeslot where jenkins nodes are otherwise not busy according to
stats in grafana to hopefully make the test results more stable. Once
we can replace faketrx with a rewrite (OS#6672), this should not be
necessary anymore.
Change-Id: If25009a5b9215a0f51381529e26bfb3ba2303ae2
---
M jobs/ttcn3-testsuites.yml
1 file changed, 15 insertions(+), 9 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml
index 92b7e6d..5d44718 100644
--- a/jobs/ttcn3-testsuites.yml
+++ b/jobs/ttcn3-testsuites.yml
@@ -26,8 +26,6 @@
timer: H 03 * * *
- nplab-sua-test: # ~1 min
timer: H 03 * * *
- - ttcn3-bts-test: # ~135 min
- timer: H 03 * * *
- ttcn3-remsim-test: # ~6 min
timer: H 03 * * *
- ttcn3-sccp-test: # ~2 min
@@ -68,8 +66,6 @@
timer: H 04 * * *
- ttcn3-msc-test-latest: # ~35 min
timer: H 04 * * *
- - ttcn3-bts-test-latest: # ~135 min
- timer: H 05 * * *
- ttcn3-remsim-test-latest: # ~6 min
timer: H 05 * * *
- ttcn3-sccp-test-latest: # ~2 min
@@ -96,15 +92,25 @@
# With LIBOSMO_IO_BACKEND=IO_URING (OS#6357)
- ttcn3-msc-test-io_uring: # ~35 min
- timer: H 06 * * *
+ timer: H 05 * * *
- ttcn3-gbproxy-test-io_uring: # ~15 min
- timer: H 06 * * *
+ timer: H 05 * * *
+
+ # BTS testsuites tend to fail with timeouts on heavy loads. Group them
+ # here in a timeslot where jenkins nodes are otherwise not busy according
+ # to stats in grafana to hopefully make the test results more stable.
+ # Once we can replace faketrx with a rewrite (OS#6672), this should not
+ # be necessary anymore.
- ttcn3-bts-test-io_uring: # ~135 min
- timer: H 06 * * *
+ timer: 0 06 * * *
+ - ttcn3-bts-test: # ~135 min
+ timer: 0 06 * * *
+ - ttcn3-bts-test-latest: # ~135 min
+ timer: 0 06 * * *
+ - ttcn3-bts-test-asan: # ~135 min
+ timer: 0 06 * * *
# With sanitizer (OS#5301)
- - ttcn3-bts-test-asan: # ~135 min
- timer: H 07 * * *
- ttcn3-gbproxy-test-asan: # ~15 min
timer: H 07 * * *
- ttcn3-msc-test-asan: # ~35 min
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39155?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: If25009a5b9215a0f51381529e26bfb3ba2303ae2
Gerrit-Change-Number: 39155
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>