testenv: podman: Install newer libcurl from bookworm-backports (details)
5gc: Fix upfd failing to start outside podman (details)
testenv: use eclipse-titan 11 in Dockerfile (details)
Commit
f5290b95a41e7413d9ff7d2ddeff9feac908a115
by Oliver Smith
Common.cfg: Logging: add %p to LogFile format
Add the process ID at the end of the log file that ttnc3 writes, to avoid potential conflicts:
> Otherwise if you have eg TC_foobar in STP_Tests_M3UA and > STP_Tests_IPA, you may end up rewriting one of them since both would be > written with the same file name.
%e is the name of the TTCN-3 executable, e.g. STP_Tests even if the test case is in STP_Tests_M3UA. It is not possible to get STP_Tests_M3UA into the file name with any of the meta characters, I've tried it out.
Commit
f93e24e746a2977355ac25b952bc58c011b630f8
by Oliver Smith
log_merge: use same prefix as for pcap files
In some testsuites we have tests in ttcn3 files other than the main testsuite executable. In that case we save the pcap files with the name of the ttcn3 file with the test, but before this patch the merged log file has the name of the main testsuite. This is inconsistent and may lead to a conflict if a test exists in multiple ttcn3 files.
Fix this by getting the same prefix as we use for the pcap from the logfile itself. Fall back to using the same prefix as without this patch in case we can't parse the log line.
Commit
d14819cf286914d87c6b87445d14f25a69eca886
by Pau Espin Pedrol
stp: Update TC_rkm_unreg_active to expect multiple routing contexts
That test is registering a new routcing context (AS) into an existing/pre-configured ASP. As a result, the ASP serves 2 AS. When we receive notifications on that ASP then we'll be receiving info on 2 routing contexts, one for the pre-confgiured AS and one for the dynamically registered one.
Commit
1da23db789f441168ae0a53bc6a1636427cae631
by Oliver Smith
testenv: podman_install: show checked out commits
When running with --podman --binary-repo and a testsuite needs a component for which we don't have a binary package (such as sccp_demo_user), we need to clone the source and build it.
Show the commit from which we are building / have already built the component.
Commit
8dfdcbc98f5da4ce0fcea261adcfecb922b3afae
by Oliver Smith
testenv: podman_install: tweak git commands
* Do not run them in podman: git is required to run testenv, by not running it through podman the command in the log is shorter. * Set advice.detachedHead=false for the git clone to avoid printing the "You are in 'detached HEAD' state. You can look around ..." text block that isn't useful in this context.
Commit
a1c1394e673ea4ae83a37f1bb1902059765d8972
by Oliver Smith
testenv: qemu: fix adding kernel modules
Without this patch qemu_initrd_add_file fails to add kernel modules with "No such file or directory" when running in podman, even though the files exist:
./testenv.py run ggsn -Dp -c osmo_ggsn_v4_only … + cp -a --parents /lib/modules/6.1.0-34-amd64/kernel/drivers/net/net_failover.ko /tmp/testenv-ggsn_tests-osmo_ggsn_v4_only-20250509-1146-cd82caba-wegi5i98/ggsn/_initrd/usr cp: 'lib/modules/6.1.0-34-amd64/kernel/drivers/net': No such file or directory …
When looking at it with strace it became clear that this comes from a getxattr that fails in the podman filesystem and returns a misleading error:
getxattr("lib/modules/6.1.0-34-amd64/kernel/drivers/net", "system.posix_acl_access", 0x7ffc012054e0, 132) = -1 ENOENT (No such file or directory)
Fix it by modifying the cp command to not try to preserve any attributes (they don't matter in the initramfs).
Commit
1555973888309197222fe06e5ce208e51579f1e1
by Oliver Smith
testenv: fix not aborting on build_initrd error
Without this patch the build_initrd function keeps going on errors:
+ cp -a --parents /lib/modules/6.1.0-34-amd64/kernel/drivers/net/net_failover.ko /tmp/testenv-ggsn_tests-osmo_ggsn_v4_only-20250509-1040-a21668df-euc9e2fs/ggsn/_initrd/usr cp: 'lib/modules/6.1.0-34-amd64/kernel/drivers/net': No such file or directory + cp -a --parents /lib/modules/6.1.0-34-amd64/kernel/drivers/net/virtio_net.ko /tmp/testenv-ggsn_tests-osmo_ggsn_v4_only-20250509-1040-a21668df-euc9e2fs/ggsn/_initrd/usr …
The reason for that is that even though the script runs with set -e, the -e flag gets ignored between if…then where the build_initrd shell function gets called:
if ! build_initrd >build_initrd.log 2>&1; then qemu_initrd_exit_error "build_initrd.log" fi
Commit
73287f8c0b45f60a2de21482a30ed9d312c37121
by Oliver Smith
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
Commit
9ccb5118853bbdcd46429ac10f5e1b8b093d1897
by Oliver Smith
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.).
Commit
b273a1d02aa6a02a65b45f5761363bc14823b771
by Oliver Smith
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.
Commit
317d4e52883375036e040eb4451a4c4d9d0a714e
by Oliver Smith
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.
The previous name usually causes confusion since it seems to indicate either: * Some sort of common placeholder for STP_Tests_IPA and STP_Tests_M3UA (it's not the case, we already have STP_Tests_Common.ttcn for that) * A placeholder for tests not IPA or M3UA related (it's not the case, since it only contains IPA<->M3UA tests).
Hence, rename it to denote better the aim of that file, ie. testing forwarding between IPA and M3UA AS(P)s.
Commit
c9165d53c1d5f9d5a523e1fe94079162d21ff023
by Oliver Smith
epdg: add sleep to f_TC_hss_initiated_deregister_permanent_termination
The test sends PERMANENT_TERMINATION twice to osmo-epdg. If we don't sleep between them, osmo-epdg is not able to terminate related FSMs quickly enough between the first and the second termination request when running in QEMU, which results in osmo-epdg answering with DIAMETER_SUCESS instead of DIAMETER_ERROR_USER_UNKNOWN for the second f_DIA_SWx_RT.
Commit
92ba23b5dcf9f9c971961bb1a465c99c65fe4361
by Oliver Smith
epdg: TC_concurrent_ues_MTC: rx CMD_ATTACHED without from vc_conn_list[i]
This is needed to make the test pass in QEMU. I think this makes it accept the COORD_CMD_ATTACHED in any order instead of the order the COORD_CMD_START were sent beforehand.
Increasing the sleep between the COORD_CMD_START also makes the test pass in QEMU, but that increases the overall test time significantly in TC_concurrent_ues100.
Commit
12500cb616309309c7b6d1ada8d72f0746312afe
by Oliver Smith
testenv: check eclipse-titan version
The osmocom:latest repository currently has eclipse-titan 9.0.0 and we assume that the user has at least this version installed. Add a check to avoid subtle unexpected errors caused by using older versions.
Commit
abb3cc03711da6bed0b30c82cadd7b34778d777b
by Pau Espin Pedrol
stp: Split M3UA TCP tests into its own testenv config
That group of tests explicitly tests operation of m3ua-tcp AS(P)s and interaction with m3ua(-sctp) ones. Hence, create a new config to test those, where we keep the TCP related configuration in osmo-stp.
Commit
5d8439122f6f8e2baa4bcb7dc7810cc410fde374
by Pau Espin Pedrol
NGAP_Templates: Fix criticality of PLMNSupportList IE in NGSetupResponse
The criticality rejected is specified in 3GPP TS 38.413 version 18.5.0 Release 18, both in the ASN.1 definition of "NGSetupResponseIEs NGAP-PROTOCOL-IES", as well as section 9.2.6.2. open5gs-amfd is correctly sending reject there.
Commit
e74f8817c7f6a0250e280765080f3fabae054339
by Pau Espin Pedrol
testenv: podman: Stick rebar3 downloaded version to 3.24.0
The previous URL now contains a newer 3.25.0 rebar3 release, which requires minimum OTP 26, but debian12 launches with OTP 25.
""" This BEAM file was compiled for a later version of the runtime system than the current (Erlang/OTP 25). To fix this, please re-compile this module with an Erlang/OTP 25 compiler. (Use of opcode 182; this emulator supports only up to 180.) """
Commit
b4780d40ee653556980d181d16b90440f402d727
by Oliver Smith
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.
Commit
12cf6c92fac57348ada46991005e1730778c8622
by Oliver Smith
testenv: deduplicate make_dir
Generate the osmo-dev make dir path in one location, in testenv.cmd which gets imported by testenv.osmo_dev instead of doing it in both. This makes it easier to bump make_dir_version when necessary.
Commit
8cbe2afa357e10014103acdf6517211b8eea3ec6
by Oliver Smith
testenv: fix TESTENV_INSTALL_DIR
When osmo-dev is used (no --binary-repo arg is set), then set TESTENV_INSTALL_DIR and --install-prefix for osmo-dev to: <cache dir>/osmo-ttcn3-testenv/{podman,host}/install Old --install-prefix: <cache dir>/osmo-ttcn3-testenv/{podman,host}/usr Old TESTENV_INSTALL_DIR: <cache dir>/osmo-ttcn3-testenv/{podman,host}
The old behavior was misleading, because: * It resulted in configs getting installed into: <cache dir>/osmo-ttcn3-testenv/{podman,host}/usr/etc/... * TESTENV_INSTALL_DIR looked like it would point at the install dir (because there is usr inside that directory), but it was actually pointing at the top dir of the install dir.
Commit
e915b6e14c2e34756df41a7d33d11b6ad9cd733e
by Pau Espin Pedrol
log_merge.sh: Merge all logs if no test cases are found
This can happen for instance if titan exits with an error during startup even before starting any test. In that scenario, titan still writes stuff to a file (eg. C5G_Tests--efc28eab6a6d-hc-1305.log). Let's try to make everything logged available in that case, so user can debug what went wrong.
Commit
01082e623873a09567c82f28aff437aaae3dd762
by Pau Espin Pedrol
deps: Depend on osmocom fork of forge.etsi.org nas.git
This module provides types, templates and functions to operate NG NAS (5G).
A fork is needed because: * Upstream code doesn't compile against eclipse titan (A PR has been submitted upstream and we should eventually be able to compile ttcn3 code just fine in that regard). * Some system/external functions need to be implemented, such as fx_GetSystemTime(). We currently do that in our fork.
Commit
1197bdf6b7b9880812d6bbcf5a8b8db32179ba47
by Oliver Smith
testenv: run "make deps" every time
The previous logic of not always running "make deps" was useful when "make deps" would take a long time to complete even if there were no changes. But this has been fixed in c7e40d6a ("Makefile: avoid fetching deps if not needed"). Run it every time now in order to fix that deps are not updated after deps/Makefile gets changed.
Commit
4e2919d7793781b9f5ae67d5ad32da57c3eff1a6
by Pau Espin Pedrol
5gc: Initial NAS transmitting support
With this patch it is already possible to transmit the NAS Auth Response in the test ConnHdlr. We still lack generating a proper RES to have the response properly accepted.
Commit
769f6e6e2cd4c2e0a02ddf2f9c81a59c5a60a0c3
by Pau Espin Pedrol
testenv: podman: Install newer libcurl from bookworm-backports
It was already spotted a few days ago that libcurl4 7.88.1-10+deb12u12, currently being shipped by debian12, contains some sort of bug where it doesn't properly format/read HTTP2 requests when used in open5gs. It was found out that installing a newer version of libcurl4 fixes the problem. This patch also fixes the problems spotted in the 5gc testsuite when running within podman (they didn't show up outside podman because I'm using Archlinux and hence using newer libcurl 8.13.0 too).
Commit
8082d099e3f96da3dfe4348b0e1bd794d93b8b02
by Oliver Smith
testenv: use eclipse-titan 11 in Dockerfile
Install eclipse-titan from osmocom:nightly instead of osmocom:latest, which now has version 11. Once we ensured everything works as expected, we will upgrade the version in osmocom:latest too.