Skip to content

Loading builds...

Changes

#22 (Nov 7, 2025, 9:30:47 AM)

ngap: Fix deviation in ASN1 from TS 38.413 version 17.5.0

I originally copied the ASN1 files from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/asn1, commit fa43d01e202379a969e991a9454d9c6c6930b5b5.

Apparently one file contained a deviation from the 3GPP content and it
was also fixed in ngap.git in 47e7239dd80f2f12a4cbcdd7977ca0a32356f3be.

I found out this problem when trying to use this ASN1 file to generate
new libfftranscode, which then failed to properly decode
DownlinkNASTransport due to the deviation.

Change-Id: I7d127998ea162a392f3381ebb1d198ad3c783a56
Pau Espin Pedrol at
library/ngap: Use titan native APER enc/dec

Related: OS#6490
Change-Id: I07b604fbd5d3665fdb48c4193ab58cffa7dd709a
Pau Espin Pedrol at
Cosmetic: deps/Makefile: update comments

Remove the part about caching logic of docker containers, as most
testsuites don't use docker-playground anymore. The main reason for
using commits here is that we have exact commits when doing regression
testing.

Replace the verbose license header with the SPDX version while at it.

Change-Id: I7eddc64aeab20292922ba013221679dfe952ff45
Oliver Smith at
5gc: Support PDU Session Establishment procedure

This commit adds initial support to issue a successful PDU Session
Establishment procedure towards the 5GC, getting a ready-to-use GTPU
session with IPv4 addr + TEID + UE IP address.

commit has to our nas.git fork is updated in order to have multiple
fixes and improvements needed to have everything working fine.

Related: SYS#7073
Change-Id: If0769afd07a4bae7778d7a7c347cebaa5909b5f8
Pau Espin Pedrol at
Split GTPv1U out of GTPv2_Emulation

GTPv1U and GTPv2C are 2 different protocols, working on 2 different
ports, on 2 different sockets.
Hence, it makes no sense to put them together, since some tests may want
to use only the control-plane, others may want to use the user-plane,
etc.
Morevoer, GTPv1U can be used together with both GTPv2C anf GTPv1C.

This commit also fixes the confusion where TEIC and TEID were not
properly separated in GTPv2_Emulation.

Change-Id: Ia45307107753294c6761cb588f0ab769821eb213
Pau Espin Pedrol at
GTP1vU_Emulation: Make UECUPS support optional

Some users may/do want to use the simple UDP/GTPU socket mode, so they
don't need to depend on all UECUPS code.

Change-Id: I3b4671d8e637f70f790b08ed8e3b5145e7a95703
Pau Espin Pedrol at
gbproxy: Drop unneeded GTP dependencies

Change-Id: Id282bf63ae4abe8f2e97d84146db1f48198dacf7
Pau Espin Pedrol at
GTPv1U_Emulation: support multiple client ports per GTP1U_ConnHdlr

This feature is already present in GTP1U code of GTP_Emulation.
That part of the code will be removed and ported to use
GTPv1U_Emulation, so we need to also support this feature here.

Change-Id: I10ce33f30a2da5159f8040725df619844a71d6bc
Pau Espin Pedrol at
Split GTPv1U out of GTP_Emulation

We already have a GTPv1U_Emulation, use it.

Change-Id: I5b3da248719b79d402b945904e3840a2ec387dab
Pau Espin Pedrol at
5gc: Rework init code

* Move T_Guard to MTC, there's no need to have multiple of them (one per
  ConnHdlr).
* Call f_init_handler() internally so it doesn't need to be called by
  each ConnHdlr test.
* Change function attribute friend to private

Change-Id: I71e5d552a6c0089345982a403285f66a92397413
Pau Espin Pedrol at
5gc: C5G_Tests.cfg: Set module name of multiple module params

Change-Id: I936240af988d4727516b5722dd360a907d70eee7
Pau Espin Pedrol at
Move ConnHdlr logic to its own file

Similar to what we do in other testsuites, since we start to have
considrable amount of logic.

Change-Id: If7edf8ee63c71fbf949e2d340cf3881fd8e3ba41
Pau Espin Pedrol at
pgw: Move to library/ high level APIs to run commands over UECUPS

This way the code can be reused by other testsuites more easily.

Change-Id: I49c98fd423e47e16ddfb9ae4612b18db21ca3fa4
Pau Espin Pedrol at
pgw: Use templates to generate UECUPS commands

This way if commands are extended with optional fields, we don't need to
update these since default params in templates will take care of it.

Related: SYS#7073
Depends: osmo-uecups.git Change-Id If524b0a122d1217fcd39e4633835a1a7d0620c7a
Change-Id: I4de6623318fe2abf9807702251fe420eb14de2cc
Pau Espin Pedrol at
5gc: Introduce test TC_register_ping4

osmo-uecups is used to set up a GTPv1U tundev with the PDU session
params configured over NGAP/NAS, similar to what is already done in
PGW_Tests.

Depends: osmo-uecups.git Change-Id I6262c3dfbf774b361aadf0aa53ce09b5fdc38da4
Change-Id: I66737a94eedcf4184aa59bbbd7cc700d1e9d1521
Pau Espin Pedrol at
library/ngap: Fix wrong procedureCode in PDUSessionResourceReleaseCommand templates

Change-Id: Ia4b0cacf8e3f859820d4b5e23d73f38bb5b7fbfd
Pau Espin Pedrol at
testenv: Dockerfile: use debian archive for deb10 libssl pkg

As Debian 10 is EOL, this debian 10 package we are still using here to
make mongodb work is getting removed from the mirrors. Currently some
still have it, some have deleted it already. Use the archive instead.

Related: docker-playground Ia447d850d38c662aac567aa88685d984c0b42238
Change-Id: I1a81e8e1485c810396f1714e6ef0485878fab6ec
Oliver Smith at
testenv: Add $install_dir/usr/bin to $PATH

When building programs from source, don't look only in $install_dir/bin,
but also in $install_dir/usr/bin for the binaries. osmo-s1gw installs to
usr/bin with recent changes and other programs may do this too.

Related: osmo-s1gw I5681ca103daf1c497218b4513b0ca97b1aae03d3
Change-Id: I8d652dba94bbd44217a3034ac012b6568941347d
Oliver Smith at
s1gw/testenv: adjust to use new launcher script

osmo-s1gw now gets started through a launcher script.

Depends: osmo-s1gw I5681ca103daf1c497218b4513b0ca97b1aae03d3
Change-Id: Ief1579154bf46b9bc2551535ede3e1f14456d65d
Oliver Smith at
testenv: podman: add libnftables-dev

This is required for building osmo-s1gw from source in podman,
otherwise:

  /home/user/.cache/osmo-ttcn3-testenv/podman/make3/osmo-s1gw/default/lib/enftables/c_src/enftables.c:16:10: fatal error: nftables/libnftables.h: No such file or directory
     16 | #include <nftables/libnftables.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

Change-Id: I0ae94f73f0875048d9a71d1582627e57e60425c6
Oliver Smith at
library/ngap: Support passing optional NAS-PDU to PDUSessionResourceReleaseCommand

Change-Id: I5f516f33824a83c0eaeb2c0decd82409b786867e
Pau Espin Pedrol at
NGAP_Functions.ttcn: Fix wrong offset of NGAP_ID_pair in uEContextReleaseCommand

Change-Id: I2302bebf75530f574a7fe2647b1eafcc4d5fd7df
Pau Espin Pedrol at
5gc: Implement PDU Session Release procedure

Related: SYS#7073
Change-Id: If79cb0c97008e7a9885bb548a3d2e67e41ba170f
Pau Espin Pedrol at
library: Comment out debugging for NGAP/5G-NAS

The current NGAP and 5G auth code is now working fine, so disable debug
logging. Keep it commented out so it can be re-enabled at any time if
some related topic needs to be debugged (will eventually happen).

Change-Id: I4250766644742f0fd11ca5e24b1a1a581dc81b4b
Pau Espin Pedrol at
5gc: Introduce test TC_ng_register_ping4_256

open5gs-dbctl tool is called in batches of multiple IMSIs to speed up
setup, since each call takes fractions of seconds to complete.
mongosh called by open5gs-dbctl actually uses quite a lot of CPU and RAM
resources, hence limit the amount of parallel runs to a fair amount (eg.
running the 256 of them in parallel froze my workstation with 16GB of
RAM).

Change-Id: I7282fa3c1a474c4b7dceeb5e358547dcdbd1fea6
Pau Espin Pedrol at
5gc: Introduce test TC_periodic_registration_updating

Related: SYS#7073
Change-Id: I63da25a3927cb459563d4325adc690beb8a67451
Pau Espin Pedrol at
{S1AP,NGAP}_Emulation: Fix indentation

Change-Id: Ifb2e4e3fc2d3ef4a76f2b0e906b12d0f740e9cdd
Pau Espin Pedrol at
{S1AP,NGAP}_Emulation: Fix using the value of an optional field containing omit

This was triggered in NGAP_Emulation during run of C5G_Tests complete
testusite, when running TC_ng_register_ping4_256.

Titan apparently doesn't like using a field set as omit in a field of a
record during match().

Same fix is applied for S1AP_Emulation since they basically use the same
logic.

Change-Id: I4812c2e9eeeadc26ad057cd8019f7570e4a16155
Pau Espin Pedrol at
{S1AP,NGAP}_Emulation: Simplify lookup code

Simplify code matching IDs. Explicitly test, log and exit function
called with both IDs passed as "omit".

Change-Id: I02f33c191d131c6325f3608ceec80be6f036aa84
Pau Espin Pedrol at
NGAP_Templates: Fixes and improvements for UEContextReleaseComplete

The existing templates for UEContextReleaseComplete were completelly
wrong, probably due to copy-paste when introducing them. This commit
fixes all those problems and allows passing optional parameters.

* procedureCode was wrong
* Criticality of several fields was wrong
* Type of resource list was wrong, and marked as mandatory while it was
  optional.

Change-Id: I50da7cd4cb15d8e6b2c68b21a4e4be93e3973593
Pau Espin Pedrol at
5gc: Implement UE-initiated de-registration procedure

Change-Id: Iab438d5a7cc5f2ba58943e4568c1fb5e5f41f99d
Related: SYS#7073
Pau Espin Pedrol at
testenv: osmo_dev: remove unused limit_section arg

Remove the unused limit_section argument in testenv.osmo_dev.make(). The
idea was to use osmo-dev to build programs where no packages are
available when using --binary-packages, but this didn't work because
when using --binary-packages, we must install all package dependencies
from the binary repository (so testing nightly / latest use the expected
library versions). Nowadays this use case is handled by
podman_install.from_source_* functions without using osmo-dev.

Change-Id: Ib09ffd0e269c58acd431bdbb5cc7cdcec2d36359
Oliver Smith at
testenv/osmo-dev: split get_targets to own func

Split the code for getting osmo-dev targets into a separate function, so
this can be reused in the next patch.

Change-Id: I2bd7c05102ca472614289870957cdca335c01eaf
Oliver Smith at
testenv: pass targets to osmo-dev's gen_makefile

Pass the targets we are about to build to osmo-dev's gen_makefile
script. This has two advantages:

1) Check early if a target isn't known by the current osmo-dev version,
   displaying a useful error to the user instead of just failing during
   make later on:

     ERROR: filter_projects_deps_targets: can't find project osmo-new-project in projects_deps!

     [testenv] gen_makefile.py from osmo-dev failed!
     [testenv] Your osmo-dev.git clone might be outdated, try:
     [testenv] $ git -C /home/user/code/osmo-dev pull

2) Parsing the generated Makefile when running "make" after generating
   it doesn't cause a noticable delay anymore. On my machine (with many
   Osmocom git repos cloned in osmo-dev's src dir) it went from several
   seconds to instantly.

Depends: osmo-dev I89bb60e94dd03606dbba5a3609d5e1a95993af5b
Change-Id: Ib2d8802b305f145d27aab3c1cc3129709b93d93d
Oliver Smith at
Makefile: add 'clean-logs' target

When running tests manually I oftentimes end up with hundreds of
*.log files in testsuite directories.  The present patch adds a
convenience target for removing them.

Change-Id: Id0597f9eeea9e128ce38a2b19f2126c729e71ffd
Vadim Yanitskiy at
msc: add TC_silent_call_{start_stop,active_conn}

This patch adds testcases for the silent-call feature:

* MSC_Tests.TC_silent_call_start_stop
  Test starting and stopping silent call via the VTY.
* MSC_Tests.TC_silent_call_active_conn
  Test initiating a silent call while there's an active connection.
  The MSC is expected to be smart and reject such an attempt.

Change-Id: I3ef22fbb5a05f69cc8aea7f42e05f6e1d6c4a8b6
Related: osmo-msc.git I93913d189800d71f82c013b6e946bd63db362f65
Related: osmo-msc.git I52b3be26c61cadacc4783b5c324809ecd6906b36
Vadim Yanitskiy at
testenv: Dockerfile: fix Suites: stable-backports

Using "stable-backports" broke now that Debian 13 is out. Use
"bookworm-backports" instead.

Fix for:
  E: The value 'bookworm-backports' is invalid for APT::Default-Release as such a release is not available in the sources

Change-Id: Icc46b6dc2493806dc12f0ff442abd70fe5b48eb8
Oliver Smith at
ngap: Add missing mandatory IE Cause to m_n2_UEContextReleaseRequest

Change-Id: Ib7d87f957e469a23448e35fd82a697d1698c7da7
Pau Espin Pedrol at
ngap: Add template for UEContextReleaseReq without PDU Session List

That's the only optional IE in the message. Add a separate template to
be able to transmit with that IE set, similar to what's already done in
m_n2_InitialContextSetupRequest_withPDUSessionList().

Change-Id: I0f1a549103b70bcd373dcd4c688761d3eeef10a6
Pau Espin Pedrol at
5gc: Obtain amf_id from NGAP_Emulation

This will be needed in a follow-up commit in order to be able to
transmit UE Context Release Request.

Change-Id: I49cb6d7fe9f18734c49bb49ecceb671e8122ce88
Pau Espin Pedrol at
5gc: Place PDU Session params into its own subrecord

This way we properly split between layers, plus the fact that we'll
probably want to hold several concurrent pdu sessions in each UE in the
future.

Change-Id: Ibb0c8d3f0901d53e4aa75855e602234410fd00f9
Pau Espin Pedrol at
5gc: Add tests for UE release context request procedure

Change-Id: Icaaeb2923fdcaba47a72ed0aedc5661f68c03774
Pau Espin Pedrol at
5gc: Add helper to get incremental PTI field

Change-Id: I9d32024b58799bbd3ef547cdc73ee73d7f7275d2
Pau Espin Pedrol at
GSUP Templates: fix empty destination_name in GSUP ISD/UL

The destination_name TLV should be either set with a valid name
or not present, but a field with length 0 shouldn't be used.

Change-Id: Ia89b5a82665e407fa578e5209fbcde0676326df0
lynxis at
GSUP_Templates: ts_GSUP_UL_REQ: add template scopes

Allow to omit the source_name TLV in GSUP UL Request.
The whole ts_GSUP_UL_REQ must resolve to a value.

Change-Id: I250960a1e1c19dfa1efa81f6bbc93efa07cb225c
lynxis at
GSUP_Templates: fix whitespace issues

Change-Id: I03be75063a71153bd2881afd1d741454c508fada
lynxis at
BSSGP_ConnHdlr: f_service_request: allow to define if a Service Accept is expected

A SecurityModeCommand is defined as an implicit Service Accept when the UE
is in PMM_IDLE (meaning, having no Iu signalling connection)

Change-Id: I5c190db28263c530a8eea188bf570a58eaffdd4d
lynxis at
MSC Tests: add TC_gsup_lu_and_det: do a LU, Detach and expect GSUP MS Purge

Currently the MSC/VLR doesn't inform the HLR when a MS detaches.

Change-Id: I9e87537efc2c921fa860539a706316ed410b45d5
lynxis at
ngap: Fix wrong IE Id in m_n2_PDUSessionResourceModifyResponse()

Change-Id: I13547e548e5323fe54340393cbe9f333f10c5969
Pau Espin Pedrol at
5gc: Test UE requested PDU Session Modification procedure

Change-Id: Id9ac0f0e431c4a82dfab8675c93bf3c3f05442a7
Pau Espin Pedrol at
Makefile: DIR_clean_template: clean depends on Makefile

Change-Id: I4934f345f4a1d54fa939143d46033c1ef6751aba
Vadim Yanitskiy at
NGAP_Templates: Introduce generic NGSetupFailure template f_mw_n2_NGSetupFailure()

Use one template containing all possible optional IEs instead of having
different templates containing optional subsets.

Change-Id: I39302624212b907a5267b8104176c2bbb96bd2ae
Pau Espin Pedrol at
NGAP_Templates: Improve InitialContextSetupRequest template

That message has tons of optional fields. Better have 1 big generic
template than dozens of different templates.

Change-Id: Ib87221455ebc9f59ab0810b28a6509cdcecc81c7
Pau Espin Pedrol at
testenv: install curl backport only for bookworm

Change-Id: Ifeeea010fb13bfd65e1d3659a3c43fc4acf07795
Oliver Smith at
Cosmetic: testenv: make builddir_env more readable

Change-Id: I7bbd14bd91c97bc37a163018217b104ace0e1a53
Oliver Smith at
msc: also execute evil USSD tests for -latest

osmo-msc v1.14.0 is out, so we can safely execute these tests.

Change-Id: Ia603bcf434a4092c5fc347300b755be92820ed3e
laforge at
testenv: use separate cache dirs per distro

Change-Id: I0f1c05bb4d8cfababc24477976abf8a0baa3daba
Oliver Smith at
testenv: init podman: add --distro arg

Allow building the podman image for another distribution. This was
mostly implemented already, but due to the missing --distro argument for
"./testenv.py init podman" it could not be used yet.

Change-Id: Iff59b5d403e88046a3f98438394e1e02a36e7c0a
Oliver Smith at
testenv: debian 13: fix installing libgcc

Use a wildcard to install the proper libgcc-*-dev package (libgcc-11-dev
for debian bookworm, libgcc-13-dev for trixie).

Change-Id: I9992d8cf8cd68a9e3ec9178909e0766dbd5d12ad
Oliver Smith at
testenv: debian 13: fix installing eclipse-titan

Use the current debian version instead of hardcoding Debian_12.

Change-Id: I56be4e3e72a1ad4590e904f9a48d90aa635c9980
Oliver Smith at
testenv: check for --distro without --podman

The --distro option only makes sense with --podman, complain if it is
used without --podman.

Change-Id: I1b7b26320c65d498a1e812f85f0b98eda95be783
Oliver Smith at
testenv: check value of --distro early

Make sure that the value for --distro is supported early on, instead of
only checking it if --binary-repo is set while trying to add the binary
repository.

Change-Id: I37493f26d71e70a19f4a19b3bbda972c03c84905
Oliver Smith at
testenv: add debian:trixie

Change-Id: Ib62851960724c17f9adddf54a2fc39adef911d32
Oliver Smith at
testenv: enable_binary_repo: configure apt pin

Add an apt-pin to ensure packages from the Osmocom repositories get
preferred over Debian's packages. I just ran into this with osmo-mgw,
where we have 1.4.0 in osmocom:latest and Debian 13 has 1.14.0+dfsg1-2,
which counts as higher version. This results in the wrong package being
selected, and also in an error later on when trying to install related
debug packages from our repository:

  The following packages have unmet dependencies:
   osmo-mgw-dbgsym : Depends: osmo-mgw (= 1.14.0) but 1.14.0+dfsg1-2 is to be installed

Change-Id: I3a45de277bbd5299c8b840680b56b52a8731caa4
Oliver Smith at
testenv: set default distro to debian:trixie

Related: OS#6826
Change-Id: Ib9c5dafaa7b17e435f61fbedfd92393c0a767f34
Oliver Smith at
testenv: qemu: ignore builtin modules

In debian 13, the virtio_pci kernel module is now builtin. Adjust the
code paths that add kernel modules to the initramfs and load them to
ignore builtin modules.

This fixes the ttcn3-ggsn-test-kernel-latest job job, which currently
fails with:

  + modprobe -a --dry-run --show-depends --set-version=6.12.41+deb13-amd64 virtio_net virtio_pci
  + sort -u
  + cut -d   -f 2
  + local files=virtio_pci
  /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/net_failover.ko.xz
  /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/virtio_net.ko.xz
  /lib/modules/6.12.41+deb13-amd64/kernel/net/core/failover.ko.xz
  + qemu_initrd_add_file virtio_pci /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/net_failover.ko.xz /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/virtio_net.ko.xz /lib/modules/6.12.41+deb13-amd64/kernel/net/core/failover.ko.xz /usr/lib/modules/6.12.41+deb13-amd64/modules.alias
  + local i
  + local cp=cp --no-dereference --recursive --parents
  + cp --no-dereference --recursive --parents virtio_pci <https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test-kernel-latest/1665/artifact/logs/osmo_ggsn_v4_only/ggsn/_initrd>
  cp: cannot stat 'virtio_pci': No such file or directory

Change-Id: Ied8acf18d0a1f47fac805619d15896918a365ff2
Oliver Smith at
testenv: fix TESTENV_INSTALL_DIR for --binary-repo

When --binary-repo is set, "/" must be used as install directory,
without any suffix for the distribution.

Fix for:
  realpath: /-debian-trixie/usr/lib/osmo-s1gw: No such file or directory

Fixes: 2152d512 ("testenv: use separate cache dirs per distro")
Change-Id: I1e1ca65fd6a7d77c751dd7138015ff474f8ae576
Oliver Smith at
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
Oliver Smith at
testenv: use separate install dir for --asan

The --asan flag builds all Osmocom components with address sanitizer
enabled. Use a separate install dir from the non-asan version to ensure
we don't end up with using non-asan versions. (A separate make dir is
already used.)

Bump make_dir_version to avoid having markers for already installed
binaries / libraries in the make dir, which are invalid now for
asan-builds as we switched the install dir.

Fixes: c3657172 ("testenv: add run --asan")
Change-Id: Ic75452b75d4c3ee8045b68353830b5532e1ce90e
Oliver Smith at
ranap: Support Tx GlobalRNC-ID during RANAP RESET (ACK)

This commit doesn't affect the behavior of any existing testsuite yet,
it only updates the templates and adds a RanOps param to be able to pass
a GlobalRNC-Id to RAN_Emulation.

A follow-up commit will change SGSN_Tests to append GlobalRNC-Id to
RANAP Reset when sending towards SGSN, since it's mandatory for an RNC
to set it according to 3GPP TS 25.413 8.26.2.2.

Change-Id: I0628e412bdff6ed8eefe9051ec351fbd1d0b634f
Pau Espin Pedrol at
Include GlobalRNC-ID IE during Tx RANAP Reset towards SGSN

An RNC shall include this IE during RANAP Reset, as specified in
3GPP TS 25.413 8.26.2.2.

Change-Id: Ic16817a2064fa87b80a81b07868005069d67aec2
Pau Espin Pedrol at
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
Oliver Smith at
sgsn: Add suport to obtain statsd output

It will be used in a follow-up commit in TC_stat_rnc_sctp_disconnected.

This new test infrastructure can still be used with osmo-sgsn latest
since it already initialized the statsd VTY commands despite having no
osmo_stats in use.

Change-Id: Ic86ce75ea700d05fc65fcea3cdab7b7eaac12069
Pau Espin Pedrol at
sgsn: TC_stat_bsc_sctp_disconnected: validate using StatsD

Similar to what we alreay do in counterpart
MSC_Tests_iu.TC_stat_bsc_sctp_disconnected.

Related: OS#3403
Depends: osmo-sgsn.git Change-Id I51b5227d92027f1251dc4debbbf59737e7c1a9ba
Change-Id: I1ff8c51a73556357c5a5e97bc2a0edec30f1cf03
Pau Espin Pedrol at
library/SGsAP_CodecPort: Properly fill in ASP_Send record

Otherwise it showed up as unbound and errors about wrong protocol showed
up. According to osmo-msc code ppid 0 is expected, so set it.

Change-Id: I6434a6522af3cae35824df5931ad5c33d79c505b
Pau Espin Pedrol at
mme: Rename GTP related functions

Better express what they are about. For instance, they only work on
GTPC, not GTPU.

Change-Id: I84b25b2c64f2d5b473e08949e8501dc5dae5b393
Pau Espin Pedrol at
mme: Introduce f_init() helper

Change-Id: I89f0dfb9c79c3edb7b42751a76f36a983da59c1d
Pau Espin Pedrol at
mme: Move g_Tguard to MTC_CT

There's no need to have Tguard per ConnHdlr, one in the MTC_CT is enough
and simpler to handle.

Furthermore, it allows to early arm it, in case something fails during
f_init().

Change-Id: I8b766ad83030ac5c92fe64b7ea2df35468b23fc0
Pau Espin Pedrol at
mme: Call f_init_handler() inside f_start_handler_with_pars()

Change-Id: I9d05c340b173cbab08bbd066d7261341d902d455
Pau Espin Pedrol at
mme: Split ConnHdlr to its own file

Change-Id: I322e679fa252388649b897a13d2d4a325212a71a
Pau Espin Pedrol at
Add templates for S1AP Handover procedure

These templates include handover preperation and resource allocation for
S1 handover procedure. It supports mandatory information elements only
at this time.

Related: SYS#7309
Change-Id: Ib8b8aee0665a4f6644287b802f5e941bd82128f6
Vadim Yanitskiy at
S1GW tests: Add test cases for S1 handover procedure

The test cases expect the handover preparation and resource allocation
to be passed on correctly with expected modifcation of E-RABs.

Related: SYS#7309
Change-Id: Id349c84749f7e897defa8cfd2ecd2c1f2fb52fc7
Vadim Yanitskiy at
mme: Set EPS Attach Type to valid value 'EPS Attach'

Previous value 0 is unused, see TS 3GPP TS 24.301 9.9.3.11.

Change-Id: I7b0c028620ee1ff6b819cce95b39fb93a70d4106
Pau Espin Pedrol at
asterisk/gen_links.sh: fix broken symlink

There exist two files named `PIPEasp_Templates.ttcn`:

* library/PIPEasp_Templates.ttcn
* deps/titan.TestPorts.PIPEasp/demo/PIPEasp_Templates.ttcn

We use our own one from the library, not the demo one.

In `asterisk/gen_links.sh` we first create a broken symlink, and then
overwrite it with a valid symlink to `library/PIPEasp_Templates.ttcn`.
This should not be a problem, since `gen_links.inc.sh` is calling ln
with flags `-sf`, yet we saw a build failure in Jenkins:

https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-asterisk-ims-ue-test/559/consoleText

------
> [3/5] RUN TTCN3-DOCKER-PREPARE "master" asterisk:
0.463 '/ttcn3-dumpcap-stop.sh' -> '/osmo-ttcn3-hacks/ttcn3-dumpcap-stop.sh'
0.463 + ln -sv /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /ttcn3-tcpdump-stop.sh
0.464 '/ttcn3-tcpdump-stop.sh' -> '/osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh'
0.465 + ln -sv /osmo-ttcn3-hacks/_scripts /_scripts
0.466 '/_scripts' -> '/osmo-ttcn3-hacks/_scripts'
0.466 + make asterisk
0.581 (cd asterisk && ./gen_links.sh && ./regen_makefile.sh)
0.627 ttcn3_makefilegen: error: Cannot find any source file for argument `PIPEasp_Templates.ttcn'.
0.631 ttcn3_makefilegen: warning: TTCN-3 preprocessing (option `-p') is enabled,
                                  but no TTCN-3 files to be preprocessed were given for the Makefile.
0.632 make: *** [Makefile:131: _build/asterisk/Makefile] Error 1
------

Change-Id: Id79bd056716c34c4de02aba68caab95d185e6e48
Vadim Yanitskiy at
mme: Mark GTP and diameter emulations alive

Change-Id: I53851dc981e9395e025cd5d2fb0122bea49564ee
Pau Espin Pedrol at
library/s1ap: Support receiving UEContextModificationRequest

Change-Id: Iadb80eea7281b3bdf3359b0e2956e18bdb208207
Pau Espin Pedrol at
mme: Add missing tests to expected-results.xml

Change-Id: I9fbe1dd102268558f4b360dc8e870117e4e17096
Pau Espin Pedrol at
library/NAS_EPS_Templates.ttcn: Add templates to handle CS Fallback related procedures

These will be used to test MT CS call over SGsAP in MME_Tests_SGsAP.

Change-Id: If8884224e353a9883200c84d737e63c3a3ca9b33
Pau Espin Pedrol at
s1ap/S1AP_Templates.ttcn: Add templates to handle CS Fallback related procedures

These will be used to test MT CS call over SGsAP in MME_Tests_SGsAP.

Change-Id: I87fa7d988bec90ccade2f40ac4d2a0924059058e
Pau Espin Pedrol at
msc: CC SETUP MT speech: verify bearer capabilities

Verify that the MSC sends the bearer capability IE from 3GPP TS 24.008 §
D.1.2 for speech in the network to MS direction, instead of allowing
e.g. what osmo-msc master and latest release currently do:

- Filling out radio channel requirement the same way as the MS to
   Network direction, which is wrong for the Network to MS direction:
   "Bits 6 and 7 are spare bits. The sending side (i.e. the network)
   shall set bit 7 to value 0 and bit 6 to value 1." (3GPP TS 24.008
   Table 10.5.102)

- Sending a speech list in the Network to MS direction, which seems to
   be allowed in theory and MS are supposed to ignore it (end of Table
   10.5.103) but causes bugs in some MS in practice. Therefore it is
   better to ensure that osmo-msc does not send it (OS#6656).

Implement this in f_mt_call_complete(), which gets used e.g. by
TC_lu_and_mt_call.

Depends: osmo-msc I7046e9244fd9d4301ee2c4df1147a619f753739c
Related: OS#6657, OS#6655, OS#6656
Change-Id: I8fd33cf2f7fb8a1c34851ecf54fccddd2efd0536
Oliver Smith at
Add optonal e-RAB lists to HANDOVER messages

These lists are required to test release of e-RABs during handover
prparation and indication of failed e-RABS during handover resource
allocation.

New templates for the new lists and list items are added.

Related: SYS#7309
Change-Id: I78d2fa8e72bb672674727a01d5c5a9aaf31cab7b
jolly at
S1GW: Add test case to test release of e-RABs during handover preperation

HANDOVER COMMAND allows e-EABs to be forwarded or to be released. The
test provides two lists and expects osmo-s1gw to release only those
e-RABs that are included int the "E-RABs to Release List" IE.

Related: SYS#7309
Change-Id: Ic70ba19c0a6e349f63aae124607d075b6d19e779
jolly at
S1GW: Add test case to test release of failed e-RABs during handover resource allocation

HANDOVER REQUEST ACKNOWLEDGE indicates admitted and failed eRABs. The
test provides two lists and expects osmo-s1gw to release only those
e-RABs that are included int the "E-RABs Failed to Setup List" IE.

Related: SYS#7309
Change-Id: Ic14f560ae16b8386e58ac85f8af53b19d7c7a5c9
jolly at
SGsAP_Emulation: Introduce proper support for server-mode

Prior to this commit, only initial (not really useful) SCTP server-mode
support existed in SGsAP_Emulation.
This is basically because MSC_Tests uses the SCTP client-mode, and
MME_Tests_SGsAP were not yet in a fully working state.

In server-mode, we have a conn_id for the listening socket and a conn_id
for the accepted socket; track them properly.
Moreover, in server node we definetly need some sort of event to wait
for the client to connect; introduce it.
Based on existing work in Iuh_Emulation.

Change-Id: Iccf4ac96c56e947529f0ffc06428e2325a115d50
Pau Espin Pedrol at
mme: Initial working state for MME_Tests_SGsAP.ttcn tests

MME_Tests_SGsAP.ttcn tests were introduced to the repository many years
ago (~2019), but they were mostly WIP and were never run as part of the
regular testsuite.

This commit reworks and extends previous work to get them up to date
with current MME_Tests and makes most of them passing.

TC_sgsap_alert_* tests are still in WIP and will be fixed in follow-up
work.

Related: OS#6850
Change-Id: If07f1a67eb4213985da82afec94adb08786a0980
Pau Espin Pedrol at
mme: Store and check {mme,enb}_ue_id over S1AP

* Generate a different enb_ue_id based on imsi_suffix, and store it
  during startup of ConnHdlr.
* Validate the MME sends the expected message to the expected enb_ue_id.
* Store the mme_ue_id and validate also that MME keeps using it.

A new procedure is added to S1AP_Emulation, similar to what already
exists in NGAP_Emulation, to obtain the mme_ue_id allocated by the peer.
This is needed because upon rx of DL NAS Transport messages we only
receive the upper layer NAS decoded in the Connhdlr, so we can't store
and track the MME ID early enough.

Change-Id: I62902db3851f48ce9f80cb1cc84797735c0091de
Pau Espin Pedrol at
mme: Introduce test TC_s1ap_tau_periodic

Change-Id: I261c3421f6a082e0d610ece4cc96d3e031022891
Pau Espin Pedrol at
mme: Fix implementation of TC_sgsap_alert*

Change-Id: I717c6f153ae77874170bf03e7a6c7bb628d12dba
Pau Espin Pedrol at
*/osmo-*.cfg: make stderr logging consistent

Use the following options for stderr logging in all config, to make the
output consistent and readable (e.g. no hex categories, no long paths to
source files at the end of log lines). Use the same order of parameters
in all files.

  log stderr
   logging filter all 1
   logging color 1
   logging timestamp 1
   logging print extended-timestamp 1
   logging print file basename last
   logging print category 1
   logging print category-hex 0
   logging print level 1

Related: OS#6272
Change-Id: I229cce244719b3ce61afb6df33fe0ca20dc22456
laforge at
es2p_Types_JSON: add ES2p JSON encoder/decoder

This patch adds ES2p encoder/decoder functions.

Change-Id: Ic6e230bdd0b2c43a5183cd1f53b930e6f3c53e66
Related: SYS#7339
laforge at
es12_Types_JSON: add ES12 JSON encoder/decoder

This patch adds ES12 encoder/decoder functions.

Related: SYS#7339
Change-Id: I875cbb3a6dab6ac1eac5df1199f6fb71738a744e
laforge at
stp: define PC for IPA ASP peers

This allows explicitly matching what's configured in osmo-stp's
"routing-key" & "point-code override dpc" VTY configs for each AS.
This in turn makes the osmo-stp cfg file easy to understand by looking
at the peer's (TTCN3) configuration.

There's no need to configure "point-code override opc" in the osmo-stp
since by default the PC declared in the routing-key is used to apply an
OPC on incoming messages over an IPA ASP.

Once we have the PC available in the TTCN3 config file, we can use it
inside IPA<->M3UA test to put the value in generated M3UA messages
(there's no visible changes in IPA ones because ofc the IPA signalling
doesn't include the PC in the messages).

Change-Id: I9cca2f4dd38e03ab1d259ffafd904b8890778883
Pau Espin Pedrol at
cosmetic: RANAP_CodecPort.ttcn: Fix trailing whitespace

Change-Id: Ibad0a23cfc15dd9d9a03e78ca64eb26b4ecee6d8
Pau Espin Pedrol at
Introduce TCAP asn enc/dec

ASN.1 files obtained from libosmo-asn1-tcap.git
a92fd1a6206832b626aa2a5c841b890ca37e4bd0.

Related: SYS#5423
Change-Id: Iae7f92cde02e5da966966bc95f9b74feec51958d
Pau Espin Pedrol at
tcap: Add initial templates

Change-Id: Ibc471733554c75b7c494b2bd4126232dd8c0553c
Pau Espin Pedrol at
smlc: Remove unneeded RAN_Adapter.ttcnpp from gen_links.sh

Change-Id: I332c09c65a9dba40bca2851eb34cd3edf8da8727
Pau Espin Pedrol at
sgsn: Remove unnedeed redefinition of RAN_Configurations

This is already defined in the same way in RAN_Adapter.ttcn, where
record RAN_Configuration is also defined.

Change-Id: Ia2193c2b7e71eb544e6aba75326babd28962a0f9
Pau Espin Pedrol at
Move RAN_Configurations module parameter definition to *_Tests.default

This way we can easily tweak values, which usually involve other
programs' config like osmo-stp, without needing to recompile ttcn-3.
Furthermore, we avoid ending up in the situation where the .ttcn file
contains invalid data which is always overridden in .default, like it
happened in MSC_Tests.ttcn.

Change-Id: Id7e77a2ecf68520a853dc35fe0013a0611e744a1
Pau Espin Pedrol at
euicc: changes and extensions to support es9p and es2p testing

Change-Id: I9c622751e195d33f6f0a832265d6b10674d1c75c
benispeter at
euicc: clean up superfluous encdec cpp files

As a bonus this means in the future encdec copypaste is only required once instead of twice in two files.

Change-Id: Ice4ab4328faf6ad34a060bc2004a44de10691cff
benispeter at
*/gen_links.sh: fix wrong SDP_EncDec.cc symlink

SDP_EncDec.cc is not in titan.Libraries.TCCUsefulFunctions, it is in
titan.ProtocolModules.SDP. The gen_links.sh scripts had instructions to
symlink both the wrong and right location of SDP_EncDec.cc, and most of
the time the right location would be symlinked.

When the wrong location was symlinked, the next command
regen_makefile.sh would fail with:

  ttcn3_makefilegen: error: Cannot find any source file for argument `SDP_EncDec.cc'.

Change-Id: I5799ee04b9897fb58a92cf222bcffbf97275d7c1
Oliver Smith at
*/gen_links: remove TCCOpenSecurity_Functions.hh

The file TCCOpenSecurity_Functions.hh does not exist in a fresh clone of
titan.Libraries.TCCUsefulFunctions. Currently it only gets created after
gen_links.sh ran, created the symlink (to the not yet existing file) and
then ttcn3_compiler writes to it. Adjust the gen_links files to not
create this broken symlink.

Related: https://gitlab.eclipse.org/eclipse/titan/titan.Libraries.TCCUsefulFunctions/-/tree/master/src
Change-Id: Idab86fa1deb0256737167767ee7f5f2b36018df4
Oliver Smith at
buildsystem/gen_links: catch broken symlinks

Tweak gen_links() to verify that each symlink target exists. If the
target does not exist, abort with an error:

  ERROR in msc/gen_links.sh:

    File not found:
      ../deps/titan.Libraries.TCCUsefulFunctions/src/TCCOpenSecurity_Functions.hh

    Section:
      DIR=../deps/titan.Libraries.TCCUsefulFunctions/src
      FILES="…TCCOpenSecurity_Functions.hh…"
      gen_links $DIR $FILES

This is slightly slower than the previous approach (which did not check
if the symlink target exists). But this prevents adding subtle bugs
that may not trigger every time (see 520ac3ab ("*/gen_links.sh: fix
wrong SDP_EncDec.cc symlink")).

Change-Id: I0da0ec30e5eaf65d0348e22900a5ee006dee9e44
Oliver Smith at
testenv: run daemons with 'ulimit -c unlimited'

Prepare to support getting core files without having systemd-coredump
installed, as we plan to uninstall it from the jenkins servers to make
retrieving coredumps for other jobs feasible again.

When starting daemons, set the maximum core file size to unlimited.
Otherwise it might be at 0, resulting in no core files getting
generated.

I have considered using resource.setrlimit() on the python process
instead, but this wouldn't work when spawning the daemons inside the
podman container.

Change-Id: Ideaf0386c8d6111c2634f276f926e976023ff511
Oliver Smith at
testenv: coredump: support core_pattern=core

Support getting core files from a typical core_pattern=core where the
coredump just gets stored in the current working dir, instead of always
retrieving it from coredumpctl. This is what we will use with jenkins in
the future, as it makes getting core files in other jobs easier. Remove
support for the custom testenv-coredump-helper code that isn't needed
anymore.

Change-Id: Ia765b01432e4cb4cd36c45de874b966e3ebf55bc
Oliver Smith at
testenv: add empty lines around backtrace

Make the backtrace stand out visually from the rest of the logs.

Change-Id: Icd75379a875b72ddf3364895bc6a0afc57d2901e
Oliver Smith at
library/HTTP_Adapter: do not hard-code 'Content-Type'

* Do not send `Content-Type` when request contains no body.
** This is wrong and some servers would reject such a request.
* Allow passing custom `Content-Type` to
** `f_http_tx_request()` and
** `f_http_transact()`.
* Use `application/json` by default.

Change-Id: Ie35ffc56b4fedc0b4d8c4a689a2232b515b7b326
Vadim Yanitskiy at
hnbgw: fix missing TC_sccp_cr_limit() from control section

fixup for f2c95021e, add TC_sccp_cr_limit() to the control{ } section.

Related: f2c95021e
Related: Ia68dad973ef18513b52f5accb5264c557c7295ea
Change-Id: I0604d937fc909fa66f2a8668c2f6926a269b2b42
Neels Hofmeyr at
smdpp: es9p testsuite

Implemented parts conform to sgp 23 v1.13-v1.15
Certs are from https://www.gsma.com/solutions-and-impact/technologies/esim/wp-content/uploads/2021/07/SGP.26_v1.5-17-July-2025_files_v3.zip
the invalid ones are generated using smdpp/generate_all_test_certificates.py

Change-Id: I3ba163d9155a3b019214dbccc3c8031dfd7deb6b
ewild at
smdpp: add es2p test suite

Integrated with es9p

Change-Id: I2865e016974d7d7a03e00a7795a42f573b147a4b
ewild at
smdpp: es9p pure asn1 support

Can be used instead of the json layer.

Change-Id: I1d824931bd6513d2320ba30df0f8193cd8352863
ewild at
smdpp: proper headers for native code

Change-Id: I9dcb3249fc712e2ddb2c7cf48d4fc54425848bc6
ewild at
fixup for SCCP_MAX_OPTIONAL_DATA changing to 128

Change-Id: I2fdafa88be1f25c90c7e1a34423a25aa7f5bff5c
laforge at
s1gw: track eNB connection, fail immediately on loss

Change-Id: I34a3d30270f1236908643b60fc8abe590a780b89
laforge at
s1gw: implement the REST interface client

OsmoS1GW implements a custom (non-standard) REST interface, primarily
intended for state introspection.  The interface is specified using
OpenAPI, with the specification available in osmo-s1gw.git.

Change-Id: Ic6e8b46b7de4fb72139b017fc9a9c83f92fc1541
Related: SYS#7066
laforge at
ttcn3-tcpdump-start: fix default TTCN3_PCAP_PATH

Fix that manually running testsuites (as described in README.md) would
unsucessfully attempt to start dumpcap for 10s before running each test:

  NOTE: unable to use dumpcap due to missing permissions in /tmp
  Warning: Named pipe already exists: /tmp/cmderr
  sudo -n /usr/bin/tcpdump -U -s 1520 -n -i any -w "/tmp/smdpp_Tests.TC_rsp_complete_flow.pcap" >/tmp/smdpp_Tests.TC_rsp_complete_flow.pcap.stdout 2>/tmp/cmderr &
  Waiting for packet dumper to start... 0
  Waiting for packet dumper to start... 1
  Waiting for packet dumper to start... 2
  Waiting for packet dumper to start... 3
  Waiting for packet dumper to start... 4
  Waiting for packet dumper to start... 5
  Waiting for packet dumper to start... 6
  Waiting for packet dumper to start... 7
  Waiting for packet dumper to start... 8
  Waiting for packet dumper to start... 9
  Packet dumper didn't start filling pcap file after 10 seconds!!!

This happens because /tmp is owned by root and not by the user running
ttcn3-tcpdump-start. Put the pcaps in /tmp/pcap by default instead of
/tmp and create this directory as the current user if it does not exist.
This also prevents cluttering /tmp.

Note that this is only relevant when manually running the testsuites and
not setting TTCN3_PCAP_PATH, e.g. testenv sets this variable already.

Change-Id: I1eb80d7f9e8dd491387e4d1da9b4ac6ac5cb7dc5
Oliver Smith at
testenv: add a --fast argument

The ttcn3-{tcpdump,dumpcap}-*.sh scripts can easily spend 5s or more for
each test with:
* Waiting until the pcap gets created.
* Waiting until pcap size does not increase anymore after the test.
* Saving the talloc report.

Add --fast to skip all this, to allow running a whole testsuite
significantly faster locally to check for regressions. Developers can
then still run failing tests again without --fast to get the pcap and
talloc reports.

Change-Id: Ief3488293e5c5c1a1c98244f80ffd56eadb040c5
Oliver Smith at
Makefile: ctags: include *.cc/*.hh files

Also generate tags for *.cc/*.hh files.  In order to avoid generating
tags for generated source files, limit the search scope for `find`.

Change-Id: Iab28b36ea6bb6ece45d1834dfc04be489da39ea2
Vadim Yanitskiy at
RAN_{Emulation,Adapter}: Split transport type from transport client/server mode

The RAN_Transport is used to identify the stack of protocols in use up
to SCCP. The client/server mode is some extra independent information.
For instance, RAN_Emulation doesn't really use it while RAN_Adapter
does, since the later is the one in charge of setting up the lower layer
socket connection.

Change-Id: Ib2e7d029bd7eb59cc6f3b3a28bc417f00d3fed9c
Pau Espin Pedrol at
Split SCCP_Adapter out of RAN_Adapter

RAN_Adapter has further features and goes up in the stack, while
sometimes getting an SCCP SAP is enough, eg. when doing stuf with
SIGTRAN on the Core Network (eg. TCAP).

Change-Id: I0558d74d53ceb1b33c4f3d583f1b4489f6d7ee60
Pau Espin Pedrol at
SCCP_Adapter: Allow configuring ipa_ccm_pars in SCCPLite transport

This is needed for instance to set ipa_unit_id, which must match the AS
name configured at the STP.

Change-Id: I16e1f5d0c40c03330642b2781dc6ddae81d821b2
Pau Espin Pedrol at
testenv: add --install-package

Add an option to quickly install packages in the container. This is
useful when making a new SUT run with osmo-ttcn3-hacks and figuring out
which packages need to be installed to make the build pass (without
rebuilding the whole container for each missing dependency). It can also
be used to quickly install additional debugging tools (strace, valgrind,
etc.). A cache for the deb files is already getting mounted inside the
container.

Change-Id: Ie54817e6c0334a224a612521beb378537c10d39d
Oliver Smith at
sgsn/SGSN_Tests_SNS.cfg: adjust to recent changes

Fix this error:
  Error: Error message was received from HC at 10.0.2.100 [10.0.2.100]: Error while setting parameter field 'SGSN_Tests.mp_ranap_cfg[0].sctp_addr' to '{ 23908, "127.0.0.103", 2905, "127.0.0.200" }': Non existent field name in type @RAN_Adapter.RAN_Configuration: sctp_addr

Fixes: 0cdd73a8 ("Split SCCP_Adapter out of RAN_Adapter")
Change-Id: I62a1188aa3346fda3f0674296629ade51a02088f
Oliver Smith at
testenv: set PYTHONUNBUFFERED=1

Prepare to run PyHSS, which needs this variable to be set or else no log
messages are printed. This problem exists with potentially all python
scripts that testenv would run, so set the env var for all commands.

Change-Id: I155f7c7bd9b985094e36fee6c6a2acfe556f580d
Oliver Smith at
hlr: add HLR_IMPL_PYHSS

Prepare to run the HLR testsuite against PyHSS.

Related: OS#6862
Change-Id: I0989374d777aabf5afaf224faeb0cb2ff4e603e6
Oliver Smith at
hlr: don't test OsmoHLR-only features with PyHSS

Proxy, mslookup and creating subscriber on demand are not implemented in
PyHSS, so don't test these features when testing PyHSS.

Related: OS#6862
Change-Id: I0c4905dd3f73abfe9f7cc77fc045368b9499aade
Oliver Smith at
hlr: add MSC to ccm_pars.name

Fix an immediate disconnect from pyHSS:
  [ERROR] 127.0.0.1:9999: Role not found in tags. 'sgsn' or 'msc' must appear in one of there tags: TYPE, UNIT, UNITNAME. Closing connection.

Related: OS#6862
Change-Id: I1813e49ec286892c1a637deb99908903613696aa
Oliver Smith at
hlr: add initial testenv_pyhss.cfg

With this patch and fixes in PyHSS, the first test cases are passing:
https://github.com/nickvsnetworking/pyhss/pull/257

Tests passing:
* TC_gsup_sai_err_invalid_imsi
* TC_gsup_ul_unknown_imsi
* TC_gsup_sai_err_unknown_imsi
* TC_gsup_purge_unknown

Related: OS#6862
Depends: osmo-ci Ic7acd3ca654580aa8e5a52f162f5c9042fc7d09f
Change-Id: I7a7e709ec02a9bf44343fff4df2861dfe4e1a761
Oliver Smith at
hlr: fix error msg in f_count_auth_tuples

Log expected_auth_tuples instead of mp_default_num_auth_tuples,
otherwise we get bogus messages such as:

  Did not received expected number of auth tuples. Expected 5 but received 5

Change-Id: Icc0e3118f0cf113ed8784a9f22d3d2ccbf47cf76
Oliver Smith at
hlr: wrap f_vty_subscr_create and _delete

Add wrappers as f_subscr_create/_delete (without _vty), and only use the
VTY implementation for OsmoHLR. This is in preparation for implementing
a different method for PyHSS in a follow-up patch.

Avoid passing the VTY parameter by splitting each function into a normal
variant that runs on test_CT, and a _HCH variant that runs on
HLR_ConnHdlr.

Change-Id: I6aafa118645346fd709c56de1e38771ed4de93b7
Oliver Smith at
Allow matching tr_GTP2C_CreateSessionReq with any tEID

Related: SYS#7635
Change-Id: I6fe3ba9f24bd0615e70ffe515c5b8c907ca8a494
jolly at
Fix length indicators in tr_NAS_ActDefEpsBearCtxReq

Related: SYS#7635
Change-Id: Ibce4b56c479fb5e31ee1f7871eab168facfef94e
jolly at
library/s1ap: Add support for E_RABSetupRequest

Related: SYS#7635
Change-Id: I4593bb8a7845b4b1dd10866fca47f473bd585cf6
jolly at
library/NAS_EPS_Templates: Add Emergency Number List templates

Change-Id: Ied3d8f56f84302617edc1cf3017a2866c6dbbd96
jolly at
MME-Tests: Add tests for emergency cappability indication

When an attachment is accepted, MME indicates the capability of
emergency calls, if and only if configured in MME's configuration file.
The emergency numbers that are configured are also indicated.

The tests check if the indications follow the configuration and are
correctly encoded.

Related: SYS#7635
Change-Id: I3d84486dd3826d0f60a3c06693118e36b01ecd2b
jolly at
MME-Tests: Add test for emergency bearer setup

When the UE makes an emergency call, it requests emergency bearer to be
established. The configured emergency bearer will be established.

The test checks if the emergency bearer is established and the APN
name matches the configured APN name.

Related: SYS#7635
Change-Id: I2a81defc96bcebdf1a4ec765278ca502800cbe46
jolly at
smdpp_Tests: fix sourcecode formatting, remove line breaks

Change-Id: I50175cd2989d6bfbe220c33e73a1724166ca548f
Related: SYS#7339
pmaier@sysmocom.de at
smdpp_Tests: rename smdp_server_url to smdp_server_fqdn

The member name "smdp_server_url" is technically not correct as the
content is an FQDN. Let's rename it to "smdp_server_fqdn".

Let's also put a comment in which we explain why FQDN is hardcoded
and not available as configurable module parameter.

Related: SYS#7339
Change-Id: I0224c838a368656821fff6014b0df7eb49466b0a
pmaier@sysmocom.de at
smdpp_Tests: make ES9+ and ES2+ ports configurable

Change-Id: I17f2713088c583bec26a0a8cdff40c796e0a490b
Related: SYS#7339
pmaier@sysmocom.de at
smdpp_Tests: simplify generation of smdpp_ConnHdlrPars (NIST vs. BRP)

When we call f_init_pars() it will return a record with default parameters.
However, those parameters are only a suitable default when the NIST curve
is used. For the brainpool curve we will have to modify returned result.

Let's simlify this by adding a parameter to f_init_pars() that allows us to
switch between the defaults for NIST and BRP as needed.

Realated: SYS#7339
Change-Id: Ied4ffa6ff4b3efbbcfc9204ce8f21ea7ca4becf5
pmaier@sysmocom.de at
hlr: pyhss: create/delete subscribers

Run the PyHSS API service, and fill it with a default APN on startup.
Having one APN entry in the database is required for creating
subscribers.

Talk to the API service for creating and deleting subscribers. Do this
with a new script pyhss_api_helper.py. Deleting subscribers requires
reading JSON returned from the server (to get the AUC and subscriber ID
from the IMSI). I have first attempted to do this via HTTP_Adapter
instead of using a helper script, but this was a lot more complex and
would have required to have the JSON structure in the TTCN3 files. The
eim testsuite also runs an external script for REST requests.

With this change and additional fixes in PyHSS, more tests pass:
* HLR_Tests.TC_gsup_sai
* HLR_Tests.TC_gsup_sai_num_auth_vectors
* HLR_Tests.TC_gsup_ul
* HLR_Tests.TC_gsup_purge_cs
* HLR_Tests.TC_gsup_purge_ps

Related: OS#6862
Change-Id: Ic924dabbc813459f73d6646ee17b79cb11d39a76
Oliver Smith at
Update key for Osmocom OBS

Change-Id: Id72581dc1cffb9d43dfc56aa16f2b1b9baf9c04f
Oliver Smith at
mme: add missing MME_Tests_emergency.cfg

Fix for:
  install: cannot stat '…/mme/MME_Tests_emergency.cfg': No such file or directory

(Config added by Andreas, commit message by Oliver)

Fixes: a8eb4c70 ("MME-Tests: Add tests for emergency cappability indication")
Change-Id: Id282981a735f9f5e29f957dc395210f5e785bff3
Oliver Smith at
smdpp_tests: extend comment with hint on CA cert locations

Let's extend the comment around mp_es2plus_server_host and mention that
CA certfiicates should be made availablein /etc/ssl/certs. In case the
CA certificate is not present in /etc/ssl/certs, libcurl will refuse
to connect.

Change-Id: I58d4f35c8493a9f9531da8d7c565760a08101e35
Related: SYS#7339
pmaier@sysmocom.de at
testenv: fix wrong exception name

Fix for:
  AttributeError: module 'testenv' has no attribute 'NoTraceError'

Change-Id: I800bccf63feb590069f80684474ca2d700ae697e
Oliver Smith at
ES2Plus_Tests: cleanup/add module parameters

The ES2Plus_Tests only have minimal configuration options. Let's remove
hardcoded options and replace them with module parameters. Let's also
document the module parameters.

Change-Id: Ib8e128e4af8e819799c4d7ea3e6a36189462f382
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests: fix typo

Related: SYS#7339
Change-Id: I510a879042977b6ef1cd19e5a66fceeefa42e0c1
pmaier@sysmocom.de at
smdpp_Tests: move module parameter up

The module parameters are somewhere in the middle of the module
code. Let's put them to the top to make it easier to find them.

Change-Id: I8d0fae934e48eb55d78bfa904be064c2613930a8
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests: remove unused module parameter

Change-Id: I98921155d74209ffe97d6981a1d65a4424ef918c
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests: remove obvious comment

Change-Id: I30564ecd89f32ea1830ef1f3bbfcddc4b3f585c4
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests: move [TESTPORT_PARAMETERS] up

We normally have the [TESTPORT_PARAMETERS] right below [LOGGING]

Change-Id: If0d5ba0dc8d5b1f07215d6ac8c02a36253c200f6
Related: SYS#7339
pmaier@sysmocom.de at
smdpp_Tests.cfg: remove unused testport parameters

The testsuite uses a custom libcurl based sublayer that handles all
the HTTP related tasks. Let's remove the HTTP_server_port related
testport parameters.

Change-Id: If58675f4243250381d407722c52e8e2384aa4f22
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests: improve error messages when setting verdict in f_init_es2plus

It is not enough to say something has failed, it is also important
to say what exactly and what for.

Related: SYS#7339
Change-Id: I1a4aa85e3b1950eae0f910a14a95afa8e16c9cf6
pmaier@sysmocom.de at
ES2Plus_Tests: add "es2plus" prefix to module parameter

Let's prefix the module parameters to make it easier to understand
their purpose.

Related: SYS#7339
Change-Id: Idda9f287177cb1dce66bbef410bb1b7085f55b4d
pmaier@sysmocom.de at
ES2Plus_Tests: rename mp_es2plus_server_host to _fqdn

Let's rename the module parameter mp_es2plus_server_host to
mp_es2plus_server_fqdn. The reason for this is that the suffix "host"
suggests that one may use an arbitrary hostname or IP address. In
this case this is in fact not true. The FQDN must match the hostname
of the SSL server certificate. Apart from that GSMA SGP.22 always
uses the word "FQDN" in their specs.

Change-Id: Idedfcce4d013c32f43307e159c45854a1e6a049b
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests.cfg: remove unhelpful comment

There is no benefit for the user from this comment. The port number
also is often a custom parameter that depends on the actual setup.

Change-Id: Ic7b2d9d665feee211d6dedcf9068a6ce3c993aaf
Related: SYS#7339
pmaier@sysmocom.de at
ES2Plus_Tests.cfg: comment out parameters in config file.

The code in ES2Plus_Tests.ttcn already provides safe defaults, so we
do not have to repeat those defaults again in ES2Plus_Tests.cfg.

So let's comment out the parameters. This way we kenn keep them for
illustrative purposes, so that users can use the config file as a
helpful template for the most basic settings.

Related: SYS#7339
Change-Id: I5677222305d847ba3ac1cdafecdc942ece80aa8c
pmaier@sysmocom.de at
smdpp_Tests.cfg: comment out parameters in config file.

The code in smdpp_Tests.ttcn already provides safe defaults, so we
do not have to repeat those defaults again in smdpp_Tests.cfg.

So let's comment out the parameters. This way we kenn keep them for
illustrative purposes, so that users can use the config file as a
helpful template for the most basic settings.

Related: SYS#7339
Change-Id: I981b683da0312799c2e5b24ac57cd838b071f955
pmaier@sysmocom.de at
smdpp_Tests: remove excess newline

Related: SYS#7339
Change-Id: Ice4d472eadf259204a4a849273bccbca8728f2ec
pmaier@sysmocom.de at
smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn

In smdp_Tests.ttcn, the ES9+ and ES2+ interface are intermingled. This
is a problem since ES2+ and ES9+ are two independed interfaces and they
may use different certificates and may even be reachable under a different
FQDN from a different network interface.

To untable ES2+ and ES9+ we can move the ES2+ code from ES2Plus_Tests.ttcn
to smdpp_Tests.ttcn. Since ES2Plus_Tests.ttcn inherits from smdpp_Tests.ttcn
the ES2+ code will still be available to ES2Plus_Tests.ttcn.

This change will add the flexibility of ES2Plus_Tests.ttcn to
smdpp_Tests.ttcn. This means we can now freely configure the FQDN and the
certificates used with ES2+.

Related: SYS#7339
Change-Id: Ib59568379a9d454ea99d66550d6da8fd203681db
pmaier@sysmocom.de at
smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters

Let's add an explanatory comment to mp_es9plus_server_port_nist and
mp_es9plus_server_port_brp

Related: SYS#7339
Change-Id: I7e3f0292256b21a75da5b756ee9af6ec58318de1
pmaier@sysmocom.de at
smdp_Tests: remove custom_tls_cert module parameters

The module parameters mp_use_custom_tls_cert and mp_custom_tls_cert_path
are no longer needed, so let's remove them.

Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964
Related: SYS#7339
pmaier@sysmocom.de at
smdpp_Tests: improve messages when setting verdict in f_init_es9plus

It is important to tell that the failure happend in the context of the
ES9+ initialization.

Related: SYS#7339
Change-Id: I6b55d0bb6d5bd698241a990cf8388adc68a99543
pmaier@sysmocom.de at
smdpp_Tests: rename f_rsp_client_init to f_init_es9plus

We already have an init function for ES2+ that is called f_init_es2plus,
let's rename f_rsp_client_init to maintain consistency.

Related: SYS#7339
Change-Id: I865b9dfc3597f9a962225880b7a5cda838b8377e
pmaier@sysmocom.de at
smdpp_Tests: fix typo

Related: SYS#7339
Change-Id: I8c2dc134f78b2780641a82baf0cebbb3ffbf9150
pmaier@sysmocom.de at
smdpp_Tests: fix sourcecode formatting

Related: SYS#7339
Change-Id: Id7edf94858a952b22bd8b86957a05b18968e085e
pmaier@sysmocom.de at
bsc: TC_lcs_loc_req_without_smlc: new test

Related: SYS#7714
Depends: osmo-bsc Ie8a66f9decf9fff602f7fecfb71a78fab900066f
Change-Id: I1cd7a7658b21d3eb04443a15ffd5ddf09b466af5
Oliver Smith at
smdpp_Tests: optimize calling of f_init_esXplus

When we call the f_init_esXplus functions we always check the return
code to see if the initialization went ok. However in both functions
we already set the verdict and in the ES2+ variant of the functions
we already stop the MTC. Let's optimize the function calls so that
we only call the function without checking the return code. Let's
do all the error handling and the stopping of the MTC in inside
f_init_esXplus.

Related: SYS#7339
Change-Id: I64fc5a7eddd6c5aee8ce85dbfe56c076f3372f3d
pmaier@sysmocom.de at
IPA: Introduce new OSMO extension TCAP_ROUTING

TCAP_ROUTING is an extension to IPA/SCCP where
the node can requests to receive only certain TCAP traffic
to support loadsharing.

Related: SYS#5423
Change-Id: Ibfcf633f7bd8773f557901fdff7580f5879391a1
lynxis at
library: TCAP: ts_TCAP_UNITDATA_req: allow to define the returnOption

TCAP loadsharing will use RETURN_OPTION_ON_ERROR option to
test UDTS when no TCAP ranges matches.

Related: SYS#5423
Change-Id: Ie4f6d9e02f65687c3158cae41f28aa30b95f85f8
lynxis at
library: TCAP: add tr_TCAP_N_NOTICE_ind

A SCCP UTDS will be passed to the TCAP layer as TCAP_N_NOTICE_ind.
Will be used by utds testsing of tcap loadsharing.

Related: SYS#5423
Change-Id: I002afabb8e827dc35cd9f4e37a6970d91600ee37
lynxis at
stp: Introduce STP_Tests_TCAP

The network topology and test infrastructure already allows testing TCAP forwarding
at STP over IPA<->IPA, M3UA<->IPA and M3UA<->M3UA.

Co-authored-by: Alexander Couzens <lynxis@fe80.eu>
Related: SYS#5423
Change-Id: I4340bdf126118c66af861f5a447e90883783920e
lynxis at
hlr: testenv: fix running pyhss from debian pkg

Move the run_in_venv.sh script that is only used by pyhss from the
generic location _testenv/data/scripts/run_in_venv.sh to
hlr/pyhss/run_in_venv.sh and hardcode the path
/opt/venvs/pyhss/bin/activate in there when running from binary
packages. This is the path used in the binary package in the Osmocom
OBS, the default path from dh_virtualenv. The package doesn't install
pyhss_gsup etc. to /usr/bin, as these are usually not meant to be
directly started without the systemd services that have the
/opt/venvs/pyhss path hardcoded.

Also put 'export PYHSS_CONFIG=config.yaml' in there, now that
the script is pyhss specific.

Related: https://dh-virtualenv.readthedocs.io/en/1.2.1/usage.html
Change-Id: I0cdf1a9f220ddd2ef0866d0d11d1e3f6056a1cba
Oliver Smith at

#21 (Aug 27, 2025, 9:51:46 AM)

testenv: fix missing titan_min= error msg

Fixes: 98268b665 ("testenv: add titan_min to all configs")
Change-Id: I0eb99da16ba6ffd5ae936aa63bb770e2a73fdd25
Oliver Smith at
pgw: initial testenv.cfg

All tests are passing with this config.

Related: OS#6494
Change-Id: I0f14ce56859c3303b2f6af57d7ab5722e0cbe8e0
Oliver Smith at
stp: Expect and answer M3UA BEAT from IUT

This fixes tests failing with newer versions of libosmo-sigtran where
HEARTBEAT procedure is enabled by default.

Change-Id: Idb70acde0683bc053db20781ce4926fbc318f51f
Pau Espin Pedrol at
IPA_Emulation.ttcn: Add call to support dis/enabling CCM management

This allows eg. a user to let the Emulation do the inital handshake, and
then pass control of eg. IPA PING/PONG messages directly to the user
afterwards.

Change-Id: If68e0ba36c3a56f021dd50aadf2156ddc696b816
Pau Espin Pedrol at
stp: IPA: Introduce test TC_beat

Similar to the one already available in STP_Tests_M3UA, but testing
PING/PONG in IPA.

Change-Id: I3d762fb4780aaa9931c3841cce69da6ee95529f3
Pau Espin Pedrol at
stp: IPA: Introduce test TC_beat_timeout

Change-Id: I6f16915238d7762faf1c63fdeccca7e4a5f20893
Related: SYS#7501
Related: OS#4072
Pau Espin Pedrol at
stp: IPA: Introduce test TC_clnt_beat_timeout

Change-Id: I5a41857dbd9f0bfe40a3a539aaed8361bc29fd6b
Related: SYS#7501
Related: OS#4072
Pau Espin Pedrol at
stp: Introduce test TC_(m3ua_tcp(clnt_))beat_timeout

Related: SYS#7501
Related: OS#4072
Change-Id: Ie0c430b7992881e8ae506fe6434f06946f8f6278
Pau Espin Pedrol at
epdg/testenv/run_osmo_epdg…: fix ip link ls output

In the code that waits until the tun device is available, fix the
silencing of stdout and stderr.

Change-Id: I8ce8824930e8841dddd7a67d178d5140e4f71b84
Oliver Smith at
epdg/testenv/run_osmo_epdg…: wait up to 30s

Wait up to 30s for the tun device as waiting 10s is not enough if
jenkins is under high load.

Related: https://jenkins.osmocom.org/jenkins/job/ttcn3-epdg-test-net-next/29/console
Change-Id: Ia7298275b92f30efc40e9d6afa1abc8d7c5536d6
Oliver Smith at
Bump titan_min to 11.1.0 where possible

I ran the generic version of all testsuites in the Osmocom jenkins with
eclipse-titan 11.1.0. Bump titan_min where we have the same result as
with 9.0.0.

The only testsuite that still didn't work the same is the gbproxy
testsuite (OS#6800), keep titan_min=9.0.0 there for now.

Related: OS#6490
Change-Id: Iba562ace07e6f38a8cde15b17478a0a1680df2fc
Oliver Smith at
testenv/podman_install: fix regex warning

Fix for the following warning with Python 3.12.3:

  …/testenv/podman_install.py:120: SyntaxWarning: invalid escape sequence '\d'
    pattern = re.compile("^\d+\.\d+\.\d+$")

Change-Id: I33ef4e16f3d3e4fa627f726d6fddd950b7826620
Oliver Smith at
stp: m3ua: Introduce test TC_combinedlset_loadshare

Test combined linkset loadsharing on M3UA AS.

Related: SYS#7112
Change-Id: I20a67648072f4d9839b1d1fceded1680362bf979
Pau Espin Pedrol at
stp: Add helper function to build SCCP UDT encoded octetstring

Change-Id: I67961807bba4853b58e4b6f87eb3f2b56e9bb027
Pau Espin Pedrol at
stp: ipa: Introduce test TC_combinedlset_loadshare

Test combined linkset loadsharing on IPA AS.

Change-Id: I029ac9f3c664d2f30cddc36f6eb1b39295689247
Related: SYS#7112
Pau Espin Pedrol at
Fix typo unknwon -> unknown

Change-Id: I483090332931d85a8808bd558c4d4ac4d36fa16b
Pau Espin Pedrol at
stp: Fix recent regression introduced in TC_ipa_to_m3ua_patch_sccp

The introduced function f_SCCP_UDT() had the calling+called param order
swapped with regards to previous templates. Change the order to first
have "calling" (src) and then "called" (dst) as already done in
ts_SCCP_UDT.
While at it, change the ts_SCCP_UDT params to accept template (value) to
make it easier for callers.

Fixes: b686e914b60d6e2486667fa8227576a70a86c909
Change-Id: I0e158557dabdb7e94d1c00a6d67126f2d85bb4cd
Pau Espin Pedrol at
pcu: TC_sns_del: improve test stability

Add a sleep 1 to ensure the BSSGP flow Ack flows before removing the SNS.
Further add a data weight to the other NSVC to have at least one valid
NSVC with data weights. Otherwise the NSEI would become unavailable.

Related: OS#6751
Change-Id: Icb32e5f46ba7950848343efc46aee67e2397de5d
lynxis at
remsim: bankd: add TC for creating a mapping with a busy client

Test if a busy client is implicit removed when creating a new mapping
for the same client with a different bankd slot.

After a desynchronisation between the server and bankd happen (e.g. restart the server),
the server might request a mapping between a client slot and a bankd slot
while the bankd still has a different mapping for the same client slot.

Example before this commit:
* server -> bankd: New Mapping (client 1/0, bankd 1/0)
* server <- bankd: Ack
* Restart server
* server -> bankd: New Mapping (client 1/0, bankd 2/0)
* server <- bankd: Ack (implicit remove mapping to bankd 1/0)

Related: SYS#7470
Change-Id: I57112758167c2a29fae9df0cf1e2691c5a8e7bed
lynxis at
bsc: generic: Introduce test TC_stat_msc_sctp_disconnected

Take the chance to properly configure all ASP/AS data statically, in
order to be able to access them through VTY as well as have the setup
properly documented in the config files.

Change-Id: I028a16e2742ff0c58bf3b51ee1233ccf947a5a6a
Related: OS#5917
Related: SYS#7501
Pau Espin Pedrol at
stp: Support expect RFC466 4.5.1 DUNA after ASP ACT

libosmo-sigtran recently introduced support in SG role to send DUNA for
unreachablew destinations when a peer ASP becomes activated.
This is currently sent upon first ASP going active, since it's the time
where SG assumes the ASP peer may need that information.

Depends: libosmo-sigtran.git Id9d92c3fda7423a9c79fffac6b650abba9651853
Change-Id: I6bee0f890a8baaa62be193824b1ae2fceb53fb45
Pau Espin Pedrol at
Cosmetic: testenv: tweak argparse formatting

Make all "add_argument" calls consistently have one function argument in
one line, instead of only having it in some places, and have all
arguments in one line in others. Having one function arg in one line is
enforced via ruff format when having a comma at the end of the function
call.

Change-Id: Ia1804f0313a27ddf8f7197ce0b2ad3b56421b290
Oliver Smith at
testenv: add run --asan

Add a new --asan option for building Osmocom libraries and programs from
source with address sanitizer enabled. This works by adding
sanitize.opts to osmo-dev's gen_makefile.py, which in turn adds
--enable-sanitize to most Osmocom projects.

The --autoreconf-in-src-copy argument for gen_makefile.py must be moved
up, so the list of *.opts files is not interrupted by another type of
argument that causes argument parsing to fail.

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Related: https://gitea.osmocom.org/osmocom/osmo-dev/src/branch/master/sanitize.opts
Change-Id: I1947dd3a7d9ce51dcbef9cffd5d7b402f236b9e2
Oliver Smith at
bsc-sccplite: Fix override of opc of incoming msgs

This patch fixes a regression introduced recently in a patch. We
basically revert that line change. This fixes osmo-bsc crashes
spotted during ttcn3-bsc-test-sccplite.

Fixes: 40c73568c77ee3747a02fce2cf031d723a938207
Related: OS#6806
Change-Id: I9764f4020e80e954de61ff9ba4d8ce959359be8e
Pau Espin Pedrol at
bsc: Avoid running TC_stat_msc_sctp_disconnected in latest

The osmo-stp in latest release, aside from not yet implementing the
"shutdown" cmd (which is known and hence test was expected to fail
there), has a side effect of ending up with a broken state after
restarting the ASP during got_parent() VTY node exit, where ASP is
ends up in ASP_DOWN and AS in AS_ACTIVE. This generates failures in all
tests after this one._

Change-Id: Icce4ec089b300f418e957ab67464759c782811a4
Related: OS#5917
Related: SYS#7501
Fixes: 40c73568c77ee3747a02fce2cf031d723a938207
Pau Espin Pedrol at
PCU: TC_sns_del: expect NS Alive while preparing the test

f_outgoing_sns_chg_weight() should handle NS Alive until
it do the SNS Delete procedure.

Related: OS#6751
Change-Id: I7c0991819de48b59e763fbe1ef6df4567c38007c
lynxis at
RAW_NS: SNS: allow to set the transaction id of Add/Chg/Del procedures

Using hardcoded transaction ids are working, but for the TC_SNS_del it would
result in descending transaction ids.

Related: OS#6751
Change-Id: I1ea0424232ed925fee623568eb0edccdf1ae0368
lynxis at
RAN_Emulation.ttcnpp: Log ignored rx RANAP msg when no cb set

Change-Id: I15b6fea2d44ab9607db020e1152ee1fd79839a52
Pau Espin Pedrol at
StatsD_Checker: Allow configuring timeout

Change-Id: I183ad5810468cba5bfec20eb584a27462fde980c
Pau Espin Pedrol at
StatsD_Checker: Keep polling IUT if waiting for convergence

The wait_converge feature was implemented and used so far only against
IUTs which used also the snapshot feature, due to not having a VTY which
allows both resetting and triggering a status report manually. Instead,
those relied on IUT reporting changes at a given frequency.

If the wait_converge feature is requested and polling mode is used, then
make sure we poll once per second after last received statsd UDP msg.

Change-Id: Id78b46b88048206f74d1d88672b8309227e9438c
Pau Espin Pedrol at
bsc: TC_mscpool_sccp_n_pcstate_detaches_msc: wait for AS to become unavailable

Otherwise race conditions can ocurr, specially since during some time
the AS can be in PENDING state until finally going into DOWN state and
notifying the peer.

Change-Id: Idc84929d89cbac4eb67cd2740f98844253dde70d
Pau Espin Pedrol at
hnbgw: Use static sigtran config between osmo-hnbgw and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Related: OS#5917
Change-Id: Icbec561e28db8e0da19a284b3ba73636ea5c8210
Pau Espin Pedrol at
hnbgw: Introduce test TC_stat_stp_sctp_disconnected

Related: OS#5917
Depends: libosmo-sigtran.git Change-Id I7e4eedb65c4f2952f8b39ca4c539ca2f40e9946c
Change-Id: I079f2da09ff8d52e614ff6f5d267cd5429e4eb58
Pau Espin Pedrol at
hnbgw: swap first MSC and SGSN PC to be usual default ones

0.23.1 and 0.23.4 are default remote PCs to be used by osmo-hnbgw to
reach MSC and SGSN respectively, if no config is provided. In this
testsuite config, however, they were swapped, which is confusing.
Swap back the values so they match the default ones in osmo-hnbgw.

Change-Id: Ib62258e340ecf8cbe1026e43ccccc6bf98932244
Pau Espin Pedrol at
msc: Use static sigtran config between osmo-msc and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Related: OS#5917

Change-Id: Id78aac528b10a8449b83075419b74315d838d4a4
Pau Espin Pedrol at
RAN_Emulation: Fix handling of IMSI in RANAP Paging

The IMSI in RANAP Paging messages is encoded in octetstring BCD format.
We need to decode it before using it, since we use plain hexstrings
everywhere in the module to manage IMSIs.

Take the chance to clean up and improve logging on related lines, both
for BSSAP and RANAP.

Change-Id: Ia892a52bad41a4e331703bbab438d8c811b2025e
Pau Espin Pedrol at
msc: Add suport to obtain statsd output

It will be used in a follow-up commit introducing a new test.

Change-Id: I66ffb278a7ddff975e43f72d9ec6b323705f720c
Pau Espin Pedrol at
msc: Introduce test TC_stat_bsc_sctp_disconnected

Related: OS#5917
Depends: osmo-msc.git Change-Id Ice1b2c163b1b0d134fcaa1c8bf543038a35fabdf
Change-Id: I4cf30ea09cb1d1286bd5ab6975f3f27e39b9c183
Pau Espin Pedrol at
GSUP Fix missing IMSI template present restriction in tr_GSUP_SAI_REQ

I got this DTE while running SGSN_Tests_Iu.TC_attach_pdp_act_user:
"""
GSUP_Templates.ttcn:381 Dynamic test case error: Restriction `present' on template of type hexstring violated.
"""

According to GSUP documentation, the IMSI param is mandatory.
Upon fixing it, the compiler found the user causing the problem:
"""
BSSGP_ConnHdlr.ttcn:797.49: error: Restriction on template formal parameter does not allow usage of any or omit
"""

That error is also fixed in this same commit.

Change-Id: Iea712df2f922fe5eb16e116f7a4609a0e20233b4
Pau Espin Pedrol at
sgsn: Use static sigtran config between osmo-sgsn and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Related: OS#5917

Change-Id: Ie52f4c1877587067af66add56ad8674b82b51718
Pau Espin Pedrol at
sgsn: Introduce test TC_stat_rnc_sctp_disconnected

The commit doesn't validate everything it should, because passing the
indication from osmo-iuh's iu_client to app (osmo-sgsn) is not
supported in current API, and hence the statsd metrics are not yet
implemented in osmo-sgsn.

Still, this test already validates that osmo-sgsn is capable of
surviving an sctp link down event in IuPS, and continue to work
afterwards. IT also allows easily debugging this scenario by inspecting
pcap files, logs, etc.

Related: OS#5917
Change-Id: I35888630ea9e9005e1252677c5d42f66f84e177b
Pau Espin Pedrol at
smlc: Use static sigtran config between osmo-msc and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Change-Id: I008dba252da29f445c52151c7b65428ca7054ed0
Related: OS#5917
Pau Espin Pedrol at
smlc: Add suport to obtain statsd output

It will be used in a follow-up commit introducing a new test.

Change-Id: I52813397890a85326a85b3580fd605f9ac10a26d
Pau Espin Pedrol at
sctp: Introduce test TC_stat_bsc_sctp_disconnected

Change-Id: Ic67d9d8120e9bd09b0e54b237e93f49f79262be0
Related: OS#5917
Depends: osmo-smlc.git Change-Id Ib01576036f34ac7f21c5bce0155b50932eb9b72a
Pau Espin Pedrol at
hnbgw: Use static sigtran config also in osmo-hnbgw-with-pfcp.cfg

Previous commit did set static configuration in osmo-hnbgw.cfg (generic)
but forgot to add the same to the with-pfcp scenario.

Fixes: 88d6666056d6cdc899d6c102fc379f8a469a725e
Change-Id: I20979cbd5cf7e9d8c109f72d5f84c4fbe26b44ca
Pau Espin Pedrol at
smlc: fix running against latest

osmo-smlc from latest doesn't support statsd yet. Use a separate config
that doesn't have the statsd block and don't try to initialize it for
latest.

Change-Id: If7b1d46777703f0511ee15520571d0313bdfa5ed
Fixes: 5268d5 ("smlc: Add suport to obtain statsd output")
Oliver Smith at
SGSN: Iu: use correct service request type

When the UE wants to transfer data, the Service Request
must have the type data.
Remove the default of f_service_request() to force
explicit defining it.

Change-Id: Ia47edd8ca916cf377da875583a3c4eb6ff5f1f52
lynxis at
testenv/requirements: update link

Adjust the link, as the Latest_Builds wiki page was merged into
Binary_Packages.

Change-Id: Ie8a6df2f8fd08983532c8a757ae1849792fbd5b3
Oliver Smith at
testenv: run requirements check before cfg init

When parsing testenv.cfg files, the titan_min version gets compared with
the installed titan version. This fails with a python trace if titan is
not installed. Catch this earlier by running the requirements check
first, which ensures ttcn3_compiler is avaiable or gives a helpful error
message:

  [testenv] Missing program: ttcn3_compiler
  [testenv]   Install eclipse-titan, e.g. from osmocom:latest:
  [testenv]   https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages

Fixes: 18eef740 ("testenv: support using multiple titan versions")
Change-Id: I09ed7af5b236aeffd910d7c0a1a0b63a78631ade
Oliver Smith at
testenv/requirements: simplify rsync checks

rsync is needed by osmo-dev for the autoreconf-in-src-copy feature that
testenv uses.

* Don't require rsync when running in podman. This is not necessary
  anymore since 92b3784 ("testenv: remove copy_ttcn3_hacks_dir").

* Combine the "if not testenv.args.binary_repo" code path with the
  "if not testenv.args.podman" code path, as --binary_repo can't be set
  without --podman.

Change-Id: I4fd885aa6c9b6801e18043f783bae357da716d19
Oliver Smith at
NGAP_Templates: Fix wrong IEs passed to InitialContextSetupResponse

Change-Id: I7b385456e45505cb4655adda5ad5aba36fc96a4b
Pau Espin Pedrol at
Dockerfile: upgrade to libfftranscode 0.6 (updated NGAP ASN.1 to V17.5.0)

Change-Id: I57c2f9adbb2f691f28ab936f09db3c24bdfeef5f
Pau Espin Pedrol at
ngap: Fix deviation in ASN1 from TS 38.413 version 17.5.0

I originally copied the ASN1 files from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/asn1, commit fa43d01e202379a969e991a9454d9c6c6930b5b5.

Apparently one file contained a deviation from the 3GPP content and it
was also fixed in ngap.git in 47e7239dd80f2f12a4cbcdd7977ca0a32356f3be.

I found out this problem when trying to use this ASN1 file to generate
new libfftranscode, which then failed to properly decode
DownlinkNASTransport due to the deviation.

Change-Id: I7d127998ea162a392f3381ebb1d198ad3c783a56
Pau Espin Pedrol at
library/ngap: Use titan native APER enc/dec

Related: OS#6490
Change-Id: I07b604fbd5d3665fdb48c4193ab58cffa7dd709a
Pau Espin Pedrol at
Cosmetic: deps/Makefile: update comments

Remove the part about caching logic of docker containers, as most
testsuites don't use docker-playground anymore. The main reason for
using commits here is that we have exact commits when doing regression
testing.

Replace the verbose license header with the SPDX version while at it.

Change-Id: I7eddc64aeab20292922ba013221679dfe952ff45
Oliver Smith at
5gc: Support PDU Session Establishment procedure

This commit adds initial support to issue a successful PDU Session
Establishment procedure towards the 5GC, getting a ready-to-use GTPU
session with IPv4 addr + TEID + UE IP address.

commit has to our nas.git fork is updated in order to have multiple
fixes and improvements needed to have everything working fine.

Related: SYS#7073
Change-Id: If0769afd07a4bae7778d7a7c347cebaa5909b5f8
Pau Espin Pedrol at
Split GTPv1U out of GTPv2_Emulation

GTPv1U and GTPv2C are 2 different protocols, working on 2 different
ports, on 2 different sockets.
Hence, it makes no sense to put them together, since some tests may want
to use only the control-plane, others may want to use the user-plane,
etc.
Morevoer, GTPv1U can be used together with both GTPv2C anf GTPv1C.

This commit also fixes the confusion where TEIC and TEID were not
properly separated in GTPv2_Emulation.

Change-Id: Ia45307107753294c6761cb588f0ab769821eb213
Pau Espin Pedrol at
GTP1vU_Emulation: Make UECUPS support optional

Some users may/do want to use the simple UDP/GTPU socket mode, so they
don't need to depend on all UECUPS code.

Change-Id: I3b4671d8e637f70f790b08ed8e3b5145e7a95703
Pau Espin Pedrol at
gbproxy: Drop unneeded GTP dependencies

Change-Id: Id282bf63ae4abe8f2e97d84146db1f48198dacf7
Pau Espin Pedrol at
GTPv1U_Emulation: support multiple client ports per GTP1U_ConnHdlr

This feature is already present in GTP1U code of GTP_Emulation.
That part of the code will be removed and ported to use
GTPv1U_Emulation, so we need to also support this feature here.

Change-Id: I10ce33f30a2da5159f8040725df619844a71d6bc
Pau Espin Pedrol at
Split GTPv1U out of GTP_Emulation

We already have a GTPv1U_Emulation, use it.

Change-Id: I5b3da248719b79d402b945904e3840a2ec387dab
Pau Espin Pedrol at
5gc: Rework init code

* Move T_Guard to MTC, there's no need to have multiple of them (one per
  ConnHdlr).
* Call f_init_handler() internally so it doesn't need to be called by
  each ConnHdlr test.
* Change function attribute friend to private

Change-Id: I71e5d552a6c0089345982a403285f66a92397413
Pau Espin Pedrol at
5gc: C5G_Tests.cfg: Set module name of multiple module params

Change-Id: I936240af988d4727516b5722dd360a907d70eee7
Pau Espin Pedrol at
Move ConnHdlr logic to its own file

Similar to what we do in other testsuites, since we start to have
considrable amount of logic.

Change-Id: If7edf8ee63c71fbf949e2d340cf3881fd8e3ba41
Pau Espin Pedrol at
pgw: Move to library/ high level APIs to run commands over UECUPS

This way the code can be reused by other testsuites more easily.

Change-Id: I49c98fd423e47e16ddfb9ae4612b18db21ca3fa4
Pau Espin Pedrol at
pgw: Use templates to generate UECUPS commands

This way if commands are extended with optional fields, we don't need to
update these since default params in templates will take care of it.

Related: SYS#7073
Depends: osmo-uecups.git Change-Id If524b0a122d1217fcd39e4633835a1a7d0620c7a
Change-Id: I4de6623318fe2abf9807702251fe420eb14de2cc
Pau Espin Pedrol at
5gc: Introduce test TC_register_ping4

osmo-uecups is used to set up a GTPv1U tundev with the PDU session
params configured over NGAP/NAS, similar to what is already done in
PGW_Tests.

Depends: osmo-uecups.git Change-Id I6262c3dfbf774b361aadf0aa53ce09b5fdc38da4
Change-Id: I66737a94eedcf4184aa59bbbd7cc700d1e9d1521
Pau Espin Pedrol at
library/ngap: Fix wrong procedureCode in PDUSessionResourceReleaseCommand templates

Change-Id: Ia4b0cacf8e3f859820d4b5e23d73f38bb5b7fbfd
Pau Espin Pedrol at
testenv: Dockerfile: use debian archive for deb10 libssl pkg

As Debian 10 is EOL, this debian 10 package we are still using here to
make mongodb work is getting removed from the mirrors. Currently some
still have it, some have deleted it already. Use the archive instead.

Related: docker-playground Ia447d850d38c662aac567aa88685d984c0b42238
Change-Id: I1a81e8e1485c810396f1714e6ef0485878fab6ec
Oliver Smith at
testenv: Add $install_dir/usr/bin to $PATH

When building programs from source, don't look only in $install_dir/bin,
but also in $install_dir/usr/bin for the binaries. osmo-s1gw installs to
usr/bin with recent changes and other programs may do this too.

Related: osmo-s1gw I5681ca103daf1c497218b4513b0ca97b1aae03d3
Change-Id: I8d652dba94bbd44217a3034ac012b6568941347d
Oliver Smith at
s1gw/testenv: adjust to use new launcher script

osmo-s1gw now gets started through a launcher script.

Depends: osmo-s1gw I5681ca103daf1c497218b4513b0ca97b1aae03d3
Change-Id: Ief1579154bf46b9bc2551535ede3e1f14456d65d
Oliver Smith at
testenv: podman: add libnftables-dev

This is required for building osmo-s1gw from source in podman,
otherwise:

  /home/user/.cache/osmo-ttcn3-testenv/podman/make3/osmo-s1gw/default/lib/enftables/c_src/enftables.c:16:10: fatal error: nftables/libnftables.h: No such file or directory
     16 | #include <nftables/libnftables.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

Change-Id: I0ae94f73f0875048d9a71d1582627e57e60425c6
Oliver Smith at
library/ngap: Support passing optional NAS-PDU to PDUSessionResourceReleaseCommand

Change-Id: I5f516f33824a83c0eaeb2c0decd82409b786867e
Pau Espin Pedrol at
NGAP_Functions.ttcn: Fix wrong offset of NGAP_ID_pair in uEContextReleaseCommand

Change-Id: I2302bebf75530f574a7fe2647b1eafcc4d5fd7df
Pau Espin Pedrol at
5gc: Implement PDU Session Release procedure

Related: SYS#7073
Change-Id: If79cb0c97008e7a9885bb548a3d2e67e41ba170f
Pau Espin Pedrol at
library: Comment out debugging for NGAP/5G-NAS

The current NGAP and 5G auth code is now working fine, so disable debug
logging. Keep it commented out so it can be re-enabled at any time if
some related topic needs to be debugged (will eventually happen).

Change-Id: I4250766644742f0fd11ca5e24b1a1a581dc81b4b
Pau Espin Pedrol at
5gc: Introduce test TC_ng_register_ping4_256

open5gs-dbctl tool is called in batches of multiple IMSIs to speed up
setup, since each call takes fractions of seconds to complete.
mongosh called by open5gs-dbctl actually uses quite a lot of CPU and RAM
resources, hence limit the amount of parallel runs to a fair amount (eg.
running the 256 of them in parallel froze my workstation with 16GB of
RAM).

Change-Id: I7282fa3c1a474c4b7dceeb5e358547dcdbd1fea6
Pau Espin Pedrol at
5gc: Introduce test TC_periodic_registration_updating

Related: SYS#7073
Change-Id: I63da25a3927cb459563d4325adc690beb8a67451
Pau Espin Pedrol at
{S1AP,NGAP}_Emulation: Fix indentation

Change-Id: Ifb2e4e3fc2d3ef4a76f2b0e906b12d0f740e9cdd
Pau Espin Pedrol at
{S1AP,NGAP}_Emulation: Fix using the value of an optional field containing omit

This was triggered in NGAP_Emulation during run of C5G_Tests complete
testusite, when running TC_ng_register_ping4_256.

Titan apparently doesn't like using a field set as omit in a field of a
record during match().

Same fix is applied for S1AP_Emulation since they basically use the same
logic.

Change-Id: I4812c2e9eeeadc26ad057cd8019f7570e4a16155
Pau Espin Pedrol at
{S1AP,NGAP}_Emulation: Simplify lookup code

Simplify code matching IDs. Explicitly test, log and exit function
called with both IDs passed as "omit".

Change-Id: I02f33c191d131c6325f3608ceec80be6f036aa84
Pau Espin Pedrol at
NGAP_Templates: Fixes and improvements for UEContextReleaseComplete

The existing templates for UEContextReleaseComplete were completelly
wrong, probably due to copy-paste when introducing them. This commit
fixes all those problems and allows passing optional parameters.

* procedureCode was wrong
* Criticality of several fields was wrong
* Type of resource list was wrong, and marked as mandatory while it was
  optional.

Change-Id: I50da7cd4cb15d8e6b2c68b21a4e4be93e3973593
Pau Espin Pedrol at
5gc: Implement UE-initiated de-registration procedure

Change-Id: Iab438d5a7cc5f2ba58943e4568c1fb5e5f41f99d
Related: SYS#7073
Pau Espin Pedrol at
testenv: osmo_dev: remove unused limit_section arg

Remove the unused limit_section argument in testenv.osmo_dev.make(). The
idea was to use osmo-dev to build programs where no packages are
available when using --binary-packages, but this didn't work because
when using --binary-packages, we must install all package dependencies
from the binary repository (so testing nightly / latest use the expected
library versions). Nowadays this use case is handled by
podman_install.from_source_* functions without using osmo-dev.

Change-Id: Ib09ffd0e269c58acd431bdbb5cc7cdcec2d36359
Oliver Smith at
testenv/osmo-dev: split get_targets to own func

Split the code for getting osmo-dev targets into a separate function, so
this can be reused in the next patch.

Change-Id: I2bd7c05102ca472614289870957cdca335c01eaf
Oliver Smith at
testenv: pass targets to osmo-dev's gen_makefile

Pass the targets we are about to build to osmo-dev's gen_makefile
script. This has two advantages:

1) Check early if a target isn't known by the current osmo-dev version,
   displaying a useful error to the user instead of just failing during
   make later on:

     ERROR: filter_projects_deps_targets: can't find project osmo-new-project in projects_deps!

     [testenv] gen_makefile.py from osmo-dev failed!
     [testenv] Your osmo-dev.git clone might be outdated, try:
     [testenv] $ git -C /home/user/code/osmo-dev pull

2) Parsing the generated Makefile when running "make" after generating
   it doesn't cause a noticable delay anymore. On my machine (with many
   Osmocom git repos cloned in osmo-dev's src dir) it went from several
   seconds to instantly.

Depends: osmo-dev I89bb60e94dd03606dbba5a3609d5e1a95993af5b
Change-Id: Ib2d8802b305f145d27aab3c1cc3129709b93d93d
Oliver Smith at
Makefile: add 'clean-logs' target

When running tests manually I oftentimes end up with hundreds of
*.log files in testsuite directories.  The present patch adds a
convenience target for removing them.

Change-Id: Id0597f9eeea9e128ce38a2b19f2126c729e71ffd
Vadim Yanitskiy at
msc: add TC_silent_call_{start_stop,active_conn}

This patch adds testcases for the silent-call feature:

* MSC_Tests.TC_silent_call_start_stop
  Test starting and stopping silent call via the VTY.
* MSC_Tests.TC_silent_call_active_conn
  Test initiating a silent call while there's an active connection.
  The MSC is expected to be smart and reject such an attempt.

Change-Id: I3ef22fbb5a05f69cc8aea7f42e05f6e1d6c4a8b6
Related: osmo-msc.git I93913d189800d71f82c013b6e946bd63db362f65
Related: osmo-msc.git I52b3be26c61cadacc4783b5c324809ecd6906b36
Vadim Yanitskiy at
testenv: Dockerfile: fix Suites: stable-backports

Using "stable-backports" broke now that Debian 13 is out. Use
"bookworm-backports" instead.

Fix for:
  E: The value 'bookworm-backports' is invalid for APT::Default-Release as such a release is not available in the sources

Change-Id: Icc46b6dc2493806dc12f0ff442abd70fe5b48eb8
Oliver Smith at
ngap: Add missing mandatory IE Cause to m_n2_UEContextReleaseRequest

Change-Id: Ib7d87f957e469a23448e35fd82a697d1698c7da7
Pau Espin Pedrol at
ngap: Add template for UEContextReleaseReq without PDU Session List

That's the only optional IE in the message. Add a separate template to
be able to transmit with that IE set, similar to what's already done in
m_n2_InitialContextSetupRequest_withPDUSessionList().

Change-Id: I0f1a549103b70bcd373dcd4c688761d3eeef10a6
Pau Espin Pedrol at
5gc: Obtain amf_id from NGAP_Emulation

This will be needed in a follow-up commit in order to be able to
transmit UE Context Release Request.

Change-Id: I49cb6d7fe9f18734c49bb49ecceb671e8122ce88
Pau Espin Pedrol at
5gc: Place PDU Session params into its own subrecord

This way we properly split between layers, plus the fact that we'll
probably want to hold several concurrent pdu sessions in each UE in the
future.

Change-Id: Ibb0c8d3f0901d53e4aa75855e602234410fd00f9
Pau Espin Pedrol at
5gc: Add tests for UE release context request procedure

Change-Id: Icaaeb2923fdcaba47a72ed0aedc5661f68c03774
Pau Espin Pedrol at
5gc: Add helper to get incremental PTI field

Change-Id: I9d32024b58799bbd3ef547cdc73ee73d7f7275d2
Pau Espin Pedrol at
GSUP Templates: fix empty destination_name in GSUP ISD/UL

The destination_name TLV should be either set with a valid name
or not present, but a field with length 0 shouldn't be used.

Change-Id: Ia89b5a82665e407fa578e5209fbcde0676326df0
lynxis at
GSUP_Templates: ts_GSUP_UL_REQ: add template scopes

Allow to omit the source_name TLV in GSUP UL Request.
The whole ts_GSUP_UL_REQ must resolve to a value.

Change-Id: I250960a1e1c19dfa1efa81f6bbc93efa07cb225c
lynxis at
GSUP_Templates: fix whitespace issues

Change-Id: I03be75063a71153bd2881afd1d741454c508fada
lynxis at
BSSGP_ConnHdlr: f_service_request: allow to define if a Service Accept is expected

A SecurityModeCommand is defined as an implicit Service Accept when the UE
is in PMM_IDLE (meaning, having no Iu signalling connection)

Change-Id: I5c190db28263c530a8eea188bf570a58eaffdd4d
lynxis at
MSC Tests: add TC_gsup_lu_and_det: do a LU, Detach and expect GSUP MS Purge

Currently the MSC/VLR doesn't inform the HLR when a MS detaches.

Change-Id: I9e87537efc2c921fa860539a706316ed410b45d5
lynxis at
ngap: Fix wrong IE Id in m_n2_PDUSessionResourceModifyResponse()

Change-Id: I13547e548e5323fe54340393cbe9f333f10c5969
Pau Espin Pedrol at
5gc: Test UE requested PDU Session Modification procedure

Change-Id: Id9ac0f0e431c4a82dfab8675c93bf3c3f05442a7
Pau Espin Pedrol at
testenv: install curl backport only for bookworm

Change-Id: Ifeeea010fb13bfd65e1d3659a3c43fc4acf07795
Oliver Smith at
Cosmetic: testenv: make builddir_env more readable

Change-Id: I7bbd14bd91c97bc37a163018217b104ace0e1a53
Oliver Smith at
testenv: use separate cache dirs per distro

Change-Id: I0f1c05bb4d8cfababc24477976abf8a0baa3daba
Oliver Smith at
testenv: init podman: add --distro arg

Allow building the podman image for another distribution. This was
mostly implemented already, but due to the missing --distro argument for
"./testenv.py init podman" it could not be used yet.

Change-Id: Iff59b5d403e88046a3f98438394e1e02a36e7c0a
Oliver Smith at
testenv: debian 13: fix installing libgcc

Use a wildcard to install the proper libgcc-*-dev package (libgcc-11-dev
for debian bookworm, libgcc-13-dev for trixie).

Change-Id: I9992d8cf8cd68a9e3ec9178909e0766dbd5d12ad
Oliver Smith at
testenv: debian 13: fix installing eclipse-titan

Change-Id: I56be4e3e72a1ad4590e904f9a48d90aa635c9980
Oliver Smith at
testenv: check for --distro without --podman

The --distro option only makes sense with --podman, complain if it is
used without --podman.

Change-Id: I1b7b26320c65d498a1e812f85f0b98eda95be783
Oliver Smith at
testenv: check value of --distro early

Make sure that the value for --distro is supported early on, instead of
only checking it if --binary-repo is set while trying to add the binary
repository.

Change-Id: I37493f26d71e70a19f4a19b3bbda972c03c84905
Oliver Smith at
testenv: add debian:trixie

Change-Id: Ib62851960724c17f9adddf54a2fc39adef911d32
Oliver Smith at
testenv: enable_binary_repo: configure apt pin

Add an apt-pin to ensure packages from the Osmocom repositories get
preferred over Debian's packages. I just ran into this with osmo-mgw,
where we have 1.4.0 in osmocom:latest and Debian 13 has 1.14.0+dfsg1-2,
which counts as higher version. This results in the wrong package being
selected, and also in an error later on when trying to install related
debug packages from our repository:

  The following packages have unmet dependencies:
   osmo-mgw-dbgsym : Depends: osmo-mgw (= 1.14.0) but 1.14.0+dfsg1-2 is to be installed

Change-Id: I3a45de277bbd5299c8b840680b56b52a8731caa4
Oliver Smith at
testenv: set default distro to debian:trixie

Related: OS#6826
Change-Id: Ib9c5dafaa7b17e435f61fbedfd92393c0a767f34
Oliver Smith at

#20 (Jul 23, 2025, 1:27:42 PM)

Revert "testenv: use eclipse-titan 11 in Dockerfile"

We had a lot of fallout from this, revert to version 9.0.0 for now.

This reverts commit 8082d099e3f96da3dfe4348b0e1bd794d93b8b02.

Related: OS#6490
Change-Id: I0a00fd4e031410be102cd6e99ecab4a464503003
Oliver Smith at
testenv: allow passing -j/--jobs together with -b/--binary-repo

Not only the -j/--jobs is used when building the IUT components,
but also when building the testsuite itself (PARALLEL_MAKE var).

Change-Id: I3eb596f2c4e5de1b624c238e34785e798d2099c3
Vadim Yanitskiy at
Makefile: add global per-project clean target

Change-Id: I434ecbe3f3dd25ea770d8f2d7adfa62c67dc0c1d
Vadim Yanitskiy at
msc: add TC_lu_and_ussd_notify_during_mt_call

This is a more realistic scenario (race condition) that reproduces
an assertion failure in osmo-msc (OS#6756).  We already do have
TC_mo_ussd_evil_ms reproducing the problem, but this scenario is
unrealistic when using a "normal" (not "evil") MS/UE.

Change-Id: I6935ad96aef7747c576505ae52f8b5d3e0611882
Related: osmo-msc.git I724f0f0c9ef8611d3c3653e9370361b252127f72
Related: OS#6756
Vadim Yanitskiy at
library/MGCP_Emulation: Fix Dynamic test case error returning unbound value

As spotted today while running HNBGW_Tests.TC_rab_assignment, probably after upgrade to titan 11:
17:54:36.223786 1570 MGCP_Emulation.ttcn:241 Dynamic test case error: Copying an unbound charstring value.

The error happened because in that failure path the component running
the function was not stopped, and hence an unset variable was returned.
Hence, make sure we tear everything down (including component going
through the failure path).

Change-Id: Id1d28924e90ed80199b61a143dac35fc6f50de68
Pau Espin Pedrol at
mme: Move LTE_CryptoFunction* to library/

S1AP_Emulation is already importing LTE_CryptoFunction.ttcn, so it
really belongs to library and not to mme/ directory.

While at it, split Snow3G algos to its own subdir so it can be easily
exported standalone, eg. when used by 5G NAS in the future.

Change-Id: I76f86beeb2c49110eea0fac6abffee8307a3c22c
Pau Espin Pedrol at
S1AP_Emulation: Remove commented duplicated function

The function used is in library/LTE_CryptoFunctions.ttcn.

Change-Id: I1d6871d2a735a4bf39c87f6c976bd5d5630e9c04
Pau Espin Pedrol at
5gc: Implement AKA authentication

deps/nas.git already has some Auth related functionaltities to calculate
XRES*, but I couldn't get them to generate proper output. Furthermore,
using them directly would include a lot of churn we don't want:
* ttcn: Otherwise ttcn/Lib_NG_NAS/LIB_NG_NAS_Functions.ttcn brings in
  tons of dependencies about Emulation stuff which is not interesting
  for us.
* .cc: We want to implement our own low level functions using our
  eclipse Titan API, as well as our own C lib dependencies (because some
  code for those dependencies is not really available in the repo).

Hence, instead use our own milenage.c implementation imported from
libosmocore (actually from a slightly modified self-contained copy we
already ported to some development branch of asterisk VoLTE project).

With this patch it is already possible to detect SQN Out-of-sync and
answer with an Auth Failure, then get a new Auth Req from network and
properly answer with an Auth Resp which the network likes and hence
answers with a Security Mode Command.

Change-Id: I11527f47e4310863124f3f02148e3f71da7d911e
Pau Espin Pedrol at
5gc: Implement NAS integrity check of DL messages

Change-Id: I118081af10f260513734550854c3a1751e32cbb4
Pau Espin Pedrol at
library: Improve some f_rnd_*() functions

Change-Id: I82535caf08aa628738c0cbc29b8b27d525ec78ce
Pau Espin Pedrol at
NGAP_Emulation: Fix match on DownlinkNASTransport with different list of IEs

The existing receive templates match only a given set of parameters.
Some of them are optional, so they wouldn't match the template if added.
Match based on procedureCode instead.

Change-Id: Iaec861f8c0d55a2897896d695b9f70bca64af339
Pau Espin Pedrol at
5gc: Implement UE registration

deps/Makefile nas.git is updated with new version containing tons of
fixes regarding LENGTHTO() in most IEs.

Change-Id: Ida0e5268c3109a25ecdd03c4f17d5ff8bce8e567
Pau Espin Pedrol at
testenv/README: fix missing :

Change-Id: Ifa2f2c2ebcb4fca20c2cc88672ef2a27df197a0c
Oliver Smith at
testenv: add titan_min to all configs

Add the minimum required eclipse-titan version to each testenv.cfg. This
is in preparation for a future patch that will allow using a different
eclipse-titan version, depending on titan_min in the config and a new
--titan-version argument.

Supporting this is desired because:
* We can't simply upgrade from 9.0.0 to 11.1.0 as there are regressions
  with some of the testsuites, but we need 11.1.0 for at least one new
  testsuite.
* By quickly switching between the versions we can check for regressions
  easily.

Related: OS#6490
Change-Id: Ibd81812227f947cf1f437bdc4b087779194bc5dc
Oliver Smith at
testenv: move ttcn3_hacks_dir to __init__.py

Move testenv.testsuite.ttcn3_hacks_dir to testenv.ttcn3_hacks_dir. It
makes more sense there as the path to osmo-ttcn3-hacks is used by many
modules, not just the testenv.testsuite module, and it prevents a cyclic
import with future patches when testenv.testsuite will import
testenv.testenv_cfg.

Change-Id: I4280009da419e6f5b533805732656ec4cc05d5ac
Oliver Smith at
testenv: support using multiple titan versions

Install eclipse-titan versions 9.0.0 and 11.1.0 into
/opt/eclipse-titan-$version inside the podman container by using the new
optdir packages. Choose the appropriate version by setting related
environment variables. Use the version in $PATH on the host, unless
/opt/eclipse-titan-$version is also present on the host system.

Add a new --titan-version argument to explicitly set a version to use
when running a testsuite.

Rewrite the version check code to take titan_min, --titan-version and
the host version (if not using optdir) into account.

Related: OS#6490
Change-Id: I48d711da57c874cf7cd557480a163eea1a4167bd
Oliver Smith at
testenv: fix missing titan_min= error msg

Fixes: 98268b665 ("testenv: add titan_min to all configs")
Change-Id: I0eb99da16ba6ffd5ae936aa63bb770e2a73fdd25
Oliver Smith at
pgw: initial testenv.cfg

All tests are passing with this config.

Related: OS#6494
Change-Id: I0f14ce56859c3303b2f6af57d7ab5722e0cbe8e0
Oliver Smith at
stp: Expect and answer M3UA BEAT from IUT

This fixes tests failing with newer versions of libosmo-sigtran where
HEARTBEAT procedure is enabled by default.

Change-Id: Idb70acde0683bc053db20781ce4926fbc318f51f
Pau Espin Pedrol at
IPA_Emulation.ttcn: Add call to support dis/enabling CCM management

This allows eg. a user to let the Emulation do the inital handshake, and
then pass control of eg. IPA PING/PONG messages directly to the user
afterwards.

Change-Id: If68e0ba36c3a56f021dd50aadf2156ddc696b816
Pau Espin Pedrol at
stp: IPA: Introduce test TC_beat

Similar to the one already available in STP_Tests_M3UA, but testing
PING/PONG in IPA.

Change-Id: I3d762fb4780aaa9931c3841cce69da6ee95529f3
Pau Espin Pedrol at
stp: IPA: Introduce test TC_beat_timeout

Change-Id: I6f16915238d7762faf1c63fdeccca7e4a5f20893
Related: SYS#7501
Related: OS#4072
Pau Espin Pedrol at
stp: IPA: Introduce test TC_clnt_beat_timeout

Change-Id: I5a41857dbd9f0bfe40a3a539aaed8361bc29fd6b
Related: SYS#7501
Related: OS#4072
Pau Espin Pedrol at
stp: Introduce test TC_(m3ua_tcp(clnt_))beat_timeout

Related: SYS#7501
Related: OS#4072
Change-Id: Ie0c430b7992881e8ae506fe6434f06946f8f6278
Pau Espin Pedrol at
epdg/testenv/run_osmo_epdg…: fix ip link ls output

In the code that waits until the tun device is available, fix the
silencing of stdout and stderr.

Change-Id: I8ce8824930e8841dddd7a67d178d5140e4f71b84
Oliver Smith at
epdg/testenv/run_osmo_epdg…: wait up to 30s

Wait up to 30s for the tun device as waiting 10s is not enough if
jenkins is under high load.

Related: https://jenkins.osmocom.org/jenkins/job/ttcn3-epdg-test-net-next/29/console
Change-Id: Ia7298275b92f30efc40e9d6afa1abc8d7c5536d6
Oliver Smith at
Bump titan_min to 11.1.0 where possible

I ran the generic version of all testsuites in the Osmocom jenkins with
eclipse-titan 11.1.0. Bump titan_min where we have the same result as
with 9.0.0.

The only testsuite that still didn't work the same is the gbproxy
testsuite (OS#6800), keep titan_min=9.0.0 there for now.

Related: OS#6490
Change-Id: Iba562ace07e6f38a8cde15b17478a0a1680df2fc
Oliver Smith at
testenv/podman_install: fix regex warning

Fix for the following warning with Python 3.12.3:

  …/testenv/podman_install.py:120: SyntaxWarning: invalid escape sequence '\d'
    pattern = re.compile("^\d+\.\d+\.\d+$")

Change-Id: I33ef4e16f3d3e4fa627f726d6fddd950b7826620
Oliver Smith at
stp: m3ua: Introduce test TC_combinedlset_loadshare

Test combined linkset loadsharing on M3UA AS.

Related: SYS#7112
Change-Id: I20a67648072f4d9839b1d1fceded1680362bf979
Pau Espin Pedrol at
stp: Add helper function to build SCCP UDT encoded octetstring

Change-Id: I67961807bba4853b58e4b6f87eb3f2b56e9bb027
Pau Espin Pedrol at
stp: ipa: Introduce test TC_combinedlset_loadshare

Test combined linkset loadsharing on IPA AS.

Change-Id: I029ac9f3c664d2f30cddc36f6eb1b39295689247
Related: SYS#7112
Pau Espin Pedrol at
Fix typo unknwon -> unknown

Change-Id: I483090332931d85a8808bd558c4d4ac4d36fa16b
Pau Espin Pedrol at
stp: Fix recent regression introduced in TC_ipa_to_m3ua_patch_sccp

The introduced function f_SCCP_UDT() had the calling+called param order
swapped with regards to previous templates. Change the order to first
have "calling" (src) and then "called" (dst) as already done in
ts_SCCP_UDT.
While at it, change the ts_SCCP_UDT params to accept template (value) to
make it easier for callers.

Fixes: b686e914b60d6e2486667fa8227576a70a86c909
Change-Id: I0e158557dabdb7e94d1c00a6d67126f2d85bb4cd
Pau Espin Pedrol at
pcu: TC_sns_del: improve test stability

Add a sleep 1 to ensure the BSSGP flow Ack flows before removing the SNS.
Further add a data weight to the other NSVC to have at least one valid
NSVC with data weights. Otherwise the NSEI would become unavailable.

Related: OS#6751
Change-Id: Icb32e5f46ba7950848343efc46aee67e2397de5d
lynxis at
remsim: bankd: add TC for creating a mapping with a busy client

Test if a busy client is implicit removed when creating a new mapping
for the same client with a different bankd slot.

After a desynchronisation between the server and bankd happen (e.g. restart the server),
the server might request a mapping between a client slot and a bankd slot
while the bankd still has a different mapping for the same client slot.

Example before this commit:
* server -> bankd: New Mapping (client 1/0, bankd 1/0)
* server <- bankd: Ack
* Restart server
* server -> bankd: New Mapping (client 1/0, bankd 2/0)
* server <- bankd: Ack (implicit remove mapping to bankd 1/0)

Related: SYS#7470
Change-Id: I57112758167c2a29fae9df0cf1e2691c5a8e7bed
lynxis at
bsc: generic: Introduce test TC_stat_msc_sctp_disconnected

Take the chance to properly configure all ASP/AS data statically, in
order to be able to access them through VTY as well as have the setup
properly documented in the config files.

Change-Id: I028a16e2742ff0c58bf3b51ee1233ccf947a5a6a
Related: OS#5917
Related: SYS#7501
Pau Espin Pedrol at
stp: Support expect RFC466 4.5.1 DUNA after ASP ACT

libosmo-sigtran recently introduced support in SG role to send DUNA for
unreachablew destinations when a peer ASP becomes activated.
This is currently sent upon first ASP going active, since it's the time
where SG assumes the ASP peer may need that information.

Depends: libosmo-sigtran.git Id9d92c3fda7423a9c79fffac6b650abba9651853
Change-Id: I6bee0f890a8baaa62be193824b1ae2fceb53fb45
Pau Espin Pedrol at
Cosmetic: testenv: tweak argparse formatting

Make all "add_argument" calls consistently have one function argument in
one line, instead of only having it in some places, and have all
arguments in one line in others. Having one function arg in one line is
enforced via ruff format when having a comma at the end of the function
call.

Change-Id: Ia1804f0313a27ddf8f7197ce0b2ad3b56421b290
Oliver Smith at
testenv: add run --asan

Add a new --asan option for building Osmocom libraries and programs from
source with address sanitizer enabled. This works by adding
sanitize.opts to osmo-dev's gen_makefile.py, which in turn adds
--enable-sanitize to most Osmocom projects.

The --autoreconf-in-src-copy argument for gen_makefile.py must be moved
up, so the list of *.opts files is not interrupted by another type of
argument that causes argument parsing to fail.

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Related: https://gitea.osmocom.org/osmocom/osmo-dev/src/branch/master/sanitize.opts
Change-Id: I1947dd3a7d9ce51dcbef9cffd5d7b402f236b9e2
Oliver Smith at
bsc-sccplite: Fix override of opc of incoming msgs

This patch fixes a regression introduced recently in a patch. We
basically revert that line change. This fixes osmo-bsc crashes
spotted during ttcn3-bsc-test-sccplite.

Fixes: 40c73568c77ee3747a02fce2cf031d723a938207
Related: OS#6806
Change-Id: I9764f4020e80e954de61ff9ba4d8ce959359be8e
Pau Espin Pedrol at
bsc: Avoid running TC_stat_msc_sctp_disconnected in latest

The osmo-stp in latest release, aside from not yet implementing the
"shutdown" cmd (which is known and hence test was expected to fail
there), has a side effect of ending up with a broken state after
restarting the ASP during got_parent() VTY node exit, where ASP is
ends up in ASP_DOWN and AS in AS_ACTIVE. This generates failures in all
tests after this one._

Change-Id: Icce4ec089b300f418e957ab67464759c782811a4
Related: OS#5917
Related: SYS#7501
Fixes: 40c73568c77ee3747a02fce2cf031d723a938207
Pau Espin Pedrol at
PCU: TC_sns_del: expect NS Alive while preparing the test

f_outgoing_sns_chg_weight() should handle NS Alive until
it do the SNS Delete procedure.

Related: OS#6751
Change-Id: I7c0991819de48b59e763fbe1ef6df4567c38007c
lynxis at
RAW_NS: SNS: allow to set the transaction id of Add/Chg/Del procedures

Using hardcoded transaction ids are working, but for the TC_SNS_del it would
result in descending transaction ids.

Related: OS#6751
Change-Id: I1ea0424232ed925fee623568eb0edccdf1ae0368
lynxis at
RAN_Emulation.ttcnpp: Log ignored rx RANAP msg when no cb set

Change-Id: I15b6fea2d44ab9607db020e1152ee1fd79839a52
Pau Espin Pedrol at
StatsD_Checker: Allow configuring timeout

Change-Id: I183ad5810468cba5bfec20eb584a27462fde980c
Pau Espin Pedrol at
StatsD_Checker: Keep polling IUT if waiting for convergence

The wait_converge feature was implemented and used so far only against
IUTs which used also the snapshot feature, due to not having a VTY which
allows both resetting and triggering a status report manually. Instead,
those relied on IUT reporting changes at a given frequency.

If the wait_converge feature is requested and polling mode is used, then
make sure we poll once per second after last received statsd UDP msg.

Change-Id: Id78b46b88048206f74d1d88672b8309227e9438c
Pau Espin Pedrol at
bsc: TC_mscpool_sccp_n_pcstate_detaches_msc: wait for AS to become unavailable

Otherwise race conditions can ocurr, specially since during some time
the AS can be in PENDING state until finally going into DOWN state and
notifying the peer.

Change-Id: Idc84929d89cbac4eb67cd2740f98844253dde70d
Pau Espin Pedrol at
hnbgw: Use static sigtran config between osmo-hnbgw and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Related: OS#5917
Change-Id: Icbec561e28db8e0da19a284b3ba73636ea5c8210
Pau Espin Pedrol at
hnbgw: Introduce test TC_stat_stp_sctp_disconnected

Related: OS#5917
Depends: libosmo-sigtran.git Change-Id I7e4eedb65c4f2952f8b39ca4c539ca2f40e9946c
Change-Id: I079f2da09ff8d52e614ff6f5d267cd5429e4eb58
Pau Espin Pedrol at
hnbgw: swap first MSC and SGSN PC to be usual default ones

0.23.1 and 0.23.4 are default remote PCs to be used by osmo-hnbgw to
reach MSC and SGSN respectively, if no config is provided. In this
testsuite config, however, they were swapped, which is confusing.
Swap back the values so they match the default ones in osmo-hnbgw.

Change-Id: Ib62258e340ecf8cbe1026e43ccccc6bf98932244
Pau Espin Pedrol at
msc: Use static sigtran config between osmo-msc and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Related: OS#5917

Change-Id: Id78aac528b10a8449b83075419b74315d838d4a4
Pau Espin Pedrol at
RAN_Emulation: Fix handling of IMSI in RANAP Paging

The IMSI in RANAP Paging messages is encoded in octetstring BCD format.
We need to decode it before using it, since we use plain hexstrings
everywhere in the module to manage IMSIs.

Take the chance to clean up and improve logging on related lines, both
for BSSAP and RANAP.

Change-Id: Ia892a52bad41a4e331703bbab438d8c811b2025e
Pau Espin Pedrol at
msc: Add suport to obtain statsd output

It will be used in a follow-up commit introducing a new test.

Change-Id: I66ffb278a7ddff975e43f72d9ec6b323705f720c
Pau Espin Pedrol at
msc: Introduce test TC_stat_bsc_sctp_disconnected

Related: OS#5917
Depends: osmo-msc.git Change-Id Ice1b2c163b1b0d134fcaa1c8bf543038a35fabdf
Change-Id: I4cf30ea09cb1d1286bd5ab6975f3f27e39b9c183
Pau Espin Pedrol at
GSUP Fix missing IMSI template present restriction in tr_GSUP_SAI_REQ

I got this DTE while running SGSN_Tests_Iu.TC_attach_pdp_act_user:
"""
GSUP_Templates.ttcn:381 Dynamic test case error: Restriction `present' on template of type hexstring violated.
"""

According to GSUP documentation, the IMSI param is mandatory.
Upon fixing it, the compiler found the user causing the problem:
"""
BSSGP_ConnHdlr.ttcn:797.49: error: Restriction on template formal parameter does not allow usage of any or omit
"""

That error is also fixed in this same commit.

Change-Id: Iea712df2f922fe5eb16e116f7a4609a0e20233b4
Pau Espin Pedrol at
sgsn: Use static sigtran config between osmo-sgsn and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Related: OS#5917

Change-Id: Ie52f4c1877587067af66add56ad8674b82b51718
Pau Espin Pedrol at
sgsn: Introduce test TC_stat_rnc_sctp_disconnected

The commit doesn't validate everything it should, because passing the
indication from osmo-iuh's iu_client to app (osmo-sgsn) is not
supported in current API, and hence the statsd metrics are not yet
implemented in osmo-sgsn.

Still, this test already validates that osmo-sgsn is capable of
surviving an sctp link down event in IuPS, and continue to work
afterwards. IT also allows easily debugging this scenario by inspecting
pcap files, logs, etc.

Related: OS#5917
Change-Id: I35888630ea9e9005e1252677c5d42f66f84e177b
Pau Espin Pedrol at
smlc: Use static sigtran config between osmo-msc and osmo-stp

This allows referencing/accessing the specific ASP in osmo-stp, which
will be needed in a follow-up commit to test IUT behavior when the SCTP
conn is dropped.

Change-Id: I008dba252da29f445c52151c7b65428ca7054ed0
Related: OS#5917
Pau Espin Pedrol at
smlc: Add suport to obtain statsd output

It will be used in a follow-up commit introducing a new test.

Change-Id: I52813397890a85326a85b3580fd605f9ac10a26d
Pau Espin Pedrol at
sctp: Introduce test TC_stat_bsc_sctp_disconnected

Change-Id: Ic67d9d8120e9bd09b0e54b237e93f49f79262be0
Related: OS#5917
Depends: osmo-smlc.git Change-Id Ib01576036f34ac7f21c5bce0155b50932eb9b72a
Pau Espin Pedrol at
hnbgw: Use static sigtran config also in osmo-hnbgw-with-pfcp.cfg

Previous commit did set static configuration in osmo-hnbgw.cfg (generic)
but forgot to add the same to the with-pfcp scenario.

Fixes: 88d6666056d6cdc899d6c102fc379f8a469a725e
Change-Id: I20979cbd5cf7e9d8c109f72d5f84c4fbe26b44ca
Pau Espin Pedrol at
smlc: fix running against latest

osmo-smlc from latest doesn't support statsd yet. Use a separate config
that doesn't have the statsd block and don't try to initialize it for
latest.

Change-Id: If7b1d46777703f0511ee15520571d0313bdfa5ed
Fixes: 5268d5 ("smlc: Add suport to obtain statsd output")
Oliver Smith at
SGSN: Iu: use correct service request type

When the UE wants to transfer data, the Service Request
must have the type data.
Remove the default of f_service_request() to force
explicit defining it.

Change-Id: Ia47edd8ca916cf377da875583a3c4eb6ff5f1f52
lynxis at
testenv/requirements: update link

Adjust the link, as the Latest_Builds wiki page was merged into
Binary_Packages.

Change-Id: Ie8a6df2f8fd08983532c8a757ae1849792fbd5b3
Oliver Smith at
testenv: run requirements check before cfg init

When parsing testenv.cfg files, the titan_min version gets compared with
the installed titan version. This fails with a python trace if titan is
not installed. Catch this earlier by running the requirements check
first, which ensures ttcn3_compiler is avaiable or gives a helpful error
message:

  [testenv] Missing program: ttcn3_compiler
  [testenv]   Install eclipse-titan, e.g. from osmocom:latest:
  [testenv]   https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages

Fixes: 18eef740 ("testenv: support using multiple titan versions")
Change-Id: I09ed7af5b236aeffd910d7c0a1a0b63a78631ade
Oliver Smith at
testenv/requirements: simplify rsync checks

rsync is needed by osmo-dev for the autoreconf-in-src-copy feature that
testenv uses.

* Don't require rsync when running in podman. This is not necessary
  anymore since 92b3784 ("testenv: remove copy_ttcn3_hacks_dir").

* Combine the "if not testenv.args.binary_repo" code path with the
  "if not testenv.args.podman" code path, as --binary_repo can't be set
  without --podman.

Change-Id: I4fd885aa6c9b6801e18043f783bae357da716d19
Oliver Smith at
NGAP_Templates: Fix wrong IEs passed to InitialContextSetupResponse

Change-Id: I7b385456e45505cb4655adda5ad5aba36fc96a4b
Pau Espin Pedrol at
Dockerfile: upgrade to libfftranscode 0.6 (updated NGAP ASN.1 to V17.5.0)

Change-Id: I57c2f9adbb2f691f28ab936f09db3c24bdfeef5f
Pau Espin Pedrol at

#18 (Jun 3, 2025, 6:24:03 AM)

sccp: Initial testenv

Change-Id: I616425d729dda342e78537c6b7256d5dddebaa88
Pau Espin Pedrol at
sccp: Let some time for SCCP RLC to reach IUT before finishing test

Otherwise tear down of the test component immediatelly afterwards
creates a race condition where sometimes the RLC message is not sent
before closing the socket.
As a result, the SCCP-SCOC stays in DISCONN_PEND until T(rel) fires a
while afterwards, generating a new RLSD in a follow-up test, disrupting
expectancies of that unrelated test.

Since sccp_demo_user doesn't implement a Layer Manager, the recv() 0
from the socket doesn't automatically tear down the SCCP conn, since it
could have several ASPs:
"""
0: asp-asp-srv-client: ss7_asp_xua_srv_conn_rx_cb(): sctp_recvmsg() returned 0 (flags=0x80)
...
asp-srv-client: connection closed
XUA_ASP(asp-srv-client){ASP_ACTIVE}: Received Event SCTP-COMM_DOWN.ind
XUA_ASP(asp-srv-client){ASP_ACTIVE}: state_chg to ASP_DOWN
XUA_AS(as-srv-client){AS_ACTIVE}: Received Event ASPAS-ASP_DOWN.ind
XUA_AS(as-srv-client){AS_ACTIVE}: state_chg to AS_PENDING
Delivering N-PCSTATE.indication to SCCP User 'SCCP Management'
Ignoring SCCP user primitive N-PCSTATE.indication
[Here same 2 lines for SCCP User 'refuser', 'echo', 'callback', 'test_client_vty']
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-ASP_DOWN.indication
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-SCTP_RELEASE.indication
"""

Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
Pau Espin Pedrol at
library/s1ap: f_tr_S1AP_RABSetupRsp(): use ispresent()

Change-Id: I6ee1246ef9f32ac7d5ce107d3ba9ea11ed87af20
Vadim Yanitskiy at
library/s1ap: add E-RAB MODIFY REQ/RSP templates

Change-Id: Id38cd51698c1388311a41f045ff08ec7f8a85146
Vadim Yanitskiy at
library/s1ap: add E-RAB MODIFY IND/CNF templates

Change-Id: I2dd3d420ebfaf37fefa1d33a40176ec57fee5619
Vadim Yanitskiy at
s1gw: make f_ConnHdlr_rx_session_modify_req() more flexible

Allow the caller to pass FAR ID, SEID, and E-RAB parameters (F-TEID),
so that it can also be used for testing the E-RAB MODIFY procedure.

Change-Id: I52317e79ac02cb4e321b49c2cd824de28e25a1c6
Vadim Yanitskiy at
s1gw: add constants for PFCP FAR IDs

Change-Id: Ib25e5cc9ca21047f9884e1c13d0861bf4f7251a1
Vadim Yanitskiy at
mgw: Improve log and teardown upon unexpected mgcp resp received

Change-Id: I233075f5a88ed7f1f7de496664cdc7281aefa900
Pau Espin Pedrol at
PCU_Tests_SNS: sns_del: check if removed NS-VC still transmits

After removing a NS-VC via SNS-DEL, the NS-VC shouldn't receive
any further NS PDUs.

Related: OS#6611
Change-Id: Ied4367a519cf75291ff8766c9efebb0f8a12b11f
lynxis at
GSUP_Templates: Purge MS Request: allow the Message class IE to be present

Change-Id: I367f63fe5286e39ba51de94729455d2638f19c6f
lynxis at
SGSN: f_cellid_to_RAI: fix spaces vs tabs

Change-Id: Ic1927729dd0d205f1bd866423c8dfdf91caf597d
lynxis at
msc: add testenv.cfg

Change-Id: Ia93115e3a27ac43b6530f2669e210f59169d75b9
lynxis at
stp: Improve failure teardown using Misc_Helpers.f_shutdown

Change-Id: I776bc32b1bdb52d7e90102c4ab6ff7b0ef7a12c6
laforge at
stp: set up all M3UA ports in array in steps

This way we have all ports in more or less the same state when handling
messages.
It should also speed up tests and mitigate sporadic failures  under some
scenarios where we already accept the SCTP conn instead of rejecting it
and waiting for reconnect from client.

Change-Id: I585d9c768301bfd9ba849876923787137fc35981
laforge at
gbproxy: Don't log the payload size for every DL/UL-UNITDATA

This just wastes memory. We can check the pcaps if a test does fail.

Change-Id: I862d67a48f1d694262cf39a1e939033bde0c6eab
Related: OS#6704
dwillmann at
testenv: run: add --autoreconf-in-src-copy arg

Add a new argument that avoids the problem that ./configure refuses to
run if it has already been executed in the source dir. (It aborts and
asks the user to run "make distclean" first, which is especially
annoying if it has to be done in multiple source dirs before being able
to build successfully.)

Put the new logic behind an "experimental argument" for now. I think it
improves usability greatly and plan to make it the default later when
it has been well tested.

I have also considered making the source dir read-only when mounted into
podman and this argument is set. This was the original goal of Lynxis'
related patch, on which idea this one is based. But osmo-dev still
needs to write into the source dir in case it clones a new repository,
so making the sources dir read-only with this trade-off should be a
separate flag and could be added in another patch later.

Related: osmo-ttcn3-hacks I0f1ac8852218f158ece14c176f05574f60d9d1f7
Depends: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650
Change-Id: I5c38ce69dc39823d12be574c74a654d2fa6ed8fb
Oliver Smith at
library/s1ap: fix criticality in UE CONTEXT RELEASE PDUs

Change-Id: I6c63b3ecb428b54705aea0c14610c00223651d8f
Related: SYS#7310
Vadim Yanitskiy at
s1gw: add f_TC_exec()

The idea is to reduce the amount of boilerplate code.

Change-Id: I0df4ad15bc2dca2afb2c598c1b053f45b69c181b
Vadim Yanitskiy at
s1gw: add TCs for UE CONTEXT RELEASE procedures

Change-Id: I065692f311e9d03630ab3ca2f6a03465418f0e71
Related: osmo-s1gw.git Ic94489e3d3052221b49431da3a95e5c1eb0e0ba0
Related: SYS#7310
Vadim Yanitskiy at
hnbgw: Use Misc_Helpers.f_shutdown upon rx of unexpected msg

Otherwise the test continues for a while and ends up with a DTE which
makes it harder to figure out the original test failure.

Change-Id: I7f07cff2ce93e8b11338ba4e39e1d49662323f58
Pau Espin Pedrol at
MGCP_Emulation: Make sure peer is running before Tx

This avoid DTE with "Broken pipe" if messages are being transmitted
while tear down process has already started, even if components are
created as "alive".

Change-Id: I8724870b9b967ffa49c3da03e1cdb2941f81653a
Pau Espin Pedrol at
hnbgw: Submit proper L3 PDUs during CR

Generating random PDU values makes hnbgw act on it, since it looks up
higher layers to figure out NRI steering.

Change-Id: I725c35a3584b7d2d162c24ab2b662cfb80e539d7
Related: OS#6717
Pau Espin Pedrol at
Mutex: Create component alive

Change-Id: Ie2980705dd0d2d8ed11a6c13349fb85e6f254748
Pau Espin Pedrol at
RAN_Adapter: Create components alive

HNBGW_Tests.TC_hnb_disconnected_timeout needs modification since it
expects the component to drop the underlaying conn towards the IUT when
the component is stopped. This is not longer the case when the component
is created as "alive". In order to make sure its resources are
destroyed, one needs to kill it.

Change-Id: Ice4d93b42552f1c5d621582b1fc3a38b4e1ae837
Pau Espin Pedrol at
hnbgw: Create all components alive

This makes it easier to figure out errors due to getting rid of DTEs
changing the result output of the test.

Change-Id: If7ef1897adf3ef819314aa094ba78c526d77770f
Pau Espin Pedrol at
pcu: Fix wrong BSN uint size

3GPP TS 44.060 9.1.4.2, BSN is 11 bit long.

Change-Id: Id1ef8b58dc61ab91de2c781a2fd1e8da5eba83a7
Pau Espin Pedrol at
pcu: Fix TC_dl_cs1_to_cs4 sporadic fail

The test TC_dl_cs1_to_cs4 failed sporadically in ttcn3-pcu-test-asan.
Due to how the DL data arriving at Gb is split in chunks over RLC/MAC
(also based on how CS changes over time), it may happen that the full
PDU content doesn't finish at the exact block number where PCU expects
the DL ACK/NACK. As a result, since PCU delays finishing the DL TBF and
some data for that DL TBF has already not been ACKed (and since there's
no more active DL TBFs), it will decide to retransmit some of the
RLC/MAC blocks which haven't been yet ACKed, instead of transmitting
nothing.
This is an optimization to increase the probabilities the MS has
received all the data.
We need to account for this possibility in f_dl_data_exp_cs(), used in
the mentioned test. In there, it needs to be checked whether the
received DL data block is a retransmission, and use that knowledge to
resolve that all data has been transmitted and hence the final condition
can be checked.

Change-Id: I7fb40689547645adf1d54f43c263161be1d7a440
Pau Espin Pedrol at
pcu: Fix dummy DL block received due to timer race conditions

Timer X2002, which manages delay at PCU between sending DL TBF Ass over
CCCH and start transmitting for it over PDCH, is clock-time based.
As a result, timer at PCU process and ttcn3 process may time out
slightly differently. Hence, it can happen that we request a DL block
immediatelly *before* the timer triggers at the PCU. In that scenario,
PCU transmits a dummy block instead of a data block.
Account for this race condition in several tests; some tests already
used this formula.

Change-Id: Ic2bb953483cd1f678cbe32c7a94e177f79ecb4e4
Pau Espin Pedrol at
s1gw: f_ConnHdlr_session_delete(): invalidate peer's SEID

Change-Id: If8027e2bdb5822eb7555cd02a72be900a1f18880
Vadim Yanitskiy at
s1gw: f_ConnHdlr_session_delete(): respect any order

It's not guranteed (nor required) that PFCP Session Deletion Request
PDUs are sent in the same order as their respective ERab records are
organized in the given ERabList.  They can be emitted in any order.

Make f_ConnHdlr_session_delete() more flexible:

* Expect to receive N PFCP Session Deletion Request PDUs;
* For each received PFCP PDU, find the matching E-RAB;
* Make sure that an E-RAB is never released twice;
* Send PFCP Session Deletion Response.

This patch fixes the following TCs:

* TC_ue_ctx_release_req3
* TC_ue_ctx_release_cmd_compl3

Change-Id: I93d3d38829b1f425d18d59464894da239e3511eb
Related: 75cb01b7 ("s1gw: add TCs for UE CONTEXT RELEASE procedures")
Related: SYS#7310
Vadim Yanitskiy at
s1gw: add TC_e_rab_modify_req_rsp[_multi]

Test the E-RAB Modify procedure (MME initiated), which is defined
in 3GPP TS 36.413 section 8.2.2.

Change-Id: I58b9964bae24b5aac526ee0c0c8ac8798f351e05
Related: osmo-s1gw.git I24d57ea390d71b640cb42046a8658e9d30670682
Related: osmo-s1gw.git I057a1c58d0c6ad04c00ad3ea4c68230d8632a07e
Related: SYS#7308
Vadim Yanitskiy at
s1gw: add TC_e_rab_modify_ind_cnf[_multi]

Test the E-RAB Modify procedure (eNB initiated), which is defined
in 3GPP TS 36.413 section 8.2.4.

Change-Id: Iec95ca0ecf37290bddfbefce1861f8ae66bf4db1
Related: osmo-s1gw.git I750ada0a5a21edc8bc06d567c8000b6304966474
Related: osmo-s1gw.git Icc16a57d40b68bd17c5d207b643927d58176e088
Related: SYS#7308
Vadim Yanitskiy at
hnbgw: remove osmo-hnbgw <= 1.6.0 code path

osmo-hnbgw 1.7.0 has been released, so we can remove this code path.

Change-Id: Ie55b752c19aa597afdc47b6e57e8ff0b42313e00
Pau Espin Pedrol at
sgsn: remove osmo-sgsn <= 1.12.0 code path

Now that 1.13.0 has been released, we can run this test in latest too.

Change-Id: I4ead7b05d7d956303584ccbfe1e13692f54341af
Pau Espin Pedrol at
eim: move es9p_Types_JSON to library

The TTCN3 module es9p_Types_JSON is currently only used by the eIM testsuite,
but it may also be helpful in other testsuites in the future.

Related: SYS#7339
Change-Id: If4be10a298e30188aebe7c9d3efbdb56d2816c7f
pmaier@sysmocom.de at
mgw: osmo-mgw.cfg: remove deprecated no-op params

This patch fixes the following warnings:

% Deprecated 'sdp audio-payload number <0-255>' config no longer has any effect
% Deprecated 'sdp audio-payload name NAME' config no longer has any effect
% Deprecated 'loop (0|1)' config no longer has any effect
% Deprecated 'allow-transcoding' config no longer has any effect
% Deprecated 'loop (0|1)' config no longer has any effect
% Deprecated 'allow-transcoding' config no longer has any effect

Change-Id: Ie4f2b46eda2e848781b77e590ad20e80fed86257
laforge at
bts: expect TC_data_{rtp,facch}_tchf144 to pass

Change-Id: I5dfcecc9cb6829ad208a54d7a3092a4cde327fb3
Related: OS#6167
laforge at
stp: Allow setting up different m3ua_config list by test

This is useful, for instance, for tests willing to test dynamic ASPs.

Change-Id: I0a875bac5e9506be9140d5afa28da25bdc99a5a6
Pau Espin Pedrol at
Use fork of titan.ProtocolModules.M3UA containing fix

Use a fork of the repository until the M3UA_NOTIFY decoding bug gets its
fix merged, currently submitted upstream in [1].

[1] https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.M3UA/-/merge_requests/4

Change-Id: I9ac3dcad88cd13c1b45fb70bdcd2a474d084a652
Pau Espin Pedrol at
stp: Pass M3UA conn idx to f_M3UA_rkm_register()

Change-Id: I9295a2c3518f82e8c82625fb573e414b1d634146
Pau Espin Pedrol at
stp: NOTIFY expectancy fixes

Fix expected behavior of STP according to specs (RFC 4666 4.3.4.5),
after osmo-stp got several related fixes in libosmo-sigtran.git
Change-Id I85948ab98623a8a53521eb2d2e84244011b39a93 and Change-Id
I3dffa2e9c554f03c7c721b757ff33a89961665b5.

Change-Id: I3a56b4fcb8c119a31815f3175db2d7899fbfddd7
Pau Espin Pedrol at
stp: Introduce tests TC_dyn_(2)asp_as_rkm_permitted

These tests allows testing behavior of scenarios related to dynamic
ASP/AS/RKM improved/fixed in libosmo-sigtran.git Change-Ids:
I986044944282cea9a13ed59424f2220fee6fe567
I85948ab98623a8a53521eb2d2e84244011b39a93
I3dffa2e9c554f03c7c721b757ff33a89961665b5

Change-Id: Ic3116cbe63832003876ae19b31491275aebb41a9
Pau Espin Pedrol at
stp: Fix expectancies of TC_clnt_quirk_snm_inactive

The test STP_Tests_M3UA.TC_clnt_quirk_snm_inactive validates the
snm_inactive quirk by sending a DAUD before the link being activated,
and expecting a DAVA to make sure osmo-stp did indeed process the SNM
message.
However, osmo-stp used to lack proper route validation based on link
state, which means it would incorrectly assumed the link for the
affected PC (55) in the test was active and hence would answer with a
DAVA. After libosmo-sigtran.git Change-Id
I928fb1ef5db6922f1386a188e3fbf9e70780f25d this wrong behavior is fixed,
and hence osmo-stp starts answering with a DUNA instead of a DAVA, since
AS "as-client" has not yet been activated during the test.
Fix the test expectancies by expecting a DUNA instead of a DAVA.

Change-Id: I907981c1487b299df852c405bae1fefff4bf5191
Depends: libosmo-sigtran.git Change-Id I928fb1ef5db6922f1386a188e3fbf9e70780f25d
Related: SYS#7112
Pau Espin Pedrol at
stp: Fix brokeness in STP_Tests_M3UA.TC_tmt_loadshare

The test was not even setting the traffic-mode in the IUT.
Furthermore, it was expecting pure round-robin behavior, which was the
older behavior of osmo-stp when loadshare traffic-mode was selected.

Actually split the test into 2, naming them properly (since round robin
is not a AS traffic mode in itself, but a possible implementation of the
loadshare traffic-mode.

The new test validates the usual loadshare traffic-mode based on SLS
distribution.

Related: SYS#7112
Depends: libosmo-sigtran.git Change-Id I61340549c596f1c04bc2269dbc165c327bf72037
Change-Id: I16d81cb2f88bb2927f248182ad4f8f27c8c24859
Pau Espin Pedrol at
stp: Fix brokeness in STP_Tests_IPA.TC_tmt_loadshare

Similar to previous commit for M3UA, this time for IPA.
Since in IPA so far the SLS is fixed per ASP, we need to add an extra
sender ASP which will get a new asp_id (and hence SLS) so that we can
also test traffic being sent/distributed to the 2nd receiver.

Change-Id: I61c3efbf8e30533d051e2de506f7c8eaae7e297b
Pau Espin Pedrol at
stp: STP_Tests.ttcn: Use M3UA PC and RCTX from config

Change-Id: I81c8402d5ccd6e59f2a6869927c637fff30cb952
Pau Espin Pedrol at
es9p_Types_JSON: split headers into separate module

The headers used in the JSON binding of ES9+ are also used in ES2+, ES11 and ES12.
Let's split the headers into a separate module, so that we can re-use them in
other definitions too.

Change-Id: I0242c877805003fa67445800960f75ce27752383
Related: SYS#7339
pmaier@sysmocom.de at
RSPDefinitions_Templates: add missing default values

The template parameters of some templates lack a reasonable default.
Let's add default values to those.

Related: SYS#7339
Change-Id: Ia55d17a00462c7c7729eb0d8d24ab0556c4c6918
pmaier@sysmocom.de at
es9p_Types_JSON: add decoder/encoder functions for opposite direction

We currently only have ES9p encoder/decoder functions to emulate an ES9p server,
however, we will need to emulate ES9p clients too

Change-Id: Ic7e3390bd09cc9e0c91ca90ac60cdde5d2ce1384
Related: SYS#7339
pmaier@sysmocom.de at
HTTP_Adapter/cosmetic: remove stray newline

Change-Id: If23ca399071ddb8f9f39797b543d43f6173406f9
pmaier@sysmocom.de at
testenv/README: fix markdown syntax

Put the two wget lines into a code block, otherwise the line break is
omitted and it looks weird.

Change-Id: Ia61d56cdf4822595e2a05b320e387a079bdbfeb2
Oliver Smith at
HTTP_Adapter: allow requests to different hosts

The host that is requested via the HTTP_Adapter is configured once on
initialization. This is fine if the test scenario only has exactly one
destination to query. For multiple destinations, this model does not
work. Let's add an http_pars parameter to the request functions, so
that the user can direct the requests to different hosts dynamically.

Related: SYS#7339
Change-Id: Ic87674f2381b3c6a1be6d0ce28a9e5403cda201b
pmaier@sysmocom.de at
HTTP_Adapter: add missing omit qualifiers

On some function in the HTTP_Adapter module, the (omit)
qualifiers are missing.

Related: SYS#7339
Change-Id: I985021852cbe2bcce60b1466e8ec9c3820a0c0f8
pmaier@sysmocom.de at
testenv: use --autoreconf-in-src-copy by default

Pass --autoreconf-in-src-copy to osmo-dev's gen_makefile.py by default,
so we can always avoid errors related to:

* running "./configure" in-tree and out-of-tree (results in "configure:
  error: source directory already configured; run "make distclean" there
  first")
* running "./configure" / "autoreconf" with different autotools versions
  (on host system and in podman container)

I've kept is as experimental flag at first for better testing, but make
it the default now as it seems to work reliably.

The old make dir is cleaned up when the user runs "./testenv.py clean"
the next time.

Related: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650
Change-Id: I41e1fb534e253ddb43f266d73485b83259a8aa40
Oliver Smith at
deps: Update titan.ProtocolModules.M3UA to upstream master

MR contained in our fork was merged [1], so we can use upstream again.

[1] https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.M3UA/-/merge_requests/4

This patch doesn't contain an update hash because it was merged as
fast-forward so the commit hash now in master HEAD did not change from
the one in our repo fork branch.

Change-Id: Icf411559d3ba5bc699d8a66d7c42e7034392a9e6
Pau Espin Pedrol at
stp: STP_Tests_IPA.TC_tmt_loadshare_sls: Fix test expectancies

Change-Id: I68856e11a92b707eb11ab4813390e6faf3c54b69
Pau Espin Pedrol at
sccp: Improve logging receiving unexpected msg

Change-Id: I90c5236882e96fc038fee0d2f4551cfc58767c78
Pau Espin Pedrol at
sccp: Fix test rx SLS expectancies

The SLS is the same for all messages in conn being sent in one direction, but
doesn't need to be the same value on both directions.
Since the SLS value on the other direction is not selected by the test
itself, we cannot expect a given specifi value.
Update the test expectancies.

This started to fail since recently libosmo-sigtran started properly
setting SLS values, eg libosmo-sigtran.git
7781eb275da41a9b6b1ea5d8b0e802e87a8e9d53 and
0061e8d0bcba3b0ed5ea255588619627d0975380.

Change-Id: Ic288b58629361de9cfadb568a27b51b7e02c9e99
Pau Espin Pedrol at
SCCP_Templates: Expect either proto class0 or class1 upon rx SCCP

Until recently, libosmo-sigtran only sent class0, but it is now able to
send class1 too (0061e8d0bcba3b0ed5ea255588619627d0975380).
Adapt the test expectancies.

Change-Id: Ia1e05b24f1b56404d951eece0e9314d784d375db
Pau Espin Pedrol at
HTTP_Server_Emulation: allow multiple HTTP server ports

At the moment the HTTP_Server_Emulation component can only provide
a single HTTP server. Let's extend it so that it can provide multiple
HTTP server.

Related: SYS#7339
Change-Id: I11df9df5c3041f977b458835e923c74abe3bba7b
laforge at
testenv: -h output: add more binary repo examples

It wasn't clear how to use the nightly asan repository with testenv.
Extend the help output for that.

Change-Id: I5e18059f129423eac3374bd6beff32930a0f7c95
Oliver Smith at
bts: BTS_Tests.cfg: remove commented out params

... most of them are personal stuff.

Change-Id: I892ae9003082da78ba41df55b6fb56ff4aae5526
Vadim Yanitskiy at
bts: BTS_Tests.cfg: set BTS_Tests.mp_transceiver_num

At least for osmo-bts-trx, we are running the testsuite with 4
transceivers.  This is also required for running the hopping config.

Change-Id: I449001f67abe1748f221c1ef9d0212f024f710dd
Vadim Yanitskiy at
bts: Run osmo-bts-trx with sched_rr priority

use a real time prio since it really needs to do stuff in ral time with
high prio. Use lower rt prio than fake_trx since that one is the most
important piece providing clock.

Change-Id: I0251ed3ec0645617cf4e9bcc03e75c805bf1634c
Pau Espin Pedrol at
asterisk: Rework test TC_ims_call_mo_after_tcp_conn_closed with new expectancies

Previous expected behavior (and Asterisk-UE implementation) was wrong.
Since recently, Asterisk behaves better, that is, whenever the TCP conn
is dropped by the peer, it will attempt re-connecting and
re-registering.

Related: SYS#7398
Change-Id: I7ec1e8e30c4d72be96c8e300e0d038e63ba0e600
laforge at
mme: Take into account KSI update by Network

Since recently, open5gs updates the KSI received from the UE in order to
comply better with 4G Core expectancies.

Track assigned KSI in ttcn3 code and update it according to
expectancies.

Depends: open5gs.git 70310979c58fe186e9eaa06bec9d9a31f24ff7a1
Change-Id: Ie97788c5d9996370cd3e24cc0ff7c003adff1a65
Pau Espin Pedrol at
mme: Replace TC_s1ap_setup_wrong_plmn with test with different expectancies

This test was written following previous open5gs behavior, which was
wrong and updated in https://github.com/open5gs/open5gs/issues/3544.

Expect test to trigger a successful S1 setup procedure.
Rename the test to reflect the new expectancies.

Related: OS#6634
Change-Id: I3aba3d642e3bc70f08b6e0713514fb8906da775d
Pau Espin Pedrol at
rmlinks.sh: use -delete instead of -exec rm

Change-Id: Ic2cf9c36159a2bbf1acb59e6b316d1ef30aabe28
Vadim Yanitskiy at
rmlinks.sh: remove non-existent path exclude

Change-Id: I91ae0d3a610f4c9d826bfb1f579204fb0f55e7c8
Vadim Yanitskiy at
remove unused ROHC_CNL113426_LATEST dir

Change-Id: I30a5595ad1d0dfd2d6e4193add9e9e3503210aca
Vadim Yanitskiy at
deps: fix overriding recipe for target 'titan.ProtocolEmulations.SCCP'

This patch fixes the following warnings:

Makefile:188: warning: overriding recipe for target 'titan.ProtocolEmulations.SCCP'
Makefile:185: warning: ignoring old recipe for target 'titan.ProtocolEmulations.SCCP'
Makefile:188: warning: overriding recipe for target 'titan.ProtocolEmulations.SCCP/clean'
Makefile:185: warning: ignoring old recipe for target 'titan.ProtocolEmulations.SCCP/clean'
Makefile:188: warning: overriding recipe for target 'titan.ProtocolEmulations.SCCP/distclean'
Makefile:185: warning: ignoring old recipe for target 'titan.ProtocolEmulations.SCCP/distclean'

The problem is that 'titan.ProtocolEmulations.SCCP' is listed in
both ECLIPSEGITLAB_REPOS and OSMOGITHUB_REPOS.

Change-Id: Ia215f02fc08d66fb56e7e0e452b75d6e2f6c59c5
Fixes: 207ce0370 ("deps: Update titan.ProtocolEmulations.SCCP to upstream master")
Vadim Yanitskiy at
bts: simplify f_tc_rsl_ms_pwr_ctrl()

Change-Id: I67968a0398f9957dc4cc9c7fdffaf2b0ac40b88a
Vadim Yanitskiy at
library: fix coding style near f_rnd_int()

Change-Id: Ic9b97cd1626f35b3483f37fa250eea9dfd35ef51
Vadim Yanitskiy at
library: add f_rnd_sleep()

Change-Id: I97474d0c39052d8a9dd294238530e0b6c31a19e0
Vadim Yanitskiy at
library/s1ap: cosmetic: fix a typo

Change-Id: I50aceea2653c426d1f60542dbb6721b8c75ed3fb
Related: SYS#7288
Vadim Yanitskiy at
library/s1ap: split PDU specific API to S1AP_Functions.ttcn

Change-Id: Id3ba089140093490abd0307addeb5d7287dc5894
Related: SYS#7288
Vadim Yanitskiy at
s1gw: derive altsteps from f_ConnHdlr_rx_s1ap_from_{enb,mme}()

Change-Id: I8637a8abed0f0152abf2dce63ac28aa90f85bdc7
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add UE multiplex component

The UEMux is built upon the ConnHdlr component, allowing to simulate
concurrent activity of multiple virtual UEs.  This new component will
be used in follow-up patches.

Change-Id: I60e6f5d2b9882c27cecd06a2450bda4909c0532a
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add TC_uemux_uldl_nas_release

So far all of our *_multi TCs have been running the test logic in
multiple eNB connections.  This is the first TC simulating activity
of multiple virtual UEs within a single eNB connection.

Change-Id: I8e5db55739241f89592a7d2a81a13e8028e90d1d
Related: SYS#7288
Vadim Yanitskiy at
s1gw: disable Nagle for eNB and MME connections

Change-Id: Id89941659fd2763aad9262b05aa007370424f2c1
Related: SYS#7288
Vadim Yanitskiy at
msc: f_establish_fully(): merge EST_TYPE_MO_{CALL,CSD}

There's nothing special about CSD at the stage of MM connection
establishment, it looks like a normal call at this point.

Change-Id: I732b58ed43bc0d76fb78a6a41e19261658d8f755
Vadim Yanitskiy at
msc: use f_expect_paging() in SS/USSD TCs

Change-Id: Ia75420c738ef412af6ae602566fab7c997b48335
Vadim Yanitskiy at
msc: split up as_unexp_gsup_or_bssap_msg()

Make use of derived as_unexp_{gsup,bssap}_msg() altsteps.
Take a chance to improve them by printing unexpected PDUs.

Change-Id: Ie6c349bdae289d19614809545e23c2b7bf88f8ed
Vadim Yanitskiy at
msc: add TC_gsup_mt_sms_{paging,conn}_timeout

Change-Id: Ief16753783e044911f1e3cef8d7012810d709e61
Related: SYS#7323
Vadim Yanitskiy at
s1gw: ConnHdlr: allow passing {MME,ENB}-UE-S1AP-ID

This is needed for follow-up UEMux testcases, in which we spawn
multiple virtual UEs with unique {MME,ENB}-UE-S1AP-IDs.

Change-Id: Ife37c77cff348cdfbde191dbad6da816e68ca941
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add UEMux TCs for E-RAB SETUP and RELEASE

Change-Id: Ia4583f82a768ca3d185aad596ce8ec9bbd37ad32
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add UEMux TCs for INITIAL CTX SETUP and UE CTX RELEASE

Change-Id: I811904e50dd6f0a05b0bb6babebe5b4690e2d3ec
Related: SYS#7288
Vadim Yanitskiy at
s1gw: fix passing swapped {MME,ENB}_UE_S1AP_ID

This commit fixes a regression introduced in 64db5053
and makes the following TCs green again:

* TC_e_rab_modify_ind_cnf[_multi]
* TC_e_rab_modify_req_rsp[_multi]

Change-Id: I9b19a82234f547a9e44c9c034492ee4b21892818
Fixes: 64db5053 ("s1gw: ConnHdlr: allow passing {MME,ENB}-UE-S1AP-ID")
Vadim Yanitskiy at
remsim: make client tests work in testenv

* Prevent osmo-remsim-client-shell from closing immediately with "STDIN
  was closed, terminating".

* Fix REMSIM_Tests.cfg:
  * move mp_ to proper section
  * proper IP

Change-Id: I91b08b9bfde11f4600993b18ece1e810b61ed904
Oliver Smith at
testenv: fix building osmo-remsim with osmo-dev

Use --disable-remsim-client-ifdhandler as configure argument for
osmo-remsim. We don't need this for running tests and this prevents the
buildsystem from trying to write to /usr/lib/pcsc/drivers/ which fails
the build.

Change-Id: I3b00e5301433476bd19de3814943878f918c1fa0
Oliver Smith at
Cosmetic: testenv/testdir: fix formatting

This wasn't caught by previous ruff versions, fix it.

Change-Id: Ib770ee2e14811777efdb2c5867b29ba379abde7c
Oliver Smith at
stp: TC_tmt_loadshare*: Use new vty command 'binding-table reset'

Reset the eSLS binding table state before starting the test, to run it
with a clean state.

This test also fixes TC_unknown_client_dynamic_tmt_loadshare since it
now resets the table after connecting the 2nd dynamic ASP, which allows
re-distributing all seeds in the table into the new available set of
ASPs.

Depends: libosmo-sigtran.git Change-Id I56c34072a9ded42c13dbfc105a0ab3353ca353ec
Change-Id: I40b7724edcc06a3df641e316be4770d0e56bb72d
Pau Espin Pedrol at
testenv: fix OSMO_DEV_MAKE_DIR env var

When --autoreconf-in-src-copy was made the default, the make dir name
has been changed to make2 but this variable was not adjusted. Fix it.

Fixes: dacbca96 ("testenv: use --autoreconf-in-src-copy by default")
Change-Id: Ia46ebe1240806995960545afbb34e6533580f209
Oliver Smith at
sccp: testenv: fix hardcoded sccp_demo_user path

The current path only worked for with podman and with osmo-dev. Make it
work for the following use cases too:

* without podman, with osmo-dev
* with podman, with binary packages (instead of osmo-dev)

Removing package=no is required, so testenv builds sccp_demo_user from
source when running with --binary-packages. This is needed as
sccp_demo_user is not packaged (OS#5899).

Change-Id: Id6e0b669dcb71cab9e789fe011e60827a8e07f77
Oliver Smith at
sccp: testenv: fix run with asan + latest binaries

When running against osmocom:nightly:asan, build sccp_demo_user with
--enable-sanitize. Otherwise this code is not running with asan and
doesn't even start (as the libraries we link against are built with
--enable-sanitize).

When running against osmocom:latest, check out the latest tag instead of
current master.

Fixes: OS#5899
Change-Id: I5307125560694feae9f0978ebd27607a77ed8675
Oliver Smith at
testenv: remove TESTENV_GIT_DIR

This variable is not used anymore, remove it.

Change-Id: Iabb9fa3b9b393b2cb7f18fb877746e5d1e510e63
Oliver Smith at
msc: add/expect network-originated MT-Forward-SM.Err

The idea is to have two variants of the MT-Forward-SM.Err:

* _MS: originated by the MS/UE (via RP-ERROR),
* _NET: originated by the network (MSC) itself.

In both testcase scenarios we expect the network to indicate the
MT_FORWARD_SM_ERROR on its own, due to the lack of response from MS/UE.
Use the right template kind for that, expect a specific Cause value.

Change-Id: Ic27d943645fdff8d34f958e3bf16c8ee6e8368d2
Related: osmo-msc.git I51d92752471147e6d21a5059bebb0702b32642a5
Related: e9de1515 ("msc: add TC_gsup_mt_sms_{paging,conn}_timeout")
Related: SYS#7323
Vadim Yanitskiy at
msc: execute more SMS-over-GSUP tests via UTRAN

Change-Id: Ia3c044ad04561a4ee6dbb4a3fe59fedd3ac79bba
Related: 1cd11a05a ("MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms")
Related: 8d0d7af27 ("msc: add TC_gsup_mt_sms_lu_delay for X36 (LU delay) timer")
Related: e9de1515d ("msc: add TC_gsup_mt_sms_{paging,conn}_timeout")
Vadim Yanitskiy at
testenv: make clone project function generic

Prepare to use the same code for cloning libosmocore in order to build
osmo-ns-dummy in a follow-up patch, which isn't in the binary packages
either.

Change-Id: Id19ed229545b22751c810b647e9be24f955f348d
Oliver Smith at
testenv: clone_project: fix getting latest version

Extend the logic for getting the last version, so it doesn't only work
with libosmo-sigtran (where the last version happens to be the last one
returned by "git ls-remote --tags") but also for libosmocore where this
isn't the case. Filter the versions by the relevant ones and then sort
them to get the highest one.

Change-Id: Ic15e385b9c8bab5c0dc70276049d6ad5ae927a6a
Oliver Smith at
ns: initial testenv config

Change-Id: I7b0d81db49dae0a3bb3d4c3b36fd3f8b4b590760
Oliver Smith at
hnbgw: Support configuring RAC on each hnb conn

Change-Id: Ie6a731d641ca963f71537e09fda8c894730bee84
Pau Espin Pedrol at
hnbgw: Test paging with PAge Area ID IE

Change-Id: I313aadae08f187b413e894a93faa29ce771ef7fe
Pau Espin Pedrol at
stp: Fix typo in comment

Change-Id: I9f4a1e5ec0b0d2614b3cec0768e8847fce3e3cdf
Pau Espin Pedrol at
testenv: clean: fix cleaning git dir

Don't try to build a PATH that contains the testsuite dir if running the
"clean" action, because then no testsuite is defined.

Fix for:
  $ ./testenv.py clean
  [testenv] + ['rm', '-rf', '/home/user/.cache/osmo-ttcn3-testenv/git']
  Traceback (most recent call last):
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/./testenv.py", line 137, in <module>
      main()
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/./testenv.py", line 133, in main
      clean()
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/./testenv.py", line 117, in clean
      testenv.cmd.run(["rm", "-rf", path])
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/_testenv/testenv/cmd.py", line 106, in run
      env=generate_env(env),
          ^^^^^^^^^^^^^^^^^
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/_testenv/testenv/cmd.py", line 72, in generate_env
      path += f":{os.path.join(testenv.testsuite.ttcn3_hacks_dir, testenv.args.testsuite)}"
                                                                  ^^^^^^^^^^^^^^^^^^^^^^
  AttributeError: 'Namespace' object has no attribute 'testsuite'

Change-Id: I65da89581260fc60b3d8da0a93ee04c0c22c7f2c
Oliver Smith at
Revert "hnbgw: Test paging with PAge Area ID IE"

This reverts commit b0e3627eaa2665a03eb2301b099da6bceb4e4d4a: caused
regression in several other tests.

Related: OS#6762
Change-Id: I416d514e739cc0b16832192bfdb746a4ed09336f
Oliver Smith at
Revert "hnbgw: Support configuring RAC on each hnb conn"

This reverts commit 4e4398aac6d19fe16c40be88290e0da08588fd2d: caused
regression in several other tests.

Related: OS#6762
Change-Id: I077c584219bfa54468bd796a1fc2e85fd60b7a02
Oliver Smith at
msc: add TC_mo_ussd_evil_ms for OS#6756

This is an "evil MS" scenario that crashes current osmo-msc.

Change-Id: If1d85a1b4b63b01b4565e53677acfd21e664e799
Related: osmo-msc.git I724f0f0c9ef8611d3c3653e9370361b252127f72
Related: OS#6756
Vadim Yanitskiy at
buildsystem: move related scripts to subdir

Clean up the main directory by moving all buildsystem related scripts
into a _buildsystem subdirectory.

Rename gen_links.sh.inc to gen_links.inc.sh while at it, so vim does
syntax highlighting as shell script and not bitbake.

The rest of these patches in this series lead up to changing the
buildsystem to build out-of-tree (so we don't clutter the source dirs
with symlinks and build artifacts) and making the build output more
readable.

Related: OS#6599
Change-Id: Ieeefdfd74b2698794fb12fec4ed32565dc9f36a6
Oliver Smith at
buildsystem/regen_makefile: change to inc script

Make the regen_makefile script more consistent with gen_links.inc.sh by
also turning it into an include script. By doing this all previously
declared variables are available in regen_makefile, which means export
and passing as arguments is not needed anymore, making the resulting
users simpler.

Use #!/bin/sh -e while at it and remove empty CPPFLAGS_TTCN3 vars.

Change-Id: I10a41671e857024be6a5e8577c2aaca83228793e
Oliver Smith at
buildsystem: remove ttcn3_compiler workaround

The related debian bug has been fixed in 2018, so remove the workaround.
I've also verified that the binary is called "compiler" in Arch Linux
(as some developers are on Arch).

Change-Id: Ia50aa3caffeaa85eefba10695096aa23dcb69c93
Oliver Smith at
buildsystem/regen_makefile: modernize

Apply various small changes to make this file more readable.

Change-Id: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
Oliver Smith at
buildsystem/gen_links: move set -e to users

Make it more obvious that the various gen_links.sh scripts are running
with "set -e" by adding it to the #! line instead of setting it through
an included file.

Change-Id: I4caf445bef716161526a213d6a06ecc9d30f78cb
Oliver Smith at
buildsystem/gen_links: rename ignore_pp_results

Rename ignore_pp_results to gen_links_finish in preparation for the next
patch where the function will be used for generating more symlinks
instead of writing to a gitignore file. This is a separate commit to
make the next one more readable.

Change-Id: I6a1a79f1a3ff18fe4b51e4c72c3e9b56c571935e
Oliver Smith at
buildsystem: build out-of-tree

The buildsystem used to create symlinks to dependency source files in
the testsuite directories, and then building inside that source
directory. This lead to many unrelated files being in the source
directory.

Change the logic to create symlinks to all sources in a separate
$BUILDDIR instead (default: _build) and do the build there.

Advantages:
* Source directories are not cluttered with other files anymore.
* Clean up logic becomes much simpler and faster (rm -rf _build instead
  of generating a Makefile and running "make clean" in every testsuite
  directory).
* No need to generate gitignore files on the fly anymore.
* Using a separate $BUILDDIR is now possible, this will be used by
  testenv in a follow-up patch when running with podman, to make sure
  that build artifacts from podman and not using podman are not mixed as
  they are incompatible.

Related: OS#6599
Change-Id: If18aaf2a2a0d55bb617e5cb1b73f6ee4b1952494
Oliver Smith at
buildsystem: make output more readable

Generate short and readable compile messages:

  CC       IPL4asp_PT.o
  CCLD     TCCInterface.so
  CCLD     TELNETasp_PT.so
  CCLD     MGCP_Test

Instead of the very verbose messages we would get otherwise. Especially
the linking message clutters a whole page of terminal output without
this path:

   if ... g++ ... $ALL_OBJ_FILES; then : ; else ... $ALL_OBJ_FILES; fi

Change-Id: I780106e64089dc24a7ba724f6a94e67417d49c30
Oliver Smith at
testenv: remove copy_ttcn3_hacks_dir

When running with podman, set a separate builddir to avoid conflicts
with build objects generated from running "make" outside of podman. As
the buildsystem supports setting a differerent builddir directly now,
remove the copy_ttcn3_hacks_dir logic that was used to emulate this
feature.

Change-Id: I9cae0c4f8c34bb6876ef51048ef19b35a2e369a9
Oliver Smith at
testenv: refactor run --until-nok code

Refactor the code in preparation for using the code that checks if the
testsuite was successful with a new --bisect arg in the next patch.

Change-Id: I3a8fc83c6833f0d2a8be9c0d7ddaea0546859988
Oliver Smith at
testenv: run: add --bisect argument

Add an argument that lets testenv.py exit with != 0 when at least one
test has failed, so it can be used with "git bisect".

Change-Id: I941064c1c704560e0f7351c82e810481cd72b6da
Oliver Smith at
start-testsuite: fix passing $TEST to ttcn3_start

Fix that testenv / ttcn3_start kept running after the testsuites were
already done. This was caused by passing an empty string to ttcn3_start
as test argument, which causes it to still use the config file, but run
in a single test mode:

https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/mctr/ttcn3_start#L307-319

After the first test ran, ttcn3_start sends "emtc" to the MTC, which
replies with "MTC cannot be terminated." as it is still in
MC_EXECUTING_TESTCASE instead of MC_READY:

https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/cli/Cli.cc#L695-700

The ttcn3_start script then waits forever for the "MTC terminated.."
string, which doesn't come since "emtc" isn't sent to the MTC a second
time:

https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/mctr/ttcn3_start#L353-356

Fixes: 050ba48c ("buildsystem: build out-of-tree")
Change-Id: Ic50de8350e20d101417c5689058b64fe6547126f
Oliver Smith at
README: use # and ## for headlines

Prepare README to be able to use deeper headline levels.

Change-Id: Ice2baaf3ffdd1c11238c7791ab39925bed10818d
Oliver Smith at
start-testsuite: respect $TTCN3_DIR (if set)

Change-Id: I5c1cdc6ffbe50cf7ee48a160d2f406e428326d14
Vadim Yanitskiy at
Move f_{dec,enc}_mcc_mnc() API BSSMAP_Templates.ttcn -> GSM_Types.ttcn

The GsmMcc and GsmMnc types used in the function are defined in
GSM_Types.ttcn, which is also incldued by BSSMAP_Templates.
Hence, move the function there so that it can be used in other
testsuites including more generic GSM_Types.ttcn but not
BSSMAP_Templates.ttcn.

Change-Id: Iafafd2957a11d34a9402d252a169fec40593f483
Pau Espin Pedrol at
Fix MNC decoding in f_dec_mcc_mnc()

This API is so far only used in MSC_Tests.ttcn f_sgs_perform_lu(), but
will be used in more testsuites in follow-up commits.

Change-Id: I9db37d0dc9abbbefd57af4f0e2b91bf8a918d4e9
Pau Espin Pedrol at
hnbgw: Support configuring RAC and Cell ID on each hnb conn

Change-Id: I490e770be5e390a1f55e1dff1cf0c42e917a8d33
Pau Espin Pedrol at
hnbgw: Test paging with Page Area ID IE

Change-Id: I5a053bcf1f8470038e95d03889da077f8f967bfa
Pau Espin Pedrol at
README: explain how to run testsuites manually

As the testsuites are now in the _build directory, running them might
not be as obvious. Add an example to the README. While at it, explain a
bit more what the testenv script does and where one can read more about
it.

Change-Id: I1ee9319ada889a8dd43cfb32776dc1a8ae12d607
Oliver Smith at
start-testsuite: remove workaround for TITAN < 9.0.0

We're using the 9.0.0 nowadays, which does not need this workaround.

Change-Id: I57eecd6e0ea9e488a2110b029ddc313bd05cd1fa
Vadim Yanitskiy at
testenv: support fetching coredumps in jenkins

The Osmocom jenkins nodes run inside LXCs. When we get a coredump it
appears on the host, fetch it from there via testenv-coredump-helper,
which gets added to the hosts in the related patch.

Related: osmo-ci I7e66c98106b7028a393e3b873e96ae2dcb412c48
Related: OS#6769
Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
Oliver Smith at
bts: set osmo-bts sched priority to 30

Change the scheduling priority from 10 to 30, as we are currently see
osmo-bts suffering from scheduling latency in jenkins even though we
don't run other jobs at that time:

  20250425034138405 DL1C ERROR PC clock skew: elapsed_us=387574, error_us=382959 (scheduler_trx.c:449)

This should fix that the kernel prioritizes other (userspace or kernel)
processes running on the same machine that have a higher priority. We
have seen such an improvement after increasing scheduler priority for
osmo-bts-sysmo too (see I2394e6bbc00a1d47987dbe7b70f4b5cbedf69b10).

Priority 30 is higher than 10. From sched(7):

> Processes scheduled under one of the real-time policies (SCHED_FIFO,
> SCHED_RR) have a sched_priority value in the range 1 (low) to 99 (high).

This testsuite currently gets executed through docker-playground and it
fetches this config from osmo-ttcn3-hacks (see
If15461240f3037c142c176fc7da745a1701ae3f8).

Related: osmo-ci I0162f7299c8e37f893ffa10ddc4c8edece29ed7f
Change-Id: I828422e2363a58ca8c19d0f1b8a1b7d4e4bc031e
Oliver Smith at
tcpdump/dumpcap: move kill_rm_pidfile to inc file

Move kill_rm_pidfile out of the 4 ttcn3 tcpdump/dumpcap scripts into a
shared include file. Use the version of the function that only tries to
kill the command with sudo if it was started with sudo.

This fixes dumpcap not stopping if:

* it was started with ttcn3-tcpdump-start.sh (despite the name it will
  start dumpcap instead of tcpdump if dumpcap was found), where it gets
  started without sudo, and

* no rule is set in the user's sudoers file to run kill as root with
  NOPASSWD.

Change-Id: Ia63c37b54fb42a8c64a676334cef6f9df4152e18
Oliver Smith at
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.

Related: https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/usrguide/referenceguide/7-the_run-time_configuration_file.adoc#L632-666
Change-Id: I0a2a376cd11784addff8ca228e3cc3e831b418a2
Oliver Smith at
Cosmetic: log_merge: modernize

Move license and copyright up and use an SPDX license identifier.

Change-Id: Iedd4f575edeaf47852f073d04d8cd8ffd92920dc
Oliver Smith at
log_merge: ensure we don't overwrite the log file

Add a safety check that ensures we don't overwrite an existing log file
by accident.

Change-Id: Ieda3d95c60dfae208959b80d55a1e8c3925a9dad
Oliver Smith at
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.

Fixes: OS#6787
Change-Id: Id2937d711a54a34c0d87d080199b4c3d5a5d6e06
Oliver Smith at
M3UA_Templates: Allow passing multiple Routing Context values

Change-Id: I117c63786d71aea683b554cf294fee0ceed665e0
Pau Espin Pedrol at
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.

Depends: libosmo-sigtran.git I646301ec3d08ef98f227cf4d19da1039e40cedd2
Change-Id: I2dc4d197e6de38781b63e3079ada4c4b4a0db31d
Pau Espin Pedrol at
stp: Store asp name in array of m3ua cfgs

This way we keep STP specific config in one place instead of having to
figure out the ASP name on each test where we want to modify that ASP.

Change-Id: I1d5d9113dc95a8da911a7a99260c9bfe6e9de7c9
Pau Espin Pedrol at
stp: Introduce test TC_clnt_sctp_adm_shutdown

Related: OS#6752
Change-Id: I8b1c8b633afc1515dedfccd43e642401896b167e
Pau Espin Pedrol at
stp: Introduce test TC_m3ua_sctp_srv_adm_shutdown

Related: OS#6752
Change-Id: Iad34af7e7758fbd3a0d686a261ccce53bc705817
Pau Espin Pedrol at
hnbgw: HNBGW_Tests.default: Drop unused LLSK config

That's only used in osmo-hnodeb, and it's probably a leftover when
copy-pasting from hnodeb directory to create the hnbgw testsuite.

Change-Id: Ic04ded35f64b5dac0c5f36ebdf066d751013c438
Pau Espin Pedrol at
hnbgw: Add missing plmn config in osmo-hnbgw.cfg

Change-Id: Ie360247b7be9cf5ac4feeab2a8957131896f7721
Pau Espin Pedrol at
hnbgw: Configure local ASP/AS in osmo-hnbgw.cfg

This allows us using known port for the SCTP assoc, which can then be
used to look up ASP in osmo-stp VTY.

Change-Id: Ic04702b597f7217890ee58734c11b866fb14af8b
Pau Espin Pedrol at
hnbgw: Introduce test TC_{cs,ps}_rua_dt_during_sccp_wait_cc

Related: SYS#7453
Change-Id: I97767db5560edf951202c876726d0c52b5b5b49f
Pau Espin Pedrol at
gbproxy/testenv: initial

Change-Id: I75265eb0765da85bffd76f8d64d278ed008d9b47
Oliver Smith at
gbproxy: sync configs with docker-playground

Change-Id: Ibef7e870c5c90d1cc861c89904950b1ac68dc9b2
Oliver Smith at
hnbgw: Introduce altstep as_pfcp_handle_del_req()

Change-Id: I94101b5f0ad8634db68f0a9d5230c00926b02061
Pau Espin Pedrol at
hnbgw: Introduce tests TC_ps_rab_release(_abnormal)

Same as their existing CS counterparts TC_rab_release(_abnormal).

Related: SYS#7451
Change-Id: Ia25efc2d6bf01d4a13e7fd1ce0563d20dd2e321e
Pau Espin Pedrol at
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.

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I2837a41c919a9f7ef8c315ce5aa48fb4fe3f9a85
Oliver Smith at
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.

Change-Id: I2ee26764d1471e54eff748e11ec2cce6fb662667
Oliver Smith at
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
Oliver Smith at
testenv: podman: add erlang-dev

Add the full erlang-dev package to the podman container, so we can build
osmo-epdg from source. Without this it fails with ei.h missing.

Change-Id: I4ca9d1823037889315f50de629e5581964cda079
Oliver Smith at
testenv: podman: add missing tree command

The tree command is used by the testenv scripts when building QEMU
initrds to quickly show the contents of the initrd before packing it.

Fix for:
  + tree -a /tmp/testenv-ggsn_tests-osmo_ggsn_v4_only-20250509-1151-745e3562-dxt_lu1f/ggsn/_initrd
  osmo-ggsn/run.sh: 140: tree: not found

That the build initramfs logic did not abort here is another bug that
gets fixed in a follow-up patch in this series.

Change-Id: I75fcd210db9e5c9364cb98ee09ebf754790aa55f
Oliver Smith at
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).

Change-Id: Ic32318da169ee8ebf867937782be5cf8a15f9f2f
Oliver Smith at
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

Fix it by using a trap instead.

Related: https://unix.stackexchange.com/a/65564
Change-Id: I2870b7e7ba28b2afc72e86b7a3bc389103564c80
Oliver Smith at
testenv: qemu: initrd build fail: stop immediately

Let qemu_wait.sh fail immediately when building the initrd has failed,
instead of waiting until it runs into a timeout.

Change-Id: I6de4d1c31385af52ee0fd55378adb10a9e2c2154
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
stp: Rename STP_Tests.ttcn -> STP_Tests_IPA_M3UA.ttcn

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.

Change-Id: Id2963407adf11add01630c3899a062d764c8ad75
Pau Espin Pedrol at
stp: STP_Tests_IPA: Support configuring less than 8 AS(P)s

This is a preparation patch towards splitting testsuite into smaller
configurations.

Change-Id: I820d295cd22fe824abf0f60bf6f1f0f3fd069d85
Pau Espin Pedrol at
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.

Related: OS#6796
Change-Id: I5d7021b6a9800cf1d7588f4a0ef864f5c30cf475
Oliver Smith at
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.

Change-Id: I4c76d12273a14df562ea906e6c8ddb348d1b0eda
Oliver Smith at
epdg: initial testenv.cfg

With this config, all tests are passing.

Depends: osmo-ci Ia60d5c1f5ade31e37293b40340e789f04ea86287
Change-Id: Ide2873be7830cc43e7fa09f26b2d504d0563a3c2
Oliver Smith at
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.

Related: I57eecd6e0ea9e488a2110b029ddc313bd05cd1fa
Change-Id: Icace325f492ce803d6f25a30b128ee0676e16727
Oliver Smith at
stp: Initial split into several testenv config

As a first step, split the generic config into 3 configs, one per
module.

The idea is to have a different config for a given set of related tests
running on a specific network topology/setup.

This helps in simplifying the test conditions, which allows easily
adding new topologies to test, validate specific scenarios or debug
existing ones.

For instance, to test Combined linkset loadsharing, we'll need to set up
some sort of scenario where we have at least 2 AS with each at least 1
ASP.

Change-Id: I4ec8e1bbc8e71d8bd421dfbd5356bf1937ce2bb4
Pau Espin Pedrol at
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.

Change-Id: I8123887755aa3253830b43407b4cc6b21142233c
Pau Espin Pedrol at
stp: m3ua: Specify ASP names to use per test

Since we recently introduced an "asp_name" into each m3ua_config,
use that to construct a list of m3ua_configs to set up for each test.

This makes each test only set up the relevant ASPs for the test easily,
plus the big win of port offsets becoming test-specific.

That means changing the order or clients or servers in the testsuite
config, or adding new ones won't break existing tests.

Also add a new "is_server" field which allows specifying clients and
servers in whichever order we like.

Change-Id: I63ed043014ee8a9a593ed17797b621f39c746bcd
Pau Espin Pedrol at
stp: ipa: Specify ASP names to use per test

Similar to what was done for M3UA ASPs in previous commit.

Change-Id: Ifce2a3964d4caf0850691515e516cee93dbe8d44
Pau Espin Pedrol at
library: NGAP encoding/decoding using libfftranscode

This allows us to encode/decode 3GPP NGAP messages, as used on the
N2/NG-C interface control plane between gNB and AMF.

asn files fetched from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/asn1, commit
fa43d01e202379a969e991a9454d9c6c6930b5b5.

Change-Id: Ia8e29c77e09a4388c774e3d7286f96052d67fe3f
Pau Espin Pedrol at
library: Add NGAP_Templates.ttcn

files fetched from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/LibNGAP_*.ttcn, commit
fa43d01e202379a969e991a9454d9c6c6930b5b5.

Change-Id: I52aed2961329ee904de82b4fdb91e3eaca2059c9
Pau Espin Pedrol at
ngap: NGAP_Pixits: fix modulepar without default value assigned to template

Otherwise titan errors during startup when trying to assign unbound
values to template parameters in NGAP_Templates.ttcn.

Change-Id: Ib2410457d2b25f09134509b618b079b010e6ace0
Pau Espin Pedrol at
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.

Change-Id: I0e73a97201e61a41ce5b056a149e185582ed187c
Pau Espin Pedrol at
NGAP_Templates: Add missing rx template for NGSetupFailure with TimeToWait optional IE

Change-Id: I241b83119e1fcf849895393ac1a1231368a85cbb
Pau Espin Pedrol at
library: Introduce NGAP Emulation

Only initial features are working, like sending NG Setup Request +
Response.

Change-Id: I5aea8be12c54cf907e71bffe6456efb5e60eb203
Pau Espin Pedrol at
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.)
"""

Change-Id: Idce3a0a9e61b1d897a6d26f6b6eb49d59b0883ad
Pau Espin Pedrol at
5gc: Introduce testsuite

Change-Id: I867433c87c6da2f0d1f299245aedf4830acbf539
Pau Espin Pedrol at
library: Rename NAS_Templates.ttcn -> NAS_EPS_Templates.ttcn

This new naming matches existing files like NAS_EPS_Types.ttcn.
This also allows differentiating it from 5G NAS.

Change-Id: Ief9835e7c70ed2885105117613ec653a6ed4dfea
Pau Espin Pedrol at
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@sysmocom.de>
Change-Id: I191291cabd40e23983d29a350e587c1e11a52c0d
Oliver Smith at
testenv: add TESTENV_INSTALL_DIR

This is useful for e.g. the new 5gc testsuite.

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I0a45e67c40a2c1d2220ef301e3e51178939f60b6
Oliver Smith at
testenv: README: document env vars set by testenv

Change-Id: I1a43d6b71c4dbc00abd8a4347fb2b35704491591
Oliver Smith at
5gc: Initial ConnHdlr support

With this we can already send an InitialUEMessage(Registration Request)
to the 5GC and see if everything is configured properly there.

Change-Id: I094b6775198dfcbf4041c3af423baa6f5072b97d
Pau Espin Pedrol at
stp: ipa: Introduce tests to validate incoming TCP conn with unkown AS (ipa_unit_id)

Change-Id: If6a9f54a19f6a4d833bbf66aad5dafd7e9917f82
Pau Espin Pedrol at
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.

Change-Id: Id3cb30e1ea126daf04dac227a2bf39b746549ec9
Oliver Smith at
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.

Fixes: 143b1000 ("testenv: add TESTENV_INSTALL_DIR")
Change-Id: Id94936338a6eb74dee0b3f4668cbaca309b269e4
Oliver Smith at
5gc: testenv: use TESTENV_INSTALL_DIR

Change-Id: I412e53d132957a877a9a0478df3ac2fe31327a6c
Oliver Smith at
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.

Change-Id: Ifc68e42022e8b2990d3c5221b3901f255e4e759b
Pau Espin Pedrol at
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.

Related: SYS#7073
Change-Id: I004fc26e5d691ee7e3be984e28f5516e2b55258c
Pau Espin Pedrol at
5gc: Initial support encoding NG NAS UL messages

Change-Id: Id59564114cf18ae745e3e385e2c91779a453e545
Pau Espin Pedrol at
library/ngap: Fix wrong id set on PWSFailureIndication templates

Change-Id: Ied1c7a5914c6cbacf64ba857aa31c12ca6f001fb
Pau Espin Pedrol at
library/ngap: Fix criticality of several NGAP messages

As defined in ASN.1 in 3GPP TS 38.413 section 9.4.3.

Change-Id: I2283a5b025f0ce7d7445fa0ce9ba8405156c4533
Pau Espin Pedrol at
bts: f_init(): print testcasename() in the IUT's logs

It's useful to see testcase names in the IUT's logs in some
situations.  For instance, when some testcase crashes the IUT.

Change-Id: I16136f32d7143edfc1638e359ef5b1066c248732
Related: OS#6794
laforge at
bsc: fix race condition in RSLEm

It may happen that the RSLEm component receives a DChan message
earlier than we suspend the DChan processing.  We saw this once:

  RSL for unknown Dchan
      BSC_Tests.ttcn:12769 BSC_Tests control part
      BSC_Tests.ttcn:5888 TC_ho_int_a5_4 testcase

Let's guard against this by calling f_rslem_suspend() earlier.

Change-Id: I012d4db05538d294a6b4aa85be4a40bb0bad28a3
laforge at
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.

Change-Id: I02668530ce36c51a1c641fb816464c9c8e6ded9e
Oliver Smith at
5gc: Initial NAS receiving support

With this patch it is already possible to receive the NAS Auth Request
in the test ConnHdlr.

nas.git dep needs updating to include a new patch fixing decoding of
NG_AUTHENTICATION_REQUEST.

Change-Id: I6697f30f95777fc9aed16a529a669d10f42c57be
Pau Espin Pedrol at
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.

Change-Id: I951e98217b0150eed58fabb8e50a4782c1a3b510
Pau Espin Pedrol at
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).

Change-Id: I799eeac73c49b9596502ad98acaa11dba3b88e97
Pau Espin Pedrol at
5gc: Fix upfd failing to start outside podman

tuns need to be recreated beforehand with sudo, as already done in
ttcn3-ggsn-tests-ogs, otherwise upfd would need root access to create
them.

Change-Id: I5d3e0c3b7391d312304190acf07b347320481275
Pau Espin Pedrol at
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.

Change-Id: I660dd6ca93a54087b1d41787c4ed2b64a3ad0437
Oliver Smith at
Revert "testenv: use eclipse-titan 11 in Dockerfile"

This reverts commit 8082d099e3f96da3dfe4348b0e1bd794d93b8b02.
Oliver Smith at

#17 (Jun 2, 2025, 12:23:57 PM)

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.

Related: https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/usrguide/referenceguide/7-the_run-time_configuration_file.adoc#L632-666
Change-Id: I0a2a376cd11784addff8ca228e3cc3e831b418a2
Oliver Smith at
Cosmetic: log_merge: modernize

Move license and copyright up and use an SPDX license identifier.

Change-Id: Iedd4f575edeaf47852f073d04d8cd8ffd92920dc
Oliver Smith at
log_merge: ensure we don't overwrite the log file

Add a safety check that ensures we don't overwrite an existing log file
by accident.

Change-Id: Ieda3d95c60dfae208959b80d55a1e8c3925a9dad
Oliver Smith at
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.

Fixes: OS#6787
Change-Id: Id2937d711a54a34c0d87d080199b4c3d5a5d6e06
Oliver Smith at
M3UA_Templates: Allow passing multiple Routing Context values

Change-Id: I117c63786d71aea683b554cf294fee0ceed665e0
Pau Espin Pedrol at
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.

Depends: libosmo-sigtran.git I646301ec3d08ef98f227cf4d19da1039e40cedd2
Change-Id: I2dc4d197e6de38781b63e3079ada4c4b4a0db31d
Pau Espin Pedrol at
stp: Store asp name in array of m3ua cfgs

This way we keep STP specific config in one place instead of having to
figure out the ASP name on each test where we want to modify that ASP.

Change-Id: I1d5d9113dc95a8da911a7a99260c9bfe6e9de7c9
Pau Espin Pedrol at
stp: Introduce test TC_clnt_sctp_adm_shutdown

Related: OS#6752
Change-Id: I8b1c8b633afc1515dedfccd43e642401896b167e
Pau Espin Pedrol at
stp: Introduce test TC_m3ua_sctp_srv_adm_shutdown

Related: OS#6752
Change-Id: Iad34af7e7758fbd3a0d686a261ccce53bc705817
Pau Espin Pedrol at
hnbgw: HNBGW_Tests.default: Drop unused LLSK config

That's only used in osmo-hnodeb, and it's probably a leftover when
copy-pasting from hnodeb directory to create the hnbgw testsuite.

Change-Id: Ic04ded35f64b5dac0c5f36ebdf066d751013c438
Pau Espin Pedrol at
hnbgw: Add missing plmn config in osmo-hnbgw.cfg

Change-Id: Ie360247b7be9cf5ac4feeab2a8957131896f7721
Pau Espin Pedrol at
hnbgw: Configure local ASP/AS in osmo-hnbgw.cfg

This allows us using known port for the SCTP assoc, which can then be
used to look up ASP in osmo-stp VTY.

Change-Id: Ic04702b597f7217890ee58734c11b866fb14af8b
Pau Espin Pedrol at
hnbgw: Introduce test TC_{cs,ps}_rua_dt_during_sccp_wait_cc

Related: SYS#7453
Change-Id: I97767db5560edf951202c876726d0c52b5b5b49f
Pau Espin Pedrol at
gbproxy/testenv: initial

Change-Id: I75265eb0765da85bffd76f8d64d278ed008d9b47
Oliver Smith at
gbproxy: sync configs with docker-playground

Change-Id: Ibef7e870c5c90d1cc861c89904950b1ac68dc9b2
Oliver Smith at
hnbgw: Introduce altstep as_pfcp_handle_del_req()

Change-Id: I94101b5f0ad8634db68f0a9d5230c00926b02061
Pau Espin Pedrol at
hnbgw: Introduce tests TC_ps_rab_release(_abnormal)

Same as their existing CS counterparts TC_rab_release(_abnormal).

Related: SYS#7451
Change-Id: Ia25efc2d6bf01d4a13e7fd1ce0563d20dd2e321e
Pau Espin Pedrol at
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.

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I2837a41c919a9f7ef8c315ce5aa48fb4fe3f9a85
Oliver Smith at
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.

Change-Id: I2ee26764d1471e54eff748e11ec2cce6fb662667
Oliver Smith at
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
Oliver Smith at
testenv: podman: add erlang-dev

Add the full erlang-dev package to the podman container, so we can build
osmo-epdg from source. Without this it fails with ei.h missing.

Change-Id: I4ca9d1823037889315f50de629e5581964cda079
Oliver Smith at
testenv: podman: add missing tree command

The tree command is used by the testenv scripts when building QEMU
initrds to quickly show the contents of the initrd before packing it.

Fix for:
  + tree -a /tmp/testenv-ggsn_tests-osmo_ggsn_v4_only-20250509-1151-745e3562-dxt_lu1f/ggsn/_initrd
  osmo-ggsn/run.sh: 140: tree: not found

That the build initramfs logic did not abort here is another bug that
gets fixed in a follow-up patch in this series.

Change-Id: I75fcd210db9e5c9364cb98ee09ebf754790aa55f
Oliver Smith at
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).

Change-Id: Ic32318da169ee8ebf867937782be5cf8a15f9f2f
Oliver Smith at
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

Fix it by using a trap instead.

Related: https://unix.stackexchange.com/a/65564
Change-Id: I2870b7e7ba28b2afc72e86b7a3bc389103564c80
Oliver Smith at
testenv: qemu: initrd build fail: stop immediately

Let qemu_wait.sh fail immediately when building the initrd has failed,
instead of waiting until it runs into a timeout.

Change-Id: I6de4d1c31385af52ee0fd55378adb10a9e2c2154
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
stp: Rename STP_Tests.ttcn -> STP_Tests_IPA_M3UA.ttcn

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.

Change-Id: Id2963407adf11add01630c3899a062d764c8ad75
Pau Espin Pedrol at
stp: STP_Tests_IPA: Support configuring less than 8 AS(P)s

This is a preparation patch towards splitting testsuite into smaller
configurations.

Change-Id: I820d295cd22fe824abf0f60bf6f1f0f3fd069d85
Pau Espin Pedrol at
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.

Related: OS#6796
Change-Id: I5d7021b6a9800cf1d7588f4a0ef864f5c30cf475
Oliver Smith at
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.

Change-Id: I4c76d12273a14df562ea906e6c8ddb348d1b0eda
Oliver Smith at
epdg: initial testenv.cfg

With this config, all tests are passing.

Depends: osmo-ci Ia60d5c1f5ade31e37293b40340e789f04ea86287
Change-Id: Ide2873be7830cc43e7fa09f26b2d504d0563a3c2
Oliver Smith at
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.

Related: I57eecd6e0ea9e488a2110b029ddc313bd05cd1fa
Change-Id: Icace325f492ce803d6f25a30b128ee0676e16727
Oliver Smith at
stp: Initial split into several testenv config

As a first step, split the generic config into 3 configs, one per
module.

The idea is to have a different config for a given set of related tests
running on a specific network topology/setup.

This helps in simplifying the test conditions, which allows easily
adding new topologies to test, validate specific scenarios or debug
existing ones.

For instance, to test Combined linkset loadsharing, we'll need to set up
some sort of scenario where we have at least 2 AS with each at least 1
ASP.

Change-Id: I4ec8e1bbc8e71d8bd421dfbd5356bf1937ce2bb4
Pau Espin Pedrol at
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.

Change-Id: I8123887755aa3253830b43407b4cc6b21142233c
Pau Espin Pedrol at
stp: m3ua: Specify ASP names to use per test

Since we recently introduced an "asp_name" into each m3ua_config,
use that to construct a list of m3ua_configs to set up for each test.

This makes each test only set up the relevant ASPs for the test easily,
plus the big win of port offsets becoming test-specific.

That means changing the order or clients or servers in the testsuite
config, or adding new ones won't break existing tests.

Also add a new "is_server" field which allows specifying clients and
servers in whichever order we like.

Change-Id: I63ed043014ee8a9a593ed17797b621f39c746bcd
Pau Espin Pedrol at
stp: ipa: Specify ASP names to use per test

Similar to what was done for M3UA ASPs in previous commit.

Change-Id: Ifce2a3964d4caf0850691515e516cee93dbe8d44
Pau Espin Pedrol at
library: NGAP encoding/decoding using libfftranscode

This allows us to encode/decode 3GPP NGAP messages, as used on the
N2/NG-C interface control plane between gNB and AMF.

asn files fetched from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/asn1, commit
fa43d01e202379a969e991a9454d9c6c6930b5b5.

Change-Id: Ia8e29c77e09a4388c774e3d7286f96052d67fe3f
Pau Espin Pedrol at
library: Add NGAP_Templates.ttcn

files fetched from https://forge.etsi.org/rep/int/5g-core/ngap.git
directory ttcn/LibNGAP/lib/LibNGAP_*.ttcn, commit
fa43d01e202379a969e991a9454d9c6c6930b5b5.

Change-Id: I52aed2961329ee904de82b4fdb91e3eaca2059c9
Pau Espin Pedrol at
ngap: NGAP_Pixits: fix modulepar without default value assigned to template

Otherwise titan errors during startup when trying to assign unbound
values to template parameters in NGAP_Templates.ttcn.

Change-Id: Ib2410457d2b25f09134509b618b079b010e6ace0
Pau Espin Pedrol at
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.

Change-Id: I0e73a97201e61a41ce5b056a149e185582ed187c
Pau Espin Pedrol at
NGAP_Templates: Add missing rx template for NGSetupFailure with TimeToWait optional IE

Change-Id: I241b83119e1fcf849895393ac1a1231368a85cbb
Pau Espin Pedrol at
library: Introduce NGAP Emulation

Only initial features are working, like sending NG Setup Request +
Response.

Change-Id: I5aea8be12c54cf907e71bffe6456efb5e60eb203
Pau Espin Pedrol at
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.)
"""

Change-Id: Idce3a0a9e61b1d897a6d26f6b6eb49d59b0883ad
Pau Espin Pedrol at
5gc: Introduce testsuite

Change-Id: I867433c87c6da2f0d1f299245aedf4830acbf539
Pau Espin Pedrol at
library: Rename NAS_Templates.ttcn -> NAS_EPS_Templates.ttcn

This new naming matches existing files like NAS_EPS_Types.ttcn.
This also allows differentiating it from 5G NAS.

Change-Id: Ief9835e7c70ed2885105117613ec653a6ed4dfea
Pau Espin Pedrol at
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@sysmocom.de>
Change-Id: I191291cabd40e23983d29a350e587c1e11a52c0d
Oliver Smith at
testenv: add TESTENV_INSTALL_DIR

This is useful for e.g. the new 5gc testsuite.

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I0a45e67c40a2c1d2220ef301e3e51178939f60b6
Oliver Smith at
testenv: README: document env vars set by testenv

Change-Id: I1a43d6b71c4dbc00abd8a4347fb2b35704491591
Oliver Smith at
5gc: Initial ConnHdlr support

With this we can already send an InitialUEMessage(Registration Request)
to the 5GC and see if everything is configured properly there.

Change-Id: I094b6775198dfcbf4041c3af423baa6f5072b97d
Pau Espin Pedrol at
stp: ipa: Introduce tests to validate incoming TCP conn with unkown AS (ipa_unit_id)

Change-Id: If6a9f54a19f6a4d833bbf66aad5dafd7e9917f82
Pau Espin Pedrol at
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.

Change-Id: Id3cb30e1ea126daf04dac227a2bf39b746549ec9
Oliver Smith at
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.

Fixes: 143b1000 ("testenv: add TESTENV_INSTALL_DIR")
Change-Id: Id94936338a6eb74dee0b3f4668cbaca309b269e4
Oliver Smith at
5gc: testenv: use TESTENV_INSTALL_DIR

Change-Id: I412e53d132957a877a9a0478df3ac2fe31327a6c
Oliver Smith at
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.

Change-Id: Ifc68e42022e8b2990d3c5221b3901f255e4e759b
Pau Espin Pedrol at
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.

Related: SYS#7073
Change-Id: I004fc26e5d691ee7e3be984e28f5516e2b55258c
Pau Espin Pedrol at
5gc: Initial support encoding NG NAS UL messages

Change-Id: Id59564114cf18ae745e3e385e2c91779a453e545
Pau Espin Pedrol at
library/ngap: Fix wrong id set on PWSFailureIndication templates

Change-Id: Ied1c7a5914c6cbacf64ba857aa31c12ca6f001fb
Pau Espin Pedrol at
library/ngap: Fix criticality of several NGAP messages

As defined in ASN.1 in 3GPP TS 38.413 section 9.4.3.

Change-Id: I2283a5b025f0ce7d7445fa0ce9ba8405156c4533
Pau Espin Pedrol at
bts: f_init(): print testcasename() in the IUT's logs

It's useful to see testcase names in the IUT's logs in some
situations.  For instance, when some testcase crashes the IUT.

Change-Id: I16136f32d7143edfc1638e359ef5b1066c248732
Related: OS#6794
laforge at
bsc: fix race condition in RSLEm

It may happen that the RSLEm component receives a DChan message
earlier than we suspend the DChan processing.  We saw this once:

  RSL for unknown Dchan
      BSC_Tests.ttcn:12769 BSC_Tests control part
      BSC_Tests.ttcn:5888 TC_ho_int_a5_4 testcase

Let's guard against this by calling f_rslem_suspend() earlier.

Change-Id: I012d4db05538d294a6b4aa85be4a40bb0bad28a3
laforge at
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.

Change-Id: I02668530ce36c51a1c641fb816464c9c8e6ded9e
Oliver Smith at
5gc: Initial NAS receiving support

With this patch it is already possible to receive the NAS Auth Request
in the test ConnHdlr.

nas.git dep needs updating to include a new patch fixing decoding of
NG_AUTHENTICATION_REQUEST.

Change-Id: I6697f30f95777fc9aed16a529a669d10f42c57be
Pau Espin Pedrol at
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.

Change-Id: I951e98217b0150eed58fabb8e50a4782c1a3b510
Pau Espin Pedrol at
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).

Change-Id: I799eeac73c49b9596502ad98acaa11dba3b88e97
Pau Espin Pedrol at
5gc: Fix upfd failing to start outside podman

tuns need to be recreated beforehand with sudo, as already done in
ttcn3-ggsn-tests-ogs, otherwise upfd would need root access to create
them.

Change-Id: I5d3e0c3b7391d312304190acf07b347320481275
Pau Espin Pedrol at
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.

Change-Id: I660dd6ca93a54087b1d41787c4ed2b64a3ad0437
Oliver Smith at

#15 (Apr 30, 2025, 11:23:17 AM)

library/s1ap: add E-RAB RELEASE templates

Change-Id: I2e9305da80934ea68e3eca8215a9c16de48b37fd
laforge at
s1gw: derive functions from f_TC_e_rab_setup()

... to avoid code duplication when adding more E-RAB related TCs.

While at it, allow establishing multiple E-RABs.

Change-Id: I1bff371da6337ecd7710219d1c86f0fff82ad17f
laforge at
s1gw: fix TC_e_rab_setup: handle PFCP Session related PDUs

S1GW_Tests.TC_e_rab_setup is failing since we introduced the PFCP
support to osmo-s1gw.  The IUT now requires co-located UPF, which
we need to emulate in the testsuite.

This patch patch adds the following API:

* S1GW_ConnHdlr.f_ConnHdlr_rx_session_establish_req(),
* S1GW_ConnHdlr.f_ConnHdlr_tx_session_establish_resp(),
* S1GW_ConnHdlr.f_ConnHdlr_rx_session_modify_req(),
* S1GW_ConnHdlr.f_ConnHdlr_tx_session_modify_resp(),

and makes use of it in S1GW_Tests.TC_e_rab_setup.

Change-Id: Ibbb326badaa1e3df968c137f3e4b576ca5c6f94d
laforge at
s1gw: TC_e_rab_setup: also test E-RAB release

* s1ap: add E-RAB RELEASE API
* pfcp: add PFCP Session Deletion API
* s1gw: make use of this API in TC_e_rab_setup

Change-Id: Id995c51d8ac76316f41ef49d35380a2521d5ae19
laforge at
s1gw: add TC_e_rab_setup3 (3 E-RABs at a time)

The idea is to verify setup and release of 3 E-RABs at a time.

Change-Id: I6a0a10f826309d8a952c77c23170df3d201e7640
laforge at
deps/update.sh: split update cmds from Makefile

Move the inline shell commands from the Makefile to a separate script,
so they are easier to edit and maintain. Proper syntax highlighting, no
need for all the backslashes + &&, etc.

Change-Id: Ifab1158000ccb39f0b384bbd81841e417ed24f37
Oliver Smith at
deps/update: don't fetch repos where COMMIT exists

Instead of unconditionally fetching each git repository, check if the
commit we want to checkout already exists in the git repository. If that
is the case, then don't fetch it.

Related: OS#6572
Change-Id: I342957668892e7d29666fada82362cb4a6c7aac5
Oliver Smith at
deps: make output readable

Instead of having a silent fetch and commits printed to stdout without
information about the repository they belong to, change the output to
have one line per git action and to include the repository name in each
of them.

Example output:

[titan.ProtocolEmulations.M3UA] Checking out b58f92046e48a7b1ed531e243a2319ebca53bf4c
[titan.ProtocolModules.IP] Checking out 1be86705f39ae38f3c04b2109806ee20d25e91d0
[titan.ProtocolModules.GTP_v13.5.0] Checking out 6b769f985eb91bf5a4332f29faa4a043b23ce62e
[titan.ProtocolModules.ICMP] Checking out e49d9fb9f7de637b4bf4803dc6b6e911a8661640
[osmo-uecups] Initial git clone
[titan.ProtocolModules.DIAMETER_ProtocolModule_Generator] Checking out ffd939595a08da1b8c8176aaa1f8578bfe02a912
[titan.ProtocolModules.L2TP] Checking out 17e76d3662bd0bb815158e8a9de1ec413f21b530
[titan.ProtocolModules.ICMPv6] Checking out 46f4d9b6e1e3c794294a92588401a81e4881dd27
[titan.ProtocolModules.LLC_v7.1.0] Checking out 09817f113255d7fb56f1d45d3dd629a093d9248d
[titan.ProtocolModules.M3UA] Checking out c496d298876fed55c2b730278b7ee77982555563
[titan.ProtocolModules.PFCP_v15.1.0] Checking out d550ad9ddb6f9c823c9a555254cd76cf0e738d18
[titan.ProtocolModules.MobileL3_v13.4.0] Checking out b6602eb357673f097ea1a1d22edd568ecd239da1
[titan.TestPorts.TELNETasp] Checking out 873fe539642542cd9a901c208f1ec11c6d2f5387
[titan.TestPorts.SIPmsg] Checking out 78bf0daf8c599d374089d97a054914d8439d133a
[titan.TestPorts.UDPasp] Checking out 54176e95850654e5e8b0ffa2f1b5f35c412b949c
[titan.ProtocolModules.BSSGP_v13.0.0] Checking out e97d92a8b66bec399babea52f593771b76cb175a
[titan.ProtocolModules.BSSMAP] Checking out 4acb6ab5f058477f0b90c2da182d52054e3614b0
[osmo-uecups] Updating URL to https://gerrit.osmocom.org/osmo-uecups
[osmo-uecups] Checking out 8362efef7c6fa341eb947a75786878e0685767b7

Change-Id: I0231488b02fdb5aa19b864e51864682ebbb3b0c6
Oliver Smith at
deps/update: skip checkout if nothing to do

Let the user see what changes when running "make deps" instead of
having unrelated lines for checking out the commits that are already
checked out.

Change-Id: I572ab11afd56e34d9d0d04cd1372af749caa7d48
Oliver Smith at
Makefile: avoid fetching deps if not needed

Running `make deps` for the first time fetches all the dependencies.
Running `make deps` again currently results in unnecessary git-fetch
and get-checkout operations for each dependency.

This is not as bad as cloning dependencies from scratch every time,
but still takes time and triggers unnecessary requests to the servers.
It's also creating problems when building testsuites offline.

This patch makes the build system a bit smarter in a way that it would
only try to update dependencies if the 'deps/Makefile' was changed.

Change-Id: Iae98585f0a83b17596857eba8c2f51a785198580
Related: OS#6572
Vadim Yanitskiy at
.gitignore: ignore '.make.*' files (like .make.deps)

Change-Id: I79dfa38bc874a48cb09a6e6fb3f06405ba869491
Related: c7e40d6a "Makefile: avoid fetching deps if not needed"
Vadim Yanitskiy at
.gitignore: ignore ctags

Change-Id: I90f468049189d919aa0cbc3c1da1ac6f8422bc36
Related: 600ebb235 "Makefile: add target for generating tags"
Vadim Yanitskiy at
Remove dead links and generated code in bin/*

Change-Id: I60929c5d4acba4d0d8df3696fade370d7e0100f8
Vadim Yanitskiy at
{bsc-nat,selftest,sysinfo}/gen_links.sh: use bash, not sh

This fixes the following error:

  ./gen_links.sh: 40: shopt: not found

which is printed when compiling the above-mentioned testsuites.

Change-Id: I994e241efb73f6f8b78803cf4ecdfb057b210a3b
Vadim Yanitskiy at
gen_links.sh.inc: 'set -e' to abort on error

We should not tolerate errors in '*/gen_links.sh' files.

Change-Id: Id9367e4c45c84dcbf1c308581360be73242c0d38
Vadim Yanitskiy at
testenv: testsuite: use rsync with --archive

When running in podman, the source files from the testsuite get copied
to a temporary directory to build the testsuites out-of-tree (avoiding
conflicts with possibly incompatible binary objects that may exist from
previously building the testsuites on the host).

This also copies additional scripts for preparation / clean up that may
be used in testenv.cfg. Use the --archive flag with rsync to ensure
that the executability is the same. I could have also used
--executability, but --archive contains two other existing flags and
more flags which may help us from running into unexpected situations
such as this one.

Without this patch, there was a bug when:
* first creating a shell script but not making it executable
* running testenv with podman (where rsync runs and creates the file
  initially without executable permissions)
* making the script executable
* running testenv with podman again, rsync will not adjust the
  permissions for the copy of the file
* user wonders why there is a "sh: 1: script.sh: Permission denied"
  error

Change-Id: Ia9737bd8ba22a555615862bf5e14dbdf0dea19b4
Oliver Smith at
testenv/README: consistency fix

Add = after the vty_* keys too, like the others.

Change-Id: Ic9828b67f5a81498d0e951dd71b80b36cdd36173
Oliver Smith at
testenv: podman.exec_cmd: better error if stopped

Testenv may try to run a comand in podman after the container was
stopped, if there is a bug in the shutdown logic. Give a meaningful
error in that case, instead of failing later on with a cryptic error in
subprocess.run() because None was passed inside cmd (for the container
name) instead of a string.

Change-Id: I29ebe200258a9a9ffb127ec8fa1260b7e2124c38
Oliver Smith at
testenv/README: deduplicate clean= description

Change-Id: I12dc9adb508a409a6156f9682c9db5684f551b06
Oliver Smith at
testenv/README: document current working dir

Change-Id: I218507bcbec94a36976fbf57d12ffd083fd2acfb
Oliver Smith at
testenv: clean_run_scripts: skip if podman stopped

Do not attempt to run the clean_run_scripts, if podman is being used and
the container has already been shutdown.

Change-Id: I3cc05aabd97b73b65c3089e8806f7a9b32e5975c
Oliver Smith at
testenv: copy=: support copying directories too

In preparation for adding the inital testenv.cfgs for ggsn, allow
copying full directories with copy= too. This will make the ggsn
testenv.cfg files easier to maintain.

Change-Id: I8e680fbd93516030614c015d7c3b5bdb153ec487
Oliver Smith at
ggsn: sync GGSN_Tests.cfg with docker-playground

Add parameters that are missing from the config.

Change-Id: I16a8cbd77f52a1ca5c52c045b8d0932e681cc380
Oliver Smith at
ggsn: add testenv.cfgs for osmo-ggsn

Change-Id: I941b859261c1fbf27360673f14f8a79f0cf6f509
Oliver Smith at
ggsn: add testenv.cfg for open5gs

Change-Id: If11c0fcba84122d2398cb50208f161b9a3961df6
Oliver Smith at
pcap-client: initial testenv.cfg

Change-Id: I44479dfa19390e325e42fa3416cf93260f74aea6
Oliver Smith at
ruff.toml: new file

Add a file in the root dir of the repository to allow running
"ruff format" in order to auto-format the code with expected max line
length, PEP-8, etc.

Replace _testenv/pyproject.toml with .ruff.toml in the root directory of
the repository, so we can exclude "compare-results.py" which doesn't
follow that code style. Otherwise it would get formatted too when
running "ruff format" in the root dir of the repository.

Change-Id: I97ed1ececba85008ca754cf91bf46522e168a894
Oliver Smith at
Cosmetic: testenv: fix line length

Run "ruff format", so there isn't a diff anymore when running it on
future patches.

Change-Id: I766a07c6d54d0da11ad47acce1fc07b4b3a4801b
Oliver Smith at
testenv: improve --config argument parsing

* Support using wildcards for the config names via fnmatch as that makes
  it much easier to run the ggsn tests against all osmo-ggsn config
  variations, and update the examples in "testenv.py -h" to illustrate
  this.
* Fix that it didn't complain about an invalid --config argument, as
  long as there was a valid --config argument before it.
* Let raise_error_config_arg only output the invalid --config argument
  instead of all of them.
* Complain if "--config all" is used in combination with another
  --config argument.
* Sort testenv*.cfg files found alphabetically, so they are always
  executed in the same order.

Change-Id: I66b976b0332be523c084a6b5d38d0f62134b495d
Oliver Smith at
ggsn: testenv: fix paths in copy= and clean=

I had moved osmo-ggsn related files to the osmo-ggsn directory and
forgot to adjust testenv_osmo_ggsn_{v4,v6,v4v6}_only.cfg. Fix it by
changing it like it is in testenv_osmo_ggsn_all.cfg

Change-Id: Ibc8aeb43ff594a6b26699f81b29abc31b9b5b71f
Oliver Smith at
ggsn: testenv: add libosmocore-utils to package=

Add libosmocore-utils, so osmo-config-merge is installed when running
with --binary-repo too. The osmo-config-merge program is used in
osmo-ggsn/testenv.sh to merge the configs.

Change-Id: I7d97e0f923d928e9b51ff41d50b28706e0e6790b
Oliver Smith at
library: add generic Mutex API for parallel components

In certain scenarios, it's required to ensure that only one of multiple
parallel components executes a specific code block at any given time.

This, for example, is the case for the S1GW testsuite, where we want to
simulate multiple eNBs establishing E-RABs.  Each new E-RAB triggers the
IUT (osmo-s1gw) to send a PFCP Session Establishment Request, and there
is no way for the PFCPEM to correlate which session belongs to which eNB.
This problem can be solved by ensuring that only one eNB is triggering
the PFCP Session Establishment Request(s) at a time.

This patch implements a generic Mutex API, which can also be used
by other testsuites that orchestrate multiple parallel components.

Change-Id: Id71f43bd5fc78d4bb4417d6c01fcff8112ea6032
laforge at
library/PFCP_Emulation: a better PDU routing concept

In recently merged 2962d170 I wrongly assumed, that SEID of outgoing
PFCP PDUs can be used to correlate and route the incoming PDUs.  In
fact, the PFCP peers use two different SEID values, negotiating them
using the F-SEID IE.

We could have implemented a logic to look for F-SEID in the outgoing
PDUs, store and then use it for routing.  However, a more flexible
approach is to allow the the PFCP_ConnHdlr components to subscribe
and unsubscribe to/from specific SEID values explicitly.

In this spirit, let's allow the PFCP_ConnHdlr components to subscribe
and unsubscribe to/from broadcast PDUs (i.e. those, for which the
PFCPEM component could not find a single recipient) explicitly.

Implicit routing using the SeqNr remains unchanged and will be
performed by the PFCPEM component automatically like before.

Change-Id: I25802471519fa297ad4cb2b056adaa6748b00af2
Related: 2962d170 "library/PFCP_Emulation: fix routing of incoming PDUs"
laforge at
library: as_pfcp_ignore(): log SeqNr of received PDUs

Printing the PFCP PDU template ('?' by default) is not very informative
when reading logs.  Printing the message type of the received PDU is
not informative either, because message types are defined as numbers
in PFCP_Types.ttcn.  Printing the whole PDU is way too verbose, and
would be redundant given that the PFCPEM component already does print
all received PDUs.  Let's print the sequence number.

Change-Id: I803ff46def4ae0182310bc01e753fe0c05112836
laforge at
s1gw: f_init_pfcp(): use 'PFCPEM' as the prefix

Make it clear that it's the PFCP EMulation component.

Change-Id: Ia5413313cffb265f83ea0850e31dfb35274c28ba
laforge at
s1gw: make number of eNBs configurable via module params

... so that we can scale the number of eNBs simulated in the
*_multi TCs without having to touch and compile code.

Change-Id: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f
laforge at
Revert "s1gw: cache PFCP Recovery Timestamp in ConnHdlr"

This reverts commit 7ad95e1cfb00d269069bd052c44a9cae9027f763.

A follow-up commit will remove the need for each ConnHdlr to call
f_ConnHdlr_register_pfcp(), that among with handling the PFCP
association retrieves a PFCP Recovery Timestamp from the PFCPEM.

Caching the PFCP Recovery Timestamp value is not really worth it,
since it's rarely used and can always be retrieved on demand.

Change-Id: I3b1c488e3ec251c7659cd9bc3197cca2f9d03144
laforge at
s1gw: move PFCP association handling into a dedicated ConnHdlr

Previously, the PFCP association request from the IUT was handled by
the first ConnHdlr component (idx := 0).  While this approach has
worked, it fails when multiple ConnHdlr instances (idx > 0) are spawned.

The problem arises when other ConnHdlr (idx > 0) instances initiate
PFCP procedures before the first ConnHdlr (idx := 0) has established
the association, so we end up playing races.

This patch introduces a dedicated ConnHdlr component to handle the
PFCP association independently.  Once the association is established,
the actual test ConnHdlr instances are spawned, ensuring a more
reliable and orderly process.

Change-Id: I5e1a14105a35b785bf598dc2a8c436ea6fb6b0f1
laforge at
s1gw: add multi-eNB variants of TC_e_rab_setup

The idea is to simulate multiple eNBs establishing one or more
E-RAB(s) simultaneously.  In order to achieve that, use the new
Mutex API to ensure that only one ConnHdlr component is triggering
PFCP session establishment at any given time.

The problem is that there is no way for the PFCPEM component to
correlate which PFCP session belongs to which eNB when multiple
ConnHdlr instances establish E-RAB(s) in parallel.  This can be
solved by making a part of the test scenario synchronous.

Change-Id: I9e2eb25a7ae78ff623b94802d881af4894d0cacd
laforge at
s1gw: add f_ConnHdlrList_all_done()

Change-Id: I20c472dd8ce7f5a25c349cc079bd5bd873be2950
laforge at
s1gw: f_ConnHdlr_rx_erab_release_cmd(): fix wrong template

Change-Id: Ib6b9f346216aaa9587025e1c580876611e6fa7bc
laforge at
s1gw: add TC_e_rab_release_ind

Change-Id: Icc28a596b7646441761cc3f56653c5f7b3ddaaca
laforge at
s1gw: f_ConnHdlr_erab_release_cmd(): add missing logging

Change-Id: I6e4574ebda2459f0a5f23ee51a21a883d079c54a
laforge at
library/s1ap: fix wrong IE ID in E-RABReleaseListBearerRelComp

Change-Id: I22e80f418787c10ccd002e30a329c0271cdd1b8a
Fixes: e59e681c "library/s1ap: add E-RAB RELEASE templates"
laforge at
library/s1ap: fix wrong field in S1AP-RABReleaseInd

Change-Id: I7a24b6401a19a6e37392083b26657bcb45b35cbe
Fixes: e59e681c "library/s1ap: add E-RAB RELEASE templates"
laforge at
library/s1ap: add templates for INITIAL CONTEXT SETUP

Change-Id: I249e34ce91c874d4b6628d367672b58a77da041e
laforge at
library/s1ap: fix wrong IDs in {ts,tr}_S1AP_InitialCtxSetupResp

Change-Id: I752f202e891f7f6ff4f8f33b56de90c99c4ab456
Fixes: ce818da5b "library: Add S1AP Templates"
laforge at
library/s1ap: comment out optional IE in tr_S1AP_InitialCtxSetupResp

Change-Id: I4765036be69ff10adb8c510d4092834c4e923229
Vadim Yanitskiy at
library/pfcp: fix template restriction in PFCP_Session_Est_Resp

Change-Id: Icf070443ffb7cfff84559db40459d0e9629ad024
Vadim Yanitskiy at
library/pfcp: make Cause IE configurable in all templates

Change-Id: I76e52d3450cca87f5fead0f834fa58ce4902ddd8
Vadim Yanitskiy at
s1gw: TC_e_rab_setup: complete E-RAB release

The MME originated E-RAB RELEASE procedure includes both:

* [ENB <- MME] E-RAB RELEASE COMMAND, and
* [ENB -> MME] E-RAB RELEASE RESPONSE.

The later was overlooked in a99224c9, so add it.

Change-Id: I856248d825b6ecf0635590b7bf02593cfae893d3
Fixes: a99224c9 "s1gw: TC_e_rab_setup: also test E-RAB release"
Vadim Yanitskiy at
s1gw: separate f_ConnHdlr_session_{establish,modify}()

Change-Id: I95dc3be975a8f51f7535b96d1580ef70b85fa2e0
Vadim Yanitskiy at
s1gw: add testcases for INITIAL CONTEXT SETUP

Change-Id: I72e3ab932fee1de0fce8ddf4041b8f2174416bc1
Vadim Yanitskiy at
testenv: podman: disable send_redirects

When starting podman, set the following sysctls to avoid ICMP redirects.
ICMP redirects lead to test failures (TC_pdp4_clients_interact in the
GGSN testsuite), and should not be sent in the test environment in
general.

  net.ipv4.conf.all.send_redirects=0
  net.ipv4.conf.default.send_redirects=0

It is really needed to set both "all" and "default", or otherwise ICMP
redirects still show up. I've seen setting both in this patch:
https://patchwork.kernel.org/project/linux-kselftest/patch/1570719055-25110-4-git-send-email-yanhaishuang@cmss.chinamobile.com/

Fixes: OS#6575
Change-Id: Ie27668f38b80c52ffef4e17b3fe64f0c9109bdea
Oliver Smith at
s1gw: add TC_initial_ctx_setup_failure

Change-Id: I969ea6813c9b805d116a974c70ab5f6e6e721e48
Vadim Yanitskiy at
s1gw: move MME_UE_S1AP_ID to ConnHdlrPars

Change-Id: Idac24c54529073855f75bef7bcec87fc68b66e1e
Vadim Yanitskiy at
testenv: requirements: find programs in /usr/sbin

Fix that testenv complains about a missing setcap program, if it is in
/usr/sbin/setcap and /usr/sbin is not in PATH as it is the case with
Debian. We actually run setcap with sudo when it is needed, and in that
case /usr/sbin gets added to PATH in Debian.

Fix for:
  [testenv] Missing program: setcap

Change-Id: Ibbccba013ac38415ef46467f97bef846b848cf39
Oliver Smith at
testenv: podman: remove mongodb-org.list

Remove mongodb-org.list at the end of building the podman image, as we
only need to install mongodb once in the container but won't use the
repository afterwards. This avoids checking the mongodb repository in
"apt update".

Change-Id: I5a0455a4dbf8a31366bff65fd011fd5494b64ea7
Oliver Smith at
testenv: podman: don't install GUI packages

Install erlang-nox and use the pre-built rebar3 as linked from
rebar3.org, instead of using the Debian package to avoid pulling in
~600 MB of GUI dependencies.

Related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083096
Change-Id: I27f58d1f102cf85ff7ff301c52696b65150e2898
Oliver Smith at
ggsn: osmo-ggsn.src.cfg: tweak log output

* Print log levels.
* Don't print categories as hex.
* Print the basename at the end of the line.
* Remove "logging level lgtp debug", there already is
  "logging level lgtp info" further above, and this is a more sensible
  setting. With "debug" there are way too many log messages in e.g.
  TC_lots_of_concurrent_pdp_ctx.

Change-Id: I771d07645ea6da91f2c93f0954d99a37c866629a
Oliver Smith at
ggsn: testenv: replace dummy netdev with bridge

Replace the dummy netdev that was used as network device reachable
through the GTP tunnel that can answer ICMP, with a bridge device. The
bridge device fulfils the same purpose, plus it can be used in a future
patch to connect osmo-ggsn when it is running in QEMU with the
testsuite.

Change-Id: I102d5b9ed0b3cafc263ad489ed4d4652f5e6dac8
Oliver Smith at
testenv: osmo-dev: build with gtp_linux.opts

Run the osmo-ggsn ./configure with --enable-gtp-linux, in preparation
for testing kernel gtp-u with testenv too.

Related: https://gitea.osmocom.org/osmocom/osmo-dev/src/branch/master/gtp_linux.opts
Change-Id: Ia8ea5494597e0fedae93f501c8bc7d6115543f36
Oliver Smith at
testenv: bridge: change default IPs 201 -> 1

During code review it was decided that we want to keep the 127.0.0.1
(and other 127.0.0.x) IPs in the configs, so one can start the testsuite
with osmo-ggsn directly on the host without using testenv scripts too,
with the same config.

The testenv script for osmo-ggsn will replace 127.0.0.x with 172.18.3.x
on the fly before the testsuite starts, so we can run osmo-ggsn
optionally in QEMU on 172.18.3.2, which will be bridged to the host.

172.18.3.1 will be used by the GGSN testsuite now, instead of
172.18.3.201 as previously planned, so change the default IP of the
bridge. The bridge is not used for another testsuite yet.

Add the 201 IPs as EXTRA_IPS for the non-QEMU case, as they are
configured as DNS IPs and tests need to be able to reach them.

Change-Id: Ied055e6e4d6214fd5247694e697a35a1e8ff1966
Oliver Smith at
ggsn: testenv: run SUT on bridge instead of lo

Replace IPs in testenv.sh so the SUT runs on 172.18.3.2 (testenv0
bridge) instead of 127.0.0.2 (lo). Later on when we can optionally use
QEMU with osmo-ggsn to test kernel GTP-U. It will then run on this IP as
well. So with this change we can use the same IP for both the QEMU and
non-QEMU case.

Change-Id: Ib768603b0050fe62baff39cab982a850eb91f49a
Oliver Smith at
ggsn: testenv: change VTY IP

Access the VTY of osmo-ggsn via 172.18.3.2 (127.0.0.2 if running without
testenv), so the testsuite can access the VTY when osmo-ggsn optionally
runs in QEMU too (through the bridge).

Change-Id: I054c19041b3027e7f66d925f031002fefe011c58
Oliver Smith at
testenv: support running SUT in QEMU

Add two new arguments -C|--custom-kernel and -D|--debian-kernel. If any
of these is set, pass an environment variable TESTENV_QEMU_KERNEL with
the path to the kernel when running commands from testenv.cfg.

These commands can then source the new qemu_functions.sh and use it to
build an initramfs with the SUT and depending libraries on the fly, and
start up QEMU to boot right to starting the SUT. All of that takes about
~1s on my system with kvm. Without kvm ~5s.

A follow-up patch will adjust the ggsn testenv configs to optionally run
osmo-ggsn in QEMU for testing kernel GTP-U.

These scripts are based on scripts/kernel-tests from docker-playground.

Related: osmo-ci Id64a1a778fa38eec20498c36b390332f75d7d3f5
Change-Id: Ic9cb7092fd029b7ba530fc755b5d4d73a9d86350
Oliver Smith at
ggsn: testenv: support running osmo-ggsn in QEMU

Run osmo-ggsn optionally in QEMU, to test the kernel GTP-U feature
with different kernels.

Related: OS#3208
Change-Id: I3f9db4325d5928c809cc99bc82d9cb82bf9e71eb
Oliver Smith at
Cosmetic: ggsn: fix copy paste error

Change-Id: Iad2424036ff3dd45a9cd67f28249fbb06e657e62
Oliver Smith at
L3_Templates: GMM: fix off-by-one error in ServiceType IE

The ServiceType IE is used in the GMM Service Request.

Change-Id: I79337fa31ffa82f766c6a1f238739c5e10773823
lynxis at
update osmo-stp.cfg to make STP_Tests work at all again

This syncs osmo-stp.cfg with changes introduced to docker-playground
in Change-Id I210b7d62845075dcfe147f2f77603625cc1e64f9 on March 4th.

I'm really getting tired at fixing up those kind of issues. It's
well-known that config changes must be made first here and then in
docker-playground.

Change-Id: I7f0cef55a9a54f1cc4b23df781dab2afd52aae78
Pau Espin Pedrol at
Replace libosmo-sccp references with libosmo-sigtran

Change-Id: I8556a9eb4e111340e2415c5adf0ad91927ce53ec
Pau Espin Pedrol at
_testenv: Avoid running make check when building IUT

In here we want to build stuff to run ttcn3 tests, not unit tests.

Change-Id: I1b5dd0947a1bd937775a74bceb88dcf3bbcf914b
Pau Espin Pedrol at
stp: Support running with testenv

The osmo-stp.cfg was not up to date with the one further updated in
docker-playground.git.

Change-Id: I43fefc206fbc7f3a4fba9e4d4ba4386e5ca748f7
Pau Espin Pedrol at
library/GTPv1U_Templates: support sending ext hdrs

Replace the seq (sequenceNumber) parameter in ts_GTP1U_PDU with
opt_part (GTPU_Header_optional_part). opt_part contains seq:

  type record GTPU_Header_optional_part {
    OCT2                       sequenceNumber,
    OCT1                       npduNumber,
    OCT1                       nextExtHeader,
    GTPU_ExtensionHeader_List  gTPU_extensionHeader_List optional
  }

With this change it is possible to set the extension headers too when
sending GTPU packets. This is in preparation for a GGSN test case with
extension headers.

Related: OS#6223
Change-Id: I5b1668d45f4454f92c234054678e17145bd4fe49
Oliver Smith at
testenv: podman: restart_count in container_name

When running testsuites with multiple configurations in a row, as it is
the case with the ttcn3-ggsn jobs in jenkins, the podman container gets
restarted whenever switching to the next config.

Use a different name for each container by appending a restart count.
This should fix that podman sometimes didn't fully shutdown the
container yet and complains that the container name is already in use.
This happens even though we use "podman kill" and "podman wait" on the
previous container. When checking later, the container is really gone
and the same name can be used, it seems that it just needs some more
time to shutdown in some cases.

Fix for:
> Error: error creating container storage: the container name
> "testenv-ggsn_tests-osmo_ggsn_-osmocom-nightly-20241012-0752-2eb85125" is
> already in use by "8b7ea42371a922ffbf4e966b853124b98cd25c9905ae443fefb4115a103d7779".
> You have to remove that container to be able to reuse that name.: that name is already in use

Related: https://github.com/containers/podman/issues/2553
Related: https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test/2674/console
Change-Id: Ia791be2fee69765293ce7a7a058319c92bb92714
Oliver Smith at
sgsn: Validate TLI received in RAB Ass Req

Related: OS#6508
Change-Id: I3a3699cea981caa89b30742c031d5f232418b0ee
Pau Espin Pedrol at
sgsn: Test tx Rab Ass Resp with ITU X.213 IPv4 address format

Related: OS#6508
Related: SYS#7119
Change-Id: I38dd85f617600a974cbe8fd17597282eaf950a78
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_pdp_act_user_addr_itu_x213_ipv4toolarge

Related: OS#6508
Related: SYS#7119
Change-Id: Id2501e38565db491a6248552e754f03f7b973997
Pau Espin Pedrol at
sgsn: Improve validation of TLA encoded in RAB Ass Req

Validate received TLA in RAB Ass Req according to confguration and test
expectancies.

Related: OS#6508
Related: SYS#7119
Change-Id: I725bf39c5564fb320954fc9e387ac569fc1a0136
Pau Espin Pedrol at
cosmetic: sgsn: Fix indenation whitespace

Use tabs as done in all the file.

Change-Id: I8cb9283fee9d5a4ff5c34b9cde4d8fcce400343a
Pau Espin Pedrol at
ggsn: README: document how to run with testenv

It is possible to run the GGSN testsuite in a lot of ways (as it was
ported from docker-playground, which had the same variations but with a
less consistent way of running them).

Document how it is typically run for development / in jenkins. This
should make it easier for users, in addition to testenv already telling
which configs are available if trying to run the ggsn testsuite without
the -c argument, and to the general help output in "./testenv.py run -h".

$ ./testenv.py run ggsn
[testenv] Using testsuite ggsn_tests (via alias ggsn)
[testenv] Found multiple testenv.cfg files:
[testenv]  * testenv_open5gs.cfg
[testenv]  * testenv_osmo_ggsn_all.cfg
[testenv]  * testenv_osmo_ggsn_v4_only.cfg
[testenv]  * testenv_osmo_ggsn_v4v6_only.cfg
[testenv]  * testenv_osmo_ggsn_v6_only.cfg
[testenv] Select a specific config (e.g. '-c open5gs') or all ('-c all')

Change-Id: I49421151b199fa6536da784b6c412b03f3fdbd05
Oliver Smith at
library/GTPv1C_Templates: Lots of improvements in template declarations

Also most the compiler warnings are fixed, only some which require
special more complex attention are left as is.

Change-Id: I38a4b1c5874fda173a7b89122c84cb83ac71a036
Pau Espin Pedrol at
cosmetic: library/GTPv1C_Templates: remove extra indentation level

The extra first indentation level around 99% of the file just loses
space which makes it difficult to keep templates at an acceptable width.
Do similarly to what we already do in lots of other template files which
were added later than this one.

Change-Id: I87755ec0a9023e79fb5f7a40c6c1734dca44696b
Pau Espin Pedrol at
library/GTPv1C_Templates: Clean up PCO templates

* Define a generic ProtoElem template and use it everywhere.
* User superset instead of "*, tr_..., *" construct.

Change-Id: I005a6dea0606bcb677260f85b24396b55a150153
Pau Espin Pedrol at
mgw: Remove unneeded dep IPCP_Types.ttcn

Change-Id: I318f4ba78adf778820e8d65d5932e454bc5da670
Pau Espin Pedrol at
s1gw: Remove unneeded dep IPCP_Types.ttcn

Change-Id: Iad81c8d76efa2618ca7e354d2b73617a54a8d5ee
Pau Espin Pedrol at
library: Move IPCP templates GTPv1C_Templates.ttcn -> IPCP_Templates.ttcn

We already have an IPCP_Types.ttcn, and the GTPv1C_Types from
ProtocolModules dep we use doesn't actually specify any record for IPCP,
so those are totally protocol independent.

Change-Id: I233292ea886e1b69a2f9aa1a159c816791b47136
Pau Espin Pedrol at
library/PCO_Types: Drop unused nonsense enum

That enum is PAP related, plus it doesn't really match the section
describing, plus it's not used anywhere.
Looks like a development artifact which was not dropped during submit.

Change-Id: Ic791d20dd600b039daa2abef7fa25aaa6780a448
Pau Espin Pedrol at
library/PCO_Types.ttcn: Drop unsued IPCP_OPT enum

It is unused, plus IPCP_Types.ttcn already defines a more complete enum
in IpcpConfigOptCode.

Change-Id: I867ab36063db262b46fc4546c17a902699a6e37c
Pau Espin Pedrol at
ggsn: Introduce test TC_pdp4(6)_act_deact_mtu

This tests so far only test retrieval of MTU over PCO, which is only
used for IPv4 APNs.
When IPv6 is in used, it is expected to be retrieved over IPv6 SLAAC RA.
Such tests will be done in a follow-up patch once the related procedure
is implemented in osmo-ggsn.

Related: OS#6298
Related: SYS#7122
Change-Id: I2ceb76a3a07b44f69937c9f5a040482320bca377
Pau Espin Pedrol at
ggsn: Validate MTU sent during ICMPv6 RA

Related: OS#6298
Related: SYS#7122
Change-Id: Ia5bbc5f9e42b02d1b9bd6c4190a2bd439663deeb
Pau Espin Pedrol at
ggsn: Request osmo-ggsn to apply the MTU on the tundev

Depends: osmo-ggsn.git Change-Id Ifae556169d895860812c9ea5633292d7e3fab338
Related: OS#6298
Related: SYS#7122
Change-Id: Ie55c8b41f5a4a128f999474c3fad1926099b3624
Pau Espin Pedrol at
ctrl: tweak errmsg for counter mismatch

- instead of "-1", print "not present", so humans know what is
  happening.
- the comma separated args in setverdict() create a lot of weird quotes.
  Use string concatenation to have only one set of quotes around the
  entire error message.

Related: OS#6545
Tweaked-by: Oliver Smith <osmith@sysmocom.de>
Change-Id: I672fcef819a6542a5b3bcfa0a6d9c84d34b468f3
Oliver Smith at
testenv: qemu: get coredump and show backtrace

If the SUT crashes inside QEMU, copy the coredump via 9p to the outer
system (either host or podman) where we have the same binaries and also
debug symbols, and run gdb there to show the backtrace.

Related: OS#6600
Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a
Oliver Smith at
pcu: add testenv.cfg

Change-Id: I57956a0bb5d5e164c3f840815573164e52300459
Oliver Smith at
bsc/osmo-bsc-sccplite.cfg: add trx1, trx2

Synchronize with the config in docker-playground.

Change-Id: Ia959c725b9efee5ccf6a67e22e740a60b4fd28b9
Oliver Smith at
bsc/osmo-bsc{,-vamos}.cfg: add no missing-msc-text

Copy this option from the config in docker-playground to have less
cluttered output.

Change-Id: I0735e5bce207961ab960294c9f39404ab64a3fb1
Oliver Smith at
bsc/osmo-stp.cfg: sync with docker-playground

Change-Id: I32fc1374d92405d642027e0c61fdd6a297cd7807
Oliver Smith at
bsc: add testenv.cfg

Change-Id: Ib2e92a9ebd78f5553161bcca433f39c7c39f3adf
Oliver Smith at
testenv: improve output for missing -c argument

When a testsuite has multiple testenv.cfg files, the user needs to
explicitly choose a config, or "-c all" for all configs. Improve the
help output to directly print the arguments that need to be passed,
instead of printing the config file names. Mention that wildcards can be
used too.

Old:
  [testenv] Found multiple testenv.cfg files:
  [testenv]  * testenv_generic.cfg
  [testenv]  * testenv_sccplite.cfg
  [testenv]  * testenv_vamos.cfg
  [testenv] Select a specific config (e.g. '-c generic') or all ('-c all')

New:
  [testenv] Found multiple testenv.cfg files, use one of:
  [testenv]  -c generic
  [testenv]  -c sccplite
  [testenv]  -c vamos
  [testenv] You can also select all of them (-c all) or use the * character as wildcard.

Related: OS#6494
Change-Id: I3f273caff702b33d3d74a9e5c8d77b22f27d7cfc
Oliver Smith at
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
Oliver Smith at
hnbgw: Support testenv

Change-Id: Id2bcc4e13881db01b8e4d9f1738355b8d779fa63
Oliver Smith at
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
Oliver Smith at
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
Oliver Smith at
hnbgw: Split ConnHdlr component code to its own file

Similar to what we do in most of the testsuites, split Component generic
code from test specific code.

Change-Id: I3a58c27a7472eea2421a45c31ac0145eb57a1f7e
Pau Espin Pedrol at
RAN_Emulation: Introduce field ranap_connect_ind_auto_res

This field allows skipping automatic response of the connect_ind, hence
allowing ConnHdlr to totally skip it, delay it, or generate a CREF by
means of sending RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ to RAN_Emulation,
as per ITU Q.711 Figure 8.

Change-Id: I5a69990e3a0839dd3c25c7dc66e6bcf66123fbff
Pau Espin Pedrol at
hnbgw: Allow modifying RanOps during test startup

This will be used by a test to skip response to CONNECT.ind, allowing
transmission of DISCONNECT.req and hence transmitting CREF over the
wire.

Change-Id: Ib9462ba41b16375348b086d7ffe9f5755ae26f84
Pau Espin Pedrol at
Convert RAN_Conn_Prim from enum to union

This will allow passing parameters in each primitive.
This is needed eg. to pass the reason in DISCONNECT.req.

Change-Id: I17994795b51efc7e6700238ddcf45594af653e42
Pau Espin Pedrol at
RAN_Emulation: Allow setting reason in primitive MSC_CONN_PRIM_DISC_REQ

This allows setting a specific reason in the CREF transmitted on the
wire, other than "End user originted (0)".
A follow-up commit will add a test in HNBGW_Tests where an emulated MSC
answers with CREF reason "End user failure (0x02)".

Change-Id: I1fa1148135625d840426b52450bf52da10448471
Pau Espin Pedrol at
hnbgw: Fix TC_ranap_ps_mo_disconnect testing CS instead of PS

Change-Id: I16a446a9de0a40f37a4af0bf54bcf0bd49b2d47f
Pau Espin Pedrol at
hnbgw: Drop unused template

Change-Id: I7dfce4485a6eaeabcdf1755619509b4b0f2bff65
Pau Espin Pedrol at
hnbgw: Introduce test TC_ranap_{cs,ps}_creq_cref

Related: SYS#6602
Change-Id: I0313ea741feca90492e25f0adc1c04844a860e41
Pau Espin Pedrol at
hnbgw: Set sccp_addr parameters during init

Those will be needed by other tests using UNITDATA primitives to send
RANAP ResetResourceAck.

Change-Id: I53f7e2e0a4622bb25667053b0b80e743e5f493bd
Pau Espin Pedrol at
hbngw: Store IuSigConid in ConnHdlr params

A follow-up patch will want to use the value to register it in order to
get RANAP ResetResource messages.

Change-Id: I7eb5716debcad8427c15341612d37152ca894e5a
Pau Espin Pedrol at
RANAP_Templates: Add templates for ResetResource(Ack)

Change-Id: If6357c19b39ef63057a2d8d471975185f0161b22
Pau Espin Pedrol at
RAN_Emulation: Support registering IuSigConId for connectionless RANAP messages

This allows dispatching received RANAP connectionless (UNITDATA)
messages which target potentially existing connections identified by
IuSigConId, like RANAP Reset Resource (Ack) messages.
Dispatching it to relevant ConnHdlrs allows explicitly waiting to
receive the message and answer from there.

Change-Id: I6a00a425ce52cb0c71b03b545207f27befa11a71
Pau Espin Pedrol at
s1gw: use the new counter name (out_pkt.forward.unmodified)

Change-Id: I037fea187bb78ba0d4b82d30915c5270d4cd28bb
Related: osmo-s1gw.git I952e198238384dca4be94f91a01d7cfff0a1471f
Vadim Yanitskiy at
RUA_Emulation: Support passing no RANAP PDU in RUA_Disc_Req

Change-Id: Id9c3d5a1e45aa6ca58a71b61e142dc041a335cc9
Pau Espin Pedrol at
hnbgw: Add missing timer stop after use

Change-Id: I2c722f524de603b75f2b7c6ba85d074518d1f51c
Pau Espin Pedrol at
hnbgw: Get rid of pars param in void_fn

Store pars into component field "g_pars" before caling void_fn.
This simplifies ConnHdlr test functions and also avoids potential
problems modifying pars vs g_pars.
This is the same as we do in lots of other testsuites.

Change-Id: I674b2a6a6a0e39f2904f9125783180da8ade5f44
Pau Espin Pedrol at
testenv: run podman command with logfile

In very rare cases it seems podman is just crashing with no reason in
jenkins. Add logging to the main script we run inside podman, and run
podman with a logfile attached to figure out why.

Related: OS#6607
Change-Id: Ife3c0ae559c94f7df8b5912bb0e338ae6283cb7f
Oliver Smith at
library/s1ap: fix wrong IE criticality in templates

Related sections in 3GPP TS 36.413:

* 9.1.3.2 E-RAB SETUP RESPONSE
* 9.1.3.6 E-RAB RELEASE RESPONSE

Change-Id: I3fd9efc4c504037758b3d97e920776123f2141e9
Related: SYS#6772
Vadim Yanitskiy at
library/s1ap: rework {ts,tr}_S1AP_RABSetupRsp templates

3GPP TS 36.413, section 9.1.3.2 "E-RAB SETUP RESPONSE" defines
the following two IEs as optional:

* E-RAB Setup List IE: 0..1 in the Range column means that
  it can either be omitted (0) or included only once (1);
* E-RAB Failed to Setup List: 'O' in the Presence column.

Our templates for this S1AP PDU require the former to be a value
(as if it was mandatory) and do not allow passing the later.

Change-Id: Ic369ae720179483a19383af2bddf56186965eae3
Related: SYS#6772
Vadim Yanitskiy at
s1gw: add TC_e_rab_setup_failure

Change-Id: I97102292678e732265dcae04d60f7a708a5246dc
Related: osmo-s1gw.git I242e84fb09b00f4794b6e1aa770f348a0e60aea4
Related: SYS#6772
Vadim Yanitskiy at
hnbgw: test for RUA Disconnect when there is no CN

Related: OS#6283
Related: osmo-hnbgw Iafb30c31a4c5db53ecdda99a0e0b5937b71e362c
Tweaked-by: Oliver Smith <osmith@sysmocom.de>
Change-Id: I2b5c024a395e736538c0c37db40d34f3b8d99991
Oliver Smith at
hnbgw: Send meaningful RANAP messages in f_tc_ranap_mo_disconnect()

Fix the code to send the messages that were fore sure intended, where an
MO disconnect is triggered.
This allows attaching more to reality, plus making it easier to follow
up the test in wireshark and in the code.

Change-Id: I9a2bb35d58c6cdda312638103ef5c3c2f5661e62
Pau Espin Pedrol at
hnbgw: Introduce test TC_cs_iu_release_req_rua_disconnect

Related: SYS#6602
Change-Id: I6782920c4a86d3311eb54239ab13a18e393c1ec0
Pau Espin Pedrol at
hnbgw: fixup for expect_compl_l3_success

During my rebase of Neels patch, I've missed setting
expect_compl_l3_success in t_pars(), leading to:

  HNBGW_Tests.ttcn:571 Dynamic test case error: Text encoder: Encoding an unbound boolean value.

For a lot of tests. Also add the parameter to f_TestHdlrParams() for
consistency.

Fixes: 25fc127c ("hnbgw: test for RUA Disconnect when there is no CN")
Change-Id: Idbfcb77a80d74f7715ef1f84ba4cbfdb08483a5c
Oliver Smith at
hnbgw: Rename RAB helper functions to be CS specific

Change-Id: If8a97fe847083e95a480006d147ff59be695b713
Pau Espin Pedrol at
hnbgw: Use g_pars.mgcp_pars directly during RAB CS setup

Change-Id: I1f699e197e29f912ad06378f10563063aa291af3
Pau Espin Pedrol at
hnbgw/expected-results: update

Add:
* TC_hnb_disconnected_timeout
* TC_mscpool_L3Compl_no_cn
* TC_sgsnpool_L3Compl_no_cn

Fixes: 25fc127c ("hnbgw: test for RUA Disconnect when there is no CN")
Change-Id: Ib126ff53aa9edfeb94f5e7e058145bd4fbe7b604
Oliver Smith at
testenv: make podman stop more robust

Terminate the watchdog process before killing the podman container. This
avoids bogus errors from a race condition where the container gets
killed first, and then the watchdog process tries to feed the watchdog
and fails:

  [testenv] Stopping podman container
  [testenv] + ['podman', 'kill', 'testenv-hnbgw-all-osmocom-latest-20241031-1222-f34534a5-1']
  e41700779a8ca5daf18ac5daa27d59a84d8442196e352f2756a19baf0592cf89
  Error: no container with name or ID testenv-hnbgw-all-osmocom-latest-20241031-1222-f34534a5-1 found: no such container
  [testenv] podman container crashed!

While at it, use "check=False" with the "podman kill" command, so we
avoid additional error messages if the container was already killed at
that point (could happen through a bug). If we fail to kill it here, it
is not a problem because the watchdog will ensure it terminates shortly
after the watchdog process was stopped.

Related: OS#6607
Change-Id: I6c67273af5b6a80ae0c94e14cb92e3784807c21d
Oliver Smith at
hnbgw: Move gtp_pars to Connhdlr

Change-Id: I40f723256b592d0d9141dfd192a1623a4804b4ea
Pau Espin Pedrol at
hnbgw: Introduce PfcpParameters in TestHdlrParameters

This allows creating generic functions to establish PS RABs based on
test setup configuration.

Change-Id: I5de50bb7032891a073e4e4e25b2dc86bc84e3d60
Pau Espin Pedrol at
bsc: testenv: set MTU=1500 for lo

Two tests are failing if the MTU is 65536 instead of 1500. This is an
upstream bug in titan.TestPorts.SCTPasp:
https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SCTPasp/-/issues/3

Add a workaround so the behavior of the test environment is the same as
with docker-playground and the tests can pass again.

Related: OS#6602
Change-Id: Ifeda66954263fe8d2637377d0701a2208a19c332
Oliver Smith at
hnbgw: Merge TC_ps_rab_assignment_* testcases

Change-Id: Ibfc3a7d74494bd78d8cfb4efa535ab4cd1b07cae
Pau Espin Pedrol at
hnbgw: Move normal condition Iu Release procedure to helper function

Change-Id: I5dc7923b78d1b98fea1f71aa6e39c41f70b1f3e6
Pau Espin Pedrol at
hnbgw: Tear down SCCP conn from CN under normal conditions

Specs mention that under normal conditions the CN is the one expected to
tear down the SCCP underlaying connection upon recieving
Iu-ReleaseComplete.

Change-Id: I920cabcb63ca352db0ed06e4c35dade52bae5399
Pau Espin Pedrol at
testenv: fix 'container crashed' detection

* When the testsuite stopped and using podman, check if it stopped
  because the container crashed and raise an exception.

* Even after 9eb5e696 ("testenv: make podman stop more robust") it
  happens sometimes in jenkins that the container gets stopped on
  purpose because the testsuite is done, but then the watchdog process
  prints an error saying it crashed (without actually stopping testenv
  at this point). Change the message to a debug message that just says
  it stopped, this should not be an error.

Related: OS#6607
Change-Id: I3c116719cdc00a99e27e5237ba3d57d5258b0919
Oliver Smith at
testenv: podman-main: set watchdog timer to 60s

Increase the timer from 10s to 60s, as with 10s I see jobs failing with:

  ERROR: /tmp/watchdog was not created, exiting

In theory 10s should already be enough, my guess is that if a jenkins
node is currently under a lot of load then the feed command may take
several seconds and so we hit the previous timer. Even if this is not
the cause, I think it is good to rule it out.

Exiting after 60s if the jenkins job was (manually / with connection
loss) aborted is still relatively quick.

Related: OS#6607
Change-Id: Ide7a9d5bc395106cdaa47cec3aa746a978674c9e
Oliver Smith at
statsd: Support f_statsd_snapshot() API when using VTY-triggered stats report

Until now that API was only used in testsuites which relied on
time-trigerred reports. This commit also supports getting a given
snapshots if the IUT is configured to only trigger a report based on VTY
request.

Change-Id: I87d34e2f365d3b71ce328c08999be43d482326ad
Pau Espin Pedrol at
hnbgw: Introduce module parameter mp_statsd_prefix

The value in that parameter depends on IUT configuration.

Change-Id: I007d45b8323831e8f3708d22c6a9bc6e9badd896
Pau Espin Pedrol at
hnbgw: Introduce module parameter mp_pfcp_upf_node_id

This will allow using it later in HNBGW_Tests.ttcn file when waiting for
PFCP Assoc Req.

Change-Id: I2142289965adba0b457e865e10f0cfc9908b0bb2
Pau Espin Pedrol at
hnbgw: Handle PFCP Assoc Setup procedure in test_CT

Handle PFCP Assoc Setup Req during PFCP initialization in main test_CT.
This simplifies test logic.

Depends: osmo-hnbgw.git Change-Id Ic71df8df83e97f4015077677e426c803f84d31ea
Change-Id: Ic5edecea86b9465c60f008e245a44cfce64c8ddb
Pau Espin Pedrol at
hnbgw: Introduce test TC_ps_iu_release_req_rua_disconnect

Change-Id: Id24a5aed5255af77fbbd30521be70700a9bff1c9
Pau Espin Pedrol at
testenv: show testsuite results at the end

Show the testsuite results from junit-*.log not after each testenv*.cfg
file is through, but for all of them at the end. This way the results
are in one place when running with multiple configs, we don't need to
scroll to the middle of the huge log to find out what tests passed with
a previous config.

Adjust the podman container stop and restart logic, so the last
container is still running until we use it for showing the results.

Change-Id: Ie4b70724a33932cd98ba0972db37bf72dc8affb8
Oliver Smith at
testenv: more tweaks for container shutdown logic

* Don't do "podman wait" when restarting the container. The idea was to
  really wait before the current container was shutdown before
  restarting one with the same name. But even with the wait we got "the
  container name ... is already in use" errors and so we use different
  names when restarting the container since 6fe837de ("testenv: podman:
  restart_count in container_name"). This means "podman wait" is not
  needed anymore.

* feed_watchdog_loop: change sleep from 5s to 2s, as we wait up to that
  long after the container was shutdown, before testenv stops. 5s is
  quite noticable compared to 2s when running the script locally.

* feed_watchdog_loop: hide stderr of "podman exec" since it will print
  "Error: container ... does not exist in database: no such container"
  during shutdown. This is expected as we stop the container, but it
  looks like an actual error. We already have a more userfriendly
  message "feed_watchdog_loop: podman container has stopped" that will
  appear when the "podman exec" fails during shutdown.

Change-Id: I71721fd41f044817e4021aea045a288f88506f76
Oliver Smith at
hnbgw: Parametrize UPF F-SEID

This is needed if we want to support several concurrent PFCP sessions.

Change-Id: I8c32998c839f75ed93de639e48d08e1458a8032c
Pau Espin Pedrol at
hlr: use :memory: (volatile in-memory database)

This eliminates hlr.db* files and reduces chances of failures
due to unclean state database when running TCs more than once.

Change-Id: Ibb34a555e999693f00d12b49f936a20105f21c43
Vadim Yanitskiy at
hlr: refactor f_SS_expect()

Prepare for follow-up patches reworking SS related GSUP templates.
Avoid passing "omit" for parameter 'ss' of the receive templates
because this will no longer work as expected.  Clean up code flow.

Change-Id: I162a79e3c7ff9dafb031e3da8a78af313534cac7
Vadim Yanitskiy at
library/gsup: improve formatting of SS templates

Change-Id: I27aa67ded044a4a5362795bb791d883c4af55cd9
Vadim Yanitskiy at
library/gsup: improve generic GSUP_PDU templates

* Fix tr_GSUP: 'ies' cannot be omitted, so use '?' (not '*')
* Add missing template restrictions ('value' / 'present')
* Move GSUP_PDU templates after GSUP_IE templates

Change-Id: If4ceaf60311f9e4ed57153e2f6d7cb793c637f89
Vadim Yanitskiy at
hnbgw: with-pfcp: Support running ConnHdlr concurrently

Use Mutex to serialize PFCP session establishment to workaround the
"Req with SEID=0" dispatching problem.
This same system is used in S1GW_Tests.

Change-Id: Ie19ee0bd1b811e9381e3c245a4b1208de8afcbce
Pau Espin Pedrol at
RAN_Emulation: Increase ExpecTable size to 16

Use same size as other tables.
This allow running HNBGW_Tests with 16 ConnHdlrs instead of 8.

Change-Id: I0748da523d886a8097b9f35991b9044e6ca33f95
Pau Espin Pedrol at
hnbgw: Add test TC_ps_rab_assignment_concurrent

Related: SYS#6602
Change-Id: I053950373cec93ed8dbdfd6b8a71ffe31de3806f
Pau Espin Pedrol at
hnbgw: Parametrize MgcpParameters MGCP endpoint

This will be needed if we want to run several CS RAB ConnHdlrs in
parallel.

Change-Id: I4bb28dea22a6ea5b415d6ca16bde61b835d435bc
Pau Espin Pedrol at
hnbgw: mgcp: Support running CS RAB ConnHdlr concurrently

Use Mutex to serialize CRCX wildcard endpoint, in order to be able
to properly steer the message to the good ConnHdlr.

Change-Id: Ibd97a37d98abfa746b58db0ea8bb591e7c8dc638
Pau Espin Pedrol at
hnbgw: Introduce test TC_rab_assignment_concurrent

Related: SYS#6602
Change-Id: I1f717edbe4a758288d017861c4b77836c5811040
Pau Espin Pedrol at
RUA_Emulation: Add missing msg component destination

Seen while running lots of components concurrently:
"RUA_Emulation.ttcn:315 Dynamic test case error: Port CLIENT has more
than one active connections. Message can be sent on it only with
explicit addressing."

Change-Id: Ief257969a451f2d11ad7619fb97af16d7dd7e199
Pau Espin Pedrol at
hnbgw: Small fixes in f_tc_rab_assignment()

Change-Id: I2f21d3ed59f6b8d26cfee3bd8e75c63cc9d710a3
Pau Espin Pedrol at
deps: Update titan.ProtocolEmulations.SCCP to upstream master

Until now we were using our own fork with an extra patch with a fix for
SCCP conn id 0.
This patch, together with other patches was merged upstream today.
Hence, update our dependency to point to current upstream master.

Related: OS#6185
Change-Id: I8ba6cec24205337f19bac951d9a8d4f5d4d476ad
Pau Espin Pedrol at
osmo-*.cfg: enable gsmtap log

Now that jenkins uses the osmo-*.cfg files from osmo-ttcn3-hacks for the
testsuites that were ported to testenv, make sure that these configs
enable logging to gsmtap log as it was the case in docker-playground.
This gives useful additional context in the pcap files.

Change-Id: I8a1c734c0d34b81e70707b0ac6732a366b867bbe
Oliver Smith at
library/gsup: improve GSUP_IE templates

* Turn template params into templates
* Use proper template restrictions
* Remove unnecessary valueof()s
* Improve formatting

Change-Id: I67cc555a54113dccb11d0cc05cee66f5c2d795fe
Vadim Yanitskiy at
library/gsup: rework f_gen_{tr,ts}_ss_ies() and SS templates

* Add missing param restrictions to SS related templates.
* f_gen_{tr,ts}_ss_ies(): proper template param restrictions.
* f_gen_ts_ss_ies(): return a template, not a value.
* f_gen_ts_ss_ies(): append IEs using list index.
* f_gen_ts_ss_ies(): isvalue() -> istemplatekind()
                     to allow passing template lists.
* f_gen_tr_ss_ies(): istemplatekind() -> ispresent()
                     to allow passing template lists.
* f_gen_tr_ss_ies(): 'omit' -> '*' for optional params.

Change-Id: Ia611ffa3845d48c5553c70f10981aa029d00d873
Vadim Yanitskiy at
library/gsup: add src/dst name IEs to all SS templates

This enables us to send/match OSMO_GSUP_{SOURCE,DESTINATION}_NAME
IEs (if needed) and brings consistency to all SS related templates.

This patch makes the following testcases pass [again]:

* TC_mt_ussd_for_unknown_subscr,
* TC_proc_ss_for_unknown_session.

At some point osmo-msc started including the Source Name IE in
OSMO_GSUP_MSGT_PROC_SS_ERROR messages, which we didn't expect.

Change-Id: I8d947313a99491d2e4790bc06db863fe09d8b5cf
Vadim Yanitskiy at
library/rsl: rename t_RSL_IE_ActType_* -> c_RSL_IE_ActType_*

We use prefix 't_' for templates and prefix 'c_' for constants.

Change-Id: I4ae8f6c35f6f823060833f24a0cad41cc9894750
Vadim Yanitskiy at
msc: use :memory: for SMS (volatile in-memory database)

This eliminates sms.db* files and reduces chances of failures
due to unclean state database when running TCs more than once.

Change-Id: I0361284e41f84f43d96b9ce10da88fc9a089cdd4
laforge at
hlr: expected-results.xml: expect TC_MSLookup_* to pass

These TCs are passing on Jenkins for quite some time.

Change-Id: I254f3a8a97d0602d46c3975315e21f87850bfa05
laforge at
{epdg,msc,pgw}/expected-results.xml: sync with Jenkins

Change-Id: Id00d9f95f81c1fdd181e56ed838f4b450accca58
laforge at
bts: use proper ActType in f_TC_data_rtp_loopback()

For the sake of correctness, use c_RSL_IE_ActType_ASS (assignment)
when activating TCH/[FH] channels in TC_data_rtp_*.  This is the
kind of ActType that would normally be used by the BSC.

Change-Id: Ide773c3fcfdab881756d5fe5b6c314b0c0335043
Vadim Yanitskiy at
bts: TC_data_rtp_tchh*: fix timeslot number in comments

Change-Id: I771e616d52315a26679acb1be17cd4f36eaa52b2
Vadim Yanitskiy at
bts: add TC_data_facch_*: test FACCH/[FH] on data channels

So far we have been testing the actual traffic on TCH/[FH] in data
mode (CSD), but not FACCH/[FH].  Add separate testcases for that.

Half-rate variants of the new testcases crash osmo-bts-trx, so
comment them out in the control section until the problem is fixed.

Change-Id: I2098ccd651fc2a81f62e70be64af386ab0ca6148
Related: OS#6618
Vadim Yanitskiy at
bsc: Fix sporadic failure in .TC_ho_in_fail_ipa_crcx_timeout

The code path was not waiting to receive DLCX if parameter
ignore_mgw_mdcx was set to false. It should wait for DLCX in any case.

Since it didn't wait, te ConnHdlr would finish earlier than expected and
MGCP_Emulation would fail when forwarding the DLCX to ConnHdlr:
"""
MGCP_Emulation.ttcn:257 Dynamic test case error: Sending data on the connection of port MGCP_CLIENT to 2023:MGCP failed. (Broken pipe)
"""

Change-Id: I322b070c369500979e3cc13814de1e4bf067726f
Pau Espin Pedrol at
epdg: fix a DTE in as_GSUP_rx_CL_REQ

Recent commit 51490419 uncovered a problem of passing 'dom := *'
to tr_GSUP_CL_REQ, which calls f_gen_tr_ies(), which in its turn
does not properly handle the '*' template kind:

'''
  Dynamic test case error: Restriction `present' on template
                           of type @GSUP_Types.GSUP_CnDomain violated.
'''

The old code was basically equivalent of passing 'dom := ?',
i.e. expecting the OSMO_GSUP_CN_DOMAIN_IE to be present.

Work the problem around by having two alternatives:

* GSUP.receive(tr_GSUP_CL_REQ(dom := omit)
* GSUP.receive(tr_GSUP_CL_REQ(dom := ?)

This patch makes TC_hss_initiated_deregister_permanent_termination pass.

Change-Id: I26738c8c2a0a4b9066bfb619149cbdbaf3e3b5e1
Related: 51490419 ("library/gsup: improve GSUP_IE templates")
Vadim Yanitskiy at
testenv: add run --until-nok

Add an argument to run a specific test (if using --test) or a whole
testsuite until it fails with "failure" or "error". This helped me in
reproducing a race condition in the mgw testsuite (related issue).

Related: OS#3849
Change-Id: I17e1ebcc5d6ff1b6a087c4d4c9405a02798212f1
Oliver Smith at
mgw: fix RTP packets received while RX disabled

Fix the race condition causing tests to abort with:
  1 RTP packets received while RX was disabled

Fixes: OS#3849
Change-Id: Ieaf5440a693448cdeeaac7f47e6110cb480bff5f
Oliver Smith at
testenv: make it pass 'ruff check' linter

I've added 'ruff check' to my pre-commit script. Make it pass initially,
so it can detect future bugs. The missing f-string is a bug that causes
ggsn testsuites with a custom kernel path to not work.

Change-Id: I3e5cd05ce0aa241509d77391c5ed64e618f385ba
Oliver Smith at
testenv: install dbg pkgs with --binary-repo too

When using --binary-repo, figure out the -dbg and -dbgsym packages for
all dependencies of packages to be installed, and install them as well.

This will make debug symbols available in jenkins, useful for the
related issue. Before this patch debug symbols were only available when
building locally without --binary-repo.

Related: OS#6630
Change-Id: I4dc57257b944126fed2c7b031c92c77a3d4286e0
Oliver Smith at
testenv: pass env var for --binary-repo

Pass TESTENV_BINARY_REPO=1 to the podman container if the --binary-repo
argument is set. This will be used for the BTS testsuite to figure out
from where we need to run fake-trx.

Change-Id: Ia88906147e2e579145e3c8d04090c58f533febd5
Oliver Smith at
bts/run_fake_trx.sh: tweak cd logic

Don't test if FAKE_TRX_DIR is empty, because it is never empty at that
point. If it was empty, then the line above would assign a default
value.

Change-Id: I63f9720487b564de5c5609eb52a6bb9d5a8aa74f
Oliver Smith at
testenv: respawn.sh: don't respawn on segfault

Do not respawn the process if it segfaulted or aborted abnormally in
another way (exit code >= 128).

Change-Id: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
Pau Espin Pedrol at
testenv: print backtrace on startup fail too

When a program fails to start up, look for the coredump and print a
backtrace if it was found (instead of only doing it if a program
crashes later on).

Change-Id: I66a55dcfdab17d035ce6425220763a85b5b6dc90
Pau Espin Pedrol at
testenv: build virtphy from src with --binary-repo

Add logic to build virtphy from source when running with --binary-repo.
This extra code path is needed because we currently don't have virtphy
packaged (like trxcon and sccp_demo_user), and we need to build the
libosmocore binary package instead of building completely from source as
we would do it with osmo-dev.

Use ".split(" ", 1)[0]" on the program= value to only look at its first
word, so we can later on use it in testenv.cfg file as follows:

  [virtphy]
  program=virtphy -s /tmp/osmocom_l2

Change-Id: I37bac8509b2601286e4feab099782f82c8338dca
Oliver Smith at
bts: add initial testenv.cfg

As usually, imported from docker-playground and adjusted to run on the
loopback device.

Related: OS#6638
Change-Id: Id9ed3780d166c5f6736a006f466dc5f0dded6279
Oliver Smith at
L3_Templates: GMM: Attach Req/RAU Req: add TLVs required for 4G -> 2G mobility tests

Change-Id: I0a37b75f6b1a522868cdbff43d99d4b953a4e952
lynxis at
L3_Templates: RAU Request: add support for MS Network Capability

The MS Network Capability is important to determine the UMTS auth capability
as well the R99 support.

Change-Id: Id750c84ae1673ac33c98cecea035805e8cb92bcb
lynxis at
L3_Templates: set R99 indicator

To support UMTS AKA auth, set the R99 indicator

Change-Id: I80035c68bd43fac336ef74ca9377a21f1061167f
lynxis at
L3_Templates: Add required TLVs for RA Request when moving from 4G to 2G

Add ts_PtmsiTypeTV and ts_RoutingAreaIdentification2TLV

Change-Id: I6d735be76aab0b5228502e3e19804bcc98864829
lynxis at
L3_Templates: correct set a5 bits to A1 + A5

The MS Radio Capabilities must include A5 bits to inform the network
of supported encryption capabilities. The a5bits of the first access network
must be present, later ones can be omited, meaning the ones of the first one
also applies.

Change-Id: I5256c1a2c57761589ec51de4fba47fa48b1f3fbb
lynxis at
Osmocom_CTRL_Functions.ttcn: Use Misc_Helpers.f_shutdown() everywhere

Change-Id: I3b11a4dee35da89b2fec0cc66021dd57db04beb4
Pau Espin Pedrol at
deps/Makefile: update titan.ProtocolModules.RTP

The module titan.ProtocolModules.RTP received a fix that avoids crashing
(segfault) on the reception of short RTP packets. Let's make sure that
this fix is included in our builds as well.

Related: OS#4005
Change-Id: Ica445c1058f3afa1e0615986ca5240eeacb02e8c
pmaier@sysmocom.de at
hnbgw: TC_rab_release: Fix race condition stats checked too early

It could happen sometimes that the stats report was requested before the
hnbgw received the message increasing the counter.

Change-Id: Ica53d956ee8aed760854d3148af170144234e6b2
laforge at
bsc: Fix missing teardown in TC_ho_in_fail_msc_clears_after_ho_detect

Missing handling of teardown messages made the test fail sporadically
due to ttcn3 side already closing the SCCP connection when it was still
expected to receive messages.

Change-Id: I492607aca0e42a823836f4a714ea818c5a897855
laforge at
msc: fix a race condition in f_mt_call_establish()

It can happen that the MSC sends a paging request quicker than
function f_ran_register_imsi() returns (e.g. when a node executing
the testsuite is under significant load).  In this case the
BSSMAP PAGING message is dropped by the RAN_Emulation CT:

  CommonBssmapUnitdataCallback: IMSI/TMSI not found in table

This can be avoided by calling f_ran_register_imsi() *before*
sending the MNCC SETUP.req, which is triggering paging.

This patch fixes sporadic failures of:

* TC_lu_and_mt_call
* TC_lu_and_mt_call_ipv6
* TC_lu_and_mt_call_no_dlcx_resp

Change-Id: Ie8b69c3b59ea61e01adb24c71c1376335a5ddde6
laforge at
bsc: osmo-bsc.cfg: Listen IPA Abis and CTRL interfaces on 127.0.0.1

CTRL seems to bind to 127.0.0.1 by default, but IPA Abis listents to
0.0.0.0 by default, which is not needed and may create problems with
concurrent instances.

Change-Id: I56c8c6af16502e8f98b28902a251e190da0c0490
Pau Espin Pedrol at
bsc: Add missing testcase in expected-results.xml

Change-Id: I6416e5cf4c12912f5094841d3738302bbd6228bb
Pau Espin Pedrol at
PCU_Tests_SNS: del/change weight: don't fail on NS

When doing a SNS procedure, ignore NS Alive which are already in the queue or happen direct after.

Related: OS#6611
Change-Id: I8088bd8f3b3e37ee79f61e73d2a3e4f73d00c5c1
lynxis at
tr_GTPC_SGSNContextReq: use the same template as MsgType

Change-Id: Idd546c3ec387e9c3ea8f1b1a61cf8ca8230db46a
laforge at
SGSN: BSSGP_ConnHdlr: GMM Service Request: handle PMM IDLE UE correct

24.008: 4.7.13.3: explicitly mention the completion of the low layer security to be an implicit
Security Command Accept if the UE is in PMM Idle.
Extend the as_service_request() to handle both cases when UE is in PMM-IDLE as well in
PMM-CONNECTED.

Change-Id: I29237997e414aea80f254247da54f909410a4b36
lynxis at
SGSN: BSSGP_ConnHdlr: GMM Service Request: add support to expect authentication

On a Service Request, the authentication is optional.
Either an authentication must happen or the key material from the previous authentication
has to be used.
The default behavior is still the same.

Change-Id: I9ed08160bf5413e3a30d6e90eb947d4d799e1058
lynxis at
SGSN: BSSGP_ConnHdlr: f_gmm_attach(): allow the SGSN to request the IMEI

The IMEI might be requested when the GMM Attach happen.

Change-Id: Id49c9e6ef7517a6a831315ac1f9915c50b88beb6
lynxis at
SGSN: f_TC_attach_timeout_after_pdp_act: allow authentication

While testing, allow the SGSN to authenticate the UE.
The new VLR code will authenticate the UE, while
the old code doesn't.

Change-Id: I11c628ecebbe7c4c1b2c28e63133a33cfc171e12
lynxis at
SGSN: f_TC_attach_rau: do a periodic RA update instead of RA change

After an attach, the periodic RA would be the correct.

Change-Id: Ic33687c55915d883b6d9a9a0d640a11588e1d1a0
lynxis at
SGSN: TC_attach_auth_id_timeout: set TMSI to provoke a ID Request

This test case simulates a MS which ignores Identity Requests. To ensure
the SGSN will ask for the IMSI, do an Attach Request with id TMSI.
Later this ID Request (type IMSI) will be ignored and the test case
expect a Attach Reject.

Change-Id: I5a860582aa57ebc073e4c33f3f2f8884e360edef
lynxis at
SGSN: f_TC_hlr_location_cancel_request_withdraw: drop incorrect Update Location response

This PDU was a Copy/Paste mistake and never been expected or used. The SGSN ignored
this message.

Change-Id: Ib8265416c650b0983d7e85786b334f84191331b2
lynxis at
SGSN: f_TC_paging_ps: call f_gmm_attach() direct

Instead of using the TC function, call f_gmm_attach() direct.
Also set explicit the verdict at the end.

Change-Id: I68c75f84b01a0cd673ffd8c19ab5f0a8517c5738
lynxis at
SGSN: f_TC_cell_change_different_*: always expect the auth

The new SGSN will always ask for authentication when receiving Attach or RA
which is the correct behaviour as long the LLC layer doesn't indicate
integrity or encryption protection.

Change-Id: I24579b5fc843caf68e035e106cee4e4ec0a3c735
lynxis at
SGSN: fix encoding of IMEISV in Auth and Ciphering Response

According to 24.008 the IMEISV field is exact 11 bytes long and
must contain a IMEI + SV which is exact 16 digits long, not 15.

Change-Id: I79dd79840de58f450c1a05e704fd9bd831455716
lynxis at
SGSN: TC_attach_pdp_act_pmm_idle: use correct Service Request type

When the UE requests data service, it must use the data service request type.

Change-Id: I9301e7a37d96c3f93e77f7618d6c13dfa1fbe46b
lynxis at
SGSN: Context Req In: use correct TEID-C

For a MS/UE moving from 2G to 4G, the Ctx Acks need to transmit
with the correct TEID-C which the SGSN chose in the Context Response.

Change-Id: I84dc7dda8ee1227edd68d1482a4c5bf267c16418
lynxis at
SGSN: assign random TEID-C to Context Req/Resp/Ack messages

Change-Id: Icac28280a810e8d24eeeaaae1fb1a15278fde8da
lynxis at
SGSN: Remove mm context triplets

Only triplets which hasn't been used should be included.
The MME will only request and sent back a single set of tuples.
There shouldn't any left overs.

Change-Id: I60a3331396cb9905ec9a4df9b1e65a3291a51058
lynxis at
testenv: use new osmocom-bb binary packages

When using --binary-packages, use the osmocom-bb-trxcon etc. binary
packages that are now available, instead of only installing the
dependencies as binary packages and building these components from
source.

Change-Id: I072ea55d12060b4ef04ee9775ef116d553090e9a
Oliver Smith at
SGSN_Tests: f_TC_attach_usim_resync: fix IMEISV value

IMEISV is IMEI + 2 digit software version.

Change-Id: I044eeccd02e2d3f891879516f5a9c003ac8f849a
lynxis at
PCU_Tests_SNS: SNS Add: handle NS_Alive while waiting for SNS_Ack

Similiar to 61ccea9ecadc ("PCU_Tests_SNS: del/change weight: don't fail on NS"),
the SNS Add procedure might have to handle a NS Alive PDU in the receiving queue while waiting
for a SNS ACK.

Related: OS#6611
Change-Id: I10646d9acfe280ddfb8852a4d5c37882aae99874
lynxis at
testenv: make copy= more intuitive

Currently copy= in testenv.cfg creates copies of files under the full
source file name under the target directory: copy=dir/file.cfg creates
dir/file.cfg (like "cp -a --parents"). This is not very intuitive,
change it to create a "file.cfg" instead without subdirectory. With
this change, it behaves the same as "cp -a".

Suggested-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: Id9e4ea066d0a0e72ccd83e4f6f887f382bf61e46
Pau Espin Pedrol at
remsim: Add initial testenv

"server" testsuite is working as goos as in docker-playground.git
"bankd" testsuite is currently failing due to bankd exiting early after
starting.
"client" is not currently working/running in docker-playground, initial
config copied here for completeness.

This commit hence allows already quickly running "server" testsuite.

Change-Id: Ic69a04342a4cdfced90cf8ffbe7e5cdede8d4b8e
Pau Espin Pedrol at
RAW_NS: SNS Add: handle IPv4/IPv6 element in SNS Ack

When adding a new NS-VC via SNS Add, the SNS Ack should
only contains the IEs "List of IP4/6 elements" if the cause code is
Unknown IP endpoint.

However the libosmocore/ns2 code isn't following this behavior yet.

Change-Id: I18c659e43db79400c1b428ed745267a5e6e59102
lynxis at
RAW_NS: SNS Changeweight: remove IPv4/IPv6 element in SNS Ack

When changweights of a NS-VC via SNS, the SNS Ack should
only contains the IEs "List of IP4/6 elements" if the cause code is
Unknown IP endpoint.

However the libosmocore/ns2 code isn't following this behavior yet.

Change-Id: Ibf00cbab0c6691cdb72fe592ee30e122dd8f4783
lynxis at
PCUIF: fix usage of bts number in PCUIF_TXT_IND

When we receive the PCU_VERSION using tr_PCUIF_TXT_IND we must ignore the
included BTS number because the PCU_VERSION is not addressed to a specific
BTS. When we send a PCU_VERSION using ts_PCUIF_TXT_IND, we should always
use the bts number 0 to be consistent (the BSC/BTS will ignore this number
anyway).

Let's fix the usage of tr_PCUIF_TXT_IND and put comments, to make clear why
the above applies.

Change-Id: I93de261fc77806b2f817e0d30cb1b0d377ed0dbb
related: OS#6507
pmaier@sysmocom.de at
RAN_Emulation: Allow client to trigger SCCP CC if automatic CC was disabled

This allows users of RAN_Emulation to trigger events in between CR
transmited and CC being receied at the IUT.

Change-Id: I117c8fde118b488b011e381d51eed378d2f3ff0e
Pau Espin Pedrol at
hnbgw: Introduce test TC_{cs,ps}_rua_disconnect_during_sccp_cr_cc

Related: SYS#7208
Change-Id: Ie4fe4aaf77017f7191cf000331e452cded56cf25
Pau Espin Pedrol at
hnbgw: Fix template restriction in template param

Change-Id: I946f21f6d662d889095199c268d2586aea55c821
Pau Espin Pedrol at
testenv: Log return code of unexpected end of process

This providing further information, for instance if the process actually
exited due to a signal (rc < 0) or due to exiting on its own (rc >= 0).

While at it, rewrite the log line since a process exiting doesn't
necessarily mean it crashed.

Change-Id: I7bbee6ad8e114eeb1ef348184158230b53d0f3cf
Pau Espin Pedrol at
remsim: Enable debug output of bankd

Change-Id: Idc1ed4b9419735170cac92916073757da01691ed
Pau Espin Pedrol at
remsim: bankd: Install vsmartcard-vpcd

This is needed for test RemsimBankd_Tests.TC_createMapping_exchangeTPDU
to work. Add require_vsmartcard_vpcd.sh to give a meaningful error
message when running without --podman, if the user doesn't have it
installed.

Co-authored-by: Oliver Smith <osmith@sysmocom.de>
Change-Id: Ib5ba5075eff4955354fa25d1c605f277e8a6962a
Oliver Smith at
sccp: Initial testenv

Change-Id: I616425d729dda342e78537c6b7256d5dddebaa88
Pau Espin Pedrol at
sccp: Let some time for SCCP RLC to reach IUT before finishing test

Otherwise tear down of the test component immediatelly afterwards
creates a race condition where sometimes the RLC message is not sent
before closing the socket.
As a result, the SCCP-SCOC stays in DISCONN_PEND until T(rel) fires a
while afterwards, generating a new RLSD in a follow-up test, disrupting
expectancies of that unrelated test.

Since sccp_demo_user doesn't implement a Layer Manager, the recv() 0
from the socket doesn't automatically tear down the SCCP conn, since it
could have several ASPs:
"""
0: asp-asp-srv-client: ss7_asp_xua_srv_conn_rx_cb(): sctp_recvmsg() returned 0 (flags=0x80)
...
asp-srv-client: connection closed
XUA_ASP(asp-srv-client){ASP_ACTIVE}: Received Event SCTP-COMM_DOWN.ind
XUA_ASP(asp-srv-client){ASP_ACTIVE}: state_chg to ASP_DOWN
XUA_AS(as-srv-client){AS_ACTIVE}: Received Event ASPAS-ASP_DOWN.ind
XUA_AS(as-srv-client){AS_ACTIVE}: state_chg to AS_PENDING
Delivering N-PCSTATE.indication to SCCP User 'SCCP Management'
Ignoring SCCP user primitive N-PCSTATE.indication
[Here same 2 lines for SCCP User 'refuser', 'echo', 'callback', 'test_client_vty']
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-ASP_DOWN.indication
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-SCTP_RELEASE.indication
"""

Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
Pau Espin Pedrol at
library/s1ap: f_tr_S1AP_RABSetupRsp(): use ispresent()

Change-Id: I6ee1246ef9f32ac7d5ce107d3ba9ea11ed87af20
Vadim Yanitskiy at
library/s1ap: add E-RAB MODIFY REQ/RSP templates

Change-Id: Id38cd51698c1388311a41f045ff08ec7f8a85146
Vadim Yanitskiy at
library/s1ap: add E-RAB MODIFY IND/CNF templates

Change-Id: I2dd3d420ebfaf37fefa1d33a40176ec57fee5619
Vadim Yanitskiy at
s1gw: make f_ConnHdlr_rx_session_modify_req() more flexible

Allow the caller to pass FAR ID, SEID, and E-RAB parameters (F-TEID),
so that it can also be used for testing the E-RAB MODIFY procedure.

Change-Id: I52317e79ac02cb4e321b49c2cd824de28e25a1c6
Vadim Yanitskiy at
s1gw: add constants for PFCP FAR IDs

Change-Id: Ib25e5cc9ca21047f9884e1c13d0861bf4f7251a1
Vadim Yanitskiy at
mgw: Improve log and teardown upon unexpected mgcp resp received

Change-Id: I233075f5a88ed7f1f7de496664cdc7281aefa900
Pau Espin Pedrol at
PCU_Tests_SNS: sns_del: check if removed NS-VC still transmits

After removing a NS-VC via SNS-DEL, the NS-VC shouldn't receive
any further NS PDUs.

Related: OS#6611
Change-Id: Ied4367a519cf75291ff8766c9efebb0f8a12b11f
lynxis at
GSUP_Templates: Purge MS Request: allow the Message class IE to be present

Change-Id: I367f63fe5286e39ba51de94729455d2638f19c6f
lynxis at
SGSN: f_cellid_to_RAI: fix spaces vs tabs

Change-Id: Ic1927729dd0d205f1bd866423c8dfdf91caf597d
lynxis at
msc: add testenv.cfg

Change-Id: Ia93115e3a27ac43b6530f2669e210f59169d75b9
lynxis at
stp: Improve failure teardown using Misc_Helpers.f_shutdown

Change-Id: I776bc32b1bdb52d7e90102c4ab6ff7b0ef7a12c6
laforge at
stp: set up all M3UA ports in array in steps

This way we have all ports in more or less the same state when handling
messages.
It should also speed up tests and mitigate sporadic failures  under some
scenarios where we already accept the SCTP conn instead of rejecting it
and waiting for reconnect from client.

Change-Id: I585d9c768301bfd9ba849876923787137fc35981
laforge at
gbproxy: Don't log the payload size for every DL/UL-UNITDATA

This just wastes memory. We can check the pcaps if a test does fail.

Change-Id: I862d67a48f1d694262cf39a1e939033bde0c6eab
Related: OS#6704
dwillmann at
testenv: run: add --autoreconf-in-src-copy arg

Add a new argument that avoids the problem that ./configure refuses to
run if it has already been executed in the source dir. (It aborts and
asks the user to run "make distclean" first, which is especially
annoying if it has to be done in multiple source dirs before being able
to build successfully.)

Put the new logic behind an "experimental argument" for now. I think it
improves usability greatly and plan to make it the default later when
it has been well tested.

I have also considered making the source dir read-only when mounted into
podman and this argument is set. This was the original goal of Lynxis'
related patch, on which idea this one is based. But osmo-dev still
needs to write into the source dir in case it clones a new repository,
so making the sources dir read-only with this trade-off should be a
separate flag and could be added in another patch later.

Related: osmo-ttcn3-hacks I0f1ac8852218f158ece14c176f05574f60d9d1f7
Depends: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650
Change-Id: I5c38ce69dc39823d12be574c74a654d2fa6ed8fb
Oliver Smith at
library/s1ap: fix criticality in UE CONTEXT RELEASE PDUs

Change-Id: I6c63b3ecb428b54705aea0c14610c00223651d8f
Related: SYS#7310
Vadim Yanitskiy at
s1gw: add f_TC_exec()

The idea is to reduce the amount of boilerplate code.

Change-Id: I0df4ad15bc2dca2afb2c598c1b053f45b69c181b
Vadim Yanitskiy at
s1gw: add TCs for UE CONTEXT RELEASE procedures

Change-Id: I065692f311e9d03630ab3ca2f6a03465418f0e71
Related: osmo-s1gw.git Ic94489e3d3052221b49431da3a95e5c1eb0e0ba0
Related: SYS#7310
Vadim Yanitskiy at
hnbgw: Use Misc_Helpers.f_shutdown upon rx of unexpected msg

Otherwise the test continues for a while and ends up with a DTE which
makes it harder to figure out the original test failure.

Change-Id: I7f07cff2ce93e8b11338ba4e39e1d49662323f58
Pau Espin Pedrol at
MGCP_Emulation: Make sure peer is running before Tx

This avoid DTE with "Broken pipe" if messages are being transmitted
while tear down process has already started, even if components are
created as "alive".

Change-Id: I8724870b9b967ffa49c3da03e1cdb2941f81653a
Pau Espin Pedrol at
hnbgw: Submit proper L3 PDUs during CR

Generating random PDU values makes hnbgw act on it, since it looks up
higher layers to figure out NRI steering.

Change-Id: I725c35a3584b7d2d162c24ab2b662cfb80e539d7
Related: OS#6717
Pau Espin Pedrol at
Mutex: Create component alive

Change-Id: Ie2980705dd0d2d8ed11a6c13349fb85e6f254748
Pau Espin Pedrol at
RAN_Adapter: Create components alive

HNBGW_Tests.TC_hnb_disconnected_timeout needs modification since it
expects the component to drop the underlaying conn towards the IUT when
the component is stopped. This is not longer the case when the component
is created as "alive". In order to make sure its resources are
destroyed, one needs to kill it.

Change-Id: Ice4d93b42552f1c5d621582b1fc3a38b4e1ae837
Pau Espin Pedrol at
hnbgw: Create all components alive

This makes it easier to figure out errors due to getting rid of DTEs
changing the result output of the test.

Change-Id: If7ef1897adf3ef819314aa094ba78c526d77770f
Pau Espin Pedrol at
pcu: Fix wrong BSN uint size

3GPP TS 44.060 9.1.4.2, BSN is 11 bit long.

Change-Id: Id1ef8b58dc61ab91de2c781a2fd1e8da5eba83a7
Pau Espin Pedrol at
pcu: Fix TC_dl_cs1_to_cs4 sporadic fail

The test TC_dl_cs1_to_cs4 failed sporadically in ttcn3-pcu-test-asan.
Due to how the DL data arriving at Gb is split in chunks over RLC/MAC
(also based on how CS changes over time), it may happen that the full
PDU content doesn't finish at the exact block number where PCU expects
the DL ACK/NACK. As a result, since PCU delays finishing the DL TBF and
some data for that DL TBF has already not been ACKed (and since there's
no more active DL TBFs), it will decide to retransmit some of the
RLC/MAC blocks which haven't been yet ACKed, instead of transmitting
nothing.
This is an optimization to increase the probabilities the MS has
received all the data.
We need to account for this possibility in f_dl_data_exp_cs(), used in
the mentioned test. In there, it needs to be checked whether the
received DL data block is a retransmission, and use that knowledge to
resolve that all data has been transmitted and hence the final condition
can be checked.

Change-Id: I7fb40689547645adf1d54f43c263161be1d7a440
Pau Espin Pedrol at
pcu: Fix dummy DL block received due to timer race conditions

Timer X2002, which manages delay at PCU between sending DL TBF Ass over
CCCH and start transmitting for it over PDCH, is clock-time based.
As a result, timer at PCU process and ttcn3 process may time out
slightly differently. Hence, it can happen that we request a DL block
immediatelly *before* the timer triggers at the PCU. In that scenario,
PCU transmits a dummy block instead of a data block.
Account for this race condition in several tests; some tests already
used this formula.

Change-Id: Ic2bb953483cd1f678cbe32c7a94e177f79ecb4e4
Pau Espin Pedrol at
s1gw: f_ConnHdlr_session_delete(): invalidate peer's SEID

Change-Id: If8027e2bdb5822eb7555cd02a72be900a1f18880
Vadim Yanitskiy at
s1gw: f_ConnHdlr_session_delete(): respect any order

It's not guranteed (nor required) that PFCP Session Deletion Request
PDUs are sent in the same order as their respective ERab records are
organized in the given ERabList.  They can be emitted in any order.

Make f_ConnHdlr_session_delete() more flexible:

* Expect to receive N PFCP Session Deletion Request PDUs;
* For each received PFCP PDU, find the matching E-RAB;
* Make sure that an E-RAB is never released twice;
* Send PFCP Session Deletion Response.

This patch fixes the following TCs:

* TC_ue_ctx_release_req3
* TC_ue_ctx_release_cmd_compl3

Change-Id: I93d3d38829b1f425d18d59464894da239e3511eb
Related: 75cb01b7 ("s1gw: add TCs for UE CONTEXT RELEASE procedures")
Related: SYS#7310
Vadim Yanitskiy at
s1gw: add TC_e_rab_modify_req_rsp[_multi]

Test the E-RAB Modify procedure (MME initiated), which is defined
in 3GPP TS 36.413 section 8.2.2.

Change-Id: I58b9964bae24b5aac526ee0c0c8ac8798f351e05
Related: osmo-s1gw.git I24d57ea390d71b640cb42046a8658e9d30670682
Related: osmo-s1gw.git I057a1c58d0c6ad04c00ad3ea4c68230d8632a07e
Related: SYS#7308
Vadim Yanitskiy at
s1gw: add TC_e_rab_modify_ind_cnf[_multi]

Test the E-RAB Modify procedure (eNB initiated), which is defined
in 3GPP TS 36.413 section 8.2.4.

Change-Id: Iec95ca0ecf37290bddfbefce1861f8ae66bf4db1
Related: osmo-s1gw.git I750ada0a5a21edc8bc06d567c8000b6304966474
Related: osmo-s1gw.git Icc16a57d40b68bd17c5d207b643927d58176e088
Related: SYS#7308
Vadim Yanitskiy at
hnbgw: remove osmo-hnbgw <= 1.6.0 code path

osmo-hnbgw 1.7.0 has been released, so we can remove this code path.

Change-Id: Ie55b752c19aa597afdc47b6e57e8ff0b42313e00
Pau Espin Pedrol at
sgsn: remove osmo-sgsn <= 1.12.0 code path

Now that 1.13.0 has been released, we can run this test in latest too.

Change-Id: I4ead7b05d7d956303584ccbfe1e13692f54341af
Pau Espin Pedrol at
eim: move es9p_Types_JSON to library

The TTCN3 module es9p_Types_JSON is currently only used by the eIM testsuite,
but it may also be helpful in other testsuites in the future.

Related: SYS#7339
Change-Id: If4be10a298e30188aebe7c9d3efbdb56d2816c7f
pmaier@sysmocom.de at
mgw: osmo-mgw.cfg: remove deprecated no-op params

This patch fixes the following warnings:

% Deprecated 'sdp audio-payload number <0-255>' config no longer has any effect
% Deprecated 'sdp audio-payload name NAME' config no longer has any effect
% Deprecated 'loop (0|1)' config no longer has any effect
% Deprecated 'allow-transcoding' config no longer has any effect
% Deprecated 'loop (0|1)' config no longer has any effect
% Deprecated 'allow-transcoding' config no longer has any effect

Change-Id: Ie4f2b46eda2e848781b77e590ad20e80fed86257
laforge at
bts: expect TC_data_{rtp,facch}_tchf144 to pass

Change-Id: I5dfcecc9cb6829ad208a54d7a3092a4cde327fb3
Related: OS#6167
laforge at
stp: Allow setting up different m3ua_config list by test

This is useful, for instance, for tests willing to test dynamic ASPs.

Change-Id: I0a875bac5e9506be9140d5afa28da25bdc99a5a6
Pau Espin Pedrol at
Use fork of titan.ProtocolModules.M3UA containing fix

Use a fork of the repository until the M3UA_NOTIFY decoding bug gets its
fix merged, currently submitted upstream in [1].

[1] https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.M3UA/-/merge_requests/4

Change-Id: I9ac3dcad88cd13c1b45fb70bdcd2a474d084a652
Pau Espin Pedrol at
stp: Pass M3UA conn idx to f_M3UA_rkm_register()

Change-Id: I9295a2c3518f82e8c82625fb573e414b1d634146
Pau Espin Pedrol at
stp: NOTIFY expectancy fixes

Fix expected behavior of STP according to specs (RFC 4666 4.3.4.5),
after osmo-stp got several related fixes in libosmo-sigtran.git
Change-Id I85948ab98623a8a53521eb2d2e84244011b39a93 and Change-Id
I3dffa2e9c554f03c7c721b757ff33a89961665b5.

Change-Id: I3a56b4fcb8c119a31815f3175db2d7899fbfddd7
Pau Espin Pedrol at
stp: Introduce tests TC_dyn_(2)asp_as_rkm_permitted

These tests allows testing behavior of scenarios related to dynamic
ASP/AS/RKM improved/fixed in libosmo-sigtran.git Change-Ids:
I986044944282cea9a13ed59424f2220fee6fe567
I85948ab98623a8a53521eb2d2e84244011b39a93
I3dffa2e9c554f03c7c721b757ff33a89961665b5

Change-Id: Ic3116cbe63832003876ae19b31491275aebb41a9
Pau Espin Pedrol at
stp: Fix expectancies of TC_clnt_quirk_snm_inactive

The test STP_Tests_M3UA.TC_clnt_quirk_snm_inactive validates the
snm_inactive quirk by sending a DAUD before the link being activated,
and expecting a DAVA to make sure osmo-stp did indeed process the SNM
message.
However, osmo-stp used to lack proper route validation based on link
state, which means it would incorrectly assumed the link for the
affected PC (55) in the test was active and hence would answer with a
DAVA. After libosmo-sigtran.git Change-Id
I928fb1ef5db6922f1386a188e3fbf9e70780f25d this wrong behavior is fixed,
and hence osmo-stp starts answering with a DUNA instead of a DAVA, since
AS "as-client" has not yet been activated during the test.
Fix the test expectancies by expecting a DUNA instead of a DAVA.

Change-Id: I907981c1487b299df852c405bae1fefff4bf5191
Depends: libosmo-sigtran.git Change-Id I928fb1ef5db6922f1386a188e3fbf9e70780f25d
Related: SYS#7112
Pau Espin Pedrol at
stp: Fix brokeness in STP_Tests_M3UA.TC_tmt_loadshare

The test was not even setting the traffic-mode in the IUT.
Furthermore, it was expecting pure round-robin behavior, which was the
older behavior of osmo-stp when loadshare traffic-mode was selected.

Actually split the test into 2, naming them properly (since round robin
is not a AS traffic mode in itself, but a possible implementation of the
loadshare traffic-mode.

The new test validates the usual loadshare traffic-mode based on SLS
distribution.

Related: SYS#7112
Depends: libosmo-sigtran.git Change-Id I61340549c596f1c04bc2269dbc165c327bf72037
Change-Id: I16d81cb2f88bb2927f248182ad4f8f27c8c24859
Pau Espin Pedrol at
stp: Fix brokeness in STP_Tests_IPA.TC_tmt_loadshare

Similar to previous commit for M3UA, this time for IPA.
Since in IPA so far the SLS is fixed per ASP, we need to add an extra
sender ASP which will get a new asp_id (and hence SLS) so that we can
also test traffic being sent/distributed to the 2nd receiver.

Change-Id: I61c3efbf8e30533d051e2de506f7c8eaae7e297b
Pau Espin Pedrol at
stp: STP_Tests.ttcn: Use M3UA PC and RCTX from config

Change-Id: I81c8402d5ccd6e59f2a6869927c637fff30cb952
Pau Espin Pedrol at
es9p_Types_JSON: split headers into separate module

The headers used in the JSON binding of ES9+ are also used in ES2+, ES11 and ES12.
Let's split the headers into a separate module, so that we can re-use them in
other definitions too.

Change-Id: I0242c877805003fa67445800960f75ce27752383
Related: SYS#7339
pmaier@sysmocom.de at
RSPDefinitions_Templates: add missing default values

The template parameters of some templates lack a reasonable default.
Let's add default values to those.

Related: SYS#7339
Change-Id: Ia55d17a00462c7c7729eb0d8d24ab0556c4c6918
pmaier@sysmocom.de at
es9p_Types_JSON: add decoder/encoder functions for opposite direction

We currently only have ES9p encoder/decoder functions to emulate an ES9p server,
however, we will need to emulate ES9p clients too

Change-Id: Ic7e3390bd09cc9e0c91ca90ac60cdde5d2ce1384
Related: SYS#7339
pmaier@sysmocom.de at
HTTP_Adapter/cosmetic: remove stray newline

Change-Id: If23ca399071ddb8f9f39797b543d43f6173406f9
pmaier@sysmocom.de at
testenv/README: fix markdown syntax

Put the two wget lines into a code block, otherwise the line break is
omitted and it looks weird.

Change-Id: Ia61d56cdf4822595e2a05b320e387a079bdbfeb2
Oliver Smith at
HTTP_Adapter: allow requests to different hosts

The host that is requested via the HTTP_Adapter is configured once on
initialization. This is fine if the test scenario only has exactly one
destination to query. For multiple destinations, this model does not
work. Let's add an http_pars parameter to the request functions, so
that the user can direct the requests to different hosts dynamically.

Related: SYS#7339
Change-Id: Ic87674f2381b3c6a1be6d0ce28a9e5403cda201b
pmaier@sysmocom.de at
HTTP_Adapter: add missing omit qualifiers

On some function in the HTTP_Adapter module, the (omit)
qualifiers are missing.

Related: SYS#7339
Change-Id: I985021852cbe2bcce60b1466e8ec9c3820a0c0f8
pmaier@sysmocom.de at
testenv: use --autoreconf-in-src-copy by default

Pass --autoreconf-in-src-copy to osmo-dev's gen_makefile.py by default,
so we can always avoid errors related to:

* running "./configure" in-tree and out-of-tree (results in "configure:
  error: source directory already configured; run "make distclean" there
  first")
* running "./configure" / "autoreconf" with different autotools versions
  (on host system and in podman container)

I've kept is as experimental flag at first for better testing, but make
it the default now as it seems to work reliably.

The old make dir is cleaned up when the user runs "./testenv.py clean"
the next time.

Related: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650
Change-Id: I41e1fb534e253ddb43f266d73485b83259a8aa40
Oliver Smith at
deps: Update titan.ProtocolModules.M3UA to upstream master

MR contained in our fork was merged [1], so we can use upstream again.

[1] https://gitlab.eclipse.org/eclipse/titan/titan.ProtocolModules.M3UA/-/merge_requests/4

This patch doesn't contain an update hash because it was merged as
fast-forward so the commit hash now in master HEAD did not change from
the one in our repo fork branch.

Change-Id: Icf411559d3ba5bc699d8a66d7c42e7034392a9e6
Pau Espin Pedrol at
stp: STP_Tests_IPA.TC_tmt_loadshare_sls: Fix test expectancies

Change-Id: I68856e11a92b707eb11ab4813390e6faf3c54b69
Pau Espin Pedrol at
sccp: Improve logging receiving unexpected msg

Change-Id: I90c5236882e96fc038fee0d2f4551cfc58767c78
Pau Espin Pedrol at
sccp: Fix test rx SLS expectancies

The SLS is the same for all messages in conn being sent in one direction, but
doesn't need to be the same value on both directions.
Since the SLS value on the other direction is not selected by the test
itself, we cannot expect a given specifi value.
Update the test expectancies.

This started to fail since recently libosmo-sigtran started properly
setting SLS values, eg libosmo-sigtran.git
7781eb275da41a9b6b1ea5d8b0e802e87a8e9d53 and
0061e8d0bcba3b0ed5ea255588619627d0975380.

Change-Id: Ic288b58629361de9cfadb568a27b51b7e02c9e99
Pau Espin Pedrol at
SCCP_Templates: Expect either proto class0 or class1 upon rx SCCP

Until recently, libosmo-sigtran only sent class0, but it is now able to
send class1 too (0061e8d0bcba3b0ed5ea255588619627d0975380).
Adapt the test expectancies.

Change-Id: Ia1e05b24f1b56404d951eece0e9314d784d375db
Pau Espin Pedrol at
HTTP_Server_Emulation: allow multiple HTTP server ports

At the moment the HTTP_Server_Emulation component can only provide
a single HTTP server. Let's extend it so that it can provide multiple
HTTP server.

Related: SYS#7339
Change-Id: I11df9df5c3041f977b458835e923c74abe3bba7b
laforge at
testenv: -h output: add more binary repo examples

It wasn't clear how to use the nightly asan repository with testenv.
Extend the help output for that.

Change-Id: I5e18059f129423eac3374bd6beff32930a0f7c95
Oliver Smith at
bts: BTS_Tests.cfg: remove commented out params

... most of them are personal stuff.

Change-Id: I892ae9003082da78ba41df55b6fb56ff4aae5526
Vadim Yanitskiy at
bts: BTS_Tests.cfg: set BTS_Tests.mp_transceiver_num

At least for osmo-bts-trx, we are running the testsuite with 4
transceivers.  This is also required for running the hopping config.

Change-Id: I449001f67abe1748f221c1ef9d0212f024f710dd
Vadim Yanitskiy at
bts: Run osmo-bts-trx with sched_rr priority

use a real time prio since it really needs to do stuff in ral time with
high prio. Use lower rt prio than fake_trx since that one is the most
important piece providing clock.

Change-Id: I0251ed3ec0645617cf4e9bcc03e75c805bf1634c
Pau Espin Pedrol at
asterisk: Rework test TC_ims_call_mo_after_tcp_conn_closed with new expectancies

Previous expected behavior (and Asterisk-UE implementation) was wrong.
Since recently, Asterisk behaves better, that is, whenever the TCP conn
is dropped by the peer, it will attempt re-connecting and
re-registering.

Related: SYS#7398
Change-Id: I7ec1e8e30c4d72be96c8e300e0d038e63ba0e600
laforge at
mme: Take into account KSI update by Network

Since recently, open5gs updates the KSI received from the UE in order to
comply better with 4G Core expectancies.

Track assigned KSI in ttcn3 code and update it according to
expectancies.

Depends: open5gs.git 70310979c58fe186e9eaa06bec9d9a31f24ff7a1
Change-Id: Ie97788c5d9996370cd3e24cc0ff7c003adff1a65
Pau Espin Pedrol at
mme: Replace TC_s1ap_setup_wrong_plmn with test with different expectancies

This test was written following previous open5gs behavior, which was
wrong and updated in https://github.com/open5gs/open5gs/issues/3544.

Expect test to trigger a successful S1 setup procedure.
Rename the test to reflect the new expectancies.

Related: OS#6634
Change-Id: I3aba3d642e3bc70f08b6e0713514fb8906da775d
Pau Espin Pedrol at
rmlinks.sh: use -delete instead of -exec rm

Change-Id: Ic2cf9c36159a2bbf1acb59e6b316d1ef30aabe28
Vadim Yanitskiy at
rmlinks.sh: remove non-existent path exclude

Change-Id: I91ae0d3a610f4c9d826bfb1f579204fb0f55e7c8
Vadim Yanitskiy at
remove unused ROHC_CNL113426_LATEST dir

Change-Id: I30a5595ad1d0dfd2d6e4193add9e9e3503210aca
Vadim Yanitskiy at
deps: fix overriding recipe for target 'titan.ProtocolEmulations.SCCP'

This patch fixes the following warnings:

Makefile:188: warning: overriding recipe for target 'titan.ProtocolEmulations.SCCP'
Makefile:185: warning: ignoring old recipe for target 'titan.ProtocolEmulations.SCCP'
Makefile:188: warning: overriding recipe for target 'titan.ProtocolEmulations.SCCP/clean'
Makefile:185: warning: ignoring old recipe for target 'titan.ProtocolEmulations.SCCP/clean'
Makefile:188: warning: overriding recipe for target 'titan.ProtocolEmulations.SCCP/distclean'
Makefile:185: warning: ignoring old recipe for target 'titan.ProtocolEmulations.SCCP/distclean'

The problem is that 'titan.ProtocolEmulations.SCCP' is listed in
both ECLIPSEGITLAB_REPOS and OSMOGITHUB_REPOS.

Change-Id: Ia215f02fc08d66fb56e7e0e452b75d6e2f6c59c5
Fixes: 207ce0370 ("deps: Update titan.ProtocolEmulations.SCCP to upstream master")
Vadim Yanitskiy at
bts: simplify f_tc_rsl_ms_pwr_ctrl()

Change-Id: I67968a0398f9957dc4cc9c7fdffaf2b0ac40b88a
Vadim Yanitskiy at
library: fix coding style near f_rnd_int()

Change-Id: Ic9b97cd1626f35b3483f37fa250eea9dfd35ef51
Vadim Yanitskiy at
library: add f_rnd_sleep()

Change-Id: I97474d0c39052d8a9dd294238530e0b6c31a19e0
Vadim Yanitskiy at
library/s1ap: cosmetic: fix a typo

Change-Id: I50aceea2653c426d1f60542dbb6721b8c75ed3fb
Related: SYS#7288
Vadim Yanitskiy at
library/s1ap: split PDU specific API to S1AP_Functions.ttcn

Change-Id: Id3ba089140093490abd0307addeb5d7287dc5894
Related: SYS#7288
Vadim Yanitskiy at
s1gw: derive altsteps from f_ConnHdlr_rx_s1ap_from_{enb,mme}()

Change-Id: I8637a8abed0f0152abf2dce63ac28aa90f85bdc7
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add UE multiplex component

The UEMux is built upon the ConnHdlr component, allowing to simulate
concurrent activity of multiple virtual UEs.  This new component will
be used in follow-up patches.

Change-Id: I60e6f5d2b9882c27cecd06a2450bda4909c0532a
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add TC_uemux_uldl_nas_release

So far all of our *_multi TCs have been running the test logic in
multiple eNB connections.  This is the first TC simulating activity
of multiple virtual UEs within a single eNB connection.

Change-Id: I8e5db55739241f89592a7d2a81a13e8028e90d1d
Related: SYS#7288
Vadim Yanitskiy at
s1gw: disable Nagle for eNB and MME connections

Change-Id: Id89941659fd2763aad9262b05aa007370424f2c1
Related: SYS#7288
Vadim Yanitskiy at
msc: f_establish_fully(): merge EST_TYPE_MO_{CALL,CSD}

There's nothing special about CSD at the stage of MM connection
establishment, it looks like a normal call at this point.

Change-Id: I732b58ed43bc0d76fb78a6a41e19261658d8f755
Vadim Yanitskiy at
msc: use f_expect_paging() in SS/USSD TCs

Change-Id: Ia75420c738ef412af6ae602566fab7c997b48335
Vadim Yanitskiy at
msc: split up as_unexp_gsup_or_bssap_msg()

Make use of derived as_unexp_{gsup,bssap}_msg() altsteps.
Take a chance to improve them by printing unexpected PDUs.

Change-Id: Ie6c349bdae289d19614809545e23c2b7bf88f8ed
Vadim Yanitskiy at
msc: add TC_gsup_mt_sms_{paging,conn}_timeout

Change-Id: Ief16753783e044911f1e3cef8d7012810d709e61
Related: SYS#7323
Vadim Yanitskiy at
s1gw: ConnHdlr: allow passing {MME,ENB}-UE-S1AP-ID

This is needed for follow-up UEMux testcases, in which we spawn
multiple virtual UEs with unique {MME,ENB}-UE-S1AP-IDs.

Change-Id: Ife37c77cff348cdfbde191dbad6da816e68ca941
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add UEMux TCs for E-RAB SETUP and RELEASE

Change-Id: Ia4583f82a768ca3d185aad596ce8ec9bbd37ad32
Related: SYS#7288
Vadim Yanitskiy at
s1gw: add UEMux TCs for INITIAL CTX SETUP and UE CTX RELEASE

Change-Id: I811904e50dd6f0a05b0bb6babebe5b4690e2d3ec
Related: SYS#7288
Vadim Yanitskiy at
s1gw: fix passing swapped {MME,ENB}_UE_S1AP_ID

This commit fixes a regression introduced in 64db5053
and makes the following TCs green again:

* TC_e_rab_modify_ind_cnf[_multi]
* TC_e_rab_modify_req_rsp[_multi]

Change-Id: I9b19a82234f547a9e44c9c034492ee4b21892818
Fixes: 64db5053 ("s1gw: ConnHdlr: allow passing {MME,ENB}-UE-S1AP-ID")
Vadim Yanitskiy at
remsim: make client tests work in testenv

* Prevent osmo-remsim-client-shell from closing immediately with "STDIN
  was closed, terminating".

* Fix REMSIM_Tests.cfg:
  * move mp_ to proper section
  * proper IP

Change-Id: I91b08b9bfde11f4600993b18ece1e810b61ed904
Oliver Smith at
testenv: fix building osmo-remsim with osmo-dev

Use --disable-remsim-client-ifdhandler as configure argument for
osmo-remsim. We don't need this for running tests and this prevents the
buildsystem from trying to write to /usr/lib/pcsc/drivers/ which fails
the build.

Change-Id: I3b00e5301433476bd19de3814943878f918c1fa0
Oliver Smith at
Cosmetic: testenv/testdir: fix formatting

This wasn't caught by previous ruff versions, fix it.

Change-Id: Ib770ee2e14811777efdb2c5867b29ba379abde7c
Oliver Smith at
stp: TC_tmt_loadshare*: Use new vty command 'binding-table reset'

Reset the eSLS binding table state before starting the test, to run it
with a clean state.

This test also fixes TC_unknown_client_dynamic_tmt_loadshare since it
now resets the table after connecting the 2nd dynamic ASP, which allows
re-distributing all seeds in the table into the new available set of
ASPs.

Depends: libosmo-sigtran.git Change-Id I56c34072a9ded42c13dbfc105a0ab3353ca353ec
Change-Id: I40b7724edcc06a3df641e316be4770d0e56bb72d
Pau Espin Pedrol at
testenv: fix OSMO_DEV_MAKE_DIR env var

When --autoreconf-in-src-copy was made the default, the make dir name
has been changed to make2 but this variable was not adjusted. Fix it.

Fixes: dacbca96 ("testenv: use --autoreconf-in-src-copy by default")
Change-Id: Ia46ebe1240806995960545afbb34e6533580f209
Oliver Smith at
sccp: testenv: fix hardcoded sccp_demo_user path

The current path only worked for with podman and with osmo-dev. Make it
work for the following use cases too:

* without podman, with osmo-dev
* with podman, with binary packages (instead of osmo-dev)

Removing package=no is required, so testenv builds sccp_demo_user from
source when running with --binary-packages. This is needed as
sccp_demo_user is not packaged (OS#5899).

Change-Id: Id6e0b669dcb71cab9e789fe011e60827a8e07f77
Oliver Smith at
sccp: testenv: fix run with asan + latest binaries

When running against osmocom:nightly:asan, build sccp_demo_user with
--enable-sanitize. Otherwise this code is not running with asan and
doesn't even start (as the libraries we link against are built with
--enable-sanitize).

When running against osmocom:latest, check out the latest tag instead of
current master.

Fixes: OS#5899
Change-Id: I5307125560694feae9f0978ebd27607a77ed8675
Oliver Smith at
testenv: remove TESTENV_GIT_DIR

This variable is not used anymore, remove it.

Change-Id: Iabb9fa3b9b393b2cb7f18fb877746e5d1e510e63
Oliver Smith at
msc: add/expect network-originated MT-Forward-SM.Err

The idea is to have two variants of the MT-Forward-SM.Err:

* _MS: originated by the MS/UE (via RP-ERROR),
* _NET: originated by the network (MSC) itself.

In both testcase scenarios we expect the network to indicate the
MT_FORWARD_SM_ERROR on its own, due to the lack of response from MS/UE.
Use the right template kind for that, expect a specific Cause value.

Change-Id: Ic27d943645fdff8d34f958e3bf16c8ee6e8368d2
Related: osmo-msc.git I51d92752471147e6d21a5059bebb0702b32642a5
Related: e9de1515 ("msc: add TC_gsup_mt_sms_{paging,conn}_timeout")
Related: SYS#7323
Vadim Yanitskiy at
msc: execute more SMS-over-GSUP tests via UTRAN

Change-Id: Ia3c044ad04561a4ee6dbb4a3fe59fedd3ac79bba
Related: 1cd11a05a ("MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms")
Related: 8d0d7af27 ("msc: add TC_gsup_mt_sms_lu_delay for X36 (LU delay) timer")
Related: e9de1515d ("msc: add TC_gsup_mt_sms_{paging,conn}_timeout")
Vadim Yanitskiy at
testenv: make clone project function generic

Prepare to use the same code for cloning libosmocore in order to build
osmo-ns-dummy in a follow-up patch, which isn't in the binary packages
either.

Change-Id: Id19ed229545b22751c810b647e9be24f955f348d
Oliver Smith at
testenv: clone_project: fix getting latest version

Extend the logic for getting the last version, so it doesn't only work
with libosmo-sigtran (where the last version happens to be the last one
returned by "git ls-remote --tags") but also for libosmocore where this
isn't the case. Filter the versions by the relevant ones and then sort
them to get the highest one.

Change-Id: Ic15e385b9c8bab5c0dc70276049d6ad5ae927a6a
Oliver Smith at
ns: initial testenv config

Change-Id: I7b0d81db49dae0a3bb3d4c3b36fd3f8b4b590760
Oliver Smith at
hnbgw: Support configuring RAC on each hnb conn

Change-Id: Ie6a731d641ca963f71537e09fda8c894730bee84
Pau Espin Pedrol at
hnbgw: Test paging with PAge Area ID IE

Change-Id: I313aadae08f187b413e894a93faa29ce771ef7fe
Pau Espin Pedrol at
stp: Fix typo in comment

Change-Id: I9f4a1e5ec0b0d2614b3cec0768e8847fce3e3cdf
Pau Espin Pedrol at
testenv: clean: fix cleaning git dir

Don't try to build a PATH that contains the testsuite dir if running the
"clean" action, because then no testsuite is defined.

Fix for:
  $ ./testenv.py clean
  [testenv] + ['rm', '-rf', '/home/user/.cache/osmo-ttcn3-testenv/git']
  Traceback (most recent call last):
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/./testenv.py", line 137, in <module>
      main()
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/./testenv.py", line 133, in main
      clean()
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/./testenv.py", line 117, in clean
      testenv.cmd.run(["rm", "-rf", path])
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/_testenv/testenv/cmd.py", line 106, in run
      env=generate_env(env),
          ^^^^^^^^^^^^^^^^^
    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/_testenv/testenv/cmd.py", line 72, in generate_env
      path += f":{os.path.join(testenv.testsuite.ttcn3_hacks_dir, testenv.args.testsuite)}"
                                                                  ^^^^^^^^^^^^^^^^^^^^^^
  AttributeError: 'Namespace' object has no attribute 'testsuite'

Change-Id: I65da89581260fc60b3d8da0a93ee04c0c22c7f2c
Oliver Smith at
Revert "hnbgw: Test paging with PAge Area ID IE"

This reverts commit b0e3627eaa2665a03eb2301b099da6bceb4e4d4a: caused
regression in several other tests.

Related: OS#6762
Change-Id: I416d514e739cc0b16832192bfdb746a4ed09336f
Oliver Smith at
Revert "hnbgw: Support configuring RAC on each hnb conn"

This reverts commit 4e4398aac6d19fe16c40be88290e0da08588fd2d: caused
regression in several other tests.

Related: OS#6762
Change-Id: I077c584219bfa54468bd796a1fc2e85fd60b7a02
Oliver Smith at
msc: add TC_mo_ussd_evil_ms for OS#6756

This is an "evil MS" scenario that crashes current osmo-msc.

Change-Id: If1d85a1b4b63b01b4565e53677acfd21e664e799
Related: osmo-msc.git I724f0f0c9ef8611d3c3653e9370361b252127f72
Related: OS#6756
Vadim Yanitskiy at
buildsystem: move related scripts to subdir

Clean up the main directory by moving all buildsystem related scripts
into a _buildsystem subdirectory.

Rename gen_links.sh.inc to gen_links.inc.sh while at it, so vim does
syntax highlighting as shell script and not bitbake.

The rest of these patches in this series lead up to changing the
buildsystem to build out-of-tree (so we don't clutter the source dirs
with symlinks and build artifacts) and making the build output more
readable.

Related: OS#6599
Change-Id: Ieeefdfd74b2698794fb12fec4ed32565dc9f36a6
Oliver Smith at
buildsystem/regen_makefile: change to inc script

Make the regen_makefile script more consistent with gen_links.inc.sh by
also turning it into an include script. By doing this all previously
declared variables are available in regen_makefile, which means export
and passing as arguments is not needed anymore, making the resulting
users simpler.

Use #!/bin/sh -e while at it and remove empty CPPFLAGS_TTCN3 vars.

Change-Id: I10a41671e857024be6a5e8577c2aaca83228793e
Oliver Smith at
buildsystem: remove ttcn3_compiler workaround

The related debian bug has been fixed in 2018, so remove the workaround.
I've also verified that the binary is called "compiler" in Arch Linux
(as some developers are on Arch).

Change-Id: Ia50aa3caffeaa85eefba10695096aa23dcb69c93
Oliver Smith at
buildsystem/regen_makefile: modernize

Apply various small changes to make this file more readable.

Change-Id: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
Oliver Smith at
buildsystem/gen_links: move set -e to users

Make it more obvious that the various gen_links.sh scripts are running
with "set -e" by adding it to the #! line instead of setting it through
an included file.

Change-Id: I4caf445bef716161526a213d6a06ecc9d30f78cb
Oliver Smith at
buildsystem/gen_links: rename ignore_pp_results

Rename ignore_pp_results to gen_links_finish in preparation for the next
patch where the function will be used for generating more symlinks
instead of writing to a gitignore file. This is a separate commit to
make the next one more readable.

Change-Id: I6a1a79f1a3ff18fe4b51e4c72c3e9b56c571935e
Oliver Smith at
buildsystem: build out-of-tree

The buildsystem used to create symlinks to dependency source files in
the testsuite directories, and then building inside that source
directory. This lead to many unrelated files being in the source
directory.

Change the logic to create symlinks to all sources in a separate
$BUILDDIR instead (default: _build) and do the build there.

Advantages:
* Source directories are not cluttered with other files anymore.
* Clean up logic becomes much simpler and faster (rm -rf _build instead
  of generating a Makefile and running "make clean" in every testsuite
  directory).
* No need to generate gitignore files on the fly anymore.
* Using a separate $BUILDDIR is now possible, this will be used by
  testenv in a follow-up patch when running with podman, to make sure
  that build artifacts from podman and not using podman are not mixed as
  they are incompatible.

Related: OS#6599
Change-Id: If18aaf2a2a0d55bb617e5cb1b73f6ee4b1952494
Oliver Smith at
buildsystem: make output more readable

Generate short and readable compile messages:

  CC       IPL4asp_PT.o
  CCLD     TCCInterface.so
  CCLD     TELNETasp_PT.so
  CCLD     MGCP_Test

Instead of the very verbose messages we would get otherwise. Especially
the linking message clutters a whole page of terminal output without
this path:

   if ... g++ ... $ALL_OBJ_FILES; then : ; else ... $ALL_OBJ_FILES; fi

Change-Id: I780106e64089dc24a7ba724f6a94e67417d49c30
Oliver Smith at
testenv: remove copy_ttcn3_hacks_dir

When running with podman, set a separate builddir to avoid conflicts
with build objects generated from running "make" outside of podman. As
the buildsystem supports setting a differerent builddir directly now,
remove the copy_ttcn3_hacks_dir logic that was used to emulate this
feature.

Change-Id: I9cae0c4f8c34bb6876ef51048ef19b35a2e369a9
Oliver Smith at
testenv: refactor run --until-nok code

Refactor the code in preparation for using the code that checks if the
testsuite was successful with a new --bisect arg in the next patch.

Change-Id: I3a8fc83c6833f0d2a8be9c0d7ddaea0546859988
Oliver Smith at
testenv: run: add --bisect argument

Add an argument that lets testenv.py exit with != 0 when at least one
test has failed, so it can be used with "git bisect".

Change-Id: I941064c1c704560e0f7351c82e810481cd72b6da
Oliver Smith at
start-testsuite: fix passing $TEST to ttcn3_start

Fix that testenv / ttcn3_start kept running after the testsuites were
already done. This was caused by passing an empty string to ttcn3_start
as test argument, which causes it to still use the config file, but run
in a single test mode:

https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/mctr/ttcn3_start#L307-319

After the first test ran, ttcn3_start sends "emtc" to the MTC, which
replies with "MTC cannot be terminated." as it is still in
MC_EXECUTING_TESTCASE instead of MC_READY:

https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/cli/Cli.cc#L695-700

The ttcn3_start script then waits forever for the "MTC terminated.."
string, which doesn't come since "emtc" isn't sent to the MTC a second
time:

https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/mctr/ttcn3_start#L353-356

Fixes: 050ba48c ("buildsystem: build out-of-tree")
Change-Id: Ic50de8350e20d101417c5689058b64fe6547126f
Oliver Smith at
README: use # and ## for headlines

Prepare README to be able to use deeper headline levels.

Change-Id: Ice2baaf3ffdd1c11238c7791ab39925bed10818d
Oliver Smith at
start-testsuite: respect $TTCN3_DIR (if set)

Change-Id: I5c1cdc6ffbe50cf7ee48a160d2f406e428326d14
Vadim Yanitskiy at
Move f_{dec,enc}_mcc_mnc() API BSSMAP_Templates.ttcn -> GSM_Types.ttcn

The GsmMcc and GsmMnc types used in the function are defined in
GSM_Types.ttcn, which is also incldued by BSSMAP_Templates.
Hence, move the function there so that it can be used in other
testsuites including more generic GSM_Types.ttcn but not
BSSMAP_Templates.ttcn.

Change-Id: Iafafd2957a11d34a9402d252a169fec40593f483
Pau Espin Pedrol at
Fix MNC decoding in f_dec_mcc_mnc()

This API is so far only used in MSC_Tests.ttcn f_sgs_perform_lu(), but
will be used in more testsuites in follow-up commits.

Change-Id: I9db37d0dc9abbbefd57af4f0e2b91bf8a918d4e9
Pau Espin Pedrol at
hnbgw: Support configuring RAC and Cell ID on each hnb conn

Change-Id: I490e770be5e390a1f55e1dff1cf0c42e917a8d33
Pau Espin Pedrol at
hnbgw: Test paging with Page Area ID IE

Change-Id: I5a053bcf1f8470038e95d03889da077f8f967bfa
Pau Espin Pedrol at
README: explain how to run testsuites manually

As the testsuites are now in the _build directory, running them might
not be as obvious. Add an example to the README. While at it, explain a
bit more what the testenv script does and where one can read more about
it.

Change-Id: I1ee9319ada889a8dd43cfb32776dc1a8ae12d607
Oliver Smith at
start-testsuite: remove workaround for TITAN < 9.0.0

We're using the 9.0.0 nowadays, which does not need this workaround.

Change-Id: I57eecd6e0ea9e488a2110b029ddc313bd05cd1fa
Vadim Yanitskiy at
testenv: support fetching coredumps in jenkins

The Osmocom jenkins nodes run inside LXCs. When we get a coredump it
appears on the host, fetch it from there via testenv-coredump-helper,
which gets added to the hosts in the related patch.

Related: osmo-ci I7e66c98106b7028a393e3b873e96ae2dcb412c48
Related: OS#6769
Change-Id: I3784b4cbcef08b26f77b6f6f7a70a830d9c81a18
Oliver Smith at
bts: set osmo-bts sched priority to 30

Change the scheduling priority from 10 to 30, as we are currently see
osmo-bts suffering from scheduling latency in jenkins even though we
don't run other jobs at that time:

  20250425034138405 DL1C ERROR PC clock skew: elapsed_us=387574, error_us=382959 (scheduler_trx.c:449)

This should fix that the kernel prioritizes other (userspace or kernel)
processes running on the same machine that have a higher priority. We
have seen such an improvement after increasing scheduler priority for
osmo-bts-sysmo too (see I2394e6bbc00a1d47987dbe7b70f4b5cbedf69b10).

Priority 30 is higher than 10. From sched(7):

> Processes scheduled under one of the real-time policies (SCHED_FIFO,
> SCHED_RR) have a sched_priority value in the range 1 (low) to 99 (high).

This testsuite currently gets executed through docker-playground and it
fetches this config from osmo-ttcn3-hacks (see
If15461240f3037c142c176fc7da745a1701ae3f8).

Related: osmo-ci I0162f7299c8e37f893ffa10ddc4c8edece29ed7f
Change-Id: I828422e2363a58ca8c19d0f1b8a1b7d4e4bc031e
Oliver Smith at
tcpdump/dumpcap: move kill_rm_pidfile to inc file

Move kill_rm_pidfile out of the 4 ttcn3 tcpdump/dumpcap scripts into a
shared include file. Use the version of the function that only tries to
kill the command with sudo if it was started with sudo.

This fixes dumpcap not stopping if:

* it was started with ttcn3-tcpdump-start.sh (despite the name it will
  start dumpcap instead of tcpdump if dumpcap was found), where it gets
  started without sudo, and

* no rule is set in the user's sudoers file to run kill as root with
  NOPASSWD.

Change-Id: Ia63c37b54fb42a8c64a676334cef6f9df4152e18
Oliver Smith at

#11 (Sep 17, 2024, 1:49:18 PM)

s1gw: Print idx of component timing out

Change-Id: I354104dd88627a6d15e160d02f5ddf1072745a17
Pau Espin Pedrol at
StatsD_Checker: Allow building without VTY support

Some programs may support exporting to statsd, but may not support the
Osmocom VTY set of commands to send reports, or not have a VTY at all.

The current StatsD_Checker implementation as it is now is not totally
useful without VTY code. a Follow-up patch will provide new APIs and
improved implementation to use it without VTY.

Change-Id: I5421c76e4f303fd16d4db945a1c69910e40ac820
Pau Espin Pedrol at
StatsD_Checker: Simplify by getting rid of StatsDExpectPriv

Get rid of extra record, we have plenty of them and we'll have more once
we add new APIs to work without VTY.
While doing so, simplify the expect loop by maintaining a counter.

Change-Id: Ib14c838c5f0647d050249853327671542182636f
Pau Espin Pedrol at
StatsD_Checker: Allow running without VTY support

New features are added to the public API of StatsD_Checker which make it
possible to use it...

* without "stats reset":
Feature to take snapshots (f_statsd_snapshot()) which can later be
used to validate expectancies with values relative to the snapshot,
using API f_statsd_expect_from_snapshot().
This way, one can do:
"""
var StatsDExpects statsd_exp := { /* relative expectancies here... */ };
var StatsDMetrics statsd_snapshot := f_statsd_snapshot(f_statsd_keys_from_expect(statsd_exp));
/* do some test stuff here changing the state of the IUT... */
f_statsd_expect_from_snapshot(statsd_exp, snapshot := statsd_snapshot);
"""

* without polling ("stats report"), aka with periodict reporting:
New parameter wait_converge in f_statsd_expect(), which allows
overcoming race conditions with StatsD server processing older incoming
metrics due to periodic reporting.
This feature also allows a test to wait until a state changes in the
IUT.

Change-Id: Ie1180a5b674504864309c3b9b11bfcf5256d9178
Pau Espin Pedrol at
s1gw: Initial StatsD support

Change-Id: Ib98c2fe68006a8d0f45de6966927b349a3b933ca
Pau Espin Pedrol at
s1gw: ConnHdlr: Use stats reported by osmo-s1gw to expect PFCP Assoc Setup

Change-Id: I329745125d78786fc9c243f0047cd394de9b16d4
Pau Espin Pedrol at
s1gw: TC_setup: Validate some metrics

Change-Id: Iae629bc9291ff8b6e482f61d692e4d97ff0136bd
Pau Espin Pedrol at
SIP_Emulation: Allow forwarding ASP_SIP_close

This allows closing SIP connections at will from within the test.

Change-Id: If5c6bb0c0d773e0ba18ec28062663bdec751c8c4
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mo_after_tcp_conn_closed

Related: SYS#7067
Change-Id: I90df69b2418557d7001dddee4b6930ebbc58066d
Pau Espin Pedrol at
deps/Makefile: Update titan.TestPorts.SIPmsg to current master

New HEAD contains 1 more commit which fixes a regression introduced in
previous version, which is needed in order to get
Asterisk_Tests.TC_ims_call_mo_after_tcp_conn_closed working fine.

Change-Id: I9962076666706bdb4f6319ddade53d5622236995
Pau Espin Pedrol at
testenv: support obtaining talloc reports

Allow setting vty_port= and vty_host= (default: 127.0.0.1) for SUT
components in testenv.cfg. Pass the values as OSMO_SUT_PORT and
OSMO_SUT_HOST to the testsuite, so ttcn3-tcpdump-stop.sh generates
talloc reports after running test cases.

The next patch will add vty_port/vty_host to existing testenv.cfg files.

I have considered enabling the talloc report only conditionally (e.g.
with a --talloc-report parameter). But previous behavior in
docker-playground was also that we created them unconditionally where
OSMO_SUT_PORT/HOST was set, and they are generated almost instantly so
it did not seem necessary to make this conditionally.

Related: OS#6552
Change-Id: I50a7035f072668ca2ab65de1bc1f194da8b18610
Oliver Smith at
*/testenv.cfg: add vty_port, vty_host

Add these variables, so a talloc report can be obtained after running
test cases.

Closes: OS#6552
Change-Id: I5c0305c5d2ac6ac79dcf01bed8fb9d5beeeb99a6
Oliver Smith at
HTTP_Adapter: Rename s/g_pars/g_http_pars/

The HTTP_Adapter component is a probable candidate to end up as part of
another component extending it, like the Prometheus_Checker coming up
soon.
Since the fields in HTTP_Adapter are available to subclass components,
that means they cannot use the usual "g_pars".
Rename the self-enclosed "g_pars" in HTTP_Adapter to let subclasses use
it.

Change-Id: Ia07cf8717593073a71632e247d7fe0775e66eb13
Pau Espin Pedrol at
Misc_Helpers: Introduce API helper f_str_startswith

Counterpart of f_str_endswith(), this API is usually available in
several programming languages like python, and it's handy to have since
it's usually used and hence dev doesn't need to think on how to
implement it using regexp, etc.

This API will be used in a follow-up patch implementing Prometheus
metrics checker module.

Change-Id: Iad392ac652714a54a25954ea697f082d55772aa8
Pau Espin Pedrol at
Introduce Prometheus_Checker module

This module serves the same purpose as the existing StatsD_Checker.
It will be used in open5gs, which so far exports its metrics using
Prometheus.

Change-Id: Iec5544ba74978918f1bddba12971f69a1824683e
Pau Espin Pedrol at
hss: Initial validation of Prometheus metrics

Requires open5gs b2f56b964133bbe2f6ab07ead4cb62524528fcf7 for HSS
diameter metrics.

Change-Id: I507537c66a031b67518294daa8338f3836a90d6b
Pau Espin Pedrol at
Introduce PCRF_Tests testsuite

Change-Id: I381577111ccadaefe42f6abe3cd9bb30cc8ceb56
Pau Espin Pedrol at
pcrf: Validate Gx metrics

Change-Id: I4eab93f14d45f291c391d9519dc1462508f8a1eb
Pau Espin Pedrol at
cosmetic: Fix same typo in comment in several files

Change-Id: Id59e09b0ac89251175ecee23e7f9d1a058644aa8
Pau Espin Pedrol at
lapdm: remove

In the related patch, lapdm/L1CTL_Test.ttcn has been moved to
bts/BTS_Tests_LAPDm.ttcn. The remaining files in this directory are
unused. Remove them to unclutter the repository a bit.

Related: Ibbc967f0bd9a19ab4bbd17f612654d72cb32d571
Change-Id: I6aae060a5b252d3ab36378da8c721154b3186466
laforge at
upf: remove unused port PFCP from test_CT

Change-Id: Iba31a6aaa9a9ec854ba36956d1b853dcf66a804d
laforge at
hnbgw: move vc_PFCP from ConnHdlr to test_CT

A logical relation between the PFCP emulation component (acting as
the UP function) and its ConnHdlr components is one-to-many.  It's
unusual for the ConnHdlr components to have their own emulation
component, especially when a testcase spawns many of them.  This
renders the dispatch function of the PFCP emulation component useless.

The HNBGW testsuite, which is using the PFCP emulation, does not
spawn more than one ConnHdlr component, so there was no problem
with that so far.  Let's move the PFCP emulation to test_CT, in
order to allow spawning more than one ConnHdlr and to make the
component hierarchy less confusing.

Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700
laforge at
library/PFCP_Emulation: look up by SeqNr and SEID separately

This allows routing of PFCP PDUs without SEID by SeqNr.
An example of such a PDU is the Heartbeat Request.

Change-Id: Ic7912d944e94852a587993708d51439ec90f08cd
laforge at
library/PFCP_Emulation: fix routing of incoming PDUs

Before this patch, the PFCP_Emulation component was unable to route
incoming PDUs properly.  The problem is that the SeqNr and SEID were
neither stored nor updated whem sending outgoing PDUs, and thus
remained unbound all the time.

Change-Id: I8e62471915ab9a917ac960d3078e89669b5ac0ea
laforge at
library/PFCP_Emulation: allow retrieving the Recovery Time Stamp

The Recovery Time Stamp is a mandatory IE for some PDUs, such as:

* Heartbeat Request/Response
* PFCP Association Setup Request/Response

Allow the PFCP_ConnHdlr components to retrieve its value, so that
they can include it in outgoing (and expect in incoming) PDUs.

Change-Id: I23eb2b4e309460f93183df83cdd35e46a93fbb94
laforge at
s1gw: rework f_pfcp_wait_assoc_setup() into f_ConnHdlr_pfcp_expect()

Generalize this function, so that it can be used to expect any
PFCP PDUs, not just the Association Setup.

Change-Id: If691cb9df72672eddfbafdd8e03ae09c81b1ce71
Vadim Yanitskiy at
s1gw: cache PFCP Recovery Timestamp in ConnHdlr

Change-Id: I71f1473b52c893245b70ef67599a2f33569c37dd
Vadim Yanitskiy at
s1gw: send the actual Recovery Time Stamp

Change-Id: I350d28289526d8264ef9b70e796ef76ee7fcbb4b
Vadim Yanitskiy at
s1gw: move t_ConnHdlrPars back to S1GW_Tests

This is a partial revert of 956bf05e7, which moved the t_ConnHdlrPars
from module S1GW_Tests to S1GW_ConnHdlr and added f_new_ConnHdlrPars().

The problem is that we want to assign module parameter values to
some fields of the ConnHdlrPars record, but TTCN-3 does not allow
to access module parameters of one module from another.  Having to
add more and more parameters to the proxy function
f_new_ConnHdlrPars() is highly inconvenient.

Change-Id: Ibc34d0219a616a239c0595e61a783f18fbc91b36
Related: 956bf05e7 "s1gw: Initial StatsD support"
Vadim Yanitskiy at
s1gw: add TC_pfcp_heartbeat

Change-Id: Iadb24c2c346a62aa8b59d24475e71f683fc3dfe6
Vadim Yanitskiy at
library/s1ap: add more E-RAB related templates

Change-Id: I57df78e72bd2b070a6222c87f6faf4930bf1bdc5
Vadim Yanitskiy at
library/PFCP_Templates: add missing receive templates

Change-Id: I534d23c4463f9de86bcc0a03b969f22f291ef8c1
Vadim Yanitskiy at
testenv: on crash, wait until test stopped

When the IUT (or other test component) crashes, wait until
ttcn3-tcpdump-stop.sh has closed the pcap, as otherwise the last
buffered data may be lost.

Add a timeout of 2 minutes in case the test doesn't stop on its own.

I considered making this feature optional, but impatient users can still
immediately kill everything with ^C.

Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
laforge at
testenv: display current test name on ^C

When running a whole testsuite and getting a lot of output, it can be
useful to know which test was currently running when pressing ^C. Now
that we have a function that provides this information, show it to the
user.

Change-Id: I2eb639f47440447ac71027956b9c234323565956
laforge at
library/PFCP_Templates: fix missing fields in {ts,tr}_PFCP_Session_Est_Resp

Change-Id: Ib0887f1150f87746f9048f2944cd18c65224a4c7
Vadim Yanitskiy at
library/s1ap: fix formatting in ts_S1AP_RABSetupItemCtxtSURes

Change-Id: Ie6a367841a927ee0b542ccff2d6eb4ab9e51ca12
Vadim Yanitskiy at
sgsn/SGSN_Tests: remove a superfluous/wrong comment

Change-Id: Ib1cdea68e534bcf33aaeb8635d85f1f02cacb148
lynxis at
asterisk: TC_ims_reregistration: Expect re-register using existing ipsec ctx

Change-Id: I8d100dbba6cddfa5f31437c9cdc8c48f1bbd5701
Pau Espin Pedrol at
testenv: get coredump + backtrace on crash

If the SUT or another test component crashes, check if a matching
coredump was registered in coredumpctl. If that is the case, then copy
it into the testdir and print + store the backtrace.

This solves the problem that it is especially tricky to get a good
backtrace when a component crashes inside a container. One needs to
grab the coredump from the host (usually handled by systemd-coredump,
we cannot override /proc/sys/kernel/core_pattern for containers so it
can't be handled in the container), then put the coredump into the
container and finally run gdb to get the backtrace inside the container
(where proper libraries and debug symbols are). This patch automates all
of these steps.

Pau requested this feature.

Related: OS#6494
Change-Id: I743c20968bda9b6d6fb9c2d23bef70ee11950761
Oliver Smith at

#10 (Sep 2, 2024, 7:26:53 AM)

asterisk: IMS: Fix To header 'tag' attr not set in resync 401 Unauthorized response

Change-Id: I74a014eb5cb5084726ef6b0462030a20fdbb3339
Pau Espin Pedrol at
asterisk: f_TC_ims_registration_423_interval_too_brief: Fix To address 'tag' attribute

Change-Id: Ifd79d9cdc03f87f104a66564455e57bb7a462fe8
Pau Espin Pedrol at
asterisk: Log unexpected AMI msg

Change-Id: I406a00a54cb6d956e465001b8da0b14ea3e24195
Pau Espin Pedrol at
Revert "s1ap: add {enc,dec}_S1AP_Global_ENB_ID() API"

This reverts commit c4944aaa0114bda268af12bfb58d9f12f1041c4b.

This commit broke ttcn3-mme-test:

TC_RIM_RAN_INF0(34)@79228701f472: Dynamic test case error: Unknown coding method requested to encode type '@S1AP-IEs.Global-ENB-ID'
TC_RIM_RAN_INF0(34)@79228701f472: setverdict(error): none -> error
TC_RIM_RAN_INF0(34)@79228701f472: Final verdict of PTC: error

Encoding/decoding IEs (not complete PDUs) is not supported by libfftranscode.  This will only work with built-in TITAN's PER codec available in recent releases.

Change-Id: I4d73bca4ca1fded487d80e535d3050661b83dcea
laforge at
deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg

This will allow us using IPv6 in IPmsg_PT until [1] is mergedi upstream.

[1] https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SIPmsg/-/merge_requests/4

Related: SYS#6982
Change-Id: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f
Pau Espin Pedrol at
asterisk: Split test code into helper functions

This allows reusing code to create new tests coming up soon, like
sending HOLD (re-INVITE sendonly) after having estavlished the call.

Related: SYS#6782
Change-Id: Ic9c712f4cd688729bece225c0d19219dc53e14b3
Pau Espin Pedrol at
asterisk: Unregister SIP UAs whose MT call gets cancelled

Otherwise they are kept registered in Asterisk and that makes Asterisk
try to page them on subsequent MT calls to extension 500, making
test expectancies fail.

Change-Id: If76c7ac3bb6bb85643a8b83800954d5025593d25
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mo_holdresume_mo

Related: SYS#7002
Change-Id: Ifffa1c4021f324871f11a60264c17b640569e18b
Pau Espin Pedrol at
asterisk: Increase timeout waiting for AMI event FullyBooted

Change-Id: Ibd2bbdc4b916b5baca01407bac3cc5e9a99500e3
Pau Espin Pedrol at
asterisk: Fix accessing to unset called_contact var in MT call without precondition

Change-Id: I7e7a6010c3b217c163945027d5c341bcb820c251
Pau Espin Pedrol at
SGP32Definitions_Templates: populate certificates correctly

The members eumCertificate and euiccCertificate are propulated with the wrong
sample certificates.

Related: SYS#6563
Change-Id: Id61c2261f931cacc543c76eea359bdcf22f36a4b
pmaier@sysmocom.de at
SGP32Definitions_Templates: add template for IpaEuiccDataResponse

Related: SYS#6824
Change-Id: I93125dfedb2c1742efdc98e5f1f4d07ed5ed715c
pmaier@sysmocom.de at
IPAd_Tests: move static test configuration to IPAd_Tests.default

In IPAd_Tests.cfg we find some configuration parameters that never
change. Those can be moved to IPAd_Tests.default.

Change-Id: I14d6c7b617ed4c95a24e2ce96bf0d86c24288324
Related: SYS#6563
pmaier@sysmocom.de at
IPAd_Tests: rework verification of ESipa responses from IPAd

The verification of the ESipa requests is done separately in each test case
after calling f_esipa_transceive or f_esipa_receive. Let's do the verification
directly in those functions.

Related: SYS#6563
Change-Id: I0150fe5c98d5a5db9f1931c72ef6e015f74055bd
pmaier@sysmocom.de at
eIM_Tests: add testsuite for an eIM

This patch adds a testsuite for an eIM server component. It simulates
the SM-DP+ server backend and the IPAd client while it operates the
REST API of the eIM server.

Change-Id: Iba72ee00d10aba7831feedadacd943bf943de53e
Related: SYS#6824
pmaier@sysmocom.de at
eIM_Tests: Use real notificationAddress in ProfileINstallationResultData

The ProfileInstallationResultData currently contains a dummy
address as notificationAddress. This means that the eIM may try to send
the ProfileInstallationResultData to that dummy address instead to the
testsuite. To prevent this, let's use the actual address as
notificationAddress

Related: SYS#6824
Change-Id: I337ef32a424875ca9d9be178ae96f1a76383dd38
pmaier@sysmocom.de at
RSPDefinitions_Templates: add variants of ts_retrieveNotificationsListResponse

There is currently only ts_retrieveNotificationsListResponse, which has a
profileInstallationResult in its notificationList. However, we will need
different variants of this template, so let's give it an appropriate prefix.
Let's also add a first variant that has just an empty notificationList

Change-Id: I1802b63a51bf68080b3ef81a967a964d961a1b96
Related: SYS#6563
pmaier@sysmocom.de at
IPAd_Tests: expect the IPAd to request a notifications list on init

The IPAd now requests a list of pending notifications before it fetches
the a new eIM package.

Related: SYS#6563
Change-Id: I2cd7fdfde24404bc8cb1af258923cd86627db68a
pmaier@sysmocom.de at
asterisk: TC_ims_call_mo_2nd_mo_rejected

Related: SYS#7003
Change-Id: I7764e29e8df11ad65366642f83ebe922488bf128
Pau Espin Pedrol at
asterisk: Move Via generation to helper function

Change-Id: Id49222928980e1fc5ab006719688b4fa0849d391
Pau Espin Pedrol at
asterisk: IMS: MT call: Move Tx INVITE to helper function

This helper function will be used by another function expecting an
INVITE reject in a follow-up patch.

Change-Id: If9657e88304fd7b3558737fdc807bae59cddc8a2
Pau Espin Pedrol at
ttcn3-asterisk: Introduce test TC_ims_call_mo_2nd_mt_rejected

Change-Id: Id6577d0e9137c86855469904d347e95b5bcfa4a7
Pau Espin Pedrol at
asterisk: MO internal call: Expect direct rtp re-INVITE

Change-Id: I4ac602865cf0c18036b411acff4562322b32933b
Pau Espin Pedrol at
asterisk: sip: Fail rx unexpected msg during unregister

Change-Id: Ibcf65b22925e990e4d13661204eaba1b471b6a5d
Pau Espin Pedrol at
asterisk: TC_internal_call_all_Nregistered: Answer Cancel when received

Otherwise CANCEL is not answered until the MO+MT SIP UAs have fully
established the call, which causes Asterisk to retransmit the CANCEL
several times.

Change-Id: I72e9ecaf58156f3fe62c4fb2d8c74c82ab16aa78
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mt_no_local_uas_registered

Change-Id: Ibf7ecfe67f90df060b0ae87f394424566ad0fed4
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mt_local_uas_inacall

Change-Id: I8a407993f37d18a0bf4c96f5228c0b5ce696053a
Pau Espin Pedrol at
Fix BTS_Tests_ASCI.TC_vbs_notification, add missing SI1

Because System Information Type 1 was missing, the BTS could not assign
time slots to NCH. Without NCH, notification is not possible.

Related: OS#6467
Change-Id: I65dc55da78bc53a1265124e6b6f6bb9a1650206e
jolly at
asterisk: Introduce test TC_ims_call_mo_holdswitchresume_mo

Related: SYS#7003
Change-Id: I80ec326524501a2f0784291250e3d5fad6b04378
Pau Espin Pedrol at
sgsn: Move BSSGP_ConnHdlr code to its own file

This was we split generic code from test specific code, making it easier
to focus on new test and finding generic functions which can be reused.
This is similar to what we already use in tons of other testsuites.

Related: SYS#5435
Change-Id: I0591cab8cca5195b8648920d5f79acc536a4efac
Pau Espin Pedrol at
sgsn: expected-results.xml: Add missing TC_sgsn_context_req_{in,out}

Change-Id: I2579958bbf8c28b72e58174e60634ca77c71dfee
Pau Espin Pedrol at
asterisk: IMS: enable EVS-only codec on IMS side

Related: SYS#7012
Change-Id: I1d1542f23ef7c6b2cd18afd90a169633d0d73a3f
Pau Espin Pedrol at
sgsn: Fix regression t_guard not passed

I forgot to pass this param when moving some code, and some tests which
set a higher guard time then where failing.

Fixes: 0737428fa71b7d9bb849a9a000b3e1a7bcdce2ca
Change-Id: I83cfd0d2fd148c8874b6e176af7273df7cb69174
Pau Espin Pedrol at
msc: Use RAB_ID obtained from RAB-AssReq

The helper function will be used too by follow-up patches.

Change-Id: If532c41304803d223591ce8e0c10dda4a562dfb8
Pau Espin Pedrol at
msc: Use template ts_RAB_SMdL

Change-Id: I768aad762c4fa6c0d3a6d0effd7a7a1aabb3488f
Pau Espin Pedrol at
library/GTP_Emulation: Check IMSI presence before returning if Conditional or Optional

Change-Id: I73c683e62191a06212933391d424d608a14f8c1e
Pau Espin Pedrol at
library/GTPv1C_Templates: Introduce template ts_GTPC_UpdatePdpRespGGSN

Will be used by SGSN_Tests in a follow-up patch.

Change-Id: I91afc14eecfadb3e00ccb9b74794079a82ef884b
Pau Espin Pedrol at
library/L3_Templates: Introduce templates for GMM Service Req/Acc/Rej

Those will be used by a follow-up patch in SGSN_Tests.

Change-Id: Ia948a27e39cf11f1421396d15da32bd82ea9513c
Pau Espin Pedrol at
library/L3_Templates: Fix discriminator field in ts_GMM_DET_ACCEPT_MO

It says it's overwritten, so in practice it may not be important, but
it's confusing for readers when figuring out which values are expected,
eg when adding a new tr_ template which needs that field set right (not
overwritten there).

Change-Id: If9741953f98b7dd29749d335a5bd937fdfb62bc6
Pau Espin Pedrol at
deps: Update titan.ProtocolEmulations.M3UA to current master

This contains a recently merged DTE fix showing up sometimes during
development in SGSN_Tests.

Change-Id: I4037fdd6ada765b2e041426393fcc506dd7885ff
Pau Espin Pedrol at
library/GTP_Emulation: Make GTPv1C port optional

The port is not needed when emulating HNBGW, since the setup of GTPv1U
happens through RAB-ASsReq/resp.

Change-Id: I3ffb54d0cb8b3a81ed5235feaaac6d989baf6e0d
Pau Espin Pedrol at
sgsn: Rename vc_GTP -> vc_GGSN_GTP

GTPv1U will also be used by emulated HNBGWs, hence we want to
differentiate them in name.

Change-Id: I663e667956935372809c1c42ebe8d4312d6a4d41
Pau Espin Pedrol at
GTP_ConnHdlr: Allow connection to multiple GTP_Emulation

This feature will be used by SGSN_Tests' BSSGP_ConnHdlr, which in 3G
scenario needs to connect to GTP at both GGSN and HNBGW/RNC endpoints.

Change-Id: I6fc49428967ebcf0f6c8a9f9f20f4a98a81f3273
Pau Espin Pedrol at
sgsn: Set up GTPv1U in emulated RNCs

Change-Id: Icf5fa28ea08cfd255b49b546eadd74e91a9c7ecf
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_pdp_act_user

Related: SYS#5435
Change-Id: I5f0cb51457395d95bde22732b032786211cb7b61
Pau Espin Pedrol at
sgsn: Validate Direct Tunnel Flags DTI=1 is set during UpdatePDPContextReq

Related: SYS#5435
Change-Id: Iadd30318d02fbc304f65840f2299e5ec8b5b08e9
Pau Espin Pedrol at
ggsn: Fix function name

The function is used to handle a UpdatePDPCtxResp, not a Req.
While at it, mark the function as private.

Change-Id: Ia455af1cd64ffce53b454e611c4fc85816e785bc
Pau Espin Pedrol at
hnbgw: remove <= 1.5.x code paths

Change-Id: Ie1336a7372a46439cf53e38a555f36d0201fa230
Oliver Smith at
msc: remove <= 1.11.x code path

Change-Id: I865f53ca0e6dd90401f8cabe5c60ad812d91e5bb
Oliver Smith at
stp: remove <= 1.8.x code paths

Change-Id: I31a1516215237984c029c02dfa30aa223c3d06a3
Oliver Smith at
sgsn: Introduce test TC_attach_pdp_act_pmm_idle

Change-Id: Id46ccd9db11c8b792e1c071de91ef092ed1544c7
Pau Espin Pedrol at
Improve use of enumareted type GTP_Clause

Change-Id: Ib071fa97a354cb27263cd46dba8f468b4ddc0018
Pau Espin Pedrol at
GTP1C_Templates,Osmocom_Gb_types: Use/move conversion functions at Osmocom_Types

Change-Id: I29948bfcb2b344d5aca293fa60455fcc6de66c72
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_status

Related: SYS#5435
Change-Id: I34a0dabc37ba24d0c9fb1ae2587e7ec8c1b606fa
Pau Espin Pedrol at
library/GTPv1U_Templates: Mark parameters as templates

Change-Id: I278f7dbc64704c1ba2b8a75d6f540ac52b067598
Pau Espin Pedrol at
sgsn: Introduce test TC_pmm_idle_rx_mt_data

Change-Id: I35d660b8e546f6ce0af8c05d7b5c56833a26fb76
Pau Espin Pedrol at
sgsn: Introduce test TC_update_ctx_err_ind_from_ggsn

Related: OS#6512
Related: SYS#5435
Change-Id: Ic417b23cae798361f73150f6a72f91e2f8528e7a
Pau Espin Pedrol at
pcu: Introduce test TC_x2001_pacch_pkt_dl_ass_unanswered_timeout

Related: OS#3928
Change-Id: I08921132de863404485581dfa439a54f109b0078
Pau Espin Pedrol at
testenv: seccomp_profile: import

Import the current default seccomp profile from podman:
https://raw.githubusercontent.com/containers/common/ae4a61e1b2e0af84a668f87f7622d86ebc418cba/pkg/seccomp/seccomp.json

The next patch will adjust it to enable io_uring. Both patches are in
preparation for the new testenv script, which will optionally use podman
to run the testsuites. The seccomp profile will allow using io_uring
inside podman.

Related: OS#6494
Change-Id: Id52e63b7ab4150def084aa0b02efbf731f4224d8
Oliver Smith at
testenv: seccomp profile: enable io_uring

Revert 399bd5 ("seccomp: let io_uring_* fail with ENOSYS") from
upstream: https://github.com/containers/common/commit/399bd59e0d0d3e3845d59a7fe197d08371b061b0

Related: OS#6494
Change-Id: If9fdc3bfe0f6541776eb9c1839d892777394e999
Oliver Smith at
testenv: add test environment script

Add a new testenv.py script that builds/installs all components needed
for a testsuite, builds the testsuite from source and runs it.

Features:
* --binary-repo argument to install packages from osmocom:latest or any
  other repository from the Osmocom OBS instead of building from source
* without --binary-repo, the test components are built with osmo-dev,
  cloning the missing source git repositories and building them in the
  right order
* --podman argument to run the testsuite and its components inside a
  container (using podman instead of docker so it runs rootless)
* Simple testenv.cfg file to specify components for running testsuites
* Iterative compilation of components and testsuite
* Using ccache
* Testsuite doesn't start if any of the components fail to start (e.g.
  because of a config error)
* Testsuite gets stopped if any of the components crash
* ^C stops the testsuite + all components
* Test component output logs to stdout in addition to a log file (turn
  off with --no-tee)
* --test argument to only run one specific test
* --shell argument to run an interactive shell before teardown to
  inspect the test environment while components are still running

This script unifies the use cases of running a testsuite without
containers (for local development), and with containers (as jenkins
runs it, but can also be used for local development e.g. to get a clean
pcap). Previously jenkins used a different set of configurations from
docker-playground.git and many different containers instead of just one.

Related: OS#6494
Change-Id: If9f8b79dd6e5b4f06be4e5ff73db97759c3acfb2
Oliver Smith at
hlr: initial testenv.cfg

Change-Id: If937f021a33bf81b4e7296c2efdbd13a73cdaca9
Oliver Smith at
mgw: initial testenv.cfg

Change-Id: Ifad2a6e25816c2dd7d27206751597b486acdd096
Oliver Smith at
sip: initial testenv.cfg

Change-Id: I2b6df9240d8cb56c363c8c1a175946af183497da
Oliver Smith at
sgsn/SGSN_Tests_SNS.cfg: run only SGSN_Tests_NS

In order to get the same output as ttcn3-sgsn-test-sns using the configs
from docker-playground, do not enable the SGSN_Tests and SGSN_Tests_Iu
in the SNS config.

Related: docker-playground I767ec223585002d6420eda27ed338722f764c902
Change-Id: I9b5b953406cd4de2b18854b3f33420610267d5fd
Oliver Smith at
sgsn: initial testenv.cfg

Change-Id: Ib72dcfba64252990b5cabf9752df86d76c8ae318
Oliver Smith at
upf: initial testenv.cfg

Change-Id: I287075221b4e001a6532056d894a79eb06934070
Oliver Smith at
hnodeb: default configs: fix conflict

Use IPs similar to the configurations in docker-playground, so when
using these configs the tests don't fail with:

GTP_Emulation.ttcn:185 Dynamic test case error: Using the value of an optional field containing omit. (Address already in use)

Change-Id: Ie99708be1164e48e2acceb9cafdb9ca6308490bb
Oliver Smith at
hnodeb: more verbose error for f_tc_cs_mo_call

Print the received IP and expected IP, so we directly see it without
finding it in the big log file.

Change-Id: I1c061aeae9d6b1645683ea758bf8169feec47bc7
Oliver Smith at
hnodeb: initial testenv.cfg

Change-Id: I13422e5cef3013992949029f847c90043ab4a4fc
Oliver Smith at
dia2gsup: initial testenv.cfg

Change-Id: I1f3f7235134a5acb4436fd4745fa5304ad51bc56
Oliver Smith at
smlc: import current configs from docker-playground

Import the current configs, replacing the IPs used with 127.0.0.x.

Before this patch, attempting to run the testsuite without containers
fails because of the wrong IP range:
20240718122103706 DLGLOBAL NOTICE unable to bind socket: (172.18.23.20|fd02:db8:23::20):2905: Cannot assign requested address (socket.c:1042)

Change-Id: I3ed9e971daf32458bc554fa0a7f4698b4a461bfa
Oliver Smith at
smlc: initial testenv.cfg

Change-Id: Ib6db49f149e9382b802fceb40b307c5a286f92a1
Oliver Smith at
cbc: initial testenv.cfg

Change-Id: I8578bf7a2e627c93cc7480534cc2ddbba3ad6ff1
Oliver Smith at
hss: initial testenv.cfg

Change-Id: I8a095f51f1a9516967d5188587537a2f90927f6c
Oliver Smith at
mme: initial testenv.cfg

Change-Id: I780584cc7722d92baa213049ee0a35e16a0e087c
Oliver Smith at
ttcn3-(tcp)dump(pcap)-stop.sh: store multiple runs of same test into different pcap file

This is useful when testing the behavior of a SUT when the same scenario
is run twice, for instance to debug a crash in the SUT.
In this setup, it is definetly interesting to have stored pcaps of the
several times the scenario is run.

Change-Id: Ib68fc4df1f5a105b4b2c904d2d2003c621a2ad31
laforge at
testenv/podman: use explicit no_podman=True

Add an explicit no_podman=True to the commands that are meant to run
outside of the podman container. Previously it was implicit by relying
on logic in testenv.cmd.run, which would run the commands outside of
podman unless the podman container was running.

In the next patch I will remove the implicit logic, because it could
lead to the bug of running commands outside of the container by accident
if the container crashed.

Related: OS#6494
Change-Id: I41afe6d6b565a8e8c384229ee44f1b75f25c0a4b
Oliver Smith at
testenv: podman.is_running() -> testenv.args.podman

Use testenv.args.podman instead of testenv.podman.is_running() in all
places except for testenv.podman.stop().

- testenv.args.podman is always True when --podman is used.

- testenv.podman.is_running() is only True while the container is
  currently running.

Most of the time the behavior is the same. But without this patch, when
the container crashes, commands would unexpectedly run outside of the
container (and then fail on jenkins due to missing programs).

Related: OS#6494
Change-Id: Iea634f5e97d14f1f7e777f4609b9593974964d23
Oliver Smith at
testenv/testdir: fix typo

Change-Id: Id61b770ff3b6fdee0dedcdab6eca3760dddc287a
Oliver Smith at
SGSN_Tests: add paging a whole routing area with multiple cells

1. Attach + PDP Request
2. Wait for UE to be in Standby
3. Transmit to GTP Userdata
4. See the Paging on 2 BVCIs within the Routing Area

Change-Id: I88dc95669d57278a96e05ec84f934ebf70b319e5
lynxis at
SGSN_Tests: remove unused variable d

Change-Id: I611e4444dfc9443584397e5523e7612ee5b00af4
lynxis at
SGSN_Tests_NS: NS related tests: use the shutdown helper

Currently the test case TC_SNS_config_sgsn() is failing because of a
dynamic test error after succeeding. Use the Misc_Helpers.f_shutdown()
to prevent this.

Change-Id: I08eee0d11ae04276ca1ad8fd58ebb93dd6d0066f
lynxis at
SGSN_Tests_NS: TC_NS_connect_alive: set missing verdict

Change-Id: I03574bc17a10d9098dcd25d73007ec5525c42c18
lynxis at
ggsn: Split test and relax expectations testing gtpu access over ipv6 ll-addr

Testing gtpu traffic to some potentially external IP address using the
link-local address has no clear usecase and it also depends on the
network setup and the implementation of the GGSN.
Hence, remove it from the regular test and move it to another test which
has a relaxed validation accepting different resolutions.
This allows knowing/testing the code path in the GGSN, while accepting
different outcomes.

Related: OS#6382
Change-Id: Icfae181ba1bb0dfb8a1a15dfe3a1d542ce69d88a
Pau Espin Pedrol at
sgsn: Fix running with testenv.py podman setup

The initial testenv.py setup introduced in osmo-ttcn3-hacks.git
6baec93cb85fa8a0051e9aacd0178e90adbfdadc lacked some recent updates to
the ttcn3 testsuite setup where a second IP address is added to the
container in order to distinguish between RNC and CN in GTPU.

Change-Id: Ia0af52f8b7d61c15bdf2b6152fae27dd003d00e8
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_rau_a_b_wrong_old_ra

This test reproduces a crash in osmo-sgsn, and fixed in
osmo-sgsn.git Change-Id I5a4328c6e945b85dd815215724feecadba59c435.

Related: OS#6441
Change-Id: I3ce02f30a1e5becb80ab2a29f6bf5d08dd45b79c
Pau Espin Pedrol at
deps/Makefile: Use upstream titan.TestPorts.SIPmsg

The patch we used from the sysmocom fork is now meged in upstream (same
git commit hash), hence we can jump back to upstream.

Related: SYS#6982
Change-Id: I8ca1252fd8710f50d8da5fb4fc105d29d9a506af
Pau Espin Pedrol at
testenv: set args.podman = False if action != "run"

Fix "./testenv.py clean":

    File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/_testenv/testenv/cmd.py", line 85, in run
      if not no_podman and testenv.args.podman:
                           ^^^^^^^^^^^^^^^^^^^
  AttributeError: 'Namespace' object has no attribute 'podman'

Change-Id: I44d5229aa481bfed13c006368d590e1486536c0e
Oliver Smith at
testenv: cmd: pass all env vars without --podman

As suggested by Pau, pass all environment variables to through testenv
if it is running without podman. This way a custom TTCN3_DIR,
TTCN3_BIN_DIR and more variables that may make sense when running
directly on the host, work as expected.

Closes: OS#6544
Change-Id: I5e710a1ee7185a3f6f4f1e98f201f3f6fda2be55
Oliver Smith at
S1AP_Emulation: Fix new_ctx never set when building security header

The flag was never set to true. It needs to be set to true when building
the security head of Security Mode Complete after receiving Security
Mode Command with a new EPS security context.
TS 24.301 5.4.3.3

Change-Id: I76ad46f7ee5f49698e41da729cb6422866202951
Pau Espin Pedrol at
S1AP_Emulation: Fix building security headers for Integrity and Ciphering

The fact that the network instructs the UE to use EEA0 encryption (null
algo) doesn't mean the UE should mark the NAS frames in the security
header as non-ciphered. They need to be marked as IP+ciphered in the
outer header, and as plain in the inner one.

Now TTCN3 behaves like a UE recorded while executing a similar test
case. Moreover, wireshark is now happy decoding the messages.

Change-Id: Ifd4fe83e7b5aefdaafe7ce1c8b1ec6a67c65819c
Pau Espin Pedrol at
testenv/README: update

Point at ./testenv.py -h and describe that everything runs in 1
container with --podman.

Change-Id: Ie9eee8cf14ba2069c1cd5bd6ab703f3f6ccdc100
Oliver Smith at
testenv: add TESTENV_REBUILD_OUTDATED_IMAGE

Add an environment variable that allows rebuilding the podman image
whenever it appears to be outdated. This is useful when working on the
Dockerfile. As requested by Pau.

Change-Id: Ia1243320b6d310c69ef9291cca69a1594b1a8a70
Oliver Smith at
testenv: fix duplicate 2>&1

The pipe variable already has 2>&1, therefore we don't need to add it in
cmd.

Change-Id: Ifeae4c53b57f90242041e61ca5ab7073d155d7a8
Oliver Smith at
mme: expect authentication during 2g->4G TAU procedure

If TAU happens without an existing security context, network for sure wants
to authenticate the UE. This is the scenario being tested here.

If there was a security context (eg. from a previous 4G Attach), then
it's up to the network to decide (or be capable) to implicitly
authenticate the UE.

Change-Id: I5ebcaf23a643b6cb97534328737257d26d3981fe
Pau Espin Pedrol at
s1gw: Split ConnHdlr to its own file

This allows easily separating general routines from test specific code.

Change-Id: I9f8d9afbccd59f3e22649b35d2a7ef75578d051a
Pau Espin Pedrol at
s1gw: Add mp_enb_bind_ip module parameter

This allows more easily understanding pcap traces by looking at the
config file to identify the ip addresses.

Change-Id: I294b14e6ef119c17eec22f813d5755279560e0bc
Pau Espin Pedrol at
s1gw: initial testenv.cfg

This commit already provides a running setup to run the testsuite,
similar to the one already available in docker-playground.git.

Change-Id: Ib66c3f23355c117302b48fc9ef05cde1920d8739
Pau Espin Pedrol at
s1gw: Wait for component to stop before testing IUT for conn refused

Change-Id: I9dcac498766dd4a597cc5827bdb9192e861356c6
Pau Espin Pedrol at
s1gw: Immediate stop all components upon ConnHdlr failure

Otherwise it's difficult to see/find in logs stuff like timeouts waiting
for messages, etc.

Change-Id: I8b3b7e9cd61a8ad0d167f20a41c61eac3f245d70
Pau Espin Pedrol at
s1gw: Increase failure timeouts to ease debugging

Let the IUT do some stuff before quickly exiting.
In fact, the previous timeouts were a bit tight anyway since several
messages may be required before an answer comes back on the same
interface.

Change-Id: I985511c1a56edb0663826a20bbf27ea34a6c4dcd
Pau Espin Pedrol at
s1gw: Fix direction of e-RAB Setup

Change-Id: Idfc3bc0a53d5f966a889b997c3d5a4928297236f
Pau Espin Pedrol at
mme: Fix order in eutran_to_geran testcase

The diagram shows that the S1-AP release should happen after the Delete
Session Request/Response (even though all a numbered 13).

The test started failing because a newer open5gs would check/require a
resource that was freed due to an S1 release.

Change-Id: I0d7a388dc8b1a1c13de8f7e3fe7781423fc90868
daniel at
s1gw: Validate S1SetupResp is forwarded fine MME->ENB

Change-Id: I6d9b060eb81269c7cb76e007f669c5b9ead97158
Pau Espin Pedrol at
s1gw: Increase S1AP setup timeout

The existing timer is too tight, specially when running tons of
components concurrently.

Change-Id: I99d554bf0dd0f4c1dbd801663c1801f3725df09f
Pau Espin Pedrol at
s1gw: Make components alive

This helps avoiding getting errors during test tear down.

TC_conn_term_mme_unavail needs to be modified since the port is kept
alive after it is stopped, so test needs to be adapted.

Change-Id: I538e31bf14836f81a6e3c0b844f9f70f1eaccb59
Pau Espin Pedrol at
s1gw: Add initial PFCP support emulating UPF

Change-Id: If2b135e113d2568092e90ac9b6c5f651ab30f5d0
Pau Espin Pedrol at
s1gw: Rename functions to include s1ap information

Change-Id: Ic4b06712f3222bada71ff5ca8a6c65ec9c92ae1e
Pau Espin Pedrol at
testenv: fix testsuite.run() not passing env variables

Running start-testsuite.sh in a clean env fails on systems with non-
standard TTCN3_BIN_DIR and TITAN_LIBRARY_PATH paths.  This is the
case for Arch Linux and the eclipse-titan AUR package.  Let's call
cmd.generate_env() to allow overriding these variables.

Change-Id: I95c3cfe41ee230927bb5777631372597cbd3c051
Vadim Yanitskiy at
s1gw: rename module ConnHdlr -> S1GW_ConnHdlr

This fixes the following warning:

  ConnHdlr.ttcn:39.1-43.1: warning: Definition with name `ConnHdlr'
                                    hides a module identifier

Change-Id: I47364a35720059d6a51f004a5692b9a0c1ad98d8
Vadim Yanitskiy at
s1gw: cosmetic: reorder module parameters

Change-Id: I6ee5d2e283327f52320ef5580b195c42e400c8de
Vadim Yanitskiy at
s1gw: S1GW_Tests.cfg: add PFCP related module params

Change-Id: Id134f2fd0e2e138ee6cb7a8f8a3e2af7f027bda4
Vadim Yanitskiy at
s1gw: osmo-s1gw.config: fix pfcp_{loc,rem}_addr comments

Change-Id: I4b5b18750de48b5db1a23a95a427ba1fd3d3905d
Vadim Yanitskiy at
s1gw: osmo-s1gw.config: enable colors in logging

Change-Id: I49fa2ca9d7aea5a2728d07f176b80a6438551047
Vadim Yanitskiy at
PFCP: rework templates, get rid of functions

This patch fixes dozens of compilation warnings, turning functions
returning templates into templates inheriting from {tr,ts}_PDU_PFCP_.

Change-Id: I04735adf88c81b949e1dca6e9ab9a3b37ba78bd6
Related: SYS#6772
Vadim Yanitskiy at
PFCP: fix SEID value in {ts,tr}_PFCP_Session_Est_Req

According to 3GPP TS 29.244, section 7.2.2.4.2 "Conditions for Sending
SEID=0 in PFCP Header": if a peer's SEID is not available, the SEID
field shall still be present in the header and its value shall be set
to "0" in the following messages:

* PFCP Session Establishment Request message on Sxa/Sxb/Sxc/N4;
...

Change-Id: Iacfbd68336b6fc4481c15ca5b304636df4491da4
Related: SYS#6772
Vadim Yanitskiy at
PFCP: drop no longer needed {ts,tr}_PDU_PFCP

Change-Id: I6091d7e76e852d2487b784fb2b3e39b416a48195
Related: SYS#6772
Vadim Yanitskiy at
PFCP: add Heartbeat Req/Resp templates

Change-Id: I569b47b6ebc3ca238da544488cac69dfc1db1dfe
Related: SYS#6772
Vadim Yanitskiy at
PFCP_Emulation: respond to incoming Heartbeat Req

This is a mandatory procedure that every 3GPP TS 29.244 compliant
peer shall support.

Change-Id: I93990feb1864701e2903af85480093ef751bafe5
Related: SYS#6772
Vadim Yanitskiy at
testenv: Fix testsuite.run() passing too many envvars to podman

A recent commit added some code in testenv to pass all environment to the
testsuite being run. However, we don't want that happening when running
the testsuite under podman, since then we'd be polluting the env inside
the container with the env from the host running the container.

This fixes running testenv with podman from an Archlinux host having
some TTCN_* extra variables used by testsuite scripts to find ttcn3
binaries & libs under /opt/eclipse-titan/.

Fixes: 95231624f12c299019c0d6064b5d4d3004dad093
Change-Id: Ia8fca37b878323cd188035004b587c124598376e
Pau Espin Pedrol at
Update key for Osmocom OBS

The current key has expried, update it to the new one which is valid
until 2026-10-16.

Related: https://osmocom.org/news/268
Source: https://obs.osmocom.org/projects/osmocom/public_key
Change-Id: I732b379b8ac70f5e2139520a07183060a9c1a7f0
Oliver Smith at