osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38530?usp=email )
Change subject: testenv: osmo-dev: add hint for gen_makefile fail
......................................................................
testenv: osmo-dev: add hint for gen_makefile fail
When gen_makefile.py from osmo-dev fails, it is likely that the osmo-dev
git clone is outdated, for example if a new file with configure options
was added to osmo-dev.git and is now being used by testenv. Display a
hint for pulling this repository to the user.
Change-Id: Ia9ed23fa910876252093054f5f389865632c7593
---
M _testenv/testenv/osmo_dev.py
M _testenv/testenv/podman.py
2 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/38530/1
diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py
index 4dd581a..9a10462 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
import logging
import os
+import shlex
import sys
import testenv
import testenv.cmd
@@ -92,7 +93,12 @@
os.path.join(testenv.data_dir, "osmo-dev/osmo-bts-trx.opts"),
] + extra_opts
- testenv.cmd.run(cmd, cwd=get_osmo_dev_dir())
+ cwd = get_osmo_dev_dir()
+ if testenv.cmd.run(cmd, cwd=cwd, check=False).returncode:
+ logging.critical("gen_makefile.py from osmo-dev failed!")
+ logging.critical("Your osmo-dev.git clone might be outdated, try:")
+ logging.critical(f"$ git -C {shlex.quote(cwd)} pull")
+ sys.exit(1)
init_done = True
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index 683f468..faa1837 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -146,7 +146,7 @@
if isinstance(cmd, str):
cmd = ["sh", "-c", cmd]
- testenv.cmd.run(
+ return testenv.cmd.run(
["podman", "exec"] + podman_opts + [container_name] + cmd,
no_podman=True,
*args,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38530?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia9ed23fa910876252093054f5f389865632c7593
Gerrit-Change-Number: 38530
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38531?usp=email )
Change subject: testenv: remove dead code for [testsuite] prepare=
......................................................................
testenv: remove dead code for [testsuite] prepare=
Remove some WIP code that I intended to use for enabling the mongodb
repository before installing binary packages, to be able to dynamically
install mongodb from there. I solved it differently by just always
having mongodb in the podman image.
This was a dead code path because configs with prepare= in [testsuite]
are currently not valid, and therefore testenv refuses to use these
configs (see keys_valid_testsuite in testenv_cfg.py's verify()).
I have a different use case for running prepare= before running the
testsuite, to replace a module parameter in the testsuite's config. This
will be done in the next patch.
Change-Id: I9bed48612fad690f86017c298372dc6cea22b94b
---
M _testenv/testenv.py
M _testenv/testenv/testsuite.py
2 files changed, 0 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/38531/1
diff --git a/_testenv/testenv.py b/_testenv/testenv.py
index e1f1210..23a2922 100755
--- a/_testenv/testenv.py
+++ b/_testenv/testenv.py
@@ -38,11 +38,6 @@
testenv.testsuite.init()
testenv.testsuite.build()
- # Run prepare functions of testsuites (may enable extra repos)
- for cfg_name, cfg in testenv.testenv_cfg.cfgs.items():
- testenv.testenv_cfg.set_current(cfg_name)
- testenv.testsuite.run_prepare_script(cfg)
-
# Build all components first
if not testenv.args.binary_repo:
for cfg_name, cfg in testenv.testenv_cfg.cfgs.items():
diff --git a/_testenv/testenv/testsuite.py b/_testenv/testenv/testsuite.py
index 7fc4344..601f339 100644
--- a/_testenv/testenv/testsuite.py
+++ b/_testenv/testenv/testsuite.py
@@ -205,15 +205,6 @@
format_log_files(cfg)
-def run_prepare_script(cfg):
- section_data = cfg["testsuite"]
- if "prepare" not in section_data:
- return
-
- logging.info("Running testsuite prepare script")
- testenv.cmd.run(section_data["prepare"])
-
-
def get_current_test():
path = os.path.join(testenv.testdir.testdir, "testsuite/.current_test")
try:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38531?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9bed48612fad690f86017c298372dc6cea22b94b
Gerrit-Change-Number: 38531
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38532?usp=email )
Change subject: testenv: add proper [testsuite] prepare= support
......................................................................
testenv: add proper [testsuite] prepare= support
Support using prepare= in the [testsuite] section to e.g. change module
parameters:
[testsuite]
prepare=sed -i 's/mp_my_parameter := false/mp_my_parameter := true/' Testsuite.cfg
Move the execution time of prepare and clean scripts in
testdir.prepare() after the testsuite config has been copied to the
testdir, so it can be modified by the prepare script.
Change-Id: Ia78a4eba061e5e070f156f75eae1dfa4cede1ee3
---
M _testenv/README.md
M _testenv/testenv/testdir.py
M _testenv/testenv/testenv_cfg.py
3 files changed, 23 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/32/38532/1
diff --git a/_testenv/README.md b/_testenv/README.md
index 3fed9c9..bd102a8 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -70,6 +70,10 @@
directory, useful for include files mentioned in the config. Multiple values
are separated by spaces.
+* `prepare=`: optional script to run before staring the testsuite (after files
+ are copied to the test directory). This can be used to change module
+ parameters in the testsuite's config.
+
* `clean=`: optional script to run before running the testsuite and on exit.
This can be used to clean up network devices for example, or to fix name
collisions when running a test with multiple configs
diff --git a/_testenv/testenv/testdir.py b/_testenv/testenv/testdir.py
index aa0ba47..88a2dca 100644
--- a/_testenv/testenv/testdir.py
+++ b/_testenv/testenv/testdir.py
@@ -94,16 +94,6 @@
mode = 755 if os.access(path, os.X_OK) else 644
testenv.cmd.run(["install", f"-Dm{mode}", path, path_dest])
- if "clean" in section_data:
- logging.info(f"Running {section} clean script (reason: prepare)")
- clean_scripts[section] = section_data["clean"]
- env = {"TESTENV_CLEAN_REASON": "prepare"}
- testenv.cmd.run(section_data["clean"], cwd=section_dir, env=env)
-
- if "prepare" in section_data:
- logging.info(f"Running {section} prepare script")
- testenv.cmd.run(section_data["prepare"], cwd=section_dir)
-
# Referenced in testsuite cfgs: *.default
pattern = os.path.join(testsuite_dir, "*.default")
for path in glob.glob(pattern):
@@ -147,6 +137,24 @@
]
)
+ # Run prepare and clean scripts
+ for section in cfg:
+ if section in ["DEFAULT"]:
+ continue
+
+ section_data = cfg[section]
+ section_dir = os.path.join(testdir, section)
+
+ if "clean" in section_data:
+ logging.info(f"Running {section} clean script (reason: prepare)")
+ clean_scripts[section] = section_data["clean"]
+ env = {"TESTENV_CLEAN_REASON": "prepare"}
+ testenv.cmd.run(section_data["clean"], cwd=section_dir, env=env)
+
+ if "prepare" in section_data:
+ logging.info(f"Running {section} prepare script")
+ testenv.cmd.run(section_data["prepare"], cwd=section_dir)
+
def clean():
"""Don't leave behind an empty testdir_topdir, e.g. if testenv.py aborted
diff --git a/_testenv/testenv/testenv_cfg.py b/_testenv/testenv/testenv_cfg.py
index ea25614..fefaf5c 100644
--- a/_testenv/testenv/testenv_cfg.py
+++ b/_testenv/testenv/testenv_cfg.py
@@ -109,6 +109,7 @@
"clean",
"config",
"copy",
+ "prepare",
"program",
]
keys_valid_component = [
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38532?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia78a4eba061e5e070f156f75eae1dfa4cede1ee3
Gerrit-Change-Number: 38532
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38528?usp=email )
Change subject: hnbgw: Split ConnHdlr component code to its own file
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38528?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3a58c27a7472eea2421a45c31ac0145eb57a1f7e
Gerrit-Change-Number: 38528
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 25 Oct 2024 09:36:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37964?usp=email )
Change subject: pfcp_peer: do not route incoming PDUs without SEID
......................................................................
Patch Set 4:
(1 comment)
This change is ready for review.
File src/pfcp_peer.erl:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37964/comment/ae4d5fe2_840c… :
PS1, Line 233: ?LOG_NOTICE("Rx unexpected PFCP PDU: ~p", [PDU])
> Acknowledged
Going back to this idea, I checked 3GPP TS 29.244 and here is what it states:
```
7.6.4 Unknown PFCP Message
If a PFCP entity receives a message with an unknown Message Type value,
it shall silently discard the message.
7.6.5 Unexpected PFCP Message
If a PFCP entity receives an unexpected request message, for example a known
message that is sent over an interface for which the message is not defined,
or a message that is sent over an interface for which the message is defined,
but the direction is incorrect, then the PFCP entity shall silently discard
the message and shall log an error.
If a PFCP entity receives an unexpected response message which is not a request
message, for example a message for which there is no corresponding outstanding
request, it shall discard the message and may log an error.
```
In our specific case we implement only a limited subset of PFCP procedures/messages, and I am not sure if the rules described in 7.6.4-5 apply to not supported messages. From the spec. point of view we shall implement all procedures and the related messages.
Regardless of how we interpret the spec. requirements, implementing the response logic is a significant effort. The problem is that there exists no single message type to indicate an error, so we would need to craft a proper response for each unexpected request kind, which involves adding all mandatory IEs.
Taking the above into account, I suggest merging this patch as-is.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37964?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: I7d33ec4e883b217b2b4f65e4866d9365c32c753d
Gerrit-Change-Number: 37964
Gerrit-PatchSet: 4
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: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Oct 2024 19:47:32 +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>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38527?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: hnbgw: Support testenv
......................................................................
hnbgw: Support testenv
Dependency package asciidoc-base is installed due to nftables checking
for a2x presence during configure stage.
Change-Id: Id2bcc4e13881db01b8e4d9f1738355b8d779fa63
---
M _testenv/data/podman/Dockerfile
M _testenv/testenv/osmo_dev.py
A hnbgw/HNBGW_Tests-with-pfcp.cfg
M hnbgw/osmo-hnbgw-with-pfcp.cfg
M hnbgw/osmo-hnbgw.cfg
A hnbgw/testenv_generic.cfg
A hnbgw/testenv_with-pfcp.cfg
7 files changed, 86 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/38527/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38527?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id2bcc4e13881db01b8e4d9f1738355b8d779fa63
Gerrit-Change-Number: 38527
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder