Attention is currently required from: daniel, laforge, pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40327?usp=email )
Change subject: asp: Avoid double-free of received msg if conn is teared down
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS2:
> So what's the root problem according to you? […]
The root problem is that `iofd` code is transferring the talloc ownership to API users that may not expect/want this. As I suggested in the ticket, in my view talloc ownership should be explicitly **taken** by the user of `iofd` (be it netif stuff or whatever else), and not given away by the `iofd` itself.
I am not against fine-grained talloc ownership, and you can still achieve that by doing `talloc_steal()` like you're doing in this patch and did in `lapdm` code in libosmocore. Let's just allocate the `msgb` as a child of the `tall_msgb_ctx` by default and leave it up to the user of `iofd`: whether `talloc_steal()` explicitly (if needed) or keep it there for performance reasons.
Patchset:
PS3:
> ping. This is a fix for a severe bug and has been here for 1 week and a half and almost no feedback.
Please add `Related: OS#6728` and feel free to merge: I am not blocking. But I still see this as a band-aid solution treating the symptoms, but not the "disease". There definitely are other places where we (and even worse, our customers) will be bitten by this again and again. Feels like we're fighting the hydra.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40327?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I69f80f611c14db2b328dafd4a90247c6f2dac6fd
Gerrit-Change-Number: 40327
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
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: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 May 2025 10:45:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40327?usp=email )
Change subject: asp: Avoid double-free of received msg if conn is teared down
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40327?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I69f80f611c14db2b328dafd4a90247c6f2dac6fd
Gerrit-Change-Number: 40327
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
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-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 May 2025 10:05:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: daniel, fixeria, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40327?usp=email )
Change subject: asp: Avoid double-free of received msg if conn is teared down
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
ping. This is a fix for a severe bug and has been here for 1 week and a half and almost no feedback.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40327?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I69f80f611c14db2b328dafd4a90247c6f2dac6fd
Gerrit-Change-Number: 40327
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
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-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 May 2025 10:02:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40377?usp=email )
Change subject: erab_fsm: clarify type spec for teid_addr()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40377?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: If649c3436ce60d3b9ceefdcfb695bb2236ebe7ef
Gerrit-Change-Number: 40377
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 May 2025 08:07:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40373?usp=email )
Change subject: testenv: README: document env vars set by testenv
......................................................................
testenv: README: document env vars set by testenv
Change-Id: I1a43d6b71c4dbc00abd8a4347fb2b35704491591
---
M _testenv/README.md
M _testenv/testenv/cmd.py
2 files changed, 76 insertions(+), 28 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/_testenv/README.md b/_testenv/README.md
index 1b62d65..53d3440 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -128,34 +128,6 @@
`qemu_functions.sh` and using functions from there. See the `ggsn` testsuite
for reference.
-### Executables
-
-#### $PATH
-
-Executables mentioned in `program=`, `prepare=`, `setup=` and `clean=` run
-with a `PATH` environment variable containing:
-
-* The directory of the testsuite
-* The directory for binaries built from source
-* The directory `_testenv/data/scripts` (which has e.g. `respawn.sh`)
-* The directory `_testenv/data/scripts/qemu`
-
-#### $PWD (current working dir)
-
-The executables run inside a directory with the component name, inside the log
-dir. For example:
-
-```
-/tmp/logs
-├── ggsn # Executables from [ggsn] section run in this dir
-│ ├── ggsn.log
-│ └── osmo-ggsn.cfg
-└── testsuite # Executables from [testsuite] run in this dir
- ├── Common.cfg
- ├── GGSN_Tests.cfg
- └── GGSN_Tests.default
-```
-
### Latest configs
Sometimes we need to run test components and/or testsuites with different
@@ -186,6 +158,10 @@
## Environment variables
+### Environment variables read by testenv
+
+You can set the following environment variables to change testenv behaviour.
+
* `TESTENV_SRC_DIR`:
Set the directory for sources of Osmocom components. The default is the
directory above your osmo-ttcn3-hacks.git clone.
@@ -225,6 +201,76 @@
Instead of attempting to automatically detect the LXC host IP, use this IP.
This can be set to 127.0.0.1 for testing.
+### Environment variables set by testenv
+
+Testenv sets the following variables while running shell commands from
+`program=`, `prepare=`, `setup=` and `clean=`. The variables are set in
+`testenv/cmd.py:init_env()`.
+
+* `PATH`:
+ The user's `PATH` environment variable is prefixed with the following paths:
+ * The directory of the testsuite.
+ * The directory for binaries built from source.
+ * The directory `_testenv/data/scripts` (which has e.g. `respawn.sh`).
+ * The directory `_testenv/data/scripts/qemu`.
+
+* `PWD`:
+ The executables run inside a directory with the component name, inside the
+ log dir. For example:
+
+```
+/tmp/logs
+├── ggsn # Executables from [ggsn] section run in this dir
+│ ├── ggsn.log
+│ └── osmo-ggsn.cfg
+└── testsuite # Executables from [testsuite] run in this dir
+ ├── Common.cfg
+ ├── GGSN_Tests.cfg
+ └── GGSN_Tests.default
+```
+
+* `TESTENV_INSTALL_DIR`:
+ The directory into which the SUT binaries and other files are installed. It
+ is set to `/` for `--podman --binary-repo`,
+ `~/.cache/osmo-ttcn3-testenv/podman` for `--podman` and
+ `~/.cache/osmo-ttcn3-testenv/host` otherwise. The
+ `~/.cache/osmo-ttcn3-testenv` part can be changed with the `--cache`
+ argument. Different cache directories for podman and for the host are used
+ as it is very likely that the binary objects from both are incompatible.
+
+* `TESTENV_SRC_DIR`:
+ Is set to the directory for sources of Osmocom components. The default is the
+ directory above the osmo-ttcn3-hacks.git clone. This can be changed by the
+ user by having `TESTENV_USR_DIR` set while running `testenv.py`.
+
+* `OSMO_DEV_MAKE_DIR`:
+ This variable is unset if `--binary-repo` is used as argument. Otherwise it
+ is set to `~/.cache/osmo-ttcn3-testenv/host/make2` or
+ `~/.cache/osmo-ttcn3-testenv/podman/make2` (with `--podman`) by default. The
+ `~/.cache/osmo-ttcn3-testenv` part can be changed with the `--cache`
+ argument.
+
+* `TESTENV_QEMU_KERNEL`:
+ Is only set if `-C`/`--custom-kernel` or `-D`/`--debian-kernel` parameters
+ are set. With `-C` it is set to `<path to osmo-ttcn3-hacks>/.linux`. With
+ `-D` it is set to `debian`.
+
+* `TESTENV_QEMU_SCRIPTS`:
+ Is set to `<path to osmo-ttcn3-hacks>/_testenv/data/scripts/qemu`.
+
+* `CCACHE_DIR`:
+ Is set to the value of the `--ccache` parameter, which is
+ `~/.cache/osmo-ttcn3-testenv/ccache` by default.
+
+* `PKG_CONFIG_PATH`:
+ Is prefixed with `$TESTENV_INSTALL_DIR/usr/lib/pkgconfig:`.
+
+* `LD_LIBRARY_PATH`:
+ Is prefixed with `$TESTENV_INSTALL_DIR/usr/lib:`.
+
+* `TERM`:
+ Is set to the same `TERM` passed to testenv with fallback to `dumb`.
+
## Troubleshooting
### Timeout waiting for RESET-ACK after sending RESET
diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py
index 24dc110..9a81e30 100644
--- a/_testenv/testenv/cmd.py
+++ b/_testenv/testenv/cmd.py
@@ -12,6 +12,8 @@
def init_env():
+ """Adjust "Environment variables set by testenv" in README.md when making
+ changes here."""
global env_extra
global install_dir
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40373?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: I1a43d6b71c4dbc00abd8a4347fb2b35704491591
Gerrit-Change-Number: 40373
Gerrit-PatchSet: 5
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/+/40371?usp=email )
Change subject: testenv: add -j/--jobs parameter to run action
......................................................................
testenv: add -j/--jobs parameter to run action
Allow building with less than all CPU cores. This may be desirable
because the NGAP asn1 files are huge and building with -j$(NPROC) eats
all the memory on some systems.
Suggested-by: Pau Espin Pedrol <pespin(a)sysmocom.de>
Change-Id: I191291cabd40e23983d29a350e587c1e11a52c0d
---
M _testenv/testenv/__init__.py
M _testenv/testenv/osmo_dev.py
M _testenv/testenv/podman_install.py
M _testenv/testenv/testsuite.py
4 files changed, 19 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 07880cc..6118b65 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -94,6 +94,12 @@
metavar="OBS_PROJECT",
help="use binary packages from this Osmocom OBS project instead (e.g. osmocom:nightly)",
)
+ group.add_argument(
+ "-j",
+ "--jobs",
+ help="number of jobs to run simultaneously (default: nproc)",
+ type=int,
+ )
group = sub_run.add_argument_group("exit options", "When and how testenv should exit when done.")
group = group.add_mutually_exclusive_group()
diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py
index 1e94cf1..02fe2e8 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -73,6 +73,9 @@
os.path.join(testenv.args.cache, "host/usr"),
]
+ if testenv.args.jobs:
+ extra_opts += [f"-j{testenv.args.jobs}"]
+
# Make dirs created without passing --autoreconf-in-src-copy to
# gen_makefile.py (as previous versions of testenv did) are incompatible.
# Add the "2" to avoid potential conflicts.
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 130085c..adc2d70 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -26,7 +26,10 @@
# errors.
git_dir = os.path.join(testenv.args.cache, "git", f"build_against_{testenv.args.binary_repo}".replace(":", "_"))
- jobs = multiprocessing.cpu_count() + 1
+ if testenv.args.jobs:
+ jobs = testenv.args.jobs
+ else:
+ jobs = multiprocessing.cpu_count()
os.makedirs(git_dir, exist_ok=True)
diff --git a/_testenv/testenv/testsuite.py b/_testenv/testenv/testsuite.py
index 149e47f..5ddbf3e 100644
--- a/_testenv/testenv/testsuite.py
+++ b/_testenv/testenv/testsuite.py
@@ -51,7 +51,12 @@
def build():
logging.info("Building testsuite")
- testenv.cmd.run(["make", testenv.args.testsuite], cwd=ttcn3_hacks_dir, env=builddir_env)
+
+ env = copy.copy(builddir_env)
+ if testenv.args.jobs:
+ env["PARALLEL_MAKE"] = f"-j{testenv.args.jobs}"
+
+ testenv.cmd.run(["make", testenv.args.testsuite], cwd=ttcn3_hacks_dir, env=env)
def is_running(pid):
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40371?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: I191291cabd40e23983d29a350e587c1e11a52c0d
Gerrit-Change-Number: 40371
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>