Commit
ebc2bb5f6cc6ca4b3bdc8b94c1a83dde1d1d3a8d
by Pau Espin Pedrol
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.
Commit
91aa542a7a3de381b4d0fb8c2f8a598f90794192
by Oliver Smith
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.
Commit
aa2211b45b8c03a77251865f6828e0fee1fe3362
by Pau Espin Pedrol
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.
Commit
131d5d0cee16b804f7034be1f5d8a2df48c22f3c
by lynxis
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.
Commit
cde4976148021b792453e631fe8f1585c58f40f5
by lynxis
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)
Commit
40c73568c77ee3747a02fce2cf031d723a938207
by Pau Espin Pedrol
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.
Commit
c3264dec64062359ce0ddc867d9c8ec0f634ba71
by Pau Espin Pedrol
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.
Commit
f2d7775d961b392188bda1ec00fd3f651937cb26
by Oliver Smith
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.
Commit
c3657172d306df5804d3142189a69ebb7a6a77f5
by Oliver Smith
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.
Commit
ae5164897d190d9dcf4bde757b6a7475ca52a890
by Pau Espin Pedrol
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.
Commit
a448af0d7f27967c54d21236eea05f7d323af654
by Pau Espin Pedrol
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._
Commit
49c118fe88d74e29c0734f3cca7a797dda4aacf4
by Pau Espin Pedrol
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.
Commit
3c8f2862a33c36f5d8791ac31232e0a6afd2e934
by Pau Espin Pedrol
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.
Commit
88d6666056d6cdc899d6c102fc379f8a469a725e
by Pau Espin Pedrol
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.
Commit
21a9dc3d6d1f1ad68a3645a810909280b28cea1a
by Pau Espin Pedrol
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.
Commit
4e5e6c88e642ad20663b2274696041c75577a0e7
by Pau Espin Pedrol
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.
Commit
edd0bee2234cd1dd60309ba1f32506b86d47d8f7
by Pau Espin Pedrol
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.
Commit
216e62c0df5890128a47f47d8b76cd749dc2d8b4
by Pau Espin Pedrol
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 """
Commit
d365b6a5e9a1a679146b195ff4870903cba2b527
by Pau Espin Pedrol
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.
Commit
3916f477b3edb7071670f909ec087a7e5b2ec514
by Pau Espin Pedrol
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.
Commit
780d496e07528c99a2b90ccf691a021c50311bba
by Pau Espin Pedrol
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.
Commit
50e6218e0f70a9bb1501d54a933c0cef5873dee8
by lynxis
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.
Commit
f66a846f9f5a41bd8ca3882020a2b18db9eb4ab7
by Oliver Smith
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
Commit
73e81344c8f7d470fc2fae626b79df20df26acbc
by Oliver Smith
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.
Commit
6d3463acdc67d34f5a9477592d7881b1bb9f94c6
by Pau Espin Pedrol
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.
Commit
c7336be632c79144499c3d31bdedd703ccb212f0
by Oliver Smith
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.
Commit
1926de1cf1da5b4f968a37636cbe8fe820419409
by Pau Espin Pedrol
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.
Commit
2cee8714b800f598f008908edfb13571ddab53e2
by Pau Espin Pedrol
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.
Commit
a1d418c2e395f0d05555849c12cf6666986aa18b
by Pau Espin Pedrol
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.
Commit
e57f19566233114807e08202f5e391b0aacad5af
by Pau Espin Pedrol
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
Commit
54be980dbf7119069682b27cfc4d79874764e412
by Oliver Smith
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.
Commit
4490d45fc46278c854d788375235436c45b9b19c
by Oliver Smith
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.
Commit
2d2840eb9cf4c6ac75734d0d79844ad83cd38588
by Pau Espin Pedrol
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).
Commit
f6570fe2d243551aaf25740ce9dcf5f5f5e55011
by Pau Espin Pedrol
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).
Commit
2640ca1e9df9ceee417ad3788c37ed39239de82b
by Pau Espin Pedrol
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.
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.
Commit
34d9429b2bd5836ddcd35f60ed0a3000e38438ae
by Oliver Smith
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.
Commit
277645455fc1e9cfc73b302e79b01305d40bdd87
by Vadim Yanitskiy
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.
Commit
fce7affe62355633b0ecf40ce79b0224d9d3cea7
by Vadim Yanitskiy
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.
Commit
3e18a7d180d3d18903ae3332f19916321bef3693
by Pau Espin Pedrol
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().
Commit
20223ae6360d71a3357ab345721bb14469ffe52d
by Oliver Smith
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.
Commit
ff1be69d165eab54efc852029e0315d5697a1342
by Oliver Smith
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.
Commit
5897e046456c48b1d7cd54b4b9bbb51ddb0eb3b6
by Oliver Smith
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