Commit
85f579d3a63773f3e7cf351b0e9b86a897287e3c
by Vadim Yanitskiy
msc: add TC_lu_and_ussd_notify_during_mt_call
This is a more realistic scenario (race condition) that reproduces an assertion failure in osmo-msc (OS#6756). We already do have TC_mo_ussd_evil_ms reproducing the problem, but this scenario is unrealistic when using a "normal" (not "evil") MS/UE.
Commit
3a84ab972c6fe4bd81de3e023d8e49d2a28707eb
by Pau Espin Pedrol
library/MGCP_Emulation: Fix Dynamic test case error returning unbound value
As spotted today while running HNBGW_Tests.TC_rab_assignment, probably after upgrade to titan 11: 17:54:36.223786 1570 MGCP_Emulation.ttcn:241 Dynamic test case error: Copying an unbound charstring value.
The error happened because in that failure path the component running the function was not stopped, and hence an unset variable was returned. Hence, make sure we tear everything down (including component going through the failure path).
Commit
7fb8722448b9c523cdd1edda8f89c100880316be
by Pau Espin Pedrol
5gc: Implement AKA authentication
deps/nas.git already has some Auth related functionaltities to calculate XRES*, but I couldn't get them to generate proper output. Furthermore, using them directly would include a lot of churn we don't want: * ttcn: Otherwise ttcn/Lib_NG_NAS/LIB_NG_NAS_Functions.ttcn brings in tons of dependencies about Emulation stuff which is not interesting for us. * .cc: We want to implement our own low level functions using our eclipse Titan API, as well as our own C lib dependencies (because some code for those dependencies is not really available in the repo).
Hence, instead use our own milenage.c implementation imported from libosmocore (actually from a slightly modified self-contained copy we already ported to some development branch of asterisk VoLTE project).
With this patch it is already possible to detect SQN Out-of-sync and answer with an Auth Failure, then get a new Auth Req from network and properly answer with an Auth Resp which the network likes and hence answers with a Security Mode Command.
Commit
a8cc6d152a9adfb9e16e00930dea8577d48a6b39
by Pau Espin Pedrol
NGAP_Emulation: Fix match on DownlinkNASTransport with different list of IEs
The existing receive templates match only a given set of parameters. Some of them are optional, so they wouldn't match the template if added. Match based on procedureCode instead.
Commit
98268b665dd33a4b1daa3ebfdf7e15df9af6c3f4
by Oliver Smith
testenv: add titan_min to all configs
Add the minimum required eclipse-titan version to each testenv.cfg. This is in preparation for a future patch that will allow using a different eclipse-titan version, depending on titan_min in the config and a new --titan-version argument.
Supporting this is desired because: * We can't simply upgrade from 9.0.0 to 11.1.0 as there are regressions with some of the testsuites, but we need 11.1.0 for at least one new testsuite. * By quickly switching between the versions we can check for regressions easily.
Commit
449c0d6b7b78a23a0e141ed404ee7cdf2298de11
by Oliver Smith
testenv: move ttcn3_hacks_dir to __init__.py
Move testenv.testsuite.ttcn3_hacks_dir to testenv.ttcn3_hacks_dir. It makes more sense there as the path to osmo-ttcn3-hacks is used by many modules, not just the testenv.testsuite module, and it prevents a cyclic import with future patches when testenv.testsuite will import testenv.testenv_cfg.
Commit
18eef74071a3439ef406e81d10c86dd783a83d74
by Oliver Smith
testenv: support using multiple titan versions
Install eclipse-titan versions 9.0.0 and 11.1.0 into /opt/eclipse-titan-$version inside the podman container by using the new optdir packages. Choose the appropriate version by setting related environment variables. Use the version in $PATH on the host, unless /opt/eclipse-titan-$version is also present on the host system.
Add a new --titan-version argument to explicitly set a version to use when running a testsuite.
Rewrite the version check code to take titan_min, --titan-version and the host version (if not using optdir) into account.
Commit
ebc2bb5f6cc6ca4b3bdc8b94c1a83dde1d1d3a8d
by Pau Espin Pedrol
IPA_Emulation.ttcn: Add call to support dis/enabling CCM management
This allows eg. a user to let the Emulation do the inital handshake, and then pass control of eg. IPA PING/PONG messages directly to the user afterwards.
Commit
91aa542a7a3de381b4d0fb8c2f8a598f90794192
by Oliver Smith
Bump titan_min to 11.1.0 where possible
I ran the generic version of all testsuites in the Osmocom jenkins with eclipse-titan 11.1.0. Bump titan_min where we have the same result as with 9.0.0.
The only testsuite that still didn't work the same is the gbproxy testsuite (OS#6800), keep titan_min=9.0.0 there for now.
Commit
aa2211b45b8c03a77251865f6828e0fee1fe3362
by Pau Espin Pedrol
stp: Fix recent regression introduced in TC_ipa_to_m3ua_patch_sccp
The introduced function f_SCCP_UDT() had the calling+called param order swapped with regards to previous templates. Change the order to first have "calling" (src) and then "called" (dst) as already done in ts_SCCP_UDT. While at it, change the ts_SCCP_UDT params to accept template (value) to make it easier for callers.
Commit
131d5d0cee16b804f7034be1f5d8a2df48c22f3c
by lynxis
pcu: TC_sns_del: improve test stability
Add a sleep 1 to ensure the BSSGP flow Ack flows before removing the SNS. Further add a data weight to the other NSVC to have at least one valid NSVC with data weights. Otherwise the NSEI would become unavailable.
Commit
cde4976148021b792453e631fe8f1585c58f40f5
by lynxis
remsim: bankd: add TC for creating a mapping with a busy client
Test if a busy client is implicit removed when creating a new mapping for the same client with a different bankd slot.
After a desynchronisation between the server and bankd happen (e.g. restart the server), the server might request a mapping between a client slot and a bankd slot while the bankd still has a different mapping for the same client slot.
Example before this commit: * server -> bankd: New Mapping (client 1/0, bankd 1/0) * server <- bankd: Ack * Restart server * server -> bankd: New Mapping (client 1/0, bankd 2/0) * server <- bankd: Ack (implicit remove mapping to bankd 1/0)
Commit
40c73568c77ee3747a02fce2cf031d723a938207
by Pau Espin Pedrol
bsc: generic: Introduce test TC_stat_msc_sctp_disconnected
Take the chance to properly configure all ASP/AS data statically, in order to be able to access them through VTY as well as have the setup properly documented in the config files.
Commit
c3264dec64062359ce0ddc867d9c8ec0f634ba71
by Pau Espin Pedrol
stp: Support expect RFC466 4.5.1 DUNA after ASP ACT
libosmo-sigtran recently introduced support in SG role to send DUNA for unreachablew destinations when a peer ASP becomes activated. This is currently sent upon first ASP going active, since it's the time where SG assumes the ASP peer may need that information.
Commit
f2d7775d961b392188bda1ec00fd3f651937cb26
by Oliver Smith
Cosmetic: testenv: tweak argparse formatting
Make all "add_argument" calls consistently have one function argument in one line, instead of only having it in some places, and have all arguments in one line in others. Having one function arg in one line is enforced via ruff format when having a comma at the end of the function call.
Commit
c3657172d306df5804d3142189a69ebb7a6a77f5
by Oliver Smith
testenv: add run --asan
Add a new --asan option for building Osmocom libraries and programs from source with address sanitizer enabled. This works by adding sanitize.opts to osmo-dev's gen_makefile.py, which in turn adds --enable-sanitize to most Osmocom projects.
The --autoreconf-in-src-copy argument for gen_makefile.py must be moved up, so the list of *.opts files is not interrupted by another type of argument that causes argument parsing to fail.
Commit
ae5164897d190d9dcf4bde757b6a7475ca52a890
by Pau Espin Pedrol
bsc-sccplite: Fix override of opc of incoming msgs
This patch fixes a regression introduced recently in a patch. We basically revert that line change. This fixes osmo-bsc crashes spotted during ttcn3-bsc-test-sccplite.
Commit
a448af0d7f27967c54d21236eea05f7d323af654
by Pau Espin Pedrol
bsc: Avoid running TC_stat_msc_sctp_disconnected in latest
The osmo-stp in latest release, aside from not yet implementing the "shutdown" cmd (which is known and hence test was expected to fail there), has a side effect of ending up with a broken state after restarting the ASP during got_parent() VTY node exit, where ASP is ends up in ASP_DOWN and AS in AS_ACTIVE. This generates failures in all tests after this one._
Commit
49c118fe88d74e29c0734f3cca7a797dda4aacf4
by Pau Espin Pedrol
StatsD_Checker: Keep polling IUT if waiting for convergence
The wait_converge feature was implemented and used so far only against IUTs which used also the snapshot feature, due to not having a VTY which allows both resetting and triggering a status report manually. Instead, those relied on IUT reporting changes at a given frequency.
If the wait_converge feature is requested and polling mode is used, then make sure we poll once per second after last received statsd UDP msg.
Commit
3c8f2862a33c36f5d8791ac31232e0a6afd2e934
by Pau Espin Pedrol
bsc: TC_mscpool_sccp_n_pcstate_detaches_msc: wait for AS to become unavailable
Otherwise race conditions can ocurr, specially since during some time the AS can be in PENDING state until finally going into DOWN state and notifying the peer.
Commit
88d6666056d6cdc899d6c102fc379f8a469a725e
by Pau Espin Pedrol
hnbgw: Use static sigtran config between osmo-hnbgw and osmo-stp
This allows referencing/accessing the specific ASP in osmo-stp, which will be needed in a follow-up commit to test IUT behavior when the SCTP conn is dropped.
Commit
21a9dc3d6d1f1ad68a3645a810909280b28cea1a
by Pau Espin Pedrol
hnbgw: swap first MSC and SGSN PC to be usual default ones
0.23.1 and 0.23.4 are default remote PCs to be used by osmo-hnbgw to reach MSC and SGSN respectively, if no config is provided. In this testsuite config, however, they were swapped, which is confusing. Swap back the values so they match the default ones in osmo-hnbgw.
Commit
4e5e6c88e642ad20663b2274696041c75577a0e7
by Pau Espin Pedrol
msc: Use static sigtran config between osmo-msc and osmo-stp
This allows referencing/accessing the specific ASP in osmo-stp, which will be needed in a follow-up commit to test IUT behavior when the SCTP conn is dropped.
Commit
edd0bee2234cd1dd60309ba1f32506b86d47d8f7
by Pau Espin Pedrol
RAN_Emulation: Fix handling of IMSI in RANAP Paging
The IMSI in RANAP Paging messages is encoded in octetstring BCD format. We need to decode it before using it, since we use plain hexstrings everywhere in the module to manage IMSIs.
Take the chance to clean up and improve logging on related lines, both for BSSAP and RANAP.
Commit
216e62c0df5890128a47f47d8b76cd749dc2d8b4
by Pau Espin Pedrol
GSUP Fix missing IMSI template present restriction in tr_GSUP_SAI_REQ
I got this DTE while running SGSN_Tests_Iu.TC_attach_pdp_act_user: """ GSUP_Templates.ttcn:381 Dynamic test case error: Restriction `present' on template of type hexstring violated. """
According to GSUP documentation, the IMSI param is mandatory. Upon fixing it, the compiler found the user causing the problem: """ BSSGP_ConnHdlr.ttcn:797.49: error: Restriction on template formal parameter does not allow usage of any or omit """
Commit
d365b6a5e9a1a679146b195ff4870903cba2b527
by Pau Espin Pedrol
sgsn: Use static sigtran config between osmo-sgsn and osmo-stp
This allows referencing/accessing the specific ASP in osmo-stp, which will be needed in a follow-up commit to test IUT behavior when the SCTP conn is dropped.
Commit
3916f477b3edb7071670f909ec087a7e5b2ec514
by Pau Espin Pedrol
sgsn: Introduce test TC_stat_rnc_sctp_disconnected
The commit doesn't validate everything it should, because passing the indication from osmo-iuh's iu_client to app (osmo-sgsn) is not supported in current API, and hence the statsd metrics are not yet implemented in osmo-sgsn.
Still, this test already validates that osmo-sgsn is capable of surviving an sctp link down event in IuPS, and continue to work afterwards. IT also allows easily debugging this scenario by inspecting pcap files, logs, etc.
Commit
780d496e07528c99a2b90ccf691a021c50311bba
by Pau Espin Pedrol
smlc: Use static sigtran config between osmo-msc and osmo-stp
This allows referencing/accessing the specific ASP in osmo-stp, which will be needed in a follow-up commit to test IUT behavior when the SCTP conn is dropped.
Commit
50e6218e0f70a9bb1501d54a933c0cef5873dee8
by lynxis
SGSN: Iu: use correct service request type
When the UE wants to transfer data, the Service Request must have the type data. Remove the default of f_service_request() to force explicit defining it.
Commit
f66a846f9f5a41bd8ca3882020a2b18db9eb4ab7
by Oliver Smith
testenv: run requirements check before cfg init
When parsing testenv.cfg files, the titan_min version gets compared with the installed titan version. This fails with a python trace if titan is not installed. Catch this earlier by running the requirements check first, which ensures ttcn3_compiler is avaiable or gives a helpful error message:
[testenv] Missing program: ttcn3_compiler [testenv] Install eclipse-titan, e.g. from osmocom:latest: [testenv] https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages
Fixes: 18eef740 ("testenv: support using multiple titan versions") Change-Id: I09ed7af5b236aeffd910d7c0a1a0b63a78631ade
Commit
73e81344c8f7d470fc2fae626b79df20df26acbc
by Oliver Smith
testenv/requirements: simplify rsync checks
rsync is needed by osmo-dev for the autoreconf-in-src-copy feature that testenv uses.
* Don't require rsync when running in podman. This is not necessary anymore since 92b3784 ("testenv: remove copy_ttcn3_hacks_dir").
* Combine the "if not testenv.args.binary_repo" code path with the "if not testenv.args.podman" code path, as --binary_repo can't be set without --podman.