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