Commit Graph

2035 Commits

Author SHA1 Message Date
Neels Hofmeyr 2f006dddc0 Revert "disable tests"
This reverts commit 0a2da132d1c41313a4bb0c5024bc6789531d13bb.
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 85dfec43e2 disable tests
Change-Id: Ifb732a40af143715c4ce3530c67dc5ac2e4a84dc
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 57ec88be9a Revert "RAN_Emulation: only respond to RESET with correct PC"
This reverts commit 54cfdfa3396d48c1c09455b98f8d9788d14db27c.
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 0d7fae912c Revert "as_Tguard: only respond to RESET with matching PC"
This reverts commit 9e64e8db8367ccd551305e8c0396944a9d044563.
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 082fc87737 include logformat in log_merge.sh
Change-Id: I4838cee7742ab99eb935f149a69e925258bbef36
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 733abf9f7d don't always imply 'make deps'
'make deps' always fails if there is no internet uplink.

Change-Id: Ic2e6af6f32d8c4bc276ca34cfeb697e9205a2649
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 81c23ec4ed disable tcpdump
Change-Id: I46116df68b2f8c9ca253a9285d0a571904521727
2020-06-30 05:29:29 +02:00
Neels Hofmeyr b015416198 RSL_Emulation: logging tweaks
Change-Id: I8ca105d1d5280cff9b88ce5a2bb9c98a3f1e7527
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 153d2387dc as_Tguard: only respond to RESET with matching PC
Change-Id: I29a141c2cda6c9240ef06a8ba27f5abf597e70eb
2020-06-30 05:29:29 +02:00
Neels Hofmeyr aad434cef0 RAN_Emulation: only respond to RESET with correct PC
While trying to add multiple MSCs on SCCPlite, I noticed that the MSC emulation
responds to RESET regardless of the PC. Only respond when the point-codes match
the configured ones.

Change-Id: Ia1f94c4fc99ca18196f3fd5c5efe26b7309df499
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 56f6c8981f msc: verify conn and VLR cell id in most tests
osmo-msc failed to record the Complete Layer 3 Information LAC and CI in the
MSC-A as well as the VLR record. Since osmo-msc
Iee1781985fb25b21ce27526c6a3768bf70d4dc9a and
I194271af2acb37b4f8cc2d106ab2fd2b0d443589, osmo-msc properly records these for
successful Complete Layer 3 procedures.

Incorporate verification of the LAC and CI in all tests calling f_perform_lu()
and f_expect_clear(). Implement by scraping the output of vty
	'show subscriber imsi 1234 conn'

Some tests model a failure to attach, or expire the VLR record: for those, add
parameter verify_cell_id to g_pars, and pass it as false, to skip checking the
LAC and CI.

Disable CI checking for all Iu tests globally in f_verify_vty_lac_ci(), see
OS#4634.

For the latest build, which does not yet record LAC and CI properly, provide
mp_enable_cell_id_test, which skips all cell id verification if set to false.
Put to effect by docker-playground I052fea208021509e12826c50474b96474e7a58c2.

Related: OS#4627
Depends: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a (osmo-msc)
Change-Id: Ie410714a96353f74a52a104c56fa0a08683e0004
2020-06-30 05:29:29 +02:00
Neels Hofmeyr d7527008f8 bsc: TC_dyn_pdch_* shorten some delays
So far we're sleeping a hole second before verifying the PDCH status of a
dynamic timeslot. That is just to ensure that osmo-bsc has read the message
from its queue and changed its status.

Change to a sleep of 0.1s, cutting a couple of seconds off the test execution.

Change-Id: Ic6cd373e18aea6eff14f2be5432705b9838e6054
2020-06-30 05:29:29 +02:00
Neels Hofmeyr 25bd342c1e bsc: verify System Information presence on RSL startup
Store all System Information data received during RSL bootstrap in a list, then
verify that the 12 expected SI are indeed sent.

The SI data presence and content are recorded, but not yet verified, leaving
that to a future patch.

Change-Id: I6a8ef404087efee491390dc1d2452ac323f145f0
2020-06-30 05:27:45 +02:00
Neels Hofmeyr 9656e923bf fixup for Osmocom_CTRL_Functions: rate counters in bulk
At the time of writing Ief0d9b096feeee7d37b5f2429dd3e80de0161806 I wasn't aware
of the 'inout' keyword, which allows to pass the counter list by reference.

Rather modify the counter lists in-place. Instead of requiring

  list := f_counter_name_vals_add(list, ...)

rather implement by directly modifying list:

  f_counter_name_vals_add(list, ...)

Change-Id: I85ac56b042fe4bb1db392c1f451c8e900582cc2a
2020-06-30 04:24:59 +02:00
Neels Hofmeyr 22c3f79c98 bsc: MSC pooling: also test rate counters
Use new f_counter_* functions to verify osmo-bsc MSC pooling counters.
This nicely also verifies the intended effect of each test in detail.

Depends: I2ded757958dfa62b502efbab765203bcadf899e2 (osmo-bsc)
Change-Id: I2006f1def5352b4b73d0159bfcaa2da9c64bfe3f
2020-06-25 20:13:11 +00:00
Neels Hofmeyr 7418059a6a Osmocom_CTRL_Functions: add: retrieve and verify rate counters in bulk
First user will be new MSC pooling tests in ttcn3-bsc-test, see
I2006f1def5352b4b73d0159bfcaa2da9c64bfe3f.

Change-Id: Ief0d9b096feeee7d37b5f2429dd3e80de0161806
2020-06-25 20:13:11 +00:00
Pau Espin 45fe5e0e1f bts: Introduce TC_tx_power_ramp_adm_state_change
Change-Id: I03efdfe19e9cecadb0d03811a7029b54bf6281da
2020-06-25 12:52:48 +02:00
Pau Espin b6985f906f bts: Introduce test TC_tx_power_start_ramp_down_bcch
Change-Id: I895d69394a0123ae32b336c9ffaff615ba657f12
2020-06-25 12:52:42 +02:00
Pau Espin abcdf78892 library/RSL: pass lost link event to upper layers instead of failing
Some tests may expect that behavior so let the test decide what to do
with it.

Change-Id: Idd4bdfc99514f4c439837f0ce4a20ec5ff45e86c
2020-06-25 09:25:20 +00:00
Harald Welte eddf0e9e10 bsc: Add CommonID Test: Send CommonID from MSC and check it is processed
Related: OS#2969
Change-Id: I501108bc6c19b17d3fc680211c7290a31770a159
2020-06-23 20:08:58 +00:00
Pau Espin 709650980a library/RSL: fix trailing whitespace
Change-Id: I84b23fef3a75dcd6d86855408adcb41142da3407
2020-06-23 14:30:13 +02:00
Vadim Yanitskiy 89db3e0f33 BTS: refactor f_init_rsl(): make number of transceivers configurable
Not all osmo-bts backends do support multiple transceivers, while
we still want to run test cases against them. Let's make the
number of transceivers configurable (mp_transceiver_num), so it
can be adjusted depending on osmo-bts backend to be used.

Change-Id: Ic9dd49a2fc856de593b52b3ec0c559e0e15ca173
Related: OS#3155
2020-06-22 18:11:46 +07:00
Vadim Yanitskiy 539e630eda MSC_ConnectionHandler: fix race condition in f_establish_fully()
For more details, see I25e10e28de174337233e6a3bb32cc16f2d7d614e.

Change-Id: Icdb4f2e0edc4cb6e2010a9299331e7e93d0ca007
Related: OS#4619
2020-06-21 20:46:49 +00:00
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
Vadim Yanitskiy a38c26595f library/RSL_Emulation: fix comment near f_rslem_suspend()
Change-Id: If6487065329a4fc44275999de1972f76ded06562
2020-06-21 20:46:49 +00:00
Harald Welte cb0cc4377c bsc: Sync osmo-{bsc,stp}.cfg with docker-playground.git
It appears some changes were made only to the files in
docker-playground.git, but not here.  This means that running
tests locally produced unexpected results.

We must always ensure that the tests run both without and with
docker, which means making sure the configs are all maintained!

Change-Id: I3a3f4c572b8a390882fb8f12807018ca19e4827c
2020-06-21 20:28:16 +02:00
Harald Welte 7262968a29 osmo-bsc.cfg: Remove access-list directive
This was removed when libfilter was removed from osmo-bsc.

For some strange reason apparently the config files were not used/tested
while testing the removal of libfilter.

Also, irrespective of breaking TTCN3 test execution, we must introduce
a dummy 'access-list' VTY command to osmo-bsc to ensure we don't break
virtually every config file out there.

Change-Id: I5d703b9f2f1066654daa43519999585cf9ec7e78
2020-06-21 20:27:26 +02:00
Neels Hofmeyr f2b88032f6 bsc: set longer T_guard for TC_ho_neighbor_config tests
They perform several handover runs and tend to timeout prematurely on my
machine.

Change-Id: I9d641c9b5d5a6f2c2edbc2c782f33872cf7a483f
2020-06-20 21:43:21 +02:00
Neels Hofmeyr 4fbad7fc1a bsc: allow individual T_guard timeout via f_init()
The TC_ho_neighbor_config_* tests sometimes take longer than 30 seconds,
because they run multiple handovers. Since they don't have access to the
Test_CT, they cannot restart the T_guard. The simplest solution is to choose a
longer T_guard timeout for those tests specifically, by adding an argument to
f_init(). (A longer timeout for those tests is following in another patch.)

Why f_init()? Assigning a different default value to T_guard seems to not be
possible, but a different timeout value can be passed to T_guard.start(), which
happens in f_init().

Change-Id: I14918f6a44d6fa1bd5c3e133757ebdbe32813b33
2020-06-20 21:43:21 +02:00
Neels Hofmeyr 0fbec5678d RAN_Emulation: drop unused function f_bssap_wait_for_reset()
Change-Id: I9ecf4fdeaee8e5437427564ef860c9053ffa4241
2020-06-20 21:43:21 +02:00
Neels Hofmeyr 90f8096890 bsc: undup pars.sccp_addr_msc and _bsc
Handover testing required passing MSC and BSC addresses to f_tc_* functions and
added pars.handover.sccp_addr_msc and .handover.sccp_addr_bsc.

MSC pool tests added a separate sub-record pars.mscpool which also contains
these two fields.

Move them both up one level, to form a single pair of pars.sccp_addr_msc and
pars.sccp_addr_bsc.

This eliminates the pars.handover sub-record.

Change-Id: Iae81ca58001455099218ce769a97dc6402832490
2020-06-20 21:43:21 +02:00
Neels Hofmeyr 4f11841173 bsc: add MSC pooling tests
The MSC pooling feature is implemented in osmo-bsc
Ifbdea197b26e88751a391c8a80c41f04e7d5e047.

A VTY command ('mscpool roundrobin next') that allows deterministic testing is
added in I2155d906505a26744966f442ffb1e87a6a9b494c.

osmo-bsc.cfg changes needed for these tests to succeed are in docker-playground
I1986e4ef43beee161c82193694421b56136c1afe

The new tests will fail until the above have been merged.

Change-Id: I21cbab193cd0de2e5692665442eae113d5f61904
2020-06-18 11:54:47 +00:00
Harald Welte 8e5932e563 sgsn: Add series of tests on suspend/resume and paging behavior
Let's test whether paging is triggered after T3314 expiration, as well
as suspend and explicit and implicit resume work as expected

Change-Id: I83b7a453958e30dfc727ba3140168217c209833f
Related: OS#4616
2020-06-18 13:36:18 +02:00
Harald Welte a5c71cdefe sgsn: Allow f_gtpu_xceive_mt() to verify non-forwarding case
In some scenarios we do not expect a PDU from GTP to show up on
the Gb side.  Let's add support for this.

Change-Id: Ia9fde1d433657c920ee1ec4d41004f4544ceb346
Related: OS#4616
2020-06-18 13:33:43 +02:00
Harald Welte f2f3c9bf79 sgsn: Add functions for BSSGP suspend + resume procedure
Change-Id: Ib1e370e2c5fe774029f459ef991fb9ac777f5631
Related: OS#4616
2020-06-18 13:32:53 +02:00
Harald Welte a36b246462 Osmocom_Gb_Types: tr_BSSGP_PS_PAGING should use template arguments
Change-Id: I7d0110e6f26fd407e11b2c60d78f4cd16f0d45af
2020-06-18 11:28:42 +00:00
Harald Welte 15fbaa4748 sgsn: Add BSSGP_SIG port to ConnHdlr
So far, the ConnHdlr components were only able to exchange BSSGP PDUs
on the PTP BVC, but not on the SIGNALING BVC.  For this, we need to
actually connect to the BSSGP_SP_SIG that BSSGP_Emulation provides.

Change-Id: I4482a24e4808ac2fe04401224f628606d8207416
Related: OS#4616
2020-06-18 11:28:42 +00:00
Harald Welte 64d6b51818 sgsn: Fix comment [cosmetic]
Change-Id: I320bce9af64edf0cfb6f600d9a4c19b73153c805
2020-06-18 11:28:42 +00:00
Neels Hofmeyr a8264612df RAN_Emulation: allow sending UnitData from MSC_ConnHdlr
Add BSSAP_N_UNITDATA_req to RAN_Conn_PT, so that we are able to send a Paging
from a test function that runs on MSC_ConnHdlr.

This will be needed by upcoming MSC pool tests, see
I21cbab193cd0de2e5692665442eae113d5f61904.

Change-Id: I36d486db05169b0fc3f19112b5a9008248d62930
2020-06-17 01:01:13 +02:00
Neels Hofmeyr d7eabd6ce6 RSL_Emulation: fix rx of tr_RSL_PAGING_CMD()
For tr_RSL_PAGING_CMD, also check comp_ref against null.

Upon receiving a tr_RSL_PAGING_CMD, the code tries to dispatch the Paging
Command to all valid clients. However, the ConnectionTable[*].comp_ref is
*always* present, and actually null for unconnected clients.
So, before this patch, a Paging Command from osmo-bsc gets sent to a null
client, which disconnects the RSL emulation and aborts the test.

There is currently no test using this, but the upcoming MSC pool tests will:
see I21cbab193cd0de2e5692665442eae113d5f61904.

Change-Id: Iaf7730153a3a19e448a33298c3e12212a55929d5
2020-06-17 01:01:13 +02:00
Vadim Yanitskiy a16749582e bts/expected-results: TC_rsl_bs_pwr_static_{ass,power_control} pass now
Change I16cc50dfca102030380a06e16c234d5f6698f38f fixes them both.

Change-Id: I2e8db76be78fffcc8418096670ad3cf5174856f8
2020-06-16 01:44:21 +07:00
Vadim Yanitskiy 117c176de7 library/RSL_Types: fix RSL_IE_BS_Power: Power Level is 4 bit long
Unlike the RSL_IE_MS_Power, where power_level is 5 bit long, in
the RSL_IE_BS_Power it's 4 bit long. Fix this.

Change-Id: Ic0cb2275ef585754b9ae5e3d8077ca652afd9365
2020-06-16 01:40:24 +07:00
Neels Hofmeyr f246a925e8 bsc: allow multiple MSCs
Similar to the MSC tests, have several g_bssap and mp_bssap_cfg.
Prepare for MSC pool tests.

Replace g_bssap with a g_bssap[NUM_MSC] array.
Replace mp_bssap_cfg with an mp_bssap_cfg[NUM_MSC] array.

Requires patch I1986e4ef43beee161c82193694421b56136c1afe in docker-playground
to match the new required BSC_Tests.cfg format.

Related: OS#3682
Change-Id: Ibb36695b7c31f7b04eec6c5d59522fc0779b3c2f
2020-06-14 11:01:34 +00:00
Neels Hofmeyr 7985aebeb3 move type RAN_Configurations to RAN_Adapter.ttcnpp
So far used only in MSC_Tests.ttcn, but soon to be used also in BSC_Tests.ttcn.

Change-Id: If8f7fd50a88302af645ab337a907d8f0ad79a306
2020-06-14 10:54:11 +00:00
Neels Hofmeyr 1661781611 fix f_enc_IMEI_L3() oddevenIndicator
f_gen_imei() calls f_enc_IMEI_L3() with a 14 digits argument, but the IMEI_L3
template used is hardcoded to 15 digits. So the oddevenIndicator must always
indicate odd, not depend on the digits argument.

f_gen_imei() should probably also compose a Luhn checksum, leaving that to
another patch.

Found by using the new osmo_mobile_identity API in osmo-msc, which is stricter
about odd/even and filler digits than our previous implementations.
See osmo-msc Idfc8e576e10756aeaacf5569f6178068313eb7ea .

Change-Id: Iaa9ba1214c4c15fd9620e68fe2e842fdf52912c0
2020-06-14 10:52:48 +00:00
Harald Welte 15a8501232 Add test whether we accept DATA without Routing Context IE
There are some M3UA implementations out there who use a routing context
during the ASPAC procedure, but who then don't use it in subsequent DATA
transmission.  Let's add a test case for that.

Change-Id: Iaf95f8eafa53cff94910d89584eef95f1b474c7f
Related: OS#4594
2020-06-13 16:35:45 +02:00
Vadim Yanitskiy 96e8c80b48 BTS: fix latest: ignore mismatching messages in as_rsl_init_guard()
Another surprise from the latest osmo-bts release: it may send us
CCCH LOAD INDication message during the RSL bring up. Ignore it.

Change-Id: Iab22b620a5f7b07fe03c1b13bebef2931d14879d
2020-06-10 14:21:39 +07:00
Vadim Yanitskiy 82af0b53d4 library/RSL_Emulation: optional IPA stream ID patching
Unfortunately, the latest release of osmo-bts still has a bug,
that has been fixed [1] in the recent master. Because of that,
most of the test cases in ttcn3-bts-test-latest currently fail.

The problem is that all transceivers use IPAC_PROTO_RSL_TRX0,
regardless of what the BSC tells them to use. Let's work this
around by patching IPA stream ID in ASP_RSL_Unitdata messages
coming from the IPA emulation.

[1] I5927f59a49724170a63e87be604973f7c9d5d8be

Change-Id: I66cecc9ea24ba79e1a03492e3fda2874951d37a0
2020-06-09 20:28:44 +07:00
Pau Espin a2e079cb5d bts: Introduce test TC_tx_power_start_ramp_up_bcch
This test verifies power ramping (up) is working fine during BTS
startup.

config files are updated to make sense:
* "nominal power" in osmo-bsc.cfg reflects correct default nominal tx
  power of fake_trx.
* "osmotrx tx-attenuation" in osmo-bts.cfg is removed to let osmo-bts
  use the value received through OML (max_power_red 20).
* "power-ramp step-size" in osmo-bts.cfg is increased to speed up the
  test. There's no good reason to keep it lower.

Change-Id: Ieb7444c6312bbeab64da2732393b3facf3e1f003
2020-06-09 10:54:05 +00:00
Pau Espin 188bfd2ebd bts: Fix trailing whitespace
Change-Id: I5164212fee7e94bc98f65e60d00ccd77b4d9e01d
2020-06-07 19:41:22 +00:00