Commit Graph

2055 Commits

Author SHA1 Message Date
Vadim Yanitskiy eec14f0951 BTS_Tests_LAPDm: consider frequency hopping parameters
Change-Id: Idd1ffe0ee97805b40bb5e37645aa53a9b1dc4b0a
Related: SYS#4868, OS#4546
2020-07-14 21:07:50 +07:00
Vadim Yanitskiy a9894281ef BTS_Tests: implement optional frequency hopping support
Change-Id: If0318fd320d4f112341465844555bf8d65b5f88f
Depends: I7822c3581fccba3277a63577e740e7486307635d
Related: SYS#4868, OS#4546
2020-07-14 21:07:50 +07:00
Vadim Yanitskiy 6c71c17fc5 BTS_Tests: introduce and use helper f_l1ctl_est_dchan()
This is required for the upcoming test cases running on hopping
channels.  Dealing with module / hopping parameters in every
test case is definitely not a good idea, so let's add a function.

Change-Id: Ia4f078ebbb278246ee117f580ff93f301dc60f7c
Related: SYS#4868, OS#4546
2020-07-14 21:07:38 +07:00
Vadim Yanitskiy f7181ed9c9 library/GSM_RR_Types: share send templates for ChannelDescription
They're going to be used in other modules too, not only in BTS_Tests.
Also, take a chance to rearrange the list of arguments, so the ones
with default values are placed after mandatory ones.

Change-Id: Ia33ebf2e680f16f774a981fc33422dfe5036637f
2020-07-14 20:31:07 +07:00
Vadim Yanitskiy 5bcd91996a library/GSM_RR_Types: add ts/tr templates for MaioHsn
Change-Id: I0c5581c3d95018d808907bd2bc5e8ddd0a730bea
2020-07-14 20:31:07 +07:00
Pau Espin cdbe90306b pcu: Introduce test TC_ul_tbf_reestablish_with_pkt_resource_req
Related: OS#4657
Change-Id: Ic251339afb9caa23d9a4e7bdb135d42a36a203d5
2020-07-14 09:49:31 +00:00
Pau Espin 630c1cf9c6 RLCMAC: Improve support of Pkt Ul AckNack messages
Change-Id: I8586248f435b1a70042ea25f633b75542bbc14aa
2020-07-14 09:49:31 +00:00
Vadim Yanitskiy eb662c87e2 fixup ttcn3-tcpdump-stop.sh: add flag '--force' to gzip
When a directory path for the "build artifacts" is not specified,
'/tmp' would be used by default.  When running the same text
case more than once, gzip will be asking for confirmation whether
to overwrite the existing capture file.  Let's do this by default.

Change-Id: I357f3d9c5dc5963f4b709166bb659f3f66a721b8
2020-07-13 05:55:17 +07:00
Vadim Yanitskiy cb478ec0ab library/GSM_SystemInformation: add dec_SystemInformationSafe()
Some types of System Information (mostly the Rest Octets) are not
fully implemented, so calling the generic dec_SystemInformation()
may result in a DTE.  Let's add dec_SystemInformationSafeBT() with
"prototype(backtrack)", so it would return a non-zero integer if
decoding fails.  Let's add a wrapper dec_SystemInformationSafe()
that would additionally check the RR Protocol Discriminator.

Change-Id: Id4d73e0f3347e1d4c4c77aec75b767311d662292
Related: OS#4662
2020-07-12 12:34:49 +00:00
Vadim Yanitskiy f949f465ba ttcn3-tcpdump-stop.sh: compress capture files with gzip
Since we have enabled the GSMTAP logging, test case capture files
now contain a lot of textual information that can be efficiently
compressed with gzip.  That would make the "Build artifacts"
take much less space on Jenkins.

Change-Id: Ibdf5312bb9ff802d7ce7d00c690facdd79839782
2020-07-12 15:57:33 +07:00
Neels Hofmeyr 56f2478e9c bsc: SI2quater EARFCNs: span entire value range of EARFCNs
Change-Id: I992771826d57669d06887c776303f85ef22f6c71
2020-07-09 13:27:50 +00:00
Neels Hofmeyr ad132f286e bsc: more SI2quater EUTRAN ARFCN tests
Add more EUTRAN ARFCNs, reaching the maximum allowed amount.

Add tests with 12, 23, 42 EARFCNs, just for the sake of testing some arbitrary
numbers.

Add tests with 32 and 33 EARFCNs because before osmo-bsc
Iabeed10053ee5899b4def3509aedd25abb2410a9, only 32 EARFCNs could be stored by
osmo-bsc.

Add a test with 48 EARFCNs to verify the maximum amount of EARFCNs and maximum
amount of SI2quater multiplexes works as expected.

Add a test with 49 EARFCNs to verify the VTY error response when adding too
many EARFCNs, and showing that osmo-bsc still sends 16 SI2quater with 48
EARFCNs.

Depends: Iabeed10053ee5899b4def3509aedd25abb2410a9 (osmo-bsc)
Change-Id: I99bf9b3381812d1db6fd0757f65995bae48da776
2020-07-09 13:27:50 +00:00
Philipp Maier 16ade7860e BTS_Tests: extend rach content tests with emergency call
The testcase tests if a CHANNEL REQUEST on the RACH leads to the correct
CHANNEL REQUIRED message on RSL level. When a MS is sending a CHANNEL
REQUEST to establish an emergency call, it uses a slightly different
layout for the request reference (RA). Lets add another similar testcase
(TC_rach_content_emerg) to cover the emergency call situation as well.

Change-Id: Ie5b7af3e93efaa6d0b412d3b1c77bc9514424f52
Related: OS#4549
2020-07-09 12:40:26 +00:00
Neels Hofmeyr 66aeba4c9a bsc: add SI2quater tests for multiple EARFCNs
Shows bug OS#4652 in osmo-bsc, fixed by
I5df269f713456a6ccbb874d6b7faac4a6f123c67

Change-Id: I45382f88686ca60e68569e93569fc4cfb63a0e0d
2020-07-09 00:26:27 +02:00
Neels Hofmeyr 5e686dce2d bsc: add first test to verify System Information on RSL startup
Change-Id: I6a8ef404087efee491390dc1d2452ac323f145f0
2020-07-09 00:25:47 +02:00
Vadim Yanitskiy eacec8abb5 library/GSM_RestOctets: add SI2quater EUTRAN templates
Will be used in upcoming System Information tests.

Change-Id: I4162cc39ad351f5e96f5941116a424adc44efaa2
2020-07-08 23:12:58 +02:00
Neels Hofmeyr 666f043de6 bsc: change f_bts_0_cfg() to take a VTY port arg
Remove the 'runs on' clause, add a VTY port argument.
That allows using this function also on the test_CT.

Will be used by upcoming System Information tests.

Change-Id: Ib059d9690f92f5f76025bca2b84496716a2a4cf0
2020-07-08 15:27:50 +00:00
Neels Hofmeyr 0b7365bb57 bsc: split f_init_bts() from f_init()
For SI tests, it is necessary to first startup the VTY, then issue some config
commands, and only then start up the BTSes. By this separation that can be done
by:

  f_init(nr_bts := 0);
  f_vty_transceive(...);
  f_init_bts(bts_idx := 0);

Will be used by upcoming System Information tests.

Change-Id: I24afb07735c3827f52760214fcb7a239190c3402
2020-07-08 15:27:50 +00:00
Neels Hofmeyr bb2777451a GSM_SystemInformation: add SI2quater
Change-Id: I879c37eb51ece55d79346c6bf1a4951c3f11c77e
2020-07-08 15:27:50 +00:00
Neels Hofmeyr c865573668 GSM_RestOctets: SI2quater fixup: rename "Cell List" to "Repeated Cells"
So far the naming is so that the EUTRAN_NeighborCell sounds like it reflects a
single E-ARFCN, while in fact it contains a list of E-ARFCNs. In 3GPP TS 48.018
it is more accurately named "Neighbor Cells", in plural.

There is another "list layer" that allows repeating these lists of E-ARFCNs,
which the spec names Repeated Neighbor Cells, i.e. have a list of (=repeat) the
lists of E-ARFCNs.

  Repeated Neighbor Cells = {
     // first cells list
     Neighbor Cells = {
          cell descriptions = {
                  { e_arfcn = 1, meas_bw = 3 },
                  { e_arfcn = 2, meas_bw = 3 },
                  { e_arfcn = 3, meas_bw = 3 },
          },
          prio, thresh, ...
     },
     // second cells list
     Neighbor Cells = {
          cell descriptions = {
                  { e_arfcn = 4, meas_bw = 3 },
                  { e_arfcn = 5, meas_bw = 3 },
                  { e_arfcn = 6, meas_bw = 3 },
          },
          prio, thresh, ...
     },
     ...
  }

Adjust the naming of the SI2quaterRestOctets members to more closely resemble
this structure, adopting the naming in 3GPP TS 48.018:

  EUTRAN_NeighborCell -> EUTRAN_NeighborCells
    because it is really a collection of multiple E-ARFCNs

  EUTRAN_NeighborCells -> EUTRAN_RepeatedNeighborCells
    because it is a list of E-ARFCN lists, and 3GPP TS 48.018 names it
    "Repeated Neighbor Cells".

Also rename the EUTRAN_NotAllowedCells accordingly.

Change-Id: Ib11d72c04cdb8997ec97321257fb58b2c113e790
2020-07-08 15:27:50 +00:00
Pau Espin e1195bbc42 cosmetic: pcu: Fix whitespacing typos
Change-Id: I38f752f709e593d1cfd3489a6ac590360f22a10f
2020-07-08 11:36:33 +00:00
Neels Hofmeyr 4e18cccb9c 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-07-08 01:45:09 +00:00
Neels Hofmeyr a5f0ed2ba4 GSM_SystemInformation: use GSM_RestOctets for SI3 and SI4 rest_octets
Change-Id: I3f00dd0b4863582fc5edf08149103150b8b5e97b
2020-07-06 16:49:52 +00:00
Pau Espin 5e6844d170 pcu: Introduce TC_ul_data_toolong_fills_padding
Change-Id: Ic37294efac005ed6c0ce48dea566fd20284b5868
2020-07-06 12:50:01 +00:00
Pau Espin fb2301eba3 pcu: Introduce test TC_ull_all_sizes
Change-Id: I293c8dea2d44c5232a96c44b605e0d8c6dc1fa0e
2020-07-06 12:50:01 +00:00
Pau Espin 245bfcb742 pcu: Support sending with CS other than CS1 in f_ms_tx_ul_block()
Change-Id: Ibafa4246b442e7c26666eb0d37570bfbbf1dbda7
2020-07-06 12:50:01 +00:00
Pau Espin 05b6c178fc pcu: Introduce test TC_ul_flow_multiple_llc_blocks
Related: OS#4559

Change-Id: I62f42981d31bc5c2e4c61e92bea329bd74cb2d19
2020-07-06 12:50:01 +00:00
Vadim Yanitskiy 89be060458 BTS_Tests: mark both TC_rll_data_{req,ind} as TODO
Change-Id: I55d8dbc3a5cb3b0422cb6329b2bd60dd7b7fad6a
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy 13c26f9279 BTS_Tests: move ts_RRM_GprsSuspReq to L3_Templates.ttcn
Change-Id: Ib1aa0053cfca8ccd6ff613ab3b1c4f5afbd27534
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy b2a90db875 BTS_Tests: cosmetic: mark friend types / functions as such
Change-Id: I53296b0d66594c198251526c8433a07348d821b1
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy 8239dd9627 BTS_Tests: cosmetic: mark private types / functions as such
Change-Id: I99ccf398130c7e5c2aac1932ebb83f158fed281d
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy 71c39ea8f2 BTS_Tests: cosmetic: mark private test case functions as such
Change-Id: I173e42dbe1694a10b54f95a730df2e64f2c65d17
2020-07-04 21:39:39 +07:00
Vadim Yanitskiy d5f6bfe7bd library/GSM_RestOctets: initial SI2quater Rest Octets definition
This is a very minimalistic (incomplete) implementation of SI2quater
Rest Octets as per 3GPP TS 44.018, table 10.5.2.33b.1.  Should be
enough to decode some of the E-UTRAN specific parameters though.

Some BITn fields might need to be replaced with more specific
enumerated or integer types.  Beware [1], the bit ordering rules
are different for integer and bitstring (sub-)types if a field
ends up on boundary of the two octets!

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488

Change-Id: I6a12c9ee12f8df8b4fc0976dd593152dc1195718
Related: SYS#4870
2020-07-03 03:30:00 +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