Fix: Only run pcscd with "--diable-polkit" if supported
For example, if bankd tests run on Debian Bookwork, pcscd does not have the "--disable-polkit" option. This option is not required, because it does not support Polit anyway.
Only add "--disable-polkit" to the command line if supported by pcscd.
Fix bankd connection at RemsimClient_Tests.TC_bank_disconnect_reconnect
After each connection (initial connection and reconnect), the test must wait for the bankd connection to be fully established. Previously the IPA/RSPRO emulation failed, because the socket was closed before sending the acknowledgemen, leading to a 'Broken pipe' error.
Access to pcscd was denied, so that bankd never conneced to the reader. This caused TC_createMapping_exchangeTPDU to fail, because it requires connection to virtual smart card for this test
As per 3GPP TS 48.008 §3.2.1.25, HANDOVER PERFORMED must report the target cell. Add an optional cell_id parameter to the template (defaulting to '?' for backward compatibility) and update the two intra-BSC handover test helpers to assert that the Cell Identifier IE carries the target BTS (BTS 1: MCC=001 MNC=01 LAC=1 CI=1).
Also remove the unnecessary interleave wrapper in f_tc_ho_during_lcs_loc_req(): the two receives arrive on separate ports (RAN_CONN vs BSSAP_LE) so sequential receive is sufficient.
Test that when the BTS NACKs a CHANnel ACTIVation with RSL_ERR_SERV_OPT_UNAVAIL or RSL_ERR_SERV_OPT_UNIMPL, the BSC: does NOT mark the lchan as BORKEN.
The f_sleep(0.5) to delay the registration of the PC for the 2nd SCCP connection sometimes fired too late and we received the VGCS/VBS Assignment Request before the channel ConnHdlr was registered in RAN_Emulation. Then in turn we need to delay call establishment until the channel is ready. Implement proper synchronization points to make sure the order of registers is accomplished while making sure the 2 ConnHdlrs are registered before they need it.
The test failed sporadically with: "RAN_Emulation.ttcnpp:600 Dynamic test case error: Sending data on the connection of port BSSAP to 659:SCCP_SP_PORT failed. (Broken pipe)"
That's because it was simply waiting for a fixed amount of time while letting the underlaying RAN_Emulation do the RESET procedure. Sometimes it started tearing down the test before the procedure was fully completed, and RAN_Emulation failed passing the Reset (ACK) up the stack because the component was already unmapped.
Fix the issue by making sure the RAN_Emulation finished the RESET procedure before stopping the testThe test.
stp: m3ua: Expect unsolicited ASPIA ACK after unblocking ASP
Since libosmo-sigtran.git Change-Id If32902575e874d2acc9a5fc12509af42ed151739, osmo-stp will send an unsolicited ASPIA ACK to the peer whenever the ASP becomes unblock, in order to somehow give a chance to the peer to notice something changed and for instance possibly attempt re-activation of the ASP.
BSSAP(_LE)/RANAP: Proper counting of RESET retries
N retries means N+1 attempts.
Since M3UA_Emulation (in deps/, not in library) doesn't support pushing DUNA/DAVA as primitive up the stack, we cannot implement the related SCCP primitives which should end up sending in turn other primitives to our BSSAP(_LE)/RANAP emulations. This means we currently have no way to figure out the status of the underlying SCCP/MTP link, and our only way is implement a poor man's solution: retransmit RESET until we get an answer.
Since before bssap_reset_retries was set to 1 everywhere and we were only attempting once, it could happen that the other end (the IUT) was not yet connected to the STP when we send the RESET, and hence it is discarded the STP. In that scenario, we'd time out and fail the test. Instead, now that we do N+1 attempts, we retry after 5 seconds, which should be enough time for the peer to reconnect to the STP.