Commit Graph

297 Commits

Author SHA1 Message Date
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
Pau Espin 7aa0274138 bsc: Do proper chan release in TC_ho_out_fail_no_ho_detect
BSC waits to receive a ClearCommand in response to its ClearRequest
before it starts tearing down the MGCP conn on the MSC-side of the MGW
endpoint.

As a result, expected DLCX was not being sent which made test fail.

However, currently test still fails because current osmo-bsc master
sends a repeated ClearRequest message in this scenario.

Related: OS#4078
Change-Id: Ic398896147a0b6b04ffeae56a23d25783b2b17fe
2019-07-03 12:20:16 +00:00
Pau Espin 54ab92f787 cosmetic: bsc: Document timer timing out in f_tc_ho_out_fail_no_ho_detect
Change-Id: I4d06fcff63d82f849da08f509b007cb19e809fb0
2019-07-01 10:35:36 +00:00
Pau Espin fd02ad474e bsc: Test MGCP-over-IPA forwarding in SCCPlite tests
* MGCP-over-IPA handling in MSC_ConnectionHandler means we need to use
the new MGCP_CLIENT_MULTI port since we'll be managing MGCP messages
from 2 different UDP connections, and we need to be able to route
answers correctly. As a result, parameter multi_conn_mode is enabled for
SCCPlite and all code adapted to use that port in that type of scenario.
* iDuring calls when on SCCPlite, send a full (all-required-params-in)
CRCX through the MGCP-over-IPA connection towards the BSC in order to
emulate the MSC, and expect the correct answer back. This way we test
BSC funcionality to forward MGCP messages coming from MSC works as
expected.

Related: OS#2536
Depends: osmo-bsc.git I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
Change-Id: I31fed700772dd0b063f913b1e1639fd428c46e7d
2019-06-24 13:53:25 +00:00
Pau Espin 1a026a52d3 lib/mgcp: Add new port with support to handle multiple MGCP sockets
* Some scenarios like MGW BSC-attached in SCCPlite require handling of
2 MGCP-over-UDP sockets in MGCP Emulation: 1 for regular
libosmomgcp-client from osmo-bsc and another one from the forward socket
from osmo-bsc (of MGCP-over-IPA messages communicated with MSC).

* Old port is kept for backward compatibility with other tests and
enabled by default. It's also interesting to keep it because it makes
tests without special needs (2 sockets) to use the old port/API which
produces simpler code to read and mantain.

* Users of the new port have to enable multi_conn_mode parameter and
expect to interact with port MGCP_CLIENT_MULTI instead of MGCP_CLIENT,
which will offer messages containing information about the UDP
connection being used by that message.

Change-Id: Ic0ba8c5cde068c07671512a83095d83e28b86746
2019-06-24 13:53:25 +00:00
Pau Espin 513b831cda bsc: Refactor altstep as_Media_mgw()
Move logic handling CRCX and MDCX to function, so they can be reused for
other ports in forthcoming commits.

Change-Id: I07344657c5d1465a8e0c278adb76150ca7f449ba
2019-06-24 13:53:25 +00:00
Pau Espin 392963fa28 bsc: Move hardcoded ip addr to variable
This way it's more clear what are those IP addresses for.

Change-Id: I3600fd0d0486205e5bdc487fa75e9038d3bfb52c
2019-06-19 10:52:11 +00:00
Pau Espin 1fc30b9483 bsc-sccplite: Fix expected DLCX in HO tests
* TTCN3 code was not ACKing the DLCXs, and as a result retransmitted
DLCX BSC->MGW were being counted as 2nd DLCX.

* In SCCPLite, only 1 DLCX is expected BSC->MGW, because the BSC only
takes care of the BTS-side conn in the endpoint, while MSC takes care of
the MSC-side conn (which is not sent in this case because doesn't really
involved the BSC other than forwarding the message, which will already
be tested in other places in forthcoming commits).

* Getting rid of retransmissions by ACKing the DLCX, it unconvers a bug
in TC_ho_out_fail_no_ho_detect when on AoIP, where BSC only deletes one
of the 2 previously created connections.

* Code is refactored into the function because its logic is made more
complex, and may be even more complex in forthcoming commits when we add
MGCP-over-IPA forwarding verification support.

Change-Id: Ia1d0db9af073760105cc8509e228e317dbea2268
2019-06-19 10:52:11 +00:00
Pau Espin 5a2d743e5d bsc: Introduce test TC_ctrl_location
Related: OS#2012
Change-Id: I3640f6889e3b6adc3b4601082f948543c64a2fe3
2019-06-13 09:38:24 +00:00
Pau Espin 76ba541efa bsc: Fix trailing whitespace
Change-Id: I97c6cc290d6cc23611ac38e7e370b5b0b88cca1d
2019-06-13 09:38:05 +00:00
Pau Espin 955491872e bsc: Only append Osmux IEs in BSSAP AoIP
Previous to this commit, BSSAP Reset (Ack) messages contained Osmux
Support IE even if transport was SCCPLite, where those IEs are actually
meaningless.

Change-Id: If6cc0f65a0f273297a4523e5d6a7564d966f0aa6
2019-06-06 17:06:29 +02:00
Pau Espin c6b78ff2f9 Add and set transport field for RanOps structure
This will allow RAN_Emulation to have better knowledge on the protocol
stack in use, and behave differently based on that information.
For intance, forthcoming commit will append OsmuxSupport IE only if
transport is BSSAP AoIP.

Change-Id: Ife62e328af2d3f2475ff93249f2138820c7ddabb
2019-06-06 17:06:29 +02:00
Pau Espin 096d73dfc3 bsc: Avoid appending Osmux CID IE in AssignReq/Compl with SCCPLite
That IE is not required when on SCCPlite, only for AoIP.

Change-Id: Iff939e431fa3da9fef648242140fdb8d0dc92e52
2019-06-06 17:06:03 +02:00
Pau Espin 58cf682d82 bsc: Add module param to disable osmux (fix bsc-latest jenkins job)
ttcn3-bsc-test-latest currently fails on most tests because it tries to
use "osmux off" VTY param and only current osmo-bsc master supports it.

Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a
2019-05-29 06:06:31 +00:00
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
Some of our files didn't have a copyright notice at all, let's add
it.  Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.

Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2019-05-27 10:00:06 +00:00
Pau Espin c6a53dbb2a bsc: Introduce Osmux infra and one test for osmo-bsc
Test verifies once osmux is enabled in osmo-bsc, BSSMAP RESET (ACK)
contains Osmux Support IE and that it correctly handles BSSMAP ASsign
Req with Osmux CID.

Related: OS#2551
Depends: osmo-bsc 6de754cdde5319af3059d8fc6abf85037ec7eacc
Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: If69c716dc06d61d810c32d1720a237c7535baca8
2019-05-27 09:56:51 +00:00
Pau Espin fe0c6083bd Depend on our own fork of titan.ProtocolModules.BSSMAP
Since we use some BSSMAP extensions to signal Osmux, we need to maintain
our own fork of BSSMAP_Types in order to supports those IEs in BSSMAP
RESET and BSSMAP Assin Req/Compl. Hence, switch all build componenets to
fetch and use our fork.

Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: Ic8debe5f3ffe8e1d4258fa6b4632a3871b99af40
2019-05-21 10:28:53 +00:00
Neels Hofmeyr 61ca08d724 bsc: deterministic TC_ho_in_fail_msc_clears: wait for MGW setup
Randomly, this test issues the Clear Command so fast that the MGW has not yet
been set up, and hence the test cannot possibly see DLCX for endpoint conns
that haven't been set up at all. So, simply wait a bit before clearing.

Change-Id: Idd0b3810916efd02a499e0ac060a6a275265b8c3
2019-05-07 00:14:33 +02:00
Harald Welte 3ca0ce13b2 RAN_Adapter: Rename functions from f_bssap_* to f_ran_adapter_*
Change-Id: I73818247f1dfc71c8ece11660e6c18f5f153d186
2019-04-25 20:07:11 +00:00
Harald Welte 2fce7887f4 RAN_Emulation: Modularize protocol support
The RAN_Emulation currently unconditionally provides BSSAP and MGCP support.
Let's re-structure the code so that support for those protocols is now
possible to enable/disable at compile time.

This patch is in preparation of introducing RANAP support in RAN_Emulation.

Change-Id: Id53ba3ff05f9946230e0e4a759245de14a0f9fbd
Related: OS#2856
2019-04-25 20:07:11 +00:00
Harald Welte 6811d10af7 Rename BSSMAP_Emulation -> RAN_Emulation
So far, BSSMAP_Emulation supported only a transport over BSSMAP.
However, we soon intend to merge support for RANAP in order to
simulate RANAP/Iu connections as well as BSSMAP.  Let's start
by renaming some of the existing types/functions/ports/modules
without introducing any functional changes just yet.

Related: OS#2857, OS#2856
Change-Id: Iecbcb0c6c136baad9460eca40606bb4010d8882d
2019-04-21 17:44:59 +02:00
Philipp Maier 8a581d2409 BSC_Tests: execute S15-S0 related tests only on AoIP
Make sure that the S15-S0 related testcases are only executed when AoIP
is used as transport.

Change-Id: I62d51bbe4b1f089ded6c271b68414a4a37d509d8
Related: OS#3864
2019-03-27 07:01:14 +00:00
Philipp Maier fe39b9da86 bsc: add TC_chan_rel_hard_clear_csfb to expected-results.xml
The testcase TC_chan_rel_hard_clear_csfb is missing from the
expected-results.xml. Lets add it.

Change-Id: I087e6715364f72944cb47fa64d96eab6538afda5
2019-03-26 17:38:26 +01:00
Philipp Maier 99a033e917 expected-results: add new S15-S0 related testscases
The S15-S0 related testscases are missing from the expected-results.xml
file. Lets add them.

Change-Id: I28a853ec25feb723b2d333061e1ae4d2e0b34d86
Related: SYS#4470
2019-03-20 09:46:17 +01:00
Philipp Maier d0e64b07dd BSC_Tests: add testcases to verify S15-S0 handling
The handling of the AMR rate configuration bits S15-S0 is currently only
superficially checked. Lets add more some more elaborated testcases to
check through varios different situations. Also make sure that the
resulting mr configuration IE is verified

Change-Id: Ica323deb9836deea72982e093c9cb31deb5a216b
Related: SYS#4470
2019-03-19 13:29:31 +00:00
Philipp Maier 806f8f1fb4 BSC_Tests: fix TC_assignment_codec_amr_f/h
The testcase TC_assignment_codec_amr_f uses a combination of S-Bits that
has S1 which configures a set of four rates at once. This is quite a
complex situation and since the BSC was upgraded with new features
affecting the behavior in this special case lets simplify this testcase
for now.

depends: osmo-bsc Ie52376b51fe07ed07056e8df2e9557293ff67a78
Change-Id: Ibf730f76947cdeed23eb3119167450e3b7a9b314
Related: SYS#4470
2019-03-19 13:29:31 +00:00
Harald Welte 9978710c4b bsc: Test CSFB "Fast Return" in new TC_chan_rel_hard_clear_csfb
When a MSC releases a connection using the BSSMAP CLEAR CMD, it can
specify that this call was part of CSFB.

The BSC is then supposed to add a special IE to the RR RELEASE
message which will help the phone to switch back to LTE as soon
as possible.

This commit adds a new test case testing for exactly that behavior.

The test does *not* verify if the EARFCN information contained is
actually correct, only that the IE is present in the RR RELEASE.

Change-Id: I7501fb25578412c882ff92da5d388f3079bbce7f
Requires: osmo-bsc Ibfbb87e2e16b05032ad1cb91c11fad1b2f76d755
Related: OS#3777
2019-02-05 17:45:29 +01:00
Harald Welte 924b6ea17b bsc: replace octet string with decmatch when matching RR RELEASE
The 'decmatch' keyword allows us to match the decoded version of some
octetstring, which is very useful in the situations where we have
the L3 message only as octetstring but want to check if it matches
some L3 template.

Change-Id: I0a91e067f7e8062bf991fef8b0d4d8da740bfafc
2019-02-05 17:45:29 +01:00
Harald Welte cc32ed9096 BSC_Tests: Don't make invalid assumptions about RR RELEASE
The RR RELEASE message does not always have to be '060D00'O,
which constrains it to:
* not having any optional IEs
* not having a cause value != 00

Let's relax the matching to accept any RR RELEASE message, whatever
the cause may be, and whether or not there are any optional IEs at the
end.

At the same time, also remove some copy+pasting but rather have one
template that gets used everywhere.

Change-Id: I4b9d078c9b66f040fe673b5d957cf8e2c6d5892c
2019-02-05 15:05:26 +00:00
Philipp Maier c704a88b40 BSC_Tests: fix vty interface for channel allocator tests
The tests presented in Change I109d986dd7ece1a56422a669ca64353ed46f7ed6,
are using a slightly outdated vty syntax and fail because of that. Lets
update the VTY syntax.

Change-Id: I302e8872dbdc8e65d51902a881f777863de22915
Related: OS#3503
2019-01-29 16:02:45 +01:00
Philipp Maier ac09bfc4ce BSC_Tests: Add tests to check channel allocator
When a channel is assigned via the assignment request throught the A
interface, the MSC may offer either FR, HR or both. When FR and HR are
permitted, a preference is set on one of the two.

At the moment we do not check how the bsc is reacting to those
preferences and its also not checked how the behavior is when the
preferred rate is not available because all lchan of that type are
already in use. Lets add a set of tests to verify this.

Change-Id: I109d986dd7ece1a56422a669ca64353ed46f7ed6
Depends: osmo-bsc I397e68e26d6a1727890353fa34f4897b54795866
Related: OS#3503
2019-01-29 12:49:47 +00:00
Neels Hofmeyr 2caf349752 update expected results
Change-Id: Idacaf8343bed4a37878eacdf338c4d5eb46bf7a7
2019-01-23 12:44:42 +01:00
Pau Espin fe200d7fef bsc: TC_chan_exhaustion: Send correct RA to alloc all different channels
Previous RA value (23, Establishment cause = 0010XXXX) meant MS was dual
rate capable but was asking speciifically for only TCH/F channel. As a
result, TCH/H was not being allocated and an immediate assignment reject
was sent.

Change-Id: I3e58592c661fc004e648dbe46b67a3b3f5a20bc8
2018-12-10 12:58:23 +01:00
Philipp Maier 4dae065057 BSC_Tests: expect a HANDOVER PERFORMED message on internal handover
When an internal handover is performed, the BSC is expected to inform
the MSC about the event by sending a BSSMAP HANDOVER PERFORMED message.
This feature was missing in the BSC and has now been added. The tests
need to be upgraded in order to handle the additional message.

- Upgrade f_tc_ho_int so that it expects a HANDOVER PERFORMED message

Change-Id: I10f4e578c96a90317939ba49b61b14a3c7e488a7
Depends: osmo-bsc If26e5807280e0f75a423b3b04f8e3c698c82a351
Related: OS#3645
2018-12-08 19:33:29 +00:00
Pau Espin 5ee6f6c08b bsc: Fix TC_paging_resp_unsol
TC_paging_resp_unsol spent some time in gerrit before being merged. As a
result, other commits were merged in between the test was submitted (tested)
and merged. As a result, commit a5302c8151
was merged while this test was still in gerrit and thus was not updated
accordingly.
Similar stuff happened with the osmo-bsc commit fixing the scenario this
test was showcasing: The osmo-bsc patch (77cd1129931928d2a6e7667d0374feeeed71b0ce)
had merge conflict with other osmo-bsc commits merged in-between,
and was merged even later than the commit introducing this TTCN3 test, so
failures were expected for this test for a while.

Change-Id: I933cba41912640eb7e15be4a27bda5b4dd489962
2018-12-07 12:11:56 +01:00
Daniel Willmann e68f927f1c bsc: Start the timer at the beginning of f_init
This avoids a possible indefinite timeout if osmo-bsc crashes during the
test.

Ticket: OS#3713

Change-Id: I88f6254d9d2d90ab49a3c3d8255af25ca6ffe624
2018-11-27 17:41:10 +01:00
Vadim Yanitskiy 1ff1fdf63e BSC_Tests.ttcn: introduce TC_chan_deact_silence
The idea of this test case is to verify channel deactivation
procedure due to no response to Immediate Assignment.

Change-Id: I00b0838c9f919303aef72280248b0d1317f42b3b
Related: OS#3709
2018-11-27 01:41:44 +07:00
Pau Espin 3466cc53d8 bsc: Introduce test TC_paging_resp_unsol
With this test we want to verify that channels are released if BSC fails
to complete an L3 request, for instance because no pending Paging
CMD is found for a received Paging Response.

Related: OS#3680
Change-Id: Iabe8a51aa13d2fcfec4500cf7aab47d60cc138ce
2018-11-22 14:10:08 +00:00
Neels Hofmeyr 20bc3e25a7 bsc: add inter-bsc ho incoming failure tests
Change-Id: I849e4c0a14cc091195d948adb8df7a0b7414ecfe
2018-11-19 16:34:17 +01:00
Max 9925390dd7 BSC: log BTS number on failure
It's useful to see which BTS exactly has failed the test in
configuration with multiple BTS on single BSC.

Change-Id: Ib813635862c04d51a30e7bbcca4ec05ce664f7e9
2018-11-19 09:27:17 +00:00