Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40324?usp=email )
Change subject: stp: Split M3UA TCP tests into its own testenv config
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40324?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: I8123887755aa3253830b43407b4cc6b21142233c
Gerrit-Change-Number: 40324
Gerrit-PatchSet: 2
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: Mon, 19 May 2025 07:52:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40323?usp=email )
Change subject: stp: Initial split into several testenv config
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40323?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: I4ec8e1bbc8e71d8bd421dfbd5356bf1937ce2bb4
Gerrit-Change-Number: 40323
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: Mon, 19 May 2025 07:51:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40322?usp=email )
Change subject: stp: STP_Tests_IPA: Support configuring less than 8 AS(P)s
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40322?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: I820d295cd22fe824abf0f60bf6f1f0f3fd069d85
Gerrit-Change-Number: 40322
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 May 2025 07:47:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40309?usp=email )
Change subject: testenv: cfg: check for multiple spaces in lists
......................................................................
testenv: cfg: check for multiple spaces in lists
Pau ran into an unexpected bug while having entries in copy= separated
by multiple spaces ("copy=osmo-stp.cfg osmo-stp-m3ua.confmerge"):
[testenv][m3ua] + ['cp', '-a', 'osmo-stp.cfg', '', 'osmo-stp-m3ua.confmerge', '/tmp/testenv-stp-m3ua-20250516-1349-e4103924-bfvi_syt/stp']
cp: cannot stat '': No such file or directory
Catch this early and print a more useful error:
[testenv] /home/user/code/osmo-dev/src/osmo-ttcn3-hacks/stp/testenv.cfg: copy= in section [stp] has multiple spaces:
[testenv] "osmo-stp.cfg osmo-stp-m3ua.confmerge"
[testenv] Please separate elements with only one space.
Change-Id: Ie47cf5482ba479457a662759ce87611a7c41e29c
---
M _testenv/testenv/testenv_cfg.py
1 file changed, 11 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/_testenv/testenv/testenv_cfg.py b/_testenv/testenv/testenv_cfg.py
index fc28d84..e517a02 100644
--- a/_testenv/testenv/testenv_cfg.py
+++ b/_testenv/testenv/testenv_cfg.py
@@ -139,6 +139,10 @@
"packages": "package",
"programs": "program",
}
+ keys_lists = [
+ "copy",
+ "package",
+ ]
if "testsuite" not in cfg:
logging.error(f"{path}: missing [testsuite] section")
@@ -179,6 +183,13 @@
logging.error("If this is on purpose, set make=no.")
exit_error_readme()
+ for key in keys_lists:
+ if key in cfg[section] and " " in cfg[section][key]:
+ logging.error(f"{path}: {key}= in section [{section}] has multiple spaces:")
+ logging.error(f' "{cfg[section][key]}"')
+ logging.error("Please separate elements with only one space.")
+ sys.exit(1)
+
get_vty_host_port(cfg, path)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40309?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: Ie47cf5482ba479457a662759ce87611a7c41e29c
Gerrit-Change-Number: 40309
Gerrit-PatchSet: 2
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>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40316?usp=email )
Change subject: testenv: qemu: add modules.alias
......................................................................
testenv: qemu: add modules.alias
Fix loading the sctp module, which is needed to run osmo-epdg in QEMU:
modprobe: can't load module libcrc32c (kernel/lib/libcrc32c.ko): unknown symbol in module, or unknown parameter
Change-Id: I475176734b994e7abda63badda0983ab6534b682
---
M _testenv/data/scripts/qemu/qemu_functions.sh
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/_testenv/data/scripts/qemu/qemu_functions.sh b/_testenv/data/scripts/qemu/qemu_functions.sh
index a984ff9..efbdd2d 100755
--- a/_testenv/data/scripts/qemu/qemu_functions.sh
+++ b/_testenv/data/scripts/qemu/qemu_functions.sh
@@ -41,7 +41,9 @@
| sort -u \
| cut -d ' ' -f 2)"
- qemu_initrd_add_file $files
+ qemu_initrd_add_file \
+ $files \
+ /usr/lib/modules/"$kernel"/modules.alias
# Save the list of modules
for i in $@; do
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40316?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: I475176734b994e7abda63badda0983ab6534b682
Gerrit-Change-Number: 40316
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/+/40318?usp=email )
Change subject: testenv: qemu_initrd_add_bin: support adding so
......................................................................
testenv: qemu_initrd_add_bin: support adding so
Erlang has its own library loading mechanism, so we need to explicitly
add the depending libraries to the initramfs instead of just pointing at
binaries.
Change-Id: I1b9f06e7bff22b9260fbe0bd765177a25e97b557
---
M _testenv/data/scripts/qemu/qemu_functions.sh
1 file changed, 15 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/_testenv/data/scripts/qemu/qemu_functions.sh b/_testenv/data/scripts/qemu/qemu_functions.sh
index efbdd2d..c1ef8b8 100755
--- a/_testenv/data/scripts/qemu/qemu_functions.sh
+++ b/_testenv/data/scripts/qemu/qemu_functions.sh
@@ -51,19 +51,27 @@
done
}
-# Add binaries with depending libraries
-# $@: paths to binaries
+# Add binaries/libraries with depending libraries
+# $@: paths to binaries/libraries
qemu_initrd_add_bin() {
local bin
local bin_path
local file
for bin in "$@"; do
- local bin_path="$(which "$bin")"
- if [ -z "$bin_path" ]; then
- echo "ERROR: file not found: $bin"
- exit 1
- fi
+ local bin_path
+ case "$bin" in
+ /*)
+ bin_path="$bin"
+ ;;
+ *)
+ bin_path="$(which "$bin")"
+ if [ -z "$bin_path" ]; then
+ echo "ERROR: file not found: $bin"
+ exit 1
+ fi
+ ;;
+ esac
lddtree_out="$(lddtree -l "$bin_path")"
if [ -z "$lddtree_out" ]; then
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40318?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: I1b9f06e7bff22b9260fbe0bd765177a25e97b557
Gerrit-Change-Number: 40318
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/+/40317?usp=email )
Change subject: testenv: support qemu=required in testenv.cfg
......................................................................
testenv: support qemu=required in testenv.cfg
Make it possible to set qemu=required in addition to the existing
possibility of qemu=optional in the testenv configs and verify that
either the debian kernel (from the podman container) or a custom kernel
gets used for such configs.
This is in preparation for adding a testenv config for osmo-epdg, which
uses kernel-gtp and unlike osmo-ggsn doesn't have userspace fallback
code. With testenv using the hosts gtp kernel device for this is not
supported (it would have several downsides anyway, such as not being in
control what exact kernel version is used leading to different test
outcomes for different users, not being easily able to compare different
kernel versions, having a harder time getting debug logs from the module
etc.).
Change-Id: If4abdf1f9248fee0915603a9b3c6e3e5e5083057
---
M _testenv/README.md
M _testenv/testenv/testenv_cfg.py
2 files changed, 21 insertions(+), 14 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/_testenv/README.md b/_testenv/README.md
index 66158c4..1b62d65 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -122,10 +122,11 @@
* `vty_host=`: optionally set the VTY host for the SUT component to be used
when obtaining a talloc report. If this is not set, `127.0.0.1` is used.
-* `qemu=`: set to `optional` to allow running this test component in QEMU.
- Additional logic must be added to build an initrd with the test component and
- actually run it in QEMU, this is done by sourcing `qemu_functions.sh` and
- using functions from there. See the `ggsn` testsuite for reference.
+* `qemu=`: set to `optional`/`required` to allow/require running this test
+ component in QEMU. Additional logic must be added to build an initrd with the
+ test component and actually run it in QEMU, this is done by sourcing
+ `qemu_functions.sh` and using functions from there. See the `ggsn` testsuite
+ for reference.
### Executables
diff --git a/_testenv/testenv/testenv_cfg.py b/_testenv/testenv/testenv_cfg.py
index 70d64c8..fc28d84 100644
--- a/_testenv/testenv/testenv_cfg.py
+++ b/_testenv/testenv/testenv_cfg.py
@@ -76,31 +76,37 @@
def verify_qemu_cfgs():
- """Check if -C or -K is set, but any of the selected configs can't run with
- QEMU."""
- if not testenv.args.kernel:
- return
+ """Check if passed -C or -K args make sense with the testenv configs."""
+ testsuite = testenv.args.testsuite
+ qemu_supported = False
+ qemu_required = False
for basename, cfg in cfgs.items():
- missing = True
-
for section in cfg.keys():
if "qemu" in cfg[section]:
- missing = False
+ qemu_supported = True
+ if cfg[section]["qemu"] == "required":
+ qemu_required = True
break
- if missing:
- testsuite = testenv.args.testsuite
+ if testenv.args.kernel and not qemu_supported:
logging.critical(f"{testsuite}/{basename}: doesn't support running in QEMU")
exit_error_readme()
+ if not testenv.args.kernel and qemu_required:
+ logging.error(f"{testsuite}/{basename}: {section} must run in QEMU")
+ logging.error("Use one of:")
+ logging.error(" -D, --debian-kernel")
+ logging.error(" -C, --custom-kernel")
+ exit_error_readme()
+
def verify_qemu_section(path, cfg, section):
"""Verify that qemu= has proper values."""
if "qemu" not in cfg[section]:
return
- valid = ["optional"]
+ valid = ["optional", "required"]
value = cfg[section]["qemu"]
if value not in valid:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40317?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: If4abdf1f9248fee0915603a9b3c6e3e5e5083057
Gerrit-Change-Number: 40317
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>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40310?usp=email )
Change subject: testenv: no python trace for setup script failures
......................................................................
testenv: no python trace for setup script failures
Do not print a python trace when a setup script fails, usually it is
unrelated and just clutters the output.
Change-Id: Icbec52befa268547906fdbe9b52bdbc9e94722e6
---
M _testenv/testenv/daemons.py
1 file changed, 2 insertions(+), 1 deletion(-)
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/daemons.py b/_testenv/testenv/daemons.py
index da8248e..d4804d0 100644
--- a/_testenv/testenv/daemons.py
+++ b/_testenv/testenv/daemons.py
@@ -75,7 +75,8 @@
if "setup" in section_data:
setup = section_data["setup"]
logging.info(f"Running {section} setup script")
- testenv.cmd.run(setup, cwd=cwd)
+ if testenv.cmd.run(setup, cwd=cwd, check=False).returncode:
+ raise testenv.NoTraceException(f"{section}: setup script failed")
def kill_process_tree(pid, ppids):
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40310?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: Icbec52befa268547906fdbe9b52bdbc9e94722e6
Gerrit-Change-Number: 40310
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>