NGAP: UESecurityCapabilities is optional in PathSwitchRequestAcknowledge
Current master branch of Open5GS includes UESecurityCapabilities IE in PathSwitchRequestAcknowledge, older versions do not. In order to match message of all versions, replace the IE by an an asterisk.
A SELECT APDU must have a header + two bytes of data (what to select). The test truncates this APDU in all variants, ranging from 6 bytes down to 0 bytes. The reader may respond with an error caused by invald request or with and error caused by timeout of the SIM.
CCID: Integrate SIMTRACE emulation into test cases
This integration allows to add tests that use SIMtrace hardware instead of a physical SIM. These tests can be used to test handling of invalid behaviors, such as invalid responses or timeouts.
The number of slots (mp_use_slot_count) are reduced to 7, so that the 8th slot can be used with a SIMtrace for subsequent tests.
CCID: Check if reader handles truncated SIM response
The reader knows how many byte of data is expected in the SIM response. The emulated SIM will truncate that response, so that some data and the final status words are not sent by the SIM. The tests expects the reader to time out and return an appropriate error core.
Do not reuse the container that gets started to build the testsuite and test components, to also do the the first testsuite run. Restart it after selecting the current testenv*.cfg, and use the podman_extra value from the right config instead.
As side-effect, this also makes the container restart logic much simpler.
Expect SlotStatus or DataBlock. The specification states that DataBlock response is used to indicate, if Secure command is not suppported. Existing implementation, such as Omnikey Cardman 3121 or osmo-ccid-firmware respond with SlotStatus instead.
Source directories can have more than one testenv.cfg file. Some options have been added to testenv.cfg that are not really specific to a single testsuite or how it gets executed, but to the whole source directory.
This is not ideal, because we need to have additional code that ensures these options have the same value across all testenv.cfg files in the same source directory, and we need functions that just pick the value from the first of these configs. When we change such a value, we also need to potentially make the change in multiple files.
Resolve this by introducing a new config file testsrcdir.cfg, that can be optionally present in the source directory, and has options that count for all testsuites in the same source directory.
Move max_jobs_per_gb_ram= as first option to the new file. The following patches will move all other source directory specific options to testsrcdir.cfg.
I have also considered naming the new file testdir.cfg, but the name "testdir" is already used in the source code for the place where we execute the individual testsuites after copying configs into that directory.
Adjust the code so it gets titan_min= from testsrcdir.cfg, instead of having it in testenv.cfg and enforcing that the value is the same across all files in the same source directory.
While at it, set the default to 11.1.0 (the value that is currently in all testenv.cfg files), so we don't need to repeat it in all source directories.
NGAP: Add UESecurityCapabilities IE to PathSwitchRequestAcknowledge
This IE is now used by Open5GS, so add it to the receive template.
This fixes C5G_Tests.TC_handover_inter_ngran_xn.
Note that there is also a pull request to fix the location of this IE in Open5GS. (https://github.com/open5gs/open5gs/pull/4589) Without this fix the test case will fail.
C5G: Release UE Context before sending Service request
A recent fix in Open5GS rejects RAN_UE_NGAP_ID in InitialUEMessage. This causes all tests to fail that send a subsequent InitialUEMessage with the same RAN_UE_NGAP_ID.
Release the UE Context before re-using the RAN_UE_NGAP_ID, because the connection handler can only handle one context at a time.
Note that the AMF_UE_NGAP_ID is incremented by Open5GS for every context.
This fixes: TC_ue_service_request_cm_idle_inact_sess TC_ue_service_request_cm_idle_ul_data TC_ue_service_request_cm_idle_unknown_sess_active
RemsimServer Tests: give the remsim server some time to update the slotmap
The check of the slotmap can race if it is requests straight away, because the slotmap might be still in the slotmap list as long the bankd hasn't responded yet.
The previous logic of not always running "make deps" was useful when "make deps" would take a long time to complete even if there were no changes. But this has been fixed in c7e40d6a ("Makefile: avoid fetching deps if not needed"). Run it every time now in order to fix that deps are not updated after deps/Makefile gets changed.
With this patch it is already possible to transmit the NAS Auth Response in the test ConnHdlr. We still lack generating a proper RES to have the response properly accepted.
testenv: podman: Install newer libcurl from bookworm-backports
It was already spotted a few days ago that libcurl4 7.88.1-10+deb12u12, currently being shipped by debian12, contains some sort of bug where it doesn't properly format/read HTTP2 requests when used in open5gs. It was found out that installing a newer version of libcurl4 fixes the problem. This patch also fixes the problems spotted in the 5gc testsuite when running within podman (they didn't show up outside podman because I'm using Archlinux and hence using newer libcurl 8.13.0 too).
Install eclipse-titan from osmocom:nightly instead of osmocom:latest, which now has version 11. Once we ensured everything works as expected, we will upgrade the version in osmocom:latest too.