Commit Graph

336 Commits

Author SHA1 Message Date
Pau Espin c6136cd4e4 Introduce test TC_si_acc_ramp_rotate
Change-Id: I29acf4f117ccea53028c780cc9feb1da1fc16739
2020-07-30 11:27:10 +00:00
Neels Hofmeyr ee3b927ea4 bsc CBSP: add numerous mtc.stop after fail verdicts
I found that I had to wait 30 seconds after a failure verdict.

Change-Id: I8314c53037948fae51028119c81ea247baed44ec
2020-07-29 20:03:50 +00:00
Neels Hofmeyr 1011c01fb5 bsc CBSP: drop unused vars 'pages'
Change-Id: I252fed22cccfc77a4f9cfdd2a0e3070ceeefc547
2020-07-29 20:03:50 +00:00
Pau Espin 85a8443c3c bsc: Introduce test TC_si_acc_rotate
Related: SYS#4911
Change-Id: I18d0243353fce547d126d62c34415628a21cb52b
2020-07-24 11:05:44 +02: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
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
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 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
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
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
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 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
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
Vadim Yanitskiy ca5c520842 BSC: use existing templates for ASP_RSL_Unitdata
Change-Id: I3243850d3ceedcd89ab5be20ff4f444cd39c9d6e
2020-05-25 22:14:04 +07:00
Vadim Yanitskiy 9b4e356886 library/IPA_Emulation: assume TRX#0 in ASP_RSL_Unitdata templates
Change-Id: I93297680a2644516870222c2bb8eee03c6b575a9
2020-05-25 22:14:04 +07:00
Neels Hofmeyr a4d2100431 update expected results
Change-Id: I37014274ee97f09985c31966e7cc9122fe11a856
2020-05-19 19:25:35 +00:00
Vadim Yanitskiy a2afacc905 library/IPA: use tr_ASP_IPA_EV instead of inline templates
This way we can easily add new parameters to ASP_IPA_Event.

Change-Id: Icc37286fcb4d43836d56a26424ecb9dcba58d1f1
2020-05-18 21:16:35 +07:00
Neels Hofmeyr a26d0a8b8c bsc/osmo-bsc.cfg: remove legacy 'rtp-base' config
osmo-bsc does not use an rtp-base for years, ever since we're using an MGW.

Related: Id14fa3066ca5d472a817593074a6222f159168a8
Change-Id: Ia4866fc603877b2ab8ce16683e9f6145764117c7
2020-05-13 18:02:57 +02:00
Neels Hofmeyr b3fc898c2d bsc: make ho_config_tests more robust against timing
In f_probe_for_handover disable the RSL emulation before the vty handover
command.  Otherwise, osmo-bsc may be too fast to issue the handoverCommand, so
that RSLem still handles it and says: "RSL for unknown Dchan".

(f_probe_for_handover() receives the handoverCommand directly, just to detect
whether a handover would be initiated, and then quickly aborts the handover
procedure.)

Related: OS#4264
Change-Id: I7f73ef8cbdf46e31a46c9e1b7ad0fa2bd41c0a12
2020-05-11 17:27:59 +00:00
Pau Espin e8d7d16f13 Split templates in RLCMAC_{CSN1_}Types into their own _Templates file
RLCMAC blocks have a lot of fields and we will potentially require lots
of different templates, as well as functions to handle related structs.

Change-Id: I9c6597178168aa3848b21930f33be698dd2ce545
2020-04-29 19:07:38 +02:00
Harald Welte 49a61e66cb bsc: Ensure osmo-bsc.fg + BSC_Tests_CBSP.ttcn defaults match
We want to make sure that the tests + config match

Change-Id: I9d6ed0aed34bb983c8db225c7762ceffa642decd
2020-04-01 10:12:27 +00:00
Vadim Yanitskiy cc4623dff2 library/RSL_Types: use MobileIdentityLV for MS Identity IE
Change-Id: I5436dcbbc961d5b572e10e4f1a3f806d252d7818
2020-03-28 06:21:02 +07:00
Vadim Yanitskiy 98bb2d5eea library/GSM_RR_Types: do not duplicate Mobile Identity records
All the records related to Mobile Identity IE (see 3GPP TS 24.008,
section 10.5.1.4) are defined in [1], so there is no real need to
dumplicate them. Moreover, most of the related templates in
library/L3_Templates.ttcn are based on these records.

[1] titan.ProtocolModules.MobileL3_v13.4.0/src/MobileL3_CommonIE_Types.ttcn

Change-Id: I27c2743c59db770d6f7e9447dc8c1f539b228ced
2020-03-28 03:29:22 +07:00
Pau Espin c675b6119c bsc: Introduce test TC_chan_rel_sccp_tiar_timeout
Verify SCCP T(iar) timeout triggers release of established channel.

Change-Id: Ic2724f62689b99c33e2e5c3a0c2fd022178a788c
2020-01-12 13:11:39 +00:00
Pau Espin 8df1011e30 bsc: Fix typo in comment
Change-Id: Iafaf4c500f05a2c98e8b151bbae0c15370b3bf22
2020-01-09 18:21:53 +01:00
Pau Espin 0361193a55 Update README.md of several TTCN3 test suites
Some stuff was wrong and some was missing after new features being
implemented in tests over time.

Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0
2019-11-15 18:49:09 +00:00
Pau Espin 8f77363ea3 bsc: Verify presence of MS Power Parameters IE on one test
Otherwise most tests in bsc-latest fail because in latest release BSC
never sends that IE.

Related: OS#4244
Change-Id: I725836784a7900d2ea51eae188c2c279e8639dbf
2019-11-05 19:32:34 +00:00
Pau Espin 7a9ccf8df9 bsc: Log wrong and expected values if MS Power level verification fails
Change-Id: Idacfdb8d9061d78ce6fa521d4008974c2d3d74df
2019-11-05 19:32:32 +00:00
Pau Espin 8f30ccdc28 bsc: Allow setting expected ms max power level with module param
It will allow changing ms max power in osmo-bsc.cfg as well as TTCN3
expactancies in BSC_Tests.cfg easily in docker-playground.git without
needing to recompile or change code in TTCN3.

Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa
2019-11-05 19:31:50 +00:00
Pau Espin f7630a6498 bsc: Verify ms power level value from RSL IE MS Power during CHAN ACT
Change-Id: I0a632156420251b14d1bbfd4ca19dc2bdf5a5f1e
2019-10-28 15:15:43 +01:00
Pau Espin 3d008ae837 bsc: Verify RSL IE MS Power Parameters is send upon CHAN ACT
Depends: osmo-bsc.git Icaaa61b363b093f00b6653c3df64d3e66583b9f8
Related: OS#1622
Change-Id: I2ecf03bbab169f9fda4e4a61d233d6a30b2a91b9
2019-10-28 14:50:27 +01:00
Harald Welte 0b5e0f9146 bsc: Test that ETWS Primary Notification is passed via RSL to PCH
The BSC must not only pass the ETWS Primary Notification from CBSP
down every dedicated channel, but it must also send it via an
Osmocom-specific RSL message to enable the BTS to brodcast it via
the PCH (P1 Rest Octets) and pass it to the PCU for PACCH.

Change-Id: Ia418095844aaa418a4e2ff6fd75d8a4b3c8bb9c0
Related: #4046
2019-09-07 12:07:13 +02:00
Harald Welte 187f7a99c1 bsc: Test that ETWS Primary Notification are sent via dedicated channels
When the BSC receives an ETWS PN via CBSP, it must send it through all
established dedicated channels of the matching BTSs.

Related: OS#4046

Change-Id: Ib057bd251604e9bae968e71de245b3bbf737a356
2019-09-07 08:38:00 +02:00
Harald Welte 09538f8bfd bsc: Test suite for CBSP (Cell Broadcast Service Protocol)
In this testsuite, we simulate BTS and CBC by attaching to RSL and CBSP
protocol interfaces of the BSC.  We then issue a variety of CBSP
commands to the BSC and check for corresponding action on both the BTS-
facing RSL as well as responses on the CBSP side.

Change-Id: Ia6ffac181f50586d06d2f29bca1c57285179e861
2019-09-05 13:13:35 +02:00
Oliver Smith 92c2bdb00f bsc: f_ipa_unknown_unit_id: use different id
Change the unit_id value, that is supposed to be unknown at BTS, from
0/0/0 to 99/0/0 to make TC_oml_unknown_unit_id pass again. The test was
failing, because a new bts that matches 0/0/0 was added to osmo-bsc.cfg
in [1], [2] and [3].

[1] Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc
[2] I1c57a04747f5ec004ccf4657954dcb0b003c24fc (docker-playground)
[3] I00547dccf8908d46df4730cb513fe577956d7683 (docker-playground)

Related: OS#4156
Change-Id: I585ff825c7b6bca17e5c6fb6d670a649965a1653
2019-08-20 15:30:41 +02:00
Oliver Smith 75aa020da5 BSC_Tests: update number-of-bts to 4
Fix failing TC_ctrl test for ttcn3-bsc-test and -latest.

Depends: I00547dccf8908d46df4730cb513fe577956d7683 (docker-playground)
Related: OS#4156
Change-Id: Ie2c664ba0f845da644e20e2c919c12d8fc2af6ba
2019-08-19 14:30:50 +02:00
Philipp Maier f45824ad0e BSC_Tests: Change test-expectation of TC_paging_resp_unsol
The testcase TC_paging_resp_unsol expects the BSC to close the channel
when an unsolicit paging response is received. This expectation is due
to the fact that osmo-bsc supports multiple MSC, which is not specified
in 3gpp specs. Therefore the BSC needs to know which MSC is in charge.

However, with MT-CSFB calls it is a normal situation that the BSC
receives a paging response on abis without sending a paging first since
the MSC has paged the UE via the SGs interface. In those cases we expect
the BSC to forward the paging response to the first configured MSC.

Related: SYS#4624
Change-Id: I5562cbf61a2aa42e6950860bc0f9c6c20c61a9fe
2019-08-18 17:13:20 +00:00
Neels Hofmeyr 7e2769f3b1 fix TC_ho_int; make neighbor config more robust
Since osmo-bsc commit "neighbor config: allow re-using ARFCN+BSIC pairs"
(I29bca59ab232eddc74e0d4698efb9c9992443983), osmo-bsc considers only those
cells as neighbors that are explicitly listed, or all local cells if none are
listed. This lead to breaking TC_ho_int, because the osmo-bsc.cfg has only one
remote-cell neighbor for bts 0, and hence a handover to local cell bts 1 is now
regarded as invalid.

The remote-cell neighbor is needed for inter-BSC handover tests; also consider
that the TC_ho_neighbor_config_* tests each place individual neighbor
configuration by live VTY interaction.

Hence make all of these tests more robust: remove the neighbor config from the
osmo-bsc.cfg file, and instead include VTY interaction for each test case that
sets the particularly needed neighbor configuration at runtime.

An analogous osmo-bsc.cfg change in docker-playground is in change
If44dd6b578cdc55076c8180707d1c2d69fe5f2a8.

(It is not actually harmful to leave the neighbor config in osmo-bsc.cfg, but
remove that since it is also not needed anymore.)

Change-Id: If44dd6b578cdc55076c8180707d1c2d69fe5f2a8
2019-08-15 01:07:40 +02:00
Neels Hofmeyr 9140101cb0 bsc: add TC_ho_neighbor_config_1 thru _7
Add tests to play through various neighbor configurations.
Tests will pass as soon as osmo-bsc I29bca59ab232eddc74e0d4698efb9c9992443983
is merged.

Add RSL2 to allow triggering handover to BTS 2.

Adjust osmo-bsc.cfg to match the new tests. Also applied in docker-playground
I1c57a04747f5ec004ccf4657954dcb0b003c24fc.
    - Actually enable handover.
    - Add bts 3

Depends: osmo-bsc I8623ab581639e9f8af6a9ff1eca990518d1b1211 ('no neighbors')
Related: OS#4056
Change-Id: Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc
2019-08-13 21:54:55 +00:00
Neels Hofmeyr d8a602cbd4 rename TC_ho_out_fail_no_ho_detect to TC_ho_out_fail_no_result_after_ho_cmd
Change-Id: If84a1d4535ee12e33a50588e178bf1ebb6fb2cd5
2019-07-14 00:10:04 +00:00
Neels Hofmeyr e1797aab91 f_tc_ho_out_fail_no_ho_detect: stricter ordering
Make sure that the RR is released only after the MSC has sent the Clear Command:
- first expect a Clear Request from osmo-bsc and return a Clear Command,
- only then accept RR release messages.

See 3GPP TS 48.008 3.1.5.3.3 "Abnormal Conditions": "The terrestrial resource
in the old BSS shall remain assigned until a CLEAR COMMAND message is received
from the MSC"

osmo-bsc already complies, the test should continue to pass.

Change-Id: Iba05336d3c4af8a1c57cdc828dae464eae3510b9
2019-07-09 19:42:58 +02:00
Neels Hofmeyr 10f2bfa444 comments: BSC_Tests: clarify f_tc_ho_out_fail functions
Change-Id: Ia0584324476d36077e92d1564d9d7e79a069addf
2019-07-09 19:42:58 +02:00