hlr: testenv: fix running pyhss from debian pkg (details)
Commit
6d3463acdc67d34f5a9477592d7881b1bb9f94c6
by Pau Espin Pedrol
ngap: Fix deviation in ASN1 from TS 38.413 version 17.5.0
I originally copied the ASN1 files from https://forge.etsi.org/rep/int/5g-core/ngap.git directory ttcn/LibNGAP/lib/asn1, commit fa43d01e202379a969e991a9454d9c6c6930b5b5.
Apparently one file contained a deviation from the 3GPP content and it was also fixed in ngap.git in 47e7239dd80f2f12a4cbcdd7977ca0a32356f3be.
I found out this problem when trying to use this ASN1 file to generate new libfftranscode, which then failed to properly decode DownlinkNASTransport due to the deviation.
Commit
c7336be632c79144499c3d31bdedd703ccb212f0
by Oliver Smith
Cosmetic: deps/Makefile: update comments
Remove the part about caching logic of docker containers, as most testsuites don't use docker-playground anymore. The main reason for using commits here is that we have exact commits when doing regression testing.
Replace the verbose license header with the SPDX version while at it.
Commit
1926de1cf1da5b4f968a37636cbe8fe820419409
by Pau Espin Pedrol
5gc: Support PDU Session Establishment procedure
This commit adds initial support to issue a successful PDU Session Establishment procedure towards the 5GC, getting a ready-to-use GTPU session with IPv4 addr + TEID + UE IP address.
commit has to our nas.git fork is updated in order to have multiple fixes and improvements needed to have everything working fine.
Commit
2cee8714b800f598f008908edfb13571ddab53e2
by Pau Espin Pedrol
Split GTPv1U out of GTPv2_Emulation
GTPv1U and GTPv2C are 2 different protocols, working on 2 different ports, on 2 different sockets. Hence, it makes no sense to put them together, since some tests may want to use only the control-plane, others may want to use the user-plane, etc. Morevoer, GTPv1U can be used together with both GTPv2C anf GTPv1C.
This commit also fixes the confusion where TEIC and TEID were not properly separated in GTPv2_Emulation.
Commit
a1d418c2e395f0d05555849c12cf6666986aa18b
by Pau Espin Pedrol
GTPv1U_Emulation: support multiple client ports per GTP1U_ConnHdlr
This feature is already present in GTP1U code of GTP_Emulation. That part of the code will be removed and ported to use GTPv1U_Emulation, so we need to also support this feature here.
Commit
e57f19566233114807e08202f5e391b0aacad5af
by Pau Espin Pedrol
5gc: Rework init code
* Move T_Guard to MTC, there's no need to have multiple of them (one per ConnHdlr). * Call f_init_handler() internally so it doesn't need to be called by each ConnHdlr test. * Change function attribute friend to private
Commit
54be980dbf7119069682b27cfc4d79874764e412
by Oliver Smith
testenv: Dockerfile: use debian archive for deb10 libssl pkg
As Debian 10 is EOL, this debian 10 package we are still using here to make mongodb work is getting removed from the mirrors. Currently some still have it, some have deleted it already. Use the archive instead.
Commit
4490d45fc46278c854d788375235436c45b9b19c
by Oliver Smith
testenv: Add $install_dir/usr/bin to $PATH
When building programs from source, don't look only in $install_dir/bin, but also in $install_dir/usr/bin for the binaries. osmo-s1gw installs to usr/bin with recent changes and other programs may do this too.
Commit
2d2840eb9cf4c6ac75734d0d79844ad83cd38588
by Pau Espin Pedrol
library: Comment out debugging for NGAP/5G-NAS
The current NGAP and 5G auth code is now working fine, so disable debug logging. Keep it commented out so it can be re-enabled at any time if some related topic needs to be debugged (will eventually happen).
Commit
f6570fe2d243551aaf25740ce9dcf5f5f5e55011
by Pau Espin Pedrol
5gc: Introduce test TC_ng_register_ping4_256
open5gs-dbctl tool is called in batches of multiple IMSIs to speed up setup, since each call takes fractions of seconds to complete. mongosh called by open5gs-dbctl actually uses quite a lot of CPU and RAM resources, hence limit the amount of parallel runs to a fair amount (eg. running the 256 of them in parallel froze my workstation with 16GB of RAM).
Commit
2640ca1e9df9ceee417ad3788c37ed39239de82b
by Pau Espin Pedrol
NGAP_Templates: Fixes and improvements for UEContextReleaseComplete
The existing templates for UEContextReleaseComplete were completelly wrong, probably due to copy-paste when introducing them. This commit fixes all those problems and allows passing optional parameters.
* procedureCode was wrong * Criticality of several fields was wrong * Type of resource list was wrong, and marked as mandatory while it was optional.
Remove the unused limit_section argument in testenv.osmo_dev.make(). The idea was to use osmo-dev to build programs where no packages are available when using --binary-packages, but this didn't work because when using --binary-packages, we must install all package dependencies from the binary repository (so testing nightly / latest use the expected library versions). Nowadays this use case is handled by podman_install.from_source_* functions without using osmo-dev.
Commit
34d9429b2bd5836ddcd35f60ed0a3000e38438ae
by Oliver Smith
testenv: pass targets to osmo-dev's gen_makefile
Pass the targets we are about to build to osmo-dev's gen_makefile script. This has two advantages:
1) Check early if a target isn't known by the current osmo-dev version, displaying a useful error to the user instead of just failing during make later on:
ERROR: filter_projects_deps_targets: can't find project osmo-new-project in projects_deps!
[testenv] gen_makefile.py from osmo-dev failed! [testenv] Your osmo-dev.git clone might be outdated, try: [testenv] $ git -C /home/user/code/osmo-dev pull
2) Parsing the generated Makefile when running "make" after generating it doesn't cause a noticable delay anymore. On my machine (with many Osmocom git repos cloned in osmo-dev's src dir) it went from several seconds to instantly.
Commit
277645455fc1e9cfc73b302e79b01305d40bdd87
by Vadim Yanitskiy
Makefile: add 'clean-logs' target
When running tests manually I oftentimes end up with hundreds of *.log files in testsuite directories. The present patch adds a convenience target for removing them.
Commit
fce7affe62355633b0ecf40ce79b0224d9d3cea7
by Vadim Yanitskiy
msc: add TC_silent_call_{start_stop,active_conn}
This patch adds testcases for the silent-call feature:
* MSC_Tests.TC_silent_call_start_stop Test starting and stopping silent call via the VTY. * MSC_Tests.TC_silent_call_active_conn Test initiating a silent call while there's an active connection. The MSC is expected to be smart and reject such an attempt.
Commit
3e18a7d180d3d18903ae3332f19916321bef3693
by Pau Espin Pedrol
ngap: Add template for UEContextReleaseReq without PDU Session List
That's the only optional IE in the message. Add a separate template to be able to transmit with that IE set, similar to what's already done in m_n2_InitialContextSetupRequest_withPDUSessionList().
Commit
48331bb5c5dc7e6f273d87bcfcdef92a520ec386
by Oliver Smith
testenv: init podman: add --distro arg
Allow building the podman image for another distribution. This was mostly implemented already, but due to the missing --distro argument for "./testenv.py init podman" it could not be used yet.
Commit
a54861145eb74451afbdcda39546e8aa09f7b1ca
by Oliver Smith
testenv: check value of --distro early
Make sure that the value for --distro is supported early on, instead of only checking it if --binary-repo is set while trying to add the binary repository.
Commit
f92398a3b38501adc330565566bca97e46bacd24
by Oliver Smith
testenv: enable_binary_repo: configure apt pin
Add an apt-pin to ensure packages from the Osmocom repositories get preferred over Debian's packages. I just ran into this with osmo-mgw, where we have 1.4.0 in osmocom:latest and Debian 13 has 1.14.0+dfsg1-2, which counts as higher version. This results in the wrong package being selected, and also in an error later on when trying to install related debug packages from our repository:
The following packages have unmet dependencies: osmo-mgw-dbgsym : Depends: osmo-mgw (= 1.14.0) but 1.14.0+dfsg1-2 is to be installed
Commit
8b1842e63aef48d3efacfa2c8d75f7db099fdfd1
by Oliver Smith
testenv: qemu: ignore builtin modules
In debian 13, the virtio_pci kernel module is now builtin. Adjust the code paths that add kernel modules to the initramfs and load them to ignore builtin modules.
This fixes the ttcn3-ggsn-test-kernel-latest job job, which currently fails with:
+ modprobe -a --dry-run --show-depends --set-version=6.12.41+deb13-amd64 virtio_net virtio_pci + sort -u + cut -d -f 2 + local files=virtio_pci /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/net_failover.ko.xz /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/virtio_net.ko.xz /lib/modules/6.12.41+deb13-amd64/kernel/net/core/failover.ko.xz + qemu_initrd_add_file virtio_pci /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/net_failover.ko.xz /lib/modules/6.12.41+deb13-amd64/kernel/drivers/net/virtio_net.ko.xz /lib/modules/6.12.41+deb13-amd64/kernel/net/core/failover.ko.xz /usr/lib/modules/6.12.41+deb13-amd64/modules.alias + local i + local cp=cp --no-dereference --recursive --parents + cp --no-dereference --recursive --parents virtio_pci <https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test-kernel-latest/1665/artifact/logs/osmo_ggsn_v4_only/ggsn/_initrd> cp: cannot stat 'virtio_pci': No such file or directory
Commit
b03de2f47c825c2920b94504d7f8c7e297986210
by Oliver Smith
testenv: use separate install dir for --asan
The --asan flag builds all Osmocom components with address sanitizer enabled. Use a separate install dir from the non-asan version to ensure we don't end up with using non-asan versions. (A separate make dir is already used.)
Bump make_dir_version to avoid having markers for already installed binaries / libraries in the make dir, which are invalid now for asan-builds as we switched the install dir.
Fixes: c3657172 ("testenv: add run --asan") Change-Id: Ic75452b75d4c3ee8045b68353830b5532e1ce90e
Commit
31ebf29eef756b721743d0dbe247972e595f698e
by Pau Espin Pedrol
ranap: Support Tx GlobalRNC-ID during RANAP RESET (ACK)
This commit doesn't affect the behavior of any existing testsuite yet, it only updates the templates and adds a RanOps param to be able to pass a GlobalRNC-Id to RAN_Emulation.
A follow-up commit will change SGSN_Tests to append GlobalRNC-Id to RANAP Reset when sending towards SGSN, since it's mandatory for an RNC to set it according to 3GPP TS 25.413 8.26.2.2.
Commit
8880a196f73ae8c5ea196c8abe15dc48e774ae7a
by Oliver Smith
testenv: don't use all RAM in 5gc testsuite build
When building the 5gc testsuite with as many parallel jobs as CPU cores are available (the default), on at least Pau's and my system, all RAM gets consumed and the system becomes unusable. On other systems, an out-of-memory killer might kill the compiler, which is also not great. This can currently only be avoided if the user remembers to pass "-j4" to testenv, to ensure that only 4 jobs run in parallel.
Add a new max_jobs_per_gb_ram= option to 5gc/testenv.cfg. Set it to 0.3, so on e.g. systems with 15 GiB of RAM, we get 4 jobs as maximum.
Commit
4d2f95437a778dd9fba55f640f76d6e7a43a8015
by Pau Espin Pedrol
sgsn: Add suport to obtain statsd output
It will be used in a follow-up commit in TC_stat_rnc_sctp_disconnected.
This new test infrastructure can still be used with osmo-sgsn latest since it already initialized the statsd VTY commands despite having no osmo_stats in use.
Commit
4ea8bff7dff2a315c54f30a44b99a36838f7a49d
by Vadim Yanitskiy
Add templates for S1AP Handover procedure
These templates include handover preperation and resource allocation for S1 handover procedure. It supports mandatory information elements only at this time.
We use our own one from the library, not the demo one.
In `asterisk/gen_links.sh` we first create a broken symlink, and then overwrite it with a valid symlink to `library/PIPEasp_Templates.ttcn`. This should not be a problem, since `gen_links.inc.sh` is calling ln with flags `-sf`, yet we saw a build failure in Jenkins:
Commit
a7d8ed895a10d3910e20bfce9f37a0125c828c56
by Oliver Smith
msc: CC SETUP MT speech: verify bearer capabilities
Verify that the MSC sends the bearer capability IE from 3GPP TS 24.008 § D.1.2 for speech in the network to MS direction, instead of allowing e.g. what osmo-msc master and latest release currently do:
- Filling out radio channel requirement the same way as the MS to Network direction, which is wrong for the Network to MS direction: "Bits 6 and 7 are spare bits. The sending side (i.e. the network) shall set bit 7 to value 0 and bit 6 to value 1." (3GPP TS 24.008 Table 10.5.102)
- Sending a speech list in the Network to MS direction, which seems to be allowed in theory and MS are supposed to ignore it (end of Table 10.5.103) but causes bugs in some MS in practice. Therefore it is better to ensure that osmo-msc does not send it (OS#6656).
Implement this in f_mt_call_complete(), which gets used e.g. by TC_lu_and_mt_call.
Commit
d54632c4da9deb1648fe9001933566d2b61a4f12
by jolly
S1GW: Add test case to test release of e-RABs during handover preperation
HANDOVER COMMAND allows e-EABs to be forwarded or to be released. The test provides two lists and expects osmo-s1gw to release only those e-RABs that are included int the "E-RABs to Release List" IE.
Commit
cef35887df9d683f53b0409efceeed6fb4f0d1ec
by jolly
S1GW: Add test case to test release of failed e-RABs during handover resource allocation
HANDOVER REQUEST ACKNOWLEDGE indicates admitted and failed eRABs. The test provides two lists and expects osmo-s1gw to release only those e-RABs that are included int the "E-RABs Failed to Setup List" IE.
Commit
3f73dc3cadd0724642dacb544f0042a661d5e0b9
by Pau Espin Pedrol
SGsAP_Emulation: Introduce proper support for server-mode
Prior to this commit, only initial (not really useful) SCTP server-mode support existed in SGsAP_Emulation. This is basically because MSC_Tests uses the SCTP client-mode, and MME_Tests_SGsAP were not yet in a fully working state.
In server-mode, we have a conn_id for the listening socket and a conn_id for the accepted socket; track them properly. Moreover, in server node we definetly need some sort of event to wait for the client to connect; introduce it. Based on existing work in Iuh_Emulation.
Commit
02d8803784ca1cd7fbad4033c4e8ba47d390d563
by Pau Espin Pedrol
mme: Initial working state for MME_Tests_SGsAP.ttcn tests
MME_Tests_SGsAP.ttcn tests were introduced to the repository many years ago (~2019), but they were mostly WIP and were never run as part of the regular testsuite.
This commit reworks and extends previous work to get them up to date with current MME_Tests and makes most of them passing.
TC_sgsap_alert_* tests are still in WIP and will be fixed in follow-up work.
Commit
e4225d26e7cc0ca8767962b26355d1665a0a5262
by Pau Espin Pedrol
mme: Store and check {mme,enb}_ue_id over S1AP
* Generate a different enb_ue_id based on imsi_suffix, and store it during startup of ConnHdlr. * Validate the MME sends the expected message to the expected enb_ue_id. * Store the mme_ue_id and validate also that MME keeps using it.
A new procedure is added to S1AP_Emulation, similar to what already exists in NGAP_Emulation, to obtain the mme_ue_id allocated by the peer. This is needed because upon rx of DL NAS Transport messages we only receive the upper layer NAS decoded in the Connhdlr, so we can't store and track the MME ID early enough.
Commit
3ffdea4b3c0a460357ab7eb6541dec6378553f9f
by laforge
*/osmo-*.cfg: make stderr logging consistent
Use the following options for stderr logging in all config, to make the output consistent and readable (e.g. no hex categories, no long paths to source files at the end of log lines). Use the same order of parameters in all files.
Commit
97cb154c443a27cc0749417ed0a1bf430b63196b
by Pau Espin Pedrol
stp: define PC for IPA ASP peers
This allows explicitly matching what's configured in osmo-stp's "routing-key" & "point-code override dpc" VTY configs for each AS. This in turn makes the osmo-stp cfg file easy to understand by looking at the peer's (TTCN3) configuration.
There's no need to configure "point-code override opc" in the osmo-stp since by default the PC declared in the routing-key is used to apply an OPC on incoming messages over an IPA ASP.
Once we have the PC available in the TTCN3 config file, we can use it inside IPA<->M3UA test to put the value in generated M3UA messages (there's no visible changes in IPA ones because ofc the IPA signalling doesn't include the PC in the messages).
Commit
eb8c9d2c002ed9d956f6833d2a436d5c15e65414
by Pau Espin Pedrol
Move RAN_Configurations module parameter definition to *_Tests.default
This way we can easily tweak values, which usually involve other programs' config like osmo-stp, without needing to recompile ttcn-3. Furthermore, we avoid ending up in the situation where the .ttcn file contains invalid data which is always overridden in .default, like it happened in MSC_Tests.ttcn.
Commit
520ac3abaa0367001d2eb4d69cbca881635ecb29
by Oliver Smith
*/gen_links.sh: fix wrong SDP_EncDec.cc symlink
SDP_EncDec.cc is not in titan.Libraries.TCCUsefulFunctions, it is in titan.ProtocolModules.SDP. The gen_links.sh scripts had instructions to symlink both the wrong and right location of SDP_EncDec.cc, and most of the time the right location would be symlinked.
When the wrong location was symlinked, the next command regen_makefile.sh would fail with:
ttcn3_makefilegen: error: Cannot find any source file for argument `SDP_EncDec.cc'.
Commit
43958bf1ecaebeff4ab88bc955c2c6e48d28ddb5
by Oliver Smith
*/gen_links: remove TCCOpenSecurity_Functions.hh
The file TCCOpenSecurity_Functions.hh does not exist in a fresh clone of titan.Libraries.TCCUsefulFunctions. Currently it only gets created after gen_links.sh ran, created the symlink (to the not yet existing file) and then ttcn3_compiler writes to it. Adjust the gen_links files to not create this broken symlink.
This is slightly slower than the previous approach (which did not check if the symlink target exists). But this prevents adding subtle bugs that may not trigger every time (see 520ac3ab ("*/gen_links.sh: fix wrong SDP_EncDec.cc symlink")).
Commit
f3b452e79e5d242fd1f3fe31414e5041a0f0161a
by Oliver Smith
testenv: run daemons with 'ulimit -c unlimited'
Prepare to support getting core files without having systemd-coredump installed, as we plan to uninstall it from the jenkins servers to make retrieving coredumps for other jobs feasible again.
When starting daemons, set the maximum core file size to unlimited. Otherwise it might be at 0, resulting in no core files getting generated.
I have considered using resource.setrlimit() on the python process instead, but this wouldn't work when spawning the daemons inside the podman container.
Commit
168a3770a3b049400b48114b79e004f120433c6f
by Oliver Smith
testenv: coredump: support core_pattern=core
Support getting core files from a typical core_pattern=core where the coredump just gets stored in the current working dir, instead of always retrieving it from coredumpctl. This is what we will use with jenkins in the future, as it makes getting core files in other jobs easier. Remove support for the custom testenv-coredump-helper code that isn't needed anymore.
Commit
0efc39b3cb781b0ff2212899e33a7efd8ad358da
by Vadim Yanitskiy
library/HTTP_Adapter: do not hard-code 'Content-Type'
* Do not send `Content-Type` when request contains no body. ** This is wrong and some servers would reject such a request. * Allow passing custom `Content-Type` to ** `f_http_tx_request()` and ** `f_http_transact()`. * Use `application/json` by default.
Commit
0081e4fe8b6b31837f2bbe72345478e14a6ce71c
by ewild
smdpp: es9p testsuite
Implemented parts conform to sgp 23 v1.13-v1.15 Certs are from https://www.gsma.com/solutions-and-impact/technologies/esim/wp-content/uploads/2021/07/SGP.26_v1.5-17-July-2025_files_v3.zip the invalid ones are generated using smdpp/generate_all_test_certificates.py
Commit
d81a77a4086ccccd1553a6f1f58d5d369ac523c2
by laforge
s1gw: implement the REST interface client
OsmoS1GW implements a custom (non-standard) REST interface, primarily intended for state introspection. The interface is specified using OpenAPI, with the specification available in osmo-s1gw.git.
Commit
6397e81ba08a411fe93be41e77ebf85351cd50af
by Oliver Smith
ttcn3-tcpdump-start: fix default TTCN3_PCAP_PATH
Fix that manually running testsuites (as described in README.md) would unsucessfully attempt to start dumpcap for 10s before running each test:
NOTE: unable to use dumpcap due to missing permissions in /tmp Warning: Named pipe already exists: /tmp/cmderr sudo -n /usr/bin/tcpdump -U -s 1520 -n -i any -w "/tmp/smdpp_Tests.TC_rsp_complete_flow.pcap" >/tmp/smdpp_Tests.TC_rsp_complete_flow.pcap.stdout 2>/tmp/cmderr & Waiting for packet dumper to start... 0 Waiting for packet dumper to start... 1 Waiting for packet dumper to start... 2 Waiting for packet dumper to start... 3 Waiting for packet dumper to start... 4 Waiting for packet dumper to start... 5 Waiting for packet dumper to start... 6 Waiting for packet dumper to start... 7 Waiting for packet dumper to start... 8 Waiting for packet dumper to start... 9 Packet dumper didn't start filling pcap file after 10 seconds!!!
This happens because /tmp is owned by root and not by the user running ttcn3-tcpdump-start. Put the pcaps in /tmp/pcap by default instead of /tmp and create this directory as the current user if it does not exist. This also prevents cluttering /tmp.
Note that this is only relevant when manually running the testsuites and not setting TTCN3_PCAP_PATH, e.g. testenv sets this variable already.
Commit
f547508b4b0b22831be018769826f52ababa51f6
by Oliver Smith
testenv: add a --fast argument
The ttcn3-{tcpdump,dumpcap}-*.sh scripts can easily spend 5s or more for each test with: * Waiting until the pcap gets created. * Waiting until pcap size does not increase anymore after the test. * Saving the talloc report.
Add --fast to skip all this, to allow running a whole testsuite significantly faster locally to check for regressions. Developers can then still run failing tests again without --fast to get the pcap and talloc reports.
Commit
110a581c30ab8ceeb093370a25501238c11b5209
by Pau Espin Pedrol
RAN_{Emulation,Adapter}: Split transport type from transport client/server mode
The RAN_Transport is used to identify the stack of protocols in use up to SCCP. The client/server mode is some extra independent information. For instance, RAN_Emulation doesn't really use it while RAN_Adapter does, since the later is the one in charge of setting up the lower layer socket connection.
Commit
0cdd73a8e2e5265004b3f100a9b6d1a5486140b6
by Pau Espin Pedrol
Split SCCP_Adapter out of RAN_Adapter
RAN_Adapter has further features and goes up in the stack, while sometimes getting an SCCP SAP is enough, eg. when doing stuf with SIGTRAN on the Core Network (eg. TCAP).
Commit
20614e6c2cc5226923f87d56914a22a93161968b
by Oliver Smith
testenv: add --install-package
Add an option to quickly install packages in the container. This is useful when making a new SUT run with osmo-ttcn3-hacks and figuring out which packages need to be installed to make the build pass (without rebuilding the whole container for each missing dependency). It can also be used to quickly install additional debugging tools (strace, valgrind, etc.). A cache for the deb files is already getting mounted inside the container.
Commit
402c199ca39147adca104d0df8d81436be4c9f22
by Oliver Smith
sgsn/SGSN_Tests_SNS.cfg: adjust to recent changes
Fix this error: Error: Error message was received from HC at 10.0.2.100 [10.0.2.100]: Error while setting parameter field 'SGSN_Tests.mp_ranap_cfg[0].sctp_addr' to '{ 23908, "127.0.0.103", 2905, "127.0.0.200" }': Non existent field name in type @RAN_Adapter.RAN_Configuration: sctp_addr
Fixes: 0cdd73a8 ("Split SCCP_Adapter out of RAN_Adapter") Change-Id: I62a1188aa3346fda3f0674296629ade51a02088f
Commit
0e1f39f0cbd35d70ace0cc39ad7a7d38632c4826
by Oliver Smith
testenv: set PYTHONUNBUFFERED=1
Prepare to run PyHSS, which needs this variable to be set or else no log messages are printed. This problem exists with potentially all python scripts that testenv would run, so set the env var for all commands.
Commit
477a06dc16270933fe2695d71afc3e3ad52e3c7b
by Oliver Smith
hlr: add MSC to ccm_pars.name
Fix an immediate disconnect from pyHSS: [ERROR] 127.0.0.1:9999: Role not found in tags. 'sgsn' or 'msc' must appear in one of there tags: TYPE, UNIT, UNITNAME. Closing connection.
Commit
192e9998a17169cab8433754e7121c485456e862
by Oliver Smith
hlr: wrap f_vty_subscr_create and _delete
Add wrappers as f_subscr_create/_delete (without _vty), and only use the VTY implementation for OsmoHLR. This is in preparation for implementing a different method for PyHSS in a follow-up patch.
Avoid passing the VTY parameter by splitting each function into a normal variant that runs on test_CT, and a _HCH variant that runs on HLR_ConnHdlr.
Commit
a8eb4c70868201c91cae06b3cba62bbc3ed5073d
by jolly
MME-Tests: Add tests for emergency cappability indication
When an attachment is accepted, MME indicates the capability of emergency calls, if and only if configured in MME's configuration file. The emergency numbers that are configured are also indicated.
The tests check if the indications follow the configuration and are correctly encoded.
smdpp_Tests: simplify generation of smdpp_ConnHdlrPars (NIST vs. BRP)
When we call f_init_pars() it will return a record with default parameters. However, those parameters are only a suitable default when the NIST curve is used. For the brainpool curve we will have to modify returned result.
Let's simlify this by adding a parameter to f_init_pars() that allows us to switch between the defaults for NIST and BRP as needed.
Commit
f27abc13d9ec733647f1701672d03ad606f71659
by Oliver Smith
hlr: pyhss: create/delete subscribers
Run the PyHSS API service, and fill it with a default APN on startup. Having one APN entry in the database is required for creating subscribers.
Talk to the API service for creating and deleting subscribers. Do this with a new script pyhss_api_helper.py. Deleting subscribers requires reading JSON returned from the server (to get the AUC and subscriber ID from the IMSI). I have first attempted to do this via HTTP_Adapter instead of using a helper script, but this was a lot more complex and would have required to have the JSON structure in the TTCN3 files. The eim testsuite also runs an external script for REST requests.
With this change and additional fixes in PyHSS, more tests pass: * HLR_Tests.TC_gsup_sai * HLR_Tests.TC_gsup_sai_num_auth_vectors * HLR_Tests.TC_gsup_ul * HLR_Tests.TC_gsup_purge_cs * HLR_Tests.TC_gsup_purge_ps
smdpp_tests: extend comment with hint on CA cert locations
Let's extend the comment around mp_es2plus_server_host and mention that CA certfiicates should be made availablein /etc/ssl/certs. In case the CA certificate is not present in /etc/ssl/certs, libcurl will refuse to connect.
The ES2Plus_Tests only have minimal configuration options. Let's remove hardcoded options and replace them with module parameters. Let's also document the module parameters.
The testsuite uses a custom libcurl based sublayer that handles all the HTTP related tasks. Let's remove the HTTP_server_port related testport parameters.
ES2Plus_Tests: rename mp_es2plus_server_host to _fqdn
Let's rename the module parameter mp_es2plus_server_host to mp_es2plus_server_fqdn. The reason for this is that the suffix "host" suggests that one may use an arbitrary hostname or IP address. In this case this is in fact not true. The FQDN must match the hostname of the SSL server certificate. Apart from that GSMA SGP.22 always uses the word "FQDN" in their specs.
ES2Plus_Tests.cfg: comment out parameters in config file.
The code in ES2Plus_Tests.ttcn already provides safe defaults, so we do not have to repeat those defaults again in ES2Plus_Tests.cfg.
So let's comment out the parameters. This way we kenn keep them for illustrative purposes, so that users can use the config file as a helpful template for the most basic settings.
smdpp_Tests.cfg: comment out parameters in config file.
The code in smdpp_Tests.ttcn already provides safe defaults, so we do not have to repeat those defaults again in smdpp_Tests.cfg.
So let's comment out the parameters. This way we kenn keep them for illustrative purposes, so that users can use the config file as a helpful template for the most basic settings.
smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn
In smdp_Tests.ttcn, the ES9+ and ES2+ interface are intermingled. This is a problem since ES2+ and ES9+ are two independed interfaces and they may use different certificates and may even be reachable under a different FQDN from a different network interface.
To untable ES2+ and ES9+ we can move the ES2+ code from ES2Plus_Tests.ttcn to smdpp_Tests.ttcn. Since ES2Plus_Tests.ttcn inherits from smdpp_Tests.ttcn the ES2+ code will still be available to ES2Plus_Tests.ttcn.
This change will add the flexibility of ES2Plus_Tests.ttcn to smdpp_Tests.ttcn. This means we can now freely configure the FQDN and the certificates used with ES2+.
When we call the f_init_esXplus functions we always check the return code to see if the initialization went ok. However in both functions we already set the verdict and in the ES2+ variant of the functions we already stop the MTC. Let's optimize the function calls so that we only call the function without checking the return code. Let's do all the error handling and the stopping of the MTC in inside f_init_esXplus.
Commit
d897b8bb991ff91a01b1cf863bbae36c0ab3d091
by Oliver Smith
hlr: testenv: fix running pyhss from debian pkg
Move the run_in_venv.sh script that is only used by pyhss from the generic location _testenv/data/scripts/run_in_venv.sh to hlr/pyhss/run_in_venv.sh and hardcode the path /opt/venvs/pyhss/bin/activate in there when running from binary packages. This is the path used in the binary package in the Osmocom OBS, the default path from dh_virtualenv. The package doesn't install pyhss_gsup etc. to /usr/bin, as these are usually not meant to be directly started without the systemd services that have the /opt/venvs/pyhss path hardcoded.
Also put 'export PYHSS_CONFIG=config.yaml' in there, now that the script is pyhss specific.