Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37955?usp=email )
Change subject: Introduce initial metrics support
......................................................................
Patch Set 4:
(4 comments)
Commit Message:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37955/comment/5104472b_25aa… :
PS4, Line 2: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de>
Not sure why/how git changed the Author, I'll revert this.
File include/s1gw_metrics.hrl:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37955/comment/5b0ba42b_a1ad… :
PS3, Line 9: S1GW_CTR_S1AP_PROXY_IN_PKT
This one was not referenced anywhere, so I removed it.
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37955/comment/b97c48bb_6bb0… :
PS3, Line 12: S1GW_CTR_S1AP_PROXY_IN_PKT_UNMODIFIED
I moved this one down below and renamed to `S1GW_CTR_S1AP_PROXY_OUT_PKT_FWD_UNMODIFIED`. The point is that it's not related to the input path, but to the output path.
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37955/comment/e6a374e0_7075… :
PS3, Line 14: S1GW_CTR_S1AP_PROXY_IN_PKT_ERAB_SETUP_REQ_FAILED
Renamed to `S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ERAB_SETUP_RSP`, see below.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37955?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I952e198238384dca4be94f91a01d7cfff0a1471f
Gerrit-Change-Number: 37955
Gerrit-PatchSet: 4
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-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 26 Sep 2024 07:52:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: laforge, lynxis lazus, pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37924?usp=email )
Change subject: s1ap_proxy: Support replying errors
......................................................................
Patch Set 6:
(2 comments)
Patchset:
PS2:
> So what is the status here? Why do we have no unit nor functional/integration tests for this patch? […]
Done. I added a unit test and also developed a TTCN-3 testcase.
Patchset:
PS4:
> Please do whatever you deem necessary so it can finally get merged.
I ended up extending the idea and reworking the patch significantly:
* `s1ap_proxy:proc` (former `s1ap_proxy:handle_pdu`) now returns a forwarding action:
* `{forward, binary()}` -- forward to the other peer,
* `{reply, binary()}` -- reply to the sending peer.
* I don't see a use case for forwarding something and replying to the sending peer at the same time, so this is no longer possible. We can re-introduce this if needed in form of `[{forward, binary()}, {reply, binary()}]`, but for now let's avoid additional complexity without the need for such functionality.
* `handle_pdu/3` becomes `handle_pdu/2` and does not accept the raw binary anymore, it can simply return `forward` alone to indicate the the binary blob should be forwarded as-is (handled in `proc/2`).
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37924?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I242e84fb09b00f4794b6e1aa770f348a0e60aea4
Gerrit-Change-Number: 37924
Gerrit-PatchSet: 6
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: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 26 Sep 2024 07:47:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38284?usp=email )
Change subject: Cosmetic: testenv: fix line length
......................................................................
Cosmetic: testenv: fix line length
Run "ruff format", so there isn't a diff anymore when running it on
future patches.
Change-Id: I766a07c6d54d0da11ad47acce1fc07b4b3a4801b
---
M _testenv/testenv/podman.py
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index 53806a4..0ecf12d 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -132,8 +132,7 @@
def exec_cmd(cmd, podman_opts=[], cwd=None, env={}, *args, **kwargs):
if not container_name:
- raise RuntimeError("Attempting to execute a command in podman, but the"
- f" container isn't running anymore: {cmd}")
+ raise RuntimeError(f"Attempting to execute a command in podman, but the container isn't running anymore: {cmd}")
podman_opts = list(podman_opts)
podman_opts += generate_env_podman(env)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38284?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I766a07c6d54d0da11ad47acce1fc07b4b3a4801b
Gerrit-Change-Number: 38284
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(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-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38285?usp=email )
Change subject: testenv: improve --config argument parsing
......................................................................
testenv: improve --config argument parsing
* Support using wildcards for the config names via fnmatch as that makes
it much easier to run the ggsn tests against all osmo-ggsn config
variations, and update the examples in "testenv.py -h" to illustrate
this.
* Fix that it didn't complain about an invalid --config argument, as
long as there was a valid --config argument before it.
* Let raise_error_config_arg only output the invalid --config argument
instead of all of them.
* Complain if "--config all" is used in combination with another
--config argument.
* Sort testenv*.cfg files found alphabetically, so they are always
executed in the same order.
Change-Id: I66b976b0332be523c084a6b5d38d0f62134b495d
---
M _testenv/testenv/__init__.py
M _testenv/testenv/testdir.py
M _testenv/testenv/testenv_cfg.py
3 files changed, 31 insertions(+), 13 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 87485c7..2af83ed 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -43,7 +43,9 @@
" ./testenv.py run mgw --test TC_crcx\n"
" ./testenv.py run mgw --podman --binary-repo osmocom:latest\n"
" ./testenv.py run mgw --io-uring\n"
- " ./testenv.py run bts --config oml\n",
+ " ./testenv.py run ggsn --config open5gs\n"
+ " ./testenv.py run ggsn --config 'osmo_ggsn_v4_only'\n"
+ " ./testenv.py run ggsn --config 'osmo_ggsn*'\n",
)
sub = parser.add_subparsers(title="action", dest="action", required=True)
@@ -77,7 +79,7 @@
"-c",
"--config",
action="append",
- help="which testenv.cfg to use, in case the testsuite has multiple (e.g. generic|oml|hopping for bts)",
+ help="which testenv.cfg to use (supports * wildcards via fnmatch)",
)
group.add_argument("-i", "--io-uring", action="store_true", help="set LIBOSMO_IO_BACKEND=IO_URING")
diff --git a/_testenv/testenv/testdir.py b/_testenv/testenv/testdir.py
index ee698fff..aa0ba47 100644
--- a/_testenv/testenv/testdir.py
+++ b/_testenv/testenv/testdir.py
@@ -28,7 +28,7 @@
prefix = f"testenv-{testenv.args.testsuite}-"
if testenv.args.config:
- prefix += f"{'-'.join(testenv.args.config)}-"
+ prefix += f"{'-'.join(testenv.args.config).replace('*','')}-"
if testenv.args.binary_repo:
prefix += f"{testenv.args.binary_repo.replace(':','-')}-"
prefix += datetime.datetime.now().strftime("%Y%m%d-%H%M")
diff --git a/_testenv/testenv/testenv_cfg.py b/_testenv/testenv/testenv_cfg.py
index 9642ae8..ba830a1 100644
--- a/_testenv/testenv/testenv_cfg.py
+++ b/_testenv/testenv/testenv_cfg.py
@@ -1,6 +1,7 @@
# Copyright 2024 sysmocom - s.f.m.c. GmbH
# SPDX-License-Identifier: GPL-3.0-or-later
import configparser
+import fnmatch
import glob
import logging
import os.path
@@ -134,14 +135,14 @@
get_vty_host_port(cfg, path)
-def raise_error_config_arg(glob_result):
+def raise_error_config_arg(glob_result, config_arg):
valid = []
for path in glob_result:
basename = os.path.basename(path)
if basename != "testenv.cfg":
valid += [basename.split("_", 1)[1].split(".", -1)[0]]
- msg = f"Invalid parameter for --config: {testenv.args.config}"
+ msg = f"Invalid parameter for --config: {config_arg}"
if valid:
msg += f" (valid: all, {', '.join(valid)})"
@@ -154,7 +155,7 @@
def find_configs():
dir_testsuite = os.path.join(testenv.testsuite.ttcn3_hacks_dir_src, testenv.args.testsuite)
pattern = os.path.join(dir_testsuite, "testenv*.cfg")
- ret = glob.glob(pattern)
+ ret = sorted(glob.glob(pattern))
if not ret:
logging.error(f"Missing testenv.cfg in: {dir_testsuite}")
@@ -185,6 +186,8 @@
def init():
global cfgs
+ cfgs_all = {}
+
config_paths = find_configs()
for path in config_paths:
@@ -201,14 +204,27 @@
handle_latest(cfg, path)
verify(cfg, path)
+ # No --config argument given, and there is only one testenv.cfg
if not testenv.args.config:
cfgs[basename] = cfg
- continue
+ return
- for config_arg in testenv.args.config:
- if config_arg == "all" or f"testenv_{config_arg}.cfg" == basename:
- cfgs[basename] = cfg
- break
+ cfgs_all[basename] = cfg
- if not cfgs:
- raise_error_config_arg(config_paths)
+ # Select configs based on --config argument(s)
+ for config_arg in testenv.args.config:
+ if config_arg == "all":
+ if len(testenv.args.config) != 1:
+ raise testenv.NoTraceException("Can't use multiple --config arguments if one of them is 'all'")
+ cfgs = cfgs_all
+ return
+
+ matched = False
+ for basename in cfgs_all:
+ pattern = f"testenv_{config_arg}.cfg"
+ if fnmatch.fnmatch(basename, pattern):
+ matched = True
+ cfgs[basename] = cfgs_all[basename]
+
+ if not matched:
+ raise_error_config_arg(config_paths, config_arg)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38285?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I66b976b0332be523c084a6b5d38d0f62134b495d
Gerrit-Change-Number: 38285
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(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-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38283?usp=email )
Change subject: ruff.toml: new file
......................................................................
ruff.toml: new file
Add a file in the root dir of the repository to allow running
"ruff format" in order to auto-format the code with expected max line
length, PEP-8, etc.
Replace _testenv/pyproject.toml with .ruff.toml in the root directory of
the repository, so we can exclude "compare-results.py" which doesn't
follow that code style. Otherwise it would get formatted too when
running "ruff format" in the root dir of the repository.
Change-Id: I97ed1ececba85008ca754cf91bf46522e168a894
---
A .ruff.toml
D _testenv/pyproject.toml
2 files changed, 4 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/.ruff.toml b/.ruff.toml
new file mode 100644
index 0000000..ad8c0b5
--- /dev/null
+++ b/.ruff.toml
@@ -0,0 +1,4 @@
+line-length = 120
+exclude = [
+ "compare-results.py",
+]
diff --git a/_testenv/pyproject.toml b/_testenv/pyproject.toml
deleted file mode 100644
index 3719b74..0000000
--- a/_testenv/pyproject.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[tool.ruff]
-line-length=120
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38283?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I97ed1ececba85008ca754cf91bf46522e168a894
Gerrit-Change-Number: 38283
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(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-Reviewer: pespin <pespin(a)sysmocom.de>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38287?usp=email )
Change subject: test_construct: move testvectors inside unittest class
......................................................................
test_construct: move testvectors inside unittest class
The unittest class TestGreedyInt has test vectors declared outside
that class, but no other class makes use of this test vectors, so
let's move them into TestGreedyInt, where they should be.
Related: SYS#7094
Change-Id: Ida24295091efd30406e9a354ca5854150127b3d4
---
M tests/test_construct.py
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/tests/test_construct.py b/tests/test_construct.py
index 9110144..c2aeece 100755
--- a/tests/test_construct.py
+++ b/tests/test_construct.py
@@ -6,21 +6,21 @@
# pylint: disable=no-name-in-module
from construct import FlagsEnum
-tests = [
+class TestGreedyInt(unittest.TestCase):
+ tests = [
( b'\x80', 0x80 ),
( b'\x80\x01', 0x8001 ),
( b'\x80\x00\x01', 0x800001 ),
( b'\x80\x23\x42\x01', 0x80234201 ),
- ]
+ ]
-class TestGreedyInt(unittest.TestCase):
def test_GreedyInt_decoder(self):
gi = GreedyInteger()
- for t in tests:
+ for t in self.tests:
self.assertEqual(gi.parse(t[0]), t[1])
def test_GreedyInt_encoder(self):
gi = GreedyInteger()
- for t in tests:
+ for t in self.tests:
self.assertEqual(t[0], gi.build(t[1]))
pass
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38287?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: Ida24295091efd30406e9a354ca5854150127b3d4
Gerrit-Change-Number: 38287
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>