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 """
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.
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.
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".
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.
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.
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.
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.
% 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
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.
These tests allows testing behavior of scenarios related to dynamic ASP/AS/RKM improved/fixed in libosmo-sigtran.git Change-Ids: I986044944282cea9a13ed59424f2220fee6fe567 I85948ab98623a8a53521eb2d2e84244011b39a93 I3dffa2e9c554f03c7c721b757ff33a89961665b5
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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")
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.
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.
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.
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.
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).
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.
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.
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.
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'
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.
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.
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).
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.
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.
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.
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
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.
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:
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:
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.
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.
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.
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).
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.
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.
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.
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.
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.
* 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.
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).
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 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
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.).
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.
Pau ran into an unexpected bug while having entries in copy= separated by multiple spaces ("copy=osmo-stp.cfg osmo-stp-m3ua.confmerge"):
[testenv][m3ua] + ['cp', '-a', 'osmo-stp.cfg', '', 'osmo-stp-m3ua.confmerge', '/tmp/testenv-stp-m3ua-20250516-1349-e4103924-bfvi_syt/stp'] cp: cannot stat '': No such file or directory
Catch this early and print a more useful error:
[testenv] /home/user/code/osmo-dev/src/osmo-ttcn3-hacks/stp/testenv.cfg: copy= in section [stp] has multiple spaces: [testenv] "osmo-stp.cfg osmo-stp-m3ua.confmerge" [testenv] Please separate elements with only one space.
The previous name usually causes confusion since it seems to indicate either: * Some sort of common placeholder for STP_Tests_IPA and STP_Tests_M3UA (it's not the case, we already have STP_Tests_Common.ttcn for that) * A placeholder for tests not IPA or M3UA related (it's not the case, since it only contains IPA<->M3UA tests).
Hence, rename it to denote better the aim of that file, ie. testing forwarding between IPA and M3UA AS(P)s.
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.
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.
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.
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.
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.
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.) """
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.
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.
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.
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.
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.
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.
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.
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).
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.