osmo-ttcn3-hacks/library
Vadim Yanitskiy e9c0635dae library/RSL_Emulation: implement waiting queue for DChan messages
Since change [1] has been merged, we see multiple regressions in
ttcn3-bsc-test (all LCLS test cases) and ttcn3-bsc-test-sccplite
(sporadic failures). In all failed cases, the reason is similar:

  RSL for unknown Dchan
      BSC_Tests.ttcn:4501 BSC_Tests control part
      BSC_Tests.ttcn:2176 TC_assignment_codec_fr testcase

The mentioned change enables TCP_NODELAY option for all IPA based
connections, including both OML and RSL. This option disables
Nagle's algorithm [2], so we get less delays on IPA based links.

It took me a lot of time to investigate, and finally, I figured
out what is actually causing those regressions. The TCP_NODELAY
itself is not a problem, of course. As it turned out, the
problem is here, in our TTCN-3 test case framework.

Each test case involves several components (actors) running in parallel.
One of them is RSL_Emulation_CT, which is responsible for handling and
routing of RSL messages between the connected components.

A test case may register dedicated channel handlers by calling
f_rslem_register(), so DCHAN/RLL/IPACCESS messages will be matched
by RslChannelNr/TrxNr and routed to the corresponding one.

If no handler is found for a given RSL message, the RSL_Emulation_CT
would abort the test case execution. And that's where the problem is.

Given that all components are running in parallel, it may happen
that a received RSL message would be processed by the RSL emulation
component faster than the test case would call f_rslem_register().
The test case would be aborted due to "RSL for unknown Dchan".

Speaking in context of the failing BSC test cases, a test case
calls f_rslem_register() on receipt of an Assignment Command as
it contains all the assignment parameters. After that we expect
to receive an RSL ip.access CRCX for that channel.

The problem is that both Assignment Command and ip.access CRCX
messages are sent by the BSC simultaneously, so the later may
be handled faster than the first one. Race condition!

Let's work this around by maintaining a waiting queue, where the
messages, for which no handler was found, will be kept until the
corresponding dedicated channel is registered.

This is an optional feature that needs to be enabled explicitly
by calling f_rslem_dchan_queue_enable(), and then explicitly
disabled by calling f_rslem_dchan_queue_disable().

If at the moment of calling f_rslem_dchan_queue_disable() the
waiting queue is not empty, e.g. because the IUT sent us more
messages than we expected, test execution will be terminated.

The actial fix for the LCLS test cases will be submitted next.

[1] Ia3d4c41bf0659e682f0b7ae5f3d58ed0f28edb58
[2] https://en.wikipedia.org/wiki/Nagle%27s_algorithm

Change-Id: I25e10e28de174337233e6a3bb32cc16f2d7d614e
Related: OS#4619
2020-06-21 20:46:49 +00:00
..
hnbap HNBAP, RUA and RANAP protocol codecs 2019-04-25 20:07:11 +00:00
ranap msc: fix Iu mo call 2019-11-23 07:59:07 +00:00
rua HNBAP, RUA and RANAP protocol codecs 2019-04-25 20:07:11 +00:00
s1ap library: Add S1AP Templates 2019-08-15 09:49:18 +00:00
sabp SABP (Service Area Broadcast Protocol) definitions 2019-09-26 19:31:08 +00:00
AbisOML_Types.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
BSSAP_CodecPort.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
BSSGP_Emulation.ttcn BSSGP_Emulation: add BssgpDecodeDepth 2019-09-02 09:15:33 +02:00
BSSGP_Helper.cc BSSGP/IuUP: Fix license disclaimer copy+paste 2020-03-01 20:27:19 +01:00
BSSGP_Helper_Functions.ttcn gprs: Move BSSGP related code to library 2018-02-16 18:33:59 +01:00
BSSGP_Types.ttcn library/BSSGP_Types: use tr_MI_IMSI from library/L3_Templates 2020-03-28 05:20:41 +07:00
BSSMAP_Templates.ttcn msc: overhaul voice call testing 2019-11-23 07:59:07 +00:00
CBSP_Adapter.ttcn Add CBSP_CodecPort + CBSP_Adapter 2019-09-04 10:45:41 +00:00
CBSP_CodecPort.ttcn Add CBSP_CodecPort + CBSP_Adapter 2019-09-04 10:45:41 +00:00
CBSP_CodecPort_CtrlFunct.ttcn Add CBSP_CodecPort + CBSP_Adapter 2019-09-04 10:45:41 +00:00
CBSP_CodecPort_CtrlFunctdef.cc Add CBSP_CodecPort + CBSP_Adapter 2019-09-04 10:45:41 +00:00
CBSP_Templates.ttcn HACK: avoid compilation error with TITAN > 6.5.0 2020-04-20 18:02:45 +02:00
CBSP_Types.ttcn bsc: Test suite for CBSP (Cell Broadcast Service Protocol) 2019-09-05 13:13:35 +02:00
DIAMETER_CodecPort.ttcn library: Add DIAMETER Templates, Emulation, CodecPort 2019-08-18 17:14:20 +00:00
DIAMETER_CodecPort_CtrlFunct.ttcn library: Add DIAMETER Templates, Emulation, CodecPort 2019-08-18 17:14:20 +00:00
DIAMETER_CodecPort_CtrlFunctDef.cc library: Add DIAMETER Templates, Emulation, CodecPort 2019-08-18 17:14:20 +00:00
DIAMETER_Emulation.ttcn DIAMETER_Emulation: Notify user of CapabilityExchange 2020-04-26 22:08:34 +02:00
DIAMETER_Templates.ttcn pgw: Add support for PCRF emulation (CCR/CCA) 2020-04-26 22:08:34 +02:00
DIAMETER_Types.ttcn DIAMETER_Types: Add IETF RFC4006 CreditControl + related 2020-04-26 22:08:34 +02:00
DNS_Helpers.ttcn library/DNS_Helpers: add f_enc_IPv4 2020-02-06 16:21:47 +00:00
GSMTAP_PortType.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
GSMTAP_Types.ttcn Introduce 'library' directory for modules shared by multiple test cases 2017-07-19 19:57:26 +02:00
GSM_RR_Types.ttcn library/GSM_RR_Types: fix MaioHsn: add missing MAIO and HSN fields 2020-05-27 20:14:08 +07:00
GSM_RestOctets.ttcn BTS: manually compose Rest Octets for SI Type 3 and 4 2020-05-06 02:26:03 +07:00
GSM_SystemInformation.ttcn library: fix enc_SystemInformation(): properly pad messages 2020-05-06 02:25:10 +07:00
GSM_Types.ttcn BTS_Tests.ttcn: add a test case for PTCCH/D and PTCCH/U 2019-10-21 11:25:40 +00:00
GSUP_Emulation.ttcn library/IPA: use tr_ASP_IPA_EV instead of inline templates 2020-05-18 21:16:35 +07:00
GSUP_Types.ttcn hlr: add tests for GSUP proxy routing 2020-05-11 17:31:57 +00:00
GTP_CodecPort.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
GTP_CodecPort_CtrlFunct.ttcn move GTP_CodecPort from ggsn to library (for sgsn reuse) 2018-02-18 10:26:45 +01:00
GTP_CodecPort_CtrlFunctDef.cc move GTP_CodecPort from ggsn to library (for sgsn reuse) 2018-02-18 10:26:45 +01:00
GTP_Emulation.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
GTP_Templates.ttcn ggsn: Add TC_pdp4_act_deact_ipcp_pap_broken() 2019-07-03 16:24:19 +00:00
GTPv2_CodecPort.ttcn Fix/complete the partial GTPv2_CodecPort we already had 2020-04-19 17:25:02 +00:00
GTPv2_CodecPort_CtrlFunct.ttcn Fix/complete the partial GTPv2_CodecPort we already had 2020-04-19 17:25:02 +00:00
GTPv2_CodecPort_CtrlFunctDef.cc Fix/complete the partial GTPv2_CodecPort we already had 2020-04-19 17:25:02 +00:00
GTPv2_Emulation.ttcn Add GTPv2_Emulation component 2020-04-21 22:57:31 +02:00
GTPv2_PrivateExtensions.ttcn mme: Add GTPv2 support 2019-08-18 17:14:20 +00:00
GTPv2_Templates.ttcn Add GTPv2_Emulation component 2020-04-21 22:57:31 +02:00
General_Types.ttcn Add GTPv2_Emulation component 2020-04-21 22:57:31 +02:00
IPA_CodecPort.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort: Wrap f_IPL4_setGetMsgLen function 2017-11-29 11:46:24 +01:00
IPA_CodecPort_CtrlFunctDef.cc IPA_CodecPort: Wrap f_IPL4_setGetMsgLen function 2017-11-29 11:46:24 +01:00
IPA_Emulation.ttcnpp library/IPA_Emulation: server mode: expose IPA IDENTITY RESPONSE 2020-05-26 18:00:26 +07:00
IPA_Testing.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
IPA_Types.ttcn library/RSL_Emulation: server mode: handle multiple transceivers 2020-05-26 20:57:00 +07:00
IPCP_Types.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
IPL4_GSMTAP_CtrlFunct.ttcn Introduce 'library' directory for modules shared by multiple test cases 2017-07-19 19:57:26 +02:00
IPL4_GSMTAP_CtrlFunctDef.cc Introduce 'library' directory for modules shared by multiple test cases 2017-07-19 19:57:26 +02:00
IuUP_Emulation.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
IuUP_EncDec.cc BSSGP/IuUP: Fix license disclaimer copy+paste 2020-03-01 20:27:19 +01:00
IuUP_Types.ttcn Add comments with short module description on top of each file 2018-01-03 21:09:29 +01:00
L1CTL_PortType.ttcn library/L1CTL_PortType: f_L1CTL_DM_EST_REQ_IA(): handle hopping params 2020-05-29 22:33:13 +07:00
L1CTL_PortType_CtrlFunct.ttcn L1CTL: Add message segmentation helper via getMsgLen() 2018-02-27 22:32:49 +01:00
L1CTL_PortType_CtrlFunctDef.cc L1CTL: Add message segmentation helper via getMsgLen() 2018-02-27 22:32:49 +01:00
L1CTL_Types.ttcn library/L1CTL_Types: introduce ts_L1CTL_DM_EST_REQ_H1 2020-05-29 15:31:12 +00:00
L3_Common.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
L3_Templates.ttcn bsc: add MSC pooling tests 2020-06-18 11:54:47 +00:00
LAPDm_RAW_PT.ttcn library/L1CTL_PortType: refactor L1CTL channel establishment 2020-05-29 15:31:12 +00:00
LAPDm_Types.ttcn bts: Add TC_segm_concat to test segmentation+concatenation 2019-06-04 09:12:03 +00:00
LLC_Templates.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
M3UA_CodecPort.ttcn stp: Introduce STP_Tests*.ttcn for testing OsmoSTP 2019-11-12 13:05:41 +01:00
M3UA_CodecPort_CtrlFunct.ttcn stp: Introduce STP_Tests*.ttcn for testing OsmoSTP 2019-11-12 13:05:41 +01:00
M3UA_CodecPort_CtrlFunctDef.cc stp: Introduce STP_Tests*.ttcn for testing OsmoSTP 2019-11-12 13:05:41 +01:00
M3UA_Templates.ttcn M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error 2019-11-12 13:05:46 +01:00
MGCP_CodecPort.ttcn lib/mgcp: Add new port with support to handle multiple MGCP sockets 2019-06-24 13:53:25 +00:00
MGCP_CodecPort_CtrlFunct.ttcn Move MGCP_CodecPort to library directory 2017-11-25 02:05:04 +01:00
MGCP_CodecPort_CtrlFunctDef.cc Move MGCP_CodecPort to library directory 2017-11-25 02:05:04 +01:00
MGCP_Emulation.ttcn lib/mgcp: Add new port with support to handle multiple MGCP sockets 2019-06-24 13:53:25 +00:00
MGCP_Templates.ttcn msc: split off f_mgcp_find_param_entry() 2019-11-04 15:07:04 +01:00
MGCP_Types.ttcn Revert "MGCP: fix pattern warning" 2019-09-18 19:46:22 +02:00
MNCC_CodecPort.ttcn MNCC: Add some useful templates / helper functions 2018-01-17 13:34:58 +00:00
MNCC_Emulation.ttcn sip: bump MNCC version sent to sipcon to 6 2019-11-28 20:57:10 +01:00
MNCC_EncDec.cc msc: add sdp to MNCC 2019-11-23 07:59:07 +00:00
MNCC_Types.ttcn library/MNCC_Types: fix sdp in tr_MNCC_* 2019-11-28 15:07:21 +01:00
MSLookup_mDNS_Emulation.ttcn hlr: add TC_MSLookup_mDNS_service_other_home 2020-02-06 16:21:47 +00:00
MSLookup_mDNS_Templates.ttcn hlr: add TC_MSLookup_GSUP_proxy 2020-02-06 16:21:47 +00:00
MSLookup_mDNS_Types.ttcn hlr: add TC_MSLookup_mDNS_service_other_home 2020-02-06 16:21:47 +00:00
Misc_Helpers.ttcn Add Misc_Helpers.ttcn to centralize TTCN3 shutdown handling 2018-10-24 15:10:13 +02:00
NAS_Templates.ttcn library: Add initial set of LTE/EPC NAS templates 2019-08-18 17:14:20 +00:00
NS_CodecPort.ttcn Migrate Gb (NS/BSSGP) code over to Ericsson NS/BSSGP modules 2018-02-16 18:35:44 +00:00
NS_CodecPort_CtrlFunct.ttcn gprs: Move NS Types/CodecPort/Emulation to library directory 2018-02-16 18:33:55 +01:00
NS_CodecPort_CtrlFunctDef.cc gprs: Move NS Types/CodecPort/Emulation to library directory 2018-02-16 18:33:55 +01:00
NS_Emulation.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
NS_Types.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
Native_FunctionDefs.cc Native_Functions: Add f_str_to{lower,upper}() 2020-02-19 19:52:22 +01:00
Native_Functions.ttcn Native_Functions: Add f_str_to{lower,upper}() 2020-02-19 19:52:22 +01:00
OSMUX_CodecPort.ttcn Add Osmux support and tests for MGW 2019-05-27 09:56:51 +00:00
OSMUX_CodecPort_CtrlFunct.ttcn Add Osmux support and tests for MGW 2019-05-27 09:56:51 +00:00
OSMUX_CodecPort_CtrlFunctDef.cc Add Osmux support and tests for MGW 2019-05-27 09:56:51 +00:00
OSMUX_Emulation.ttcn Add Osmux support and tests for MGW 2019-05-27 09:56:51 +00:00
OSMUX_Types.ttcn Add Osmux support and tests for MGW 2019-05-27 09:56:51 +00:00
Osmocom_CTRL_Adapter.ttcn library/IPA: use tr_ASP_IPA_EV instead of inline templates 2020-05-18 21:16:35 +07:00
Osmocom_CTRL_Functions.ttcn lib/CTRL: Improve and add more helper templates and functions 2019-06-13 09:39:14 +00:00
Osmocom_CTRL_Types.ttcn lib/CTRL: Improve and add more helper templates and functions 2019-06-13 09:39:14 +00:00
Osmocom_Gb_Types.ttcn Osmocom_Gb_Types: tr_BSSGP_PS_PAGING should use template arguments 2020-06-18 11:28:42 +00:00
Osmocom_Types.ttcn BTS: manually compose Rest Octets for SI Type 3 and 4 2020-05-06 02:26:03 +07:00
Osmocom_VTY_Functions.ttcn bsc: Introduce test TC_chan_rel_sccp_tiar_timeout 2020-01-12 13:11:39 +00:00
PAP_Types.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
PCUIF_CodecPort.ttcn library/PCUIF_CodecPort.ttcn: strip padding bytes from PCUIF_data 2019-09-27 03:17:50 +00:00
PCUIF_Types.ttcn library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields 2019-11-23 07:57:45 +00:00
RAN_Adapter.ttcnpp move type RAN_Configurations to RAN_Adapter.ttcnpp 2020-06-14 10:54:11 +00:00
RAN_Emulation.ttcnpp RAN_Emulation: drop unused function f_bssap_wait_for_reset() 2020-06-20 21:43:21 +02:00
RLCMAC_CSN1_Templates.ttcn pcu: TC_mt_ping_pong: Request UL TBF on last DL ACK 2020-05-28 22:13:10 +07:00
RLCMAC_CSN1_Types.ttcn library/RLCMAC_CSN1_Types: Extend support for PacketDlAssignment 2020-05-20 10:46:14 +00:00
RLCMAC_EncDec.cc RLCMAC_EncDec.cc: Fix egprs data block encode alignment 2020-05-01 15:54:17 +02:00
RLCMAC_Templates.ttcn pcu: TC_mt_ping_pong: Request UL TBF on last DL ACK 2020-05-28 22:13:10 +07:00
RLCMAC_Types.ttcn RLCMAC_Templates: Add functions to convert HeaderType<->MCS<->CPS 2020-04-30 20:22:25 +02:00
RSL_Emulation.ttcn library/RSL_Emulation: implement waiting queue for DChan messages 2020-06-21 20:46:49 +00:00
RSL_Types.ttcn library/RSL_Types: fix RSL_IE_BS_Power: Power Level is 4 bit long 2020-06-16 01:40:24 +07:00
RTP_CodecPort.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
RTP_CodecPort_CtrlFunct.ttcn Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files 2017-12-13 15:42:31 +01:00
RTP_CodecPort_CtrlFunctDef.cc Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files 2017-12-13 15:42:31 +01:00
RTP_Emulation.ttcn RTP_Emulation: allow expecting connection refused 2019-06-26 16:15:13 +02:00
S1AP_CodecPort.ttcn library: Add S1AP CodecPort/Emulation 2019-08-18 17:14:20 +00:00
S1AP_CodecPort_CtrlFunct.ttcn library: Add S1AP CodecPort/Emulation 2019-08-18 17:14:20 +00:00
S1AP_CodecPort_CtrlFunctDef.cc library: Add S1AP CodecPort/Emulation 2019-08-18 17:14:20 +00:00
S1AP_Emulation.ttcn library: Add S1AP CodecPort/Emulation 2019-08-18 17:14:20 +00:00
SABP_Adapter.ttcn SABP CodecPort and SABP_Adapter 2019-09-26 19:31:08 +00:00
SABP_CodecPort.ttcn SABP CodecPort and SABP_Adapter 2019-09-26 19:31:08 +00:00
SABP_CodecPort_CtrlFunct.ttcn SABP CodecPort and SABP_Adapter 2019-09-26 19:31:08 +00:00
SABP_CodecPort_CtrlFunctDef.cc SABP CodecPort and SABP_Adapter 2019-09-26 19:31:08 +00:00
SCCP_Templates.ttcn sccp: Introduce test TC_it_avoids_tiar 2020-01-21 14:22:20 +01:00
SGsAP_CodecPort.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
SGsAP_CodecPort_CtrlFunct.ttcn Add SGsAP_CodecPort + SGsAP_Emulation module 2018-10-28 09:52:34 +00:00
SGsAP_CodecPort_CtrlFunctDef.cc Add SGsAP_CodecPort + SGsAP_Emulation module 2018-10-28 09:52:34 +00:00
SGsAP_Emulation.ttcn mme: initial skeleton for MME / SGsAP tetss 2019-08-15 09:49:11 +00:00
SGsAP_Templates.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
SIP_Emulation.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
SIP_Templates.ttcn More progress on osmo-sip-connector tests 2018-03-26 23:11:51 +02:00
SMPP_CodecPort.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
SMPP_CodecPort_CtrlFunct.ttcn msc: Add SMPP_CodecPort 2018-04-14 21:58:16 +02:00
SMPP_CodecPort_CtrlFunctDef.cc msc: Add SMPP_CodecPort 2018-04-14 21:58:16 +02:00
SMPP_Emulation.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
SMPP_Templates.ttcn msc: Add SMPP tests for MO + MT SMS 2018-04-14 21:58:16 +02:00
SS_Templates.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
TRXC_CodecPort.ttcn library: Ensure setverdict(fail) is followed by mtc.stop 2018-07-24 09:54:18 +00:00
TRXC_CodecPort_CtrlFunct.ttcn Add TRXC (OsmoTRX Control) protocol types + codec port 2018-02-24 01:03:09 +01:00
TRXC_CodecPort_CtrlFunctDef.cc Add TRXC (OsmoTRX Control) protocol types + codec port 2018-02-24 01:03:09 +01:00
TRXC_Types.ttcn library/TRXC_Types.ttcn: add FAKE_CI command for C/I simulation 2019-07-07 08:14:10 +00:00
USSD_Helpers.ttcn cosmetic: Update copyright statement, license notice and SPDX 2019-05-27 10:00:06 +00:00
VPCD_Adapter.ttcn VPCD protocol support (for vsmartcard.git PCD/PICC code) 2019-11-22 22:53:40 +01:00
VPCD_CodecPort.ttcn VPCD protocol support (for vsmartcard.git PCD/PICC code) 2019-11-22 22:53:40 +01:00
VPCD_CodecPort_CtrlFunct.ttcn VPCD protocol support (for vsmartcard.git PCD/PICC code) 2019-11-22 22:53:40 +01:00
VPCD_CodecPort_CtrlFunctDef.cc VPCD protocol support (for vsmartcard.git PCD/PICC code) 2019-11-22 22:53:40 +01:00
VPCD_Types.ttcn VPCD protocol support (for vsmartcard.git PCD/PICC code) 2019-11-22 22:53:40 +01:00
mncc.h msc: add sdp to MNCC 2019-11-23 07:59:07 +00:00