aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2024-08-22s1gw: Fix direction of e-RAB Setuposmith/wipPau Espin Pedrol1-10/+10
Change-Id: Idfc3bc0a53d5f966a889b997c3d5a4928297236f
2024-08-22s1gw: Increase failure timeouts to ease debuggingPau Espin Pedrol1-2/+2
Let the IUT do some stuff before quickly exiting. In fact, the previous timeouts were a bit tight anyway since several messages may be required before an answer comes back on the same interface. Change-Id: I985511c1a56edb0663826a20bbf27ea34a6c4dcd
2024-08-22s1gw: Immediate stop all components upon ConnHdlr failurePau Espin Pedrol1-13/+16
Otherwise it's difficult to see/find in logs stuff like timeouts waiting for messages, etc. Change-Id: I8b3b7e9cd61a8ad0d167f20a41c61eac3f245d70
2024-08-22s1gw: Wait for component to stop before testing IUT for conn refusedPau Espin Pedrol1-0/+1
Change-Id: I9dcac498766dd4a597cc5827bdb9192e861356c6
2024-08-22s1gw: initial testenv.cfgPau Espin Pedrol2-0/+44
This commit already provides a running setup to run the testsuite, similar to the one already available in docker-playground.git. Change-Id: Ib66c3f23355c117302b48fc9ef05cde1920d8739
2024-08-22s1gw: Add mp_enb_bind_ip module parameterPau Espin Pedrol3-6/+8
This allows more easily understanding pcap traces by looking at the config file to identify the ip addresses. Change-Id: I294b14e6ef119c17eec22f813d5755279560e0bc
2024-08-22s1gw: Split ConnHdlr to its own filePau Espin Pedrol2-172/+205
This allows easily separating general routines from test specific code. Change-Id: I9f8d9afbccd59f3e22649b35d2a7ef75578d051a
2024-08-22mme: expect authentication during 2g->4G TAU procedurePau Espin Pedrol2-9/+27
If TAU happens without an existing security context, network for sure wants to authenticate the UE. This is the scenario being tested here. If there was a security context (eg. from a previous 4G Attach), then it's up to the network to decide (or be capable) to implicitly authenticate the UE. Change-Id: I5ebcaf23a643b6cb97534328737257d26d3981fe
2024-08-22testenv: fix duplicate 2>&1Oliver Smith1-1/+1
The pipe variable already has 2>&1, therefore we don't need to add it in cmd. Change-Id: Ifeae4c53b57f90242041e61ca5ab7073d155d7a8
2024-08-22testenv: add TESTENV_REBUILD_OUTDATED_IMAGEOliver Smith2-8/+25
Add an environment variable that allows rebuilding the podman image whenever it appears to be outdated. This is useful when working on the Dockerfile. As requested by Pau. Change-Id: Ia1243320b6d310c69ef9291cca69a1594b1a8a70
2024-08-22testenv/README: updateOliver Smith1-1/+19
Point at ./testenv.py -h and describe that everything runs in 1 container with --podman. Change-Id: Ie9eee8cf14ba2069c1cd5bd6ab703f3f6ccdc100
2024-08-21S1AP_Emulation: Fix building security headers for Integrity and CipheringPau Espin Pedrol3-18/+41
The fact that the network instructs the UE to use EEA0 encryption (null algo) doesn't mean the UE should mark the NAS frames in the security header as non-ciphered. They need to be marked as IP+ciphered in the outer header, and as plain in the inner one. Now TTCN3 behaves like a UE recorded while executing a similar test case. Moreover, wireshark is now happy decoding the messages. Change-Id: Ifd4fe83e7b5aefdaafe7ce1c8b1ec6a67c65819c
2024-08-21S1AP_Emulation: Fix new_ctx never set when building security headerPau Espin Pedrol2-6/+12
The flag was never set to true. It needs to be set to true when building the security head of Security Mode Complete after receiving Security Mode Command with a new EPS security context. TS 24.301 5.4.3.3 Change-Id: I76ad46f7ee5f49698e41da729cb6422866202951
2024-08-21testenv: cmd: pass all env vars without --podmanOliver Smith1-0/+7
As suggested by Pau, pass all environment variables to through testenv if it is running without podman. This way a custom TTCN3_DIR, TTCN3_BIN_DIR and more variables that may make sense when running directly on the host, work as expected. Closes: OS#6544 Change-Id: I5e710a1ee7185a3f6f4f1e98f201f3f6fda2be55
2024-08-21testenv: set args.podman = False if action != "run"Oliver Smith1-0/+3
Fix "./testenv.py clean": File "/home/user/code/osmo-dev/src/osmo-ttcn3-hacks/_testenv/testenv/cmd.py", line 85, in run if not no_podman and testenv.args.podman: ^^^^^^^^^^^^^^^^^^^ AttributeError: 'Namespace' object has no attribute 'podman' Change-Id: I44d5229aa481bfed13c006368d590e1486536c0e
2024-08-20deps/Makefile: Use upstream titan.TestPorts.SIPmsgPau Espin Pedrol1-1/+1
The patch we used from the sysmocom fork is now meged in upstream (same git commit hash), hence we can jump back to upstream. Related: SYS#6982 Change-Id: I8ca1252fd8710f50d8da5fb4fc105d29d9a506af
2024-08-20sgsn: Introduce test TC_attach_rau_a_b_wrong_old_raPau Espin Pedrol2-2/+55
This test reproduces a crash in osmo-sgsn, and fixed in osmo-sgsn.git Change-Id I5a4328c6e945b85dd815215724feecadba59c435. Related: OS#6441 Change-Id: I3ce02f30a1e5becb80ab2a29f6bf5d08dd45b79c
2024-08-20sgsn: Fix running with testenv.py podman setupPau Espin Pedrol2-2/+2
The initial testenv.py setup introduced in osmo-ttcn3-hacks.git 6baec93cb85fa8a0051e9aacd0178e90adbfdadc lacked some recent updates to the ttcn3 testsuite setup where a second IP address is added to the container in order to distinguish between RNC and CN in GTPU. Change-Id: Ia0af52f8b7d61c15bdf2b6152fae27dd003d00e8
2024-08-19ggsn: Split test and relax expectations testing gtpu access over ipv6 ll-addrPau Espin Pedrol1-9/+56
Testing gtpu traffic to some potentially external IP address using the link-local address has no clear usecase and it also depends on the network setup and the implementation of the GGSN. Hence, remove it from the regular test and move it to another test which has a relaxed validation accepting different resolutions. This allows knowing/testing the code path in the GGSN, while accepting different outcomes. Related: OS#6382 Change-Id: Icfae181ba1bb0dfb8a1a15dfe3a1d542ce69d88a
2024-08-13SGSN_Tests_NS: TC_NS_connect_alive: set missing verdictAlexander Couzens1-0/+1
Change-Id: I03574bc17a10d9098dcd25d73007ec5525c42c18
2024-08-13SGSN_Tests_NS: NS related tests: use the shutdown helperAlexander Couzens1-0/+8
Currently the test case TC_SNS_config_sgsn() is failing because of a dynamic test error after succeeding. Use the Misc_Helpers.f_shutdown() to prevent this. Change-Id: I08eee0d11ae04276ca1ad8fd58ebb93dd6d0066f
2024-08-13SGSN_Tests: remove unused variable dAlexander Couzens1-1/+0
Change-Id: I611e4444dfc9443584397e5523e7612ee5b00af4
2024-08-13SGSN_Tests: add paging a whole routing area with multiple cellsAlexander Couzens1-0/+50
1. Attach + PDP Request 2. Wait for UE to be in Standby 3. Transmit to GTP Userdata 4. See the Paging on 2 BVCIs within the Routing Area Change-Id: I88dc95669d57278a96e05ec84f934ebf70b319e5
2024-08-05testenv/testdir: fix typoOliver Smith1-1/+1
Change-Id: Id61b770ff3b6fdee0dedcdab6eca3760dddc287a
2024-08-05testenv: podman.is_running() -> testenv.args.podmanOliver Smith2-2/+2
Use testenv.args.podman instead of testenv.podman.is_running() in all places except for testenv.podman.stop(). - testenv.args.podman is always True when --podman is used. - testenv.podman.is_running() is only True while the container is currently running. Most of the time the behavior is the same. But without this patch, when the container crashes, commands would unexpectedly run outside of the container (and then fail on jenkins due to missing programs). Related: OS#6494 Change-Id: Iea634f5e97d14f1f7e777f4609b9593974964d23
2024-08-05testenv/podman: use explicit no_podman=TrueOliver Smith1-2/+4
Add an explicit no_podman=True to the commands that are meant to run outside of the podman container. Previously it was implicit by relying on logic in testenv.cmd.run, which would run the commands outside of podman unless the podman container was running. In the next patch I will remove the implicit logic, because it could lead to the bug of running commands outside of the container by accident if the container crashed. Related: OS#6494 Change-Id: I41afe6d6b565a8e8c384229ee44f1b75f25c0a4b
2024-08-05ttcn3-(tcp)dump(pcap)-stop.sh: store multiple runs of same test into ↵Pau Espin Pedrol2-2/+22
different pcap file This is useful when testing the behavior of a SUT when the same scenario is run twice, for instance to debug a crash in the SUT. In this setup, it is definetly interesting to have stored pcaps of the several times the scenario is run. Change-Id: Ib68fc4df1f5a105b4b2c904d2d2003c621a2ad31
2024-08-02mme: initial testenv.cfgOliver Smith4-0/+366
Change-Id: I780584cc7722d92baa213049ee0a35e16a0e087c
2024-08-02hss: initial testenv.cfgOliver Smith6-0/+379
Change-Id: I8a095f51f1a9516967d5188587537a2f90927f6c
2024-08-02cbc: initial testenv.cfgOliver Smith3-0/+61
Change-Id: I8578bf7a2e627c93cc7480534cc2ddbba3ad6ff1
2024-08-02smlc: initial testenv.cfgOliver Smith1-0/+15
Change-Id: Ib6db49f149e9382b802fceb40b307c5a286f92a1
2024-08-02smlc: import current configs from docker-playgroundOliver Smith3-21/+31
Import the current configs, replacing the IPs used with 127.0.0.x. Before this patch, attempting to run the testsuite without containers fails because of the wrong IP range: 20240718122103706 DLGLOBAL NOTICE unable to bind socket: (172.18.23.20|fd02:db8:23::20):2905: Cannot assign requested address (socket.c:1042) Change-Id: I3ed9e971daf32458bc554fa0a7f4698b4a461bfa
2024-08-02dia2gsup: initial testenv.cfgOliver Smith3-0/+25
Change-Id: I1f3f7235134a5acb4436fd4745fa5304ad51bc56
2024-08-02hnodeb: initial testenv.cfgOliver Smith1-0/+9
Change-Id: I13422e5cef3013992949029f847c90043ab4a4fc
2024-08-02hnodeb: more verbose error for f_tc_cs_mo_callOliver Smith1-1/+2
Print the received IP and expected IP, so we directly see it without finding it in the big log file. Change-Id: I1c061aeae9d6b1645683ea758bf8169feec47bc7
2024-08-02hnodeb: default configs: fix conflictOliver Smith2-4/+9
Use IPs similar to the configurations in docker-playground, so when using these configs the tests don't fail with: GTP_Emulation.ttcn:185 Dynamic test case error: Using the value of an optional field containing omit. (Address already in use) Change-Id: Ie99708be1164e48e2acceb9cafdb9ca6308490bb
2024-08-02upf: initial testenv.cfgOliver Smith1-0/+9
Change-Id: I287075221b4e001a6532056d894a79eb06934070
2024-08-02sgsn: initial testenv.cfgOliver Smith2-0/+30
Change-Id: Ib72dcfba64252990b5cabf9752df86d76c8ae318
2024-08-02sgsn/SGSN_Tests_SNS.cfg: run only SGSN_Tests_NSOliver Smith1-2/+0
In order to get the same output as ttcn3-sgsn-test-sns using the configs from docker-playground, do not enable the SGSN_Tests and SGSN_Tests_Iu in the SNS config. Related: docker-playground I767ec223585002d6420eda27ed338722f764c902 Change-Id: I9b5b953406cd4de2b18854b3f33420610267d5fd
2024-08-02sip: initial testenv.cfgOliver Smith1-0/+9
Change-Id: I2b6df9240d8cb56c363c8c1a175946af183497da
2024-08-02mgw: initial testenv.cfgOliver Smith1-0/+9
Change-Id: Ifad2a6e25816c2dd7d27206751597b486acdd096
2024-08-02hlr: initial testenv.cfgOliver Smith1-0/+9
Change-Id: If937f021a33bf81b4e7296c2efdbd13a73cdaca9
2024-08-02testenv: add test environment scriptOliver Smith23-0/+2200
Add a new testenv.py script that builds/installs all components needed for a testsuite, builds the testsuite from source and runs it. Features: * --binary-repo argument to install packages from osmocom:latest or any other repository from the Osmocom OBS instead of building from source * without --binary-repo, the test components are built with osmo-dev, cloning the missing source git repositories and building them in the right order * --podman argument to run the testsuite and its components inside a container (using podman instead of docker so it runs rootless) * Simple testenv.cfg file to specify components for running testsuites * Iterative compilation of components and testsuite * Using ccache * Testsuite doesn't start if any of the components fail to start (e.g. because of a config error) * Testsuite gets stopped if any of the components crash * ^C stops the testsuite + all components * Test component output logs to stdout in addition to a log file (turn off with --no-tee) * --test argument to only run one specific test * --shell argument to run an interactive shell before teardown to inspect the test environment while components are still running This script unifies the use cases of running a testsuite without containers (for local development), and with containers (as jenkins runs it, but can also be used for local development e.g. to get a clean pcap). Previously jenkins used a different set of configurations from docker-playground.git and many different containers instead of just one. Related: OS#6494 Change-Id: If9f8b79dd6e5b4f06be4e5ff73db97759c3acfb2
2024-08-02testenv: seccomp profile: enable io_uringOliver Smith1-1/+4
Revert 399bd5 ("seccomp: let io_uring_* fail with ENOSYS") from upstream: https://github.com/containers/common/commit/399bd59e0d0d3e3845d59a7fe197d08371b061b0 Related: OS#6494 Change-Id: If9fdc3bfe0f6541776eb9c1839d892777394e999
2024-08-02testenv: seccomp_profile: importOliver Smith1-0/+1130
Import the current default seccomp profile from podman: https://raw.githubusercontent.com/containers/common/ae4a61e1b2e0af84a668f87f7622d86ebc418cba/pkg/seccomp/seccomp.json The next patch will adjust it to enable io_uring. Both patches are in preparation for the new testenv script, which will optionally use podman to run the testsuites. The seccomp profile will allow using io_uring inside podman. Related: OS#6494 Change-Id: Id52e63b7ab4150def084aa0b02efbf731f4224d8
2024-08-01pcu: Introduce test TC_x2001_pacch_pkt_dl_ass_unanswered_timeoutPau Espin Pedrol2-0/+189
Related: OS#3928 Change-Id: I08921132de863404485581dfa439a54f109b0078
2024-07-30sgsn: Introduce test TC_update_ctx_err_ind_from_ggsnPau Espin Pedrol5-2/+190
Related: OS#6512 Related: SYS#5435 Change-Id: Ic417b23cae798361f73150f6a72f91e2f8528e7a
2024-07-30sgsn: Introduce test TC_pmm_idle_rx_mt_dataPau Espin Pedrol3-4/+65
Change-Id: I35d660b8e546f6ce0af8c05d7b5c56833a26fb76
2024-07-30library/GTPv1U_Templates: Mark parameters as templatesPau Espin Pedrol2-31/+35
Change-Id: I278f7dbc64704c1ba2b8a75d6f540ac52b067598
2024-07-29sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_statusPau Espin Pedrol3-14/+70
Related: SYS#5435 Change-Id: I34a0dabc37ba24d0c9fb1ae2587e7ec8c1b606fa