Skip to content

Changes

Started by Oliver Smith
Started 1 yr 5 mo ago
Queued 6 ms
Took 3 min 5 sec on build4-deb12build-ansible
asterisk: IMS: Fix To header 'tag' attr not set in resync 401 Unauthorized response

Change-Id: I74a014eb5cb5084726ef6b0462030a20fdbb3339
Pau Espin Pedrol at
asterisk: f_TC_ims_registration_423_interval_too_brief: Fix To address 'tag' attribute

Change-Id: Ifd79d9cdc03f87f104a66564455e57bb7a462fe8
Pau Espin Pedrol at
asterisk: Log unexpected AMI msg

Change-Id: I406a00a54cb6d956e465001b8da0b14ea3e24195
Pau Espin Pedrol at
Revert "s1ap: add {enc,dec}_S1AP_Global_ENB_ID() API"

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.

Change-Id: I4d73bca4ca1fded487d80e535d3050661b83dcea
laforge at
deps/Makefile: Use osmocom fork of titan.TestPorts.SIPmsg

This will allow us using IPv6 in IPmsg_PT until [1] is mergedi upstream.

[1] https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.SIPmsg/-/merge_requests/4

Related: SYS#6982
Change-Id: If9bffd57204ee1ea56cbf0cb0109c422fb2c460f
Pau Espin Pedrol at
asterisk: Split test code into helper functions

This allows reusing code to create new tests coming up soon, like
sending HOLD (re-INVITE sendonly) after having estavlished the call.

Related: SYS#6782
Change-Id: Ic9c712f4cd688729bece225c0d19219dc53e14b3
Pau Espin Pedrol at
asterisk: Unregister SIP UAs whose MT call gets cancelled

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.

Change-Id: If76c7ac3bb6bb85643a8b83800954d5025593d25
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mo_holdresume_mo

Related: SYS#7002
Change-Id: Ifffa1c4021f324871f11a60264c17b640569e18b
Pau Espin Pedrol at
asterisk: Increase timeout waiting for AMI event FullyBooted

Change-Id: Ibd2bbdc4b916b5baca01407bac3cc5e9a99500e3
Pau Espin Pedrol at
asterisk: Fix accessing to unset called_contact var in MT call without precondition

Change-Id: I7e7a6010c3b217c163945027d5c341bcb820c251
Pau Espin Pedrol at
SGP32Definitions_Templates: populate certificates correctly

The members eumCertificate and euiccCertificate are propulated with the wrong
sample certificates.

Related: SYS#6563
Change-Id: Id61c2261f931cacc543c76eea359bdcf22f36a4b
pmaier@sysmocom.de at
SGP32Definitions_Templates: add template for IpaEuiccDataResponse

Related: SYS#6824
Change-Id: I93125dfedb2c1742efdc98e5f1f4d07ed5ed715c
pmaier@sysmocom.de at
IPAd_Tests: move static test configuration to IPAd_Tests.default

In IPAd_Tests.cfg we find some configuration parameters that never
change. Those can be moved to IPAd_Tests.default.

Change-Id: I14d6c7b617ed4c95a24e2ce96bf0d86c24288324
Related: SYS#6563
pmaier@sysmocom.de at
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.

Related: SYS#6563
Change-Id: I0150fe5c98d5a5db9f1931c72ef6e015f74055bd
pmaier@sysmocom.de at
eIM_Tests: add testsuite for an eIM

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.

Change-Id: Iba72ee00d10aba7831feedadacd943bf943de53e
Related: SYS#6824
pmaier@sysmocom.de at
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

Related: SYS#6824
Change-Id: I337ef32a424875ca9d9be178ae96f1a76383dd38
pmaier@sysmocom.de at
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

Change-Id: I1802b63a51bf68080b3ef81a967a964d961a1b96
Related: SYS#6563
pmaier@sysmocom.de at
IPAd_Tests: expect the IPAd to request a notifications list on init

The IPAd now requests a list of pending notifications before it fetches
the a new eIM package.

Related: SYS#6563
Change-Id: I2cd7fdfde24404bc8cb1af258923cd86627db68a
pmaier@sysmocom.de at
asterisk: TC_ims_call_mo_2nd_mo_rejected

Related: SYS#7003
Change-Id: I7764e29e8df11ad65366642f83ebe922488bf128
Pau Espin Pedrol at
asterisk: Move Via generation to helper function

Change-Id: Id49222928980e1fc5ab006719688b4fa0849d391
Pau Espin Pedrol at
asterisk: IMS: MT call: Move Tx INVITE to helper function

This helper function will be used by another function expecting an
INVITE reject in a follow-up patch.

Change-Id: If9657e88304fd7b3558737fdc807bae59cddc8a2
Pau Espin Pedrol at
ttcn3-asterisk: Introduce test TC_ims_call_mo_2nd_mt_rejected

Change-Id: Id6577d0e9137c86855469904d347e95b5bcfa4a7
Pau Espin Pedrol at
asterisk: MO internal call: Expect direct rtp re-INVITE

Change-Id: I4ac602865cf0c18036b411acff4562322b32933b
Pau Espin Pedrol at
asterisk: sip: Fail rx unexpected msg during unregister

Change-Id: Ibcf65b22925e990e4d13661204eaba1b471b6a5d
Pau Espin Pedrol at
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.

Change-Id: I72e9ecaf58156f3fe62c4fb2d8c74c82ab16aa78
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mt_no_local_uas_registered

Change-Id: Ibf7ecfe67f90df060b0ae87f394424566ad0fed4
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mt_local_uas_inacall

Change-Id: I8a407993f37d18a0bf4c96f5228c0b5ce696053a
Pau Espin Pedrol at
Fix BTS_Tests_ASCI.TC_vbs_notification, add missing SI1

Because System Information Type 1 was missing, the BTS could not assign
time slots to NCH. Without NCH, notification is not possible.

Related: OS#6467
Change-Id: I65dc55da78bc53a1265124e6b6f6bb9a1650206e
jolly at
asterisk: Introduce test TC_ims_call_mo_holdswitchresume_mo

Related: SYS#7003
Change-Id: I80ec326524501a2f0784291250e3d5fad6b04378
Pau Espin Pedrol at
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.

Related: SYS#5435
Change-Id: I0591cab8cca5195b8648920d5f79acc536a4efac
Pau Espin Pedrol at
sgsn: expected-results.xml: Add missing TC_sgsn_context_req_{in,out}

Change-Id: I2579958bbf8c28b72e58174e60634ca77c71dfee
Pau Espin Pedrol at
asterisk: IMS: enable EVS-only codec on IMS side

Related: SYS#7012
Change-Id: I1d1542f23ef7c6b2cd18afd90a169633d0d73a3f
Pau Espin Pedrol at
sgsn: Fix regression t_guard not passed

I forgot to pass this param when moving some code, and some tests which
set a higher guard time then where failing.

Fixes: 0737428fa71b7d9bb849a9a000b3e1a7bcdce2ca
Change-Id: I83cfd0d2fd148c8874b6e176af7273df7cb69174
Pau Espin Pedrol at
msc: Use RAB_ID obtained from RAB-AssReq

The helper function will be used too by follow-up patches.

Change-Id: If532c41304803d223591ce8e0c10dda4a562dfb8
Pau Espin Pedrol at
msc: Use template ts_RAB_SMdL

Change-Id: I768aad762c4fa6c0d3a6d0effd7a7a1aabb3488f
Pau Espin Pedrol at
library/GTP_Emulation: Check IMSI presence before returning if Conditional or Optional

Change-Id: I73c683e62191a06212933391d424d608a14f8c1e
Pau Espin Pedrol at
library/GTPv1C_Templates: Introduce template ts_GTPC_UpdatePdpRespGGSN

Will be used by SGSN_Tests in a follow-up patch.

Change-Id: I91afc14eecfadb3e00ccb9b74794079a82ef884b
Pau Espin Pedrol at
library/L3_Templates: Introduce templates for GMM Service Req/Acc/Rej

Those will be used by a follow-up patch in SGSN_Tests.

Change-Id: Ia948a27e39cf11f1421396d15da32bd82ea9513c
Pau Espin Pedrol at
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).

Change-Id: If9741953f98b7dd29749d335a5bd937fdfb62bc6
Pau Espin Pedrol at
deps: Update titan.ProtocolEmulations.M3UA to current master

This contains a recently merged DTE fix showing up sometimes during
development in SGSN_Tests.

Change-Id: I4037fdd6ada765b2e041426393fcc506dd7885ff
Pau Espin Pedrol at
library/GTP_Emulation: Make GTPv1C port optional

The port is not needed when emulating HNBGW, since the setup of GTPv1U
happens through RAB-ASsReq/resp.

Change-Id: I3ffb54d0cb8b3a81ed5235feaaac6d989baf6e0d
Pau Espin Pedrol at
sgsn: Rename vc_GTP -> vc_GGSN_GTP

GTPv1U will also be used by emulated HNBGWs, hence we want to
differentiate them in name.

Change-Id: I663e667956935372809c1c42ebe8d4312d6a4d41
Pau Espin Pedrol at
GTP_ConnHdlr: Allow connection to multiple GTP_Emulation

This feature will be used by SGSN_Tests' BSSGP_ConnHdlr, which in 3G
scenario needs to connect to GTP at both GGSN and HNBGW/RNC endpoints.

Change-Id: I6fc49428967ebcf0f6c8a9f9f20f4a98a81f3273
Pau Espin Pedrol at
sgsn: Set up GTPv1U in emulated RNCs

Change-Id: Icf5fa28ea08cfd255b49b546eadd74e91a9c7ecf
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_pdp_act_user

Related: SYS#5435
Change-Id: I5f0cb51457395d95bde22732b032786211cb7b61
Pau Espin Pedrol at
sgsn: Validate Direct Tunnel Flags DTI=1 is set during UpdatePDPContextReq

Related: SYS#5435
Change-Id: Iadd30318d02fbc304f65840f2299e5ec8b5b08e9
Pau Espin Pedrol at
ggsn: Fix function name

The function is used to handle a UpdatePDPCtxResp, not a Req.
While at it, mark the function as private.

Change-Id: Ia455af1cd64ffce53b454e611c4fc85816e785bc
Pau Espin Pedrol at
hnbgw: remove <= 1.5.x code paths

Change-Id: Ie1336a7372a46439cf53e38a555f36d0201fa230
Oliver Smith at
msc: remove <= 1.11.x code path

Change-Id: I865f53ca0e6dd90401f8cabe5c60ad812d91e5bb
Oliver Smith at
stp: remove <= 1.8.x code paths

Change-Id: I31a1516215237984c029c02dfa30aa223c3d06a3
Oliver Smith at
sgsn: Introduce test TC_attach_pdp_act_pmm_idle

Change-Id: Id46ccd9db11c8b792e1c071de91ef092ed1544c7
Pau Espin Pedrol at
Improve use of enumareted type GTP_Clause

Change-Id: Ib071fa97a354cb27263cd46dba8f468b4ddc0018
Pau Espin Pedrol at
GTP1C_Templates,Osmocom_Gb_types: Use/move conversion functions at Osmocom_Types

Change-Id: I29948bfcb2b344d5aca293fa60455fcc6de66c72
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_pdp_act_pmm_idle_lost_pdp_status

Related: SYS#5435
Change-Id: I34a0dabc37ba24d0c9fb1ae2587e7ec8c1b606fa
Pau Espin Pedrol at
library/GTPv1U_Templates: Mark parameters as templates

Change-Id: I278f7dbc64704c1ba2b8a75d6f540ac52b067598
Pau Espin Pedrol at
sgsn: Introduce test TC_pmm_idle_rx_mt_data

Change-Id: I35d660b8e546f6ce0af8c05d7b5c56833a26fb76
Pau Espin Pedrol at
sgsn: Introduce test TC_update_ctx_err_ind_from_ggsn

Related: OS#6512
Related: SYS#5435
Change-Id: Ic417b23cae798361f73150f6a72f91e2f8528e7a
Pau Espin Pedrol at
pcu: Introduce test TC_x2001_pacch_pkt_dl_ass_unanswered_timeout

Related: OS#3928
Change-Id: I08921132de863404485581dfa439a54f109b0078
Pau Espin Pedrol at
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.

Related: OS#6494
Change-Id: Id52e63b7ab4150def084aa0b02efbf731f4224d8
Oliver Smith at
testenv: seccomp profile: enable io_uring

Revert 399bd5 ("seccomp: let io_uring_* fail with ENOSYS") from
upstream: https://github.com/containers/common/commit/399bd59e0d0d3e3845d59a7fe197d08371b061b0

Related: OS#6494
Change-Id: If9fdc3bfe0f6541776eb9c1839d892777394e999
Oliver Smith at
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.

Related: OS#6494
Change-Id: If9f8b79dd6e5b4f06be4e5ff73db97759c3acfb2
Oliver Smith at
hlr: initial testenv.cfg

Change-Id: If937f021a33bf81b4e7296c2efdbd13a73cdaca9
Oliver Smith at
mgw: initial testenv.cfg

Change-Id: Ifad2a6e25816c2dd7d27206751597b486acdd096
Oliver Smith at
sip: initial testenv.cfg

Change-Id: I2b6df9240d8cb56c363c8c1a175946af183497da
Oliver Smith at
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.

Related: docker-playground I767ec223585002d6420eda27ed338722f764c902
Change-Id: I9b5b953406cd4de2b18854b3f33420610267d5fd
Oliver Smith at
sgsn: initial testenv.cfg

Change-Id: Ib72dcfba64252990b5cabf9752df86d76c8ae318
Oliver Smith at
upf: initial testenv.cfg

Change-Id: I287075221b4e001a6532056d894a79eb06934070
Oliver Smith at
hnodeb: default configs: fix conflict

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
Oliver Smith at
hnodeb: more verbose error for f_tc_cs_mo_call

Print the received IP and expected IP, so we directly see it without
finding it in the big log file.

Change-Id: I1c061aeae9d6b1645683ea758bf8169feec47bc7
Oliver Smith at
hnodeb: initial testenv.cfg

Change-Id: I13422e5cef3013992949029f847c90043ab4a4fc
Oliver Smith at
dia2gsup: initial testenv.cfg

Change-Id: I1f3f7235134a5acb4436fd4745fa5304ad51bc56
Oliver Smith at
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)

Change-Id: I3ed9e971daf32458bc554fa0a7f4698b4a461bfa
Oliver Smith at
smlc: initial testenv.cfg

Change-Id: Ib6db49f149e9382b802fceb40b307c5a286f92a1
Oliver Smith at
cbc: initial testenv.cfg

Change-Id: I8578bf7a2e627c93cc7480534cc2ddbba3ad6ff1
Oliver Smith at
mme: initial testenv.cfg

Change-Id: I780584cc7722d92baa213049ee0a35e16a0e087c
Oliver Smith at
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.

Change-Id: Ib68fc4df1f5a105b4b2c904d2d2003c621a2ad31
laforge at
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.

Related: OS#6494
Change-Id: I41afe6d6b565a8e8c384229ee44f1b75f25c0a4b
Oliver Smith at
testenv: podman.is_running() -> testenv.args.podman

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
Oliver Smith at
testenv/testdir: fix typo

Change-Id: Id61b770ff3b6fdee0dedcdab6eca3760dddc287a
Oliver Smith at
SGSN_Tests: add paging a whole routing area with multiple cells

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
lynxis at
SGSN_Tests: remove unused variable d

Change-Id: I611e4444dfc9443584397e5523e7612ee5b00af4
lynxis at
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.

Change-Id: I08eee0d11ae04276ca1ad8fd58ebb93dd6d0066f
lynxis at
SGSN_Tests_NS: TC_NS_connect_alive: set missing verdict

Change-Id: I03574bc17a10d9098dcd25d73007ec5525c42c18
lynxis at
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.

Related: OS#6382
Change-Id: Icfae181ba1bb0dfb8a1a15dfe3a1d542ce69d88a
Pau Espin Pedrol at
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.

Change-Id: Ia0af52f8b7d61c15bdf2b6152fae27dd003d00e8
Pau Espin Pedrol at
sgsn: Introduce test TC_attach_rau_a_b_wrong_old_ra

This test reproduces a crash in osmo-sgsn, and fixed in
osmo-sgsn.git Change-Id I5a4328c6e945b85dd815215724feecadba59c435.

Related: OS#6441
Change-Id: I3ce02f30a1e5becb80ab2a29f6bf5d08dd45b79c
Pau Espin Pedrol at
deps/Makefile: Use upstream titan.TestPorts.SIPmsg

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
Pau Espin Pedrol at
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'

Change-Id: I44d5229aa481bfed13c006368d590e1486536c0e
Oliver Smith at
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.

Closes: OS#6544
Change-Id: I5e710a1ee7185a3f6f4f1e98f201f3f6fda2be55
Oliver Smith at
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

Change-Id: I76ad46f7ee5f49698e41da729cb6422866202951
Pau Espin Pedrol at
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.

Change-Id: Ifd4fe83e7b5aefdaafe7ce1c8b1ec6a67c65819c
Pau Espin Pedrol at
testenv/README: update

Point at ./testenv.py -h and describe that everything runs in 1
container with --podman.

Change-Id: Ie9eee8cf14ba2069c1cd5bd6ab703f3f6ccdc100
Oliver Smith at
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.

Change-Id: Ia1243320b6d310c69ef9291cca69a1594b1a8a70
Oliver Smith at
testenv: fix duplicate 2>&1

The pipe variable already has 2>&1, therefore we don't need to add it in
cmd.

Change-Id: Ifeae4c53b57f90242041e61ca5ab7073d155d7a8
Oliver Smith at
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.

Change-Id: I5ebcaf23a643b6cb97534328737257d26d3981fe
Pau Espin Pedrol at
s1gw: Split ConnHdlr to its own file

This allows easily separating general routines from test specific code.

Change-Id: I9f8d9afbccd59f3e22649b35d2a7ef75578d051a
Pau Espin Pedrol at
s1gw: Add mp_enb_bind_ip module parameter

This allows more easily understanding pcap traces by looking at the
config file to identify the ip addresses.

Change-Id: I294b14e6ef119c17eec22f813d5755279560e0bc
Pau Espin Pedrol at
s1gw: initial testenv.cfg

This commit already provides a running setup to run the testsuite,
similar to the one already available in docker-playground.git.

Change-Id: Ib66c3f23355c117302b48fc9ef05cde1920d8739
Pau Espin Pedrol at
s1gw: Wait for component to stop before testing IUT for conn refused

Change-Id: I9dcac498766dd4a597cc5827bdb9192e861356c6
Pau Espin Pedrol at
s1gw: Immediate stop all components upon ConnHdlr failure

Otherwise it's difficult to see/find in logs stuff like timeouts waiting
for messages, etc.

Change-Id: I8b3b7e9cd61a8ad0d167f20a41c61eac3f245d70
Pau Espin Pedrol at
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.

Change-Id: I985511c1a56edb0663826a20bbf27ea34a6c4dcd
Pau Espin Pedrol at
s1gw: Fix direction of e-RAB Setup

Change-Id: Idfc3bc0a53d5f966a889b997c3d5a4928297236f
Pau Espin Pedrol at
mme: Fix order in eutran_to_geran testcase

The diagram shows that the S1-AP release should happen after the Delete
Session Request/Response (even though all a numbered 13).

The test started failing because a newer open5gs would check/require a
resource that was freed due to an S1 release.

Change-Id: I0d7a388dc8b1a1c13de8f7e3fe7781423fc90868
daniel at
s1gw: Validate S1SetupResp is forwarded fine MME->ENB

Change-Id: I6d9b060eb81269c7cb76e007f669c5b9ead97158
Pau Espin Pedrol at
s1gw: Increase S1AP setup timeout

The existing timer is too tight, specially when running tons of
components concurrently.

Change-Id: I99d554bf0dd0f4c1dbd801663c1801f3725df09f
Pau Espin Pedrol at
s1gw: Make components alive

This helps avoiding getting errors during test tear down.

TC_conn_term_mme_unavail needs to be modified since the port is kept
alive after it is stopped, so test needs to be adapted.

Change-Id: I538e31bf14836f81a6e3c0b844f9f70f1eaccb59
Pau Espin Pedrol at
s1gw: Add initial PFCP support emulating UPF

Change-Id: If2b135e113d2568092e90ac9b6c5f651ab30f5d0
Pau Espin Pedrol at
s1gw: Rename functions to include s1ap information

Change-Id: Ic4b06712f3222bada71ff5ca8a6c65ec9c92ae1e
Pau Espin Pedrol at
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.

Change-Id: I95c3cfe41ee230927bb5777631372597cbd3c051
Vadim Yanitskiy at
s1gw: rename module ConnHdlr -> S1GW_ConnHdlr

This fixes the following warning:

  ConnHdlr.ttcn:39.1-43.1: warning: Definition with name `ConnHdlr'
                                    hides a module identifier

Change-Id: I47364a35720059d6a51f004a5692b9a0c1ad98d8
Vadim Yanitskiy at
s1gw: cosmetic: reorder module parameters

Change-Id: I6ee5d2e283327f52320ef5580b195c42e400c8de
Vadim Yanitskiy at
s1gw: S1GW_Tests.cfg: add PFCP related module params

Change-Id: Id134f2fd0e2e138ee6cb7a8f8a3e2af7f027bda4
Vadim Yanitskiy at
s1gw: osmo-s1gw.config: fix pfcp_{loc,rem}_addr comments

Change-Id: I4b5b18750de48b5db1a23a95a427ba1fd3d3905d
Vadim Yanitskiy at
s1gw: osmo-s1gw.config: enable colors in logging

Change-Id: I49fa2ca9d7aea5a2728d07f176b80a6438551047
Vadim Yanitskiy at
PFCP: rework templates, get rid of functions

This patch fixes dozens of compilation warnings, turning functions
returning templates into templates inheriting from {tr,ts}_PDU_PFCP_.

Change-Id: I04735adf88c81b949e1dca6e9ab9a3b37ba78bd6
Related: SYS#6772
Vadim Yanitskiy at
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;
...

Change-Id: Iacfbd68336b6fc4481c15ca5b304636df4491da4
Related: SYS#6772
Vadim Yanitskiy at
PFCP: drop no longer needed {ts,tr}_PDU_PFCP

Change-Id: I6091d7e76e852d2487b784fb2b3e39b416a48195
Related: SYS#6772
Vadim Yanitskiy at
PFCP: add Heartbeat Req/Resp templates

Change-Id: I569b47b6ebc3ca238da544488cac69dfc1db1dfe
Related: SYS#6772
Vadim Yanitskiy at
PFCP_Emulation: respond to incoming Heartbeat Req

This is a mandatory procedure that every 3GPP TS 29.244 compliant
peer shall support.

Change-Id: I93990feb1864701e2903af85480093ef751bafe5
Related: SYS#6772
Vadim Yanitskiy at
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/.

Fixes: 95231624f12c299019c0d6064b5d4d3004dad093
Change-Id: Ia8fca37b878323cd188035004b587c124598376e
Pau Espin Pedrol at
Update key for Osmocom OBS

The current key has expried, update it to the new one which is valid
until 2026-10-16.

Related: https://osmocom.org/news/268
Source: https://obs.osmocom.org/projects/osmocom/public_key
Change-Id: I732b379b8ac70f5e2139520a07183060a9c1a7f0
Oliver Smith at