Osmocom test suites in TTCN-3 (Eclipse Titan) https://osmocom.org/projects/core-testing-infra
Go to file
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
COMMON initial chekin of code received by Ericsson on 20170410 2017-04-12 12:13:44 +02:00
ROHC_CNL113426_LATEST import Ericsson NS, ISUP, ROHC and SNDCP modules for TITAN 2017-07-25 08:23:52 +02:00
SCCP_Test WIP: gen_links.sh + regen_makefile.sh for make SCCP_Tests 2020-01-12 11:48:58 +01:00
asn-test HNBAP, RUA and RANAP protocol codecs 2019-04-25 20:07:11 +00:00
bin Remove M3UA/MTP3/SCCP code from this repo, use upstream repos 2018-03-18 12:52:20 +01:00
bsc bsc: Sync osmo-{bsc,stp}.cfg with docker-playground.git 2020-06-21 20:28:16 +02:00
bsc-nat library/IPA: use tr_ASP_IPA_EV instead of inline templates 2020-05-18 21:16:35 +07:00
bts osmo-bsc.cfg: Remove access-list directive 2020-06-21 20:27:26 +02:00
ccid pps exchange after power on 2019-12-02 23:29:46 +00:00
deps Use osmocom fork of TELNETasp to fix compilation error spotted by gcc 10.1.0 2020-05-19 19:21:29 +00:00
doc add ttcn3 test suites slides from OsmoDevCon 2018 2018-09-16 12:39:51 +02:00
ggsn_tests ggsn: Terminate immediately on pipong altstep failure 2020-03-03 16:48:34 +01:00
hlr update expected results 2020-05-19 19:25:35 +00:00
lapdm Split templates in RLCMAC_{CSN1_}Types into their own _Templates file 2020-04-29 19:07:38 +02:00
library library/RSL_Emulation: implement waiting queue for DChan messages 2020-06-21 20:46:49 +00:00
mgw MGCP_Test: fix test vector in TC_amr_oa_bwe_rtp_conversion 2020-06-02 14:13:57 +02:00
mme Split templates in RLCMAC_{CSN1_}Types into their own _Templates file 2020-04-29 19:07:38 +02:00
msc move type RAN_Configurations to RAN_Adapter.ttcnpp 2020-06-14 10:54:11 +00:00
pcu PCU: s/f_establish_tbf/f_pcuif_tx_rach_rx_imm_ass/g 2020-05-29 20:02:49 +00:00
pgw pgw: Add support for PCRF emulation (CCR/CCA) 2020-04-26 22:08:34 +02:00
remsim library/IPA: use tr_ASP_IPA_EV instead of inline templates 2020-05-18 21:16:35 +07:00
sccp sccp: Introduce test TC_it_avoids_tiar 2020-01-21 14:22:20 +01:00
selftest library/IPA_Emulation: assume TRX#0 in ASP_RSL_Unitdata templates 2020-05-25 22:14:04 +07:00
sgsn sgsn: Add series of tests on suspend/resume and paging behavior 2020-06-18 13:36:18 +02:00
simtrace Initial SIMTRACE testsuite 2020-04-01 10:16:02 +00:00
sip update expected results 2020-05-19 19:25:35 +00:00
stp Add test whether we accept DATA without Routing Context IE 2020-06-13 16:35:45 +02:00
sysinfo Split templates in RLCMAC_{CSN1_}Types into their own _Templates file 2020-04-29 19:07:38 +02:00
.gitignore gitignore: Add *.d files 2020-03-03 16:48:34 +01:00
.gitreview Add git-review config 2017-12-13 11:15:48 +01:00
Common.cfg Make Console Loggign a bit more verbose: add all USER "log()" 2018-03-18 14:16:37 +01:00
Makefile pgw: Initial testsuite for a PGW (Packet Gateway in the EPC) 2020-04-21 22:57:31 +02:00
compare-results.py compare_results.py: use ansi colors 2020-05-19 19:25:35 +00:00
gen_links.sh.inc Put build / run scripts under Apache 2.0 license 2019-06-21 09:34:09 +00:00
log_merge.sh Put build / run scripts under Apache 2.0 license 2019-06-21 09:34:09 +00:00
mask_expected_results.sh add mask_expected_results.sh 2018-04-11 19:32:01 +02:00
regen-makefile.sh ttcn3_makefilegen: Generate gnu make files (we use Linux...) 2020-03-02 14:25:47 +01:00
rmlinks.sh Remove M3UA/MTP3/SCCP code from this repo, use upstream repos 2018-03-18 12:52:20 +01:00
start-testsuite.sh start-testsuite.sh: allow overriding TTCN3_BIN_DIR 2020-05-29 06:10:42 +00:00
ttcn3-tcpdump-start.sh Create dummy gsmtap sink with netcat 2019-10-04 16:09:27 +00:00
ttcn3-tcpdump-stop.sh ttcn3-tcpdump-stop.sh: fix echo: add -e to enable colors 2020-05-21 20:36:37 +07:00
update_expected_results_from_jenkins.sh Put build / run scripts under Apache 2.0 license 2019-06-21 09:34:09 +00:00