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.
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.
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.
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.
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
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
Commit
8e7ca9358c59532025cfb3ffc8900005c6610676
by Pau Espin Pedrol
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.
Commit
0737428fa71b7d9bb849a9a000b3e1a7bcdce2ca
by Pau Espin Pedrol
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.
Commit
e77e00e642003b6978cba362d917b8fca28736b5
by Pau Espin Pedrol
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).
Commit
2f5e76013a32f2a203c2b0075465b743c09234b7
by Oliver Smith
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.
Commit
59f2cc1dd23e4996ae988a788dcf347a8ace7791
by Oliver Smith
testenv: seccomp profile: enable io_uring
Revert 399bd5 ("seccomp: let io_uring_* fail with ENOSYS") from upstream: https://github.com/containers/common/commit/399bd59e0d0d3e3845d59a7fe197d08371b061b0
Commit
6cc780e5dc273531d0c336dd21329c9e1393f4e1
by Oliver Smith
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.
Commit
3caeb5b352cf2ce2ee0f83115c7cf98ac3bca1e8
by Oliver Smith
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.
Commit
00cb43161731d4be786357b7971457a3bbd04292
by Oliver Smith
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)
Commit
b82c0e163dc111b5b972246b793dc91d1b4c2adb
by laforge
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.
Commit
c35202f7071e2fb2b460ca97276b02bfcacebb19
by Oliver Smith
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.
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).
Commit
95e0430755b41accd287a7501f722d876ec247f1
by lynxis
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.
Commit
6ec37f62651e8f3e9e841d32d62a1539b4dd25d0
by Pau Espin Pedrol
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.
Commit
8802fe3d1807306f10fb117a5d176552003ff456
by Pau Espin Pedrol
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.
Commit
0891beff9d786c91a99fc5016f78b90bc48d90f1
by Oliver Smith
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'
Commit
de72acd28406033f295582112a5fe4314f74addc
by Oliver Smith
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.
Commit
9229de94aecdf2313ebead5e3eb6ed9fc51044d8
by Pau Espin Pedrol
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
Commit
54047a1303854dbd289ec892ae5c080fb930d956
by Pau Espin Pedrol
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.
Commit
368177254e7ff91637ac36421f5193f8c73d84d0
by Oliver Smith
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.
Commit
46b706f7fe0c73033dd47643e2bac3c84dd17395
by Pau Espin Pedrol
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.
Commit
2fe4882bf29a246940742f902e1ff0a61ad0bfae
by Pau Espin Pedrol
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.
Commit
95231624f12c299019c0d6064b5d4d3004dad093
by Vadim Yanitskiy
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.
Commit
136143d55bc3bc900addeb83c4a30863e2e90eea
by Vadim Yanitskiy
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; ...
Commit
5e4a5f5382d0312e96314b1b29f1cd847d353e5f
by Pau Espin Pedrol
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/.