Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40968?usp=email )
Change subject: testenv: don't use all RAM in 5gc testsuite build
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
Indeed I always run it with -j4. Also I need to clean up /tmp/testenv-* from time to time since tmpfs eats substantial part of my RAM ;)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40968?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: I1b9c9a2e3fa244337342e95457ac6d3a8caa0ae6
Gerrit-Change-Number: 40968
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 28 Aug 2025 12:38:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40970?usp=email )
Change subject: testenv: fix missing hasattr check
......................................................................
testenv: fix missing hasattr check
Fix that commands without a --distro argument ("./testenv.py init osmo-dev"
and "./testenv.py clean") fail with:
AttributeError: 'Namespace' object has no attribute 'distro'
Fixes: 8d21add6 ("testenv: check for --distro without --podman")
Change-Id: I138fda5f5807588428bba4eb1593b887fe7357c9
---
M _testenv/testenv/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/70/40970/1
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 7a453a5..44e0e92 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -279,7 +279,7 @@
def set_args_defaults():
"""Some defaults are set later, e.g. after verifying that --distro is not
being used without --podman."""
- if args.distro is None:
+ if hasattr(args, "distro") and args.distro is None:
args.distro = distro_default
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40970?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: I138fda5f5807588428bba4eb1593b887fe7357c9
Gerrit-Change-Number: 40970
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: fixeria, lynxis lazus, pespin.
Hello Jenkins Builder, fixeria, lynxis lazus,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-sgsn/+/40961?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review-1 by lynxis lazus, Verified-1 by Jenkins Builder
Change subject: Split Iu RANAP RAB PS act/deact over different layers
......................................................................
Split Iu RANAP RAB PS act/deact over different layers
Properly separate logic acting on objects vs logic building and
generating RANAP msg on the wire.
Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be
---
M include/osmocom/sgsn/gprs_ranap.h
M include/osmocom/sgsn/mmctx.h
M include/osmocom/sgsn/pdpctx.h
M src/sgsn/gprs_gmm.c
M src/sgsn/gprs_ranap.c
M src/sgsn/mmctx.c
M src/sgsn/pdpctx.c
M src/sgsn/sgsn_libgtp.c
8 files changed, 76 insertions(+), 41 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/61/40961/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/40961?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I98788468b7e50619cfd99b3aef2311bb601fb6be
Gerrit-Change-Number: 40961
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40968?usp=email )
Change subject: testenv: don't use all RAM in 5gc testsuite build
......................................................................
testenv: don't use all RAM in 5gc testsuite build
When building the 5gc testsuite with as many parallel jobs as CPU cores
are available (the default), on at least Pau's and my system, all RAM
gets consumed and the system becomes unusable. On other systems, an
out-of-memory killer might kill the compiler, which is also not great.
This can currently only be avoided if the user remembers to pass "-j4"
to testenv, to ensure that only 4 jobs run in parallel.
Add a new max_jobs_per_gb_ram= option to 5gc/testenv.cfg. Set it to 0.3,
so on e.g. systems with 15 GiB of RAM, we get 4 jobs as maximum.
Change-Id: I1b9c9a2e3fa244337342e95457ac6d3a8caa0ae6
---
M 5gc/testenv.cfg
M _testenv/README.md
M _testenv/testenv/__init__.py
M _testenv/testenv/testenv_cfg.py
M _testenv/testenv/testsuite.py
5 files changed, 71 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/68/40968/1
diff --git a/5gc/testenv.cfg b/5gc/testenv.cfg
index d70c135..876aacf 100644
--- a/5gc/testenv.cfg
+++ b/5gc/testenv.cfg
@@ -1,5 +1,6 @@
[testsuite]
titan_min=11.1.0
+max_jobs_per_gb_ram=0.3
program=C5G_Tests
config=C5G_Tests.cfg
copy=testsuite_prepare.sh
diff --git a/_testenv/README.md b/_testenv/README.md
index ecc8701..072dcd2 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -89,6 +89,11 @@
depending on when the script runs. The script will not run on crash if podman
is used, as the container gets shutdown beforehand.
+* `max_jobs_per_gb_ram=`: optional value that can be set to reduce the amount
+ of parallel jobs when compiling the testsuite. This is set in the 5gc
+ testsuite to avoid consuming the whole RAM and freezing (or possibly getting
+ killed from an out-of-memory daemon).
+
#### Component section
* `program=`: executable for starting a test component, may contain arguments.
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 7a453a5..84d8cac 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -125,6 +125,7 @@
"--jobs",
help="number of jobs to run simultaneously (default: nproc)",
type=int,
+ default=os.cpu_count(),
)
group.add_argument(
"-a",
diff --git a/_testenv/testenv/testenv_cfg.py b/_testenv/testenv/testenv_cfg.py
index c687d88..9edc102 100644
--- a/_testenv/testenv/testenv_cfg.py
+++ b/_testenv/testenv/testenv_cfg.py
@@ -5,9 +5,11 @@
import fnmatch
import glob
import logging
+import math
import os.path
import sys
import testenv
+import traceback
cfgs = {}
current = None
@@ -147,6 +149,64 @@
return get_titan_version(cfg)
+def verify_max_jobs_per_gb_ram(cfgs_all):
+ error = False
+ max_jobs_per_gb_ram = None
+
+ for cfg_name, cfg in cfgs_all.items():
+ cfg_max = cfg["testsuite"].get("max_jobs_per_gb_ram", None)
+ if cfg_max is not None:
+ if max_jobs_per_gb_ram is not None:
+ if cfg_max != max_jobs_per_gb_ram:
+ error = True
+ break
+ else:
+ max_jobs_per_gb_ram = cfg_max
+ elif max_jobs_per_gb_ram:
+ error = True
+ break
+
+ if not error:
+ return
+
+ logging.error("Found different max_jobs_per_gb_ram= values in testenv.cfg files of the same directory.")
+ logging.error("This is not supported, please fix it.")
+ sys.exit(1)
+
+
+def get_titan_make_job_count():
+ _, cfg = next(iter(cfgs.items()))
+ max_jobs_per_gb_ram = cfg["testsuite"].get("max_jobs_per_gb_ram", None)
+ max_jobs = None
+
+ if max_jobs_per_gb_ram:
+ try:
+ gb_ram = 0
+ with open("/proc/meminfo") as f:
+ line = f.readline()
+ # Parse e.g. "MemTotal: 15571604 kB"
+ if line.startswith("MemTotal:"):
+ gb_ram = int(line.split(" ")[-2]) / 1024 / 1024
+ logging.debug(f"Building with {round(gb_ram, 2)} GB of RAM")
+ max_jobs = math.floor(gb_ram * float(max_jobs_per_gb_ram))
+ if max_jobs < 1:
+ raise RuntimeError(f"max_jobs is invalid: max_jobs={max_jobs}, gb_ram={gb_ram}")
+
+ except Exception as ex:
+ traceback.print_exception(type(ex), ex, ex.__traceback__)
+ logging.error(f"Calculating max jobs with max_jobs_per_gb_ram={max_jobs_per_gb_ram} failed, assuming 4")
+ max_jobs = 4
+
+ if max_jobs and max_jobs < testenv.args.jobs:
+ logging.info(
+ f"Using only {max_jobs} jobs instead of {testenv.args.jobs} because of"
+ f" max_jobs_per_gb_ram={max_jobs_per_gb_ram} in testenv.cfg"
+ )
+ return max_jobs
+
+ return testenv.args.jobs
+
+
def verify_qemu_cfgs():
"""Check if passed -C or -K args make sense with the testenv configs."""
testsuite = testenv.args.testsuite
@@ -194,6 +254,7 @@
"prepare",
"program",
"titan_min",
+ "max_jobs_per_gb_ram",
]
keys_valid_component = [
"clean",
@@ -346,6 +407,8 @@
cfgs_all[basename] = cfg
+ verify_max_jobs_per_gb_ram(cfgs_all)
+
# Select configs based on --config argument(s)
for config_arg in testenv.args.config:
if config_arg == "all":
diff --git a/_testenv/testenv/testsuite.py b/_testenv/testenv/testsuite.py
index 0e00b0f..0007c57 100644
--- a/_testenv/testenv/testsuite.py
+++ b/_testenv/testenv/testsuite.py
@@ -58,8 +58,7 @@
logging.info(f"Building testsuite (eclipse-titan {titan_version}, {titan_reason})")
env = copy.copy(builddir_env)
- if testenv.args.jobs:
- env["PARALLEL_MAKE"] = f"-j{testenv.args.jobs}"
+ env["PARALLEL_MAKE"] = f"-j{testenv.testenv_cfg.get_titan_make_job_count()}"
testenv.cmd.run(["make", testenv.args.testsuite], cwd=testenv.ttcn3_hacks_dir, env=env)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40968?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: I1b9c9a2e3fa244337342e95457ac6d3a8caa0ae6
Gerrit-Change-Number: 40968
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/40953?usp=email )
Change subject: docs: fix authors line exceeding the page
......................................................................
docs: fix authors line exceeding the page
Fix that the authors get cut off as they exceed the page in the PDF
version. This can currently be seen here:
https://downloads.osmocom.org/docs/pysim/master/osmopysim-usermanual.pdf
Change-Id: Iacbba6c2f74bf2b9f96057e71bde017a11f703a8
---
M docs/conf.py
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/docs/conf.py b/docs/conf.py
index 8455007..9091878 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -21,6 +21,14 @@
copyright = '2009-2023 by Sylvain Munaut, Harald Welte, Philipp Maier, Supreeth Herle, Merlin Chlosta'
author = 'Sylvain Munaut, Harald Welte, Philipp Maier, Supreeth Herle, Merlin Chlosta'
+# PDF: Avoid that the authors list exceeds the page by inserting '\and'
+# manually as line break (https://github.com/sphinx-doc/sphinx/issues/6875)
+latex_elements = {
+ "maketitle":
+ r"""\author{Sylvain Munaut, Harald Welte, Philipp Maier, \and Supreeth Herle, Merlin Chlosta}
+\sphinxmaketitle
+"""
+}
# -- General configuration ---------------------------------------------------
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40953?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iacbba6c2f74bf2b9f96057e71bde017a11f703a8
Gerrit-Change-Number: 40953
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/pysim/+/40952?usp=email )
Change subject: requirements: set cmd2>=2.6.2,<3.0
......................................................................
requirements: set cmd2>=2.6.2,<3.0
Remove the previous workaround that set cmd2==2.4.3 in jenkins.sh. The
bug this worked around has been fixed in 2.6.2.
3.0 will break unless we use some new additional decorator.
Related: OS#6776
Change-Id: I4ba65ed486247c5670313b75f43a242d264df14b
---
M contrib/jenkins.sh
M requirements.txt
2 files changed, 1 insertion(+), 5 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 63087f0..de1d9f8 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -82,10 +82,6 @@
pip install -r requirements.txt
- # XXX: workaround for https://github.com/python-cmd2/cmd2/issues/1414
- # 2.4.3 was the last stable release not affected by this bug (OS#6776)
- pip install cmd2==2.4.3
-
rm -rf docs/_build
make -C "docs" html latexpdf
diff --git a/requirements.txt b/requirements.txt
index 9749d7f..056d912 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
pyscard
pyserial
pytlv
-cmd2>=1.5
+cmd2>=2.6.2,<3.0
jsonpath-ng
construct>=2.10.70
bidict
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40952?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4ba65ed486247c5670313b75f43a242d264df14b
Gerrit-Change-Number: 40952
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>
Attention is currently required from: osmith.
fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/pysim/+/40953?usp=email )
Change subject: docs: fix authors line exceeding the page
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40953?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iacbba6c2f74bf2b9f96057e71bde017a11f703a8
Gerrit-Change-Number: 40953
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 28 Aug 2025 12:04:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes