* 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
* 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
* 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
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
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
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
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
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
Make sure that the S15-S0 related testcases are only executed when AoIP
is used as transport.
Change-Id: I62d51bbe4b1f089ded6c271b68414a4a37d509d8
Related: OS#3864
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
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
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
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
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
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
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
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
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
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
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
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
It's useful to see which BTS exactly has failed the test in
configuration with multiple BTS on single BSC.
Change-Id: Ib813635862c04d51a30e7bbcca4ec05ce664f7e9
Add two helper functions which retry a VTY command until the
result matches a regular expression or a configurable timeout
expires.
Use these functions in BSC test's f_ts_dyn_mode_get, which has
seen sporadic failures due to a race condition during channel
reconfiguration, in order to hopefully close this race.
Change-Id: I308ddb06e440c165fe1e73fe2c1fb78be2e1d510
Related: OS#3690
Instead of vaguely allowing any release messages to be present or not, exactly
pinpoint for each test case the exact release messages expected during lchan
release.
Related: an osmo-bsc change broke sending of RR Release messages, which was
utterly ignored and hence not caught by ttcn tests. That must not happen again.
I am not actually sure that these expectations are 100% correct; if errors
become apparent, we shall change the expectations in ttcn3 and then fix
osmo-bsc according to that.
Adjust f_expect_chan_rel() and callers,
and the Assignment procedures (as_assignment and f_establish_fully).
The current state of the bsc tests should all pass with osmo-bsc
Id3301df059582da2377ef82feae554e94fa42035
Related: OS#3413
Change-Id: Ibc64058f1e214bea585f4e8dcb66f3df8ead3845
Allow osmo-bsc sending a Deact SACCH messages in most cases. Prepare the
ttcn3-bsc-tests to not break just because of those messages that will soon be
sent.
When releasing an lchan, it makes sense to Deactivate SACCH on it, if it was
ever active. So far osmo-bsc was fairly reluctant to send Deactivate SACCH, but
osmo-bsc Id3301df059582da2377ef82feae554e94fa42035 is about to change that.
In most test cases, Deact SACCH are still optional, but in one case, the
current missing Deact SACCH will introduce a test failure: in the 'interleave'
of BSC_Tests.TC_ho_out_fail_no_ho_detect.
As soon as abovementioned osmo-bsc patch is merged, the test will pass again.
Also, as soon as Ibc64058f1e214bea585f4e8dcb66f3df8ead3845 is merged here, the
bsc tests will properly ensure whether Deact SACCH is sent or not in all tests.
Change-Id: I27da24dbe3184fa7a076a35f6fa6af457c1db8d2
Receive RR Release messages if they happen during lchan release. Add RR Release
to the alt{}s in both f_expect_chan_rel() to cover a whole bunch of test cases,
and in f_tc_ho_out_fail_no_ho_detect() which has its own release expectations.
Before this, RR Release messages would typically be lost in the RSL.clear
recently removed by Ie1be30c3f109dda8c58c523df508211f8e20aad3.
However, I still expect tests to pass after this, since the current osmo-bsc
master has a bug that omits RR Release messages (since [1]).
By applying this patch, both the buggy osmo-bsc (omitting RR Release) and the
fix of that [2] should pass the BSC tests. So far by accepting whatever comes
along, and not complaining if it doesn't come along.
A subsequent patch will more precisely ensure that exactly the expected
messages will be sent by osmo-bsc (Ibc64058f1e214bea585f4e8dcb66f3df8ead3845).
[1] osmo-bsc I4fd582b41ba4599af704d670af83651d2450b1db
commit 8b818a01b00ea3daad4ad58c162ac52b4f08a5cb
"subscr conn: properly forget lchan before release"
[2] osmo-bsc I666b3b4f45706d898d664d380bd0fd2b018be358
"fix: send RR Release (e.g. after BSSMAP Clear Cmd"
Related: OS#3413
Change-Id: I4e6d266d091b140f56b28312cb3c5d67ffcc3a59
Instead of placing an own set of channel release expectations, just use the
common f_expect_chan_rel() that exists for exactly this purpose.
This will also be in line with upcoming changes to tighten checking of the
lchan release messages.
Related: OS#3413
Change-Id: Ib7dd886472337e2deb968e6f9de6cecdb7855319
When we're expecting release, it can be non-deterministic / timing dependent to
flush the RSL queue. Particularly the RR Release message is typically already
in the queue when f_expect_chan_rel() is called and would be lost.
It turns out that none of the current callers need the flush feature.
If a test needs it, we can add a separate f_rsl_flush() function and call that,
no need to clutter up the f_expect_chan_rel() argument list. I had such
function but found that no caller needs it, so dropped it.
Related: OS#3413
Change-Id: Ie1be30c3f109dda8c58c523df508211f8e20aad3
Some TC_no_out_fail_* testcases still used valueof() to get g_pars which
always set aoip to true.
Use f_gen_test_hdlr_pars() now so these tests can properly detect if
they are run with sccplite of aoip and can adjust their expectations
accordingly.
Change-Id: Ic164827d63c9f5452888951bba4c197c3fe6f57b
Add another IPA test to the BTS and BSC test suites.
This new test sends the header in one burst, followed by the
payload which is transmitted byte-per-byte.
The test uses an ID REQ message. If acting as a server, the test
can expect an ID RESP message. However, if acting as a client, the
server will close the connection when it receives the ID REQ.
The CTRL interface port on the BSC does not close the connection in
this case, so that particular port is skipped by the test for now.
Change-Id: If75cb90841bb25619b414f0cabe008a2428a9fdf
Related: OS#2010
Depends: I4804ccabd342b82d44e69dbc6eaaae220ec7d4e4
With a related patch to libosmocore, this test will pass on
osmo-bsc's ctrl interface.
Change-Id: I20a4f251dbe3e75a5c53a0ff167998bbd1266f62
Depends: I9d7137c830981ccad03806b30b776e2b1f1b4699
Related: OS#2010
Most differences between sccplite and AoIP are visible during the
assignment. The current implementation checks for the presence of a CIC
in the ASSIGNMENT REQUEST in order to detect if the communication should
be modeled by AoIP or sccplite. This method is error prone and does not
work very well in situations where only signalling is used, because
there in sccplite and AoIP no CIC or AoIP trasp. identifier is present,
so there is nothing to check on. To resolve this we need an explicit way
to tell the MSC_ConnectionHandler that it has to behave like an AoIP MSC
or like an sccplite MSC.
- Add an aoip flag to TestHdlrParams
- Make sure BSC_Tests.ttcn sets the AoIP depending on mp_bssap_cfg.transport
Change-Id: I800249e783deb018d99e81d814843e0574a5c69b
Related: OS#3639
We cannot test the control interface with an IPA ping message.
The control interface only supports osmocom-specific extensions,
and the IPA ping message is not part of those extensions.
Other tests will have to be devised for the control interface.
Change-Id: Iae0f16394c78196de621c14b34d1b1905c0cb7c8
Related: OS#2010
This new module allows us to test IPA code in libosmocore
and libosmo-netif. Currently only one test is implemented,
which sends a chopped IPA ping message and expects to receive
an IPA pong.
The system under test is any IPA speaker on any TCP port.
Any test suite may call parametrized functions to create
an IPA testing component and run a particular test.
So far, one such test has been added to the BSC_Tests suite.
Change-Id: I246a405414e36a44dc1e308692faab8bf04da0e6
Related: OS#2010
At the moment we use the default S0-S15 bits for the AMR config,
regardless what RSL_IE_Body mr_conf or osmo-bsc.cfg sets.
- Make sure consistant S0-S15 bits are used for AMR related tests.
This is a re-submit of change I794e6d4fe8abc67337428cbe0bcc8802fae37a6e,
which had to be reverted because the depending patch in osmo-bsc is not
yet merged into master. This caused TC_assignment_codec_amr_f and
TC_assignment_codec_amr_h to fail.
Change-Id: Ia98f18ba2c17c85ed01488734dc6df67f5b60d41
Depends: osmo-bsc: I2d8ded51b3eb4c003fe2da6f2d6f48d001b73737
Related: OS#3529
The change depends on another change in osmo-bsc, which
is not in master yet. Because of this TC_assignment_codec_amr_f
and TC_assignment_codec_amr_h are currently failing. So lets
revert this patch and re-submit it later.
See also: osmo-bsc change I2d8ded51b3eb4c003fe2da6f2d6f48d001b73737
This reverts commit 7f5609ad3e.
Change-Id: Ib16d14c723773ce67508c7e6028e594c15779506
Add f_gen_handover_req() like f_gen_ass_req(), to match AoIP or SCCPlite
requirements.
For incoming HO, MSC_ConnHdlr needs to know the SCCP addresses to expect the
incoming SCCP Connection from MSC to BSC. Add 'handover' section to
TestHdlrParams, and pass in the addresses from test_CT via that.
In osmo-bsc.cfg, add a remote neighbor config, so that the VTY command
'handover any to arfcn 123 bsic any' can trigger an outgoing inter-BSC HO.
Add various BSSMAP handover templates to BSSMAP_Templates.ttcn.
Add RR Ho Command template to L3_Templates.ttcn.
Move ts_BSSAP_Conn_Req() from msc/BSC_ConnectionHandler.ttcn to
library/BSSMAP_Emulation.ttcn, so we can also model an SCCP Connection Request
in BSC_Tests.ttcn (this time from MSC to BSC).
Add the two new tests to bsc/expected-results.xml.
Related: OS#2283
Change-Id: Id22852d4be7f127d827e7a8beeec55db27c07f03
At the moment we use the default S0-S15 bits for the AMR config,
regardless what RSL_IE_Body mr_conf or osmo-bsc.cfg sets.
- Make sure consistant S0-S15 bits are used for AMR related tests.
Change-Id: I794e6d4fe8abc67337428cbe0bcc8802fae37a6e
Enhance TC_classmark to also include the BSSMAP Classmark Request -> RR
Classmark Enquiry part. So far it was only testing the return path of RR
Classmark Change -> BSSMAP Classmark Update.
This test will thus fail with current osmo-bsc master, and will succeed as soon
as osmo-bsc If5db638fd6e8d9c2ef9e139e99f0fabe1ef16ddf is merged.
Add:
* ts_BSSMAP_ClassmarkRequest in BSSMAP_Templates.ttcn
* tr_RRM_CM_ENQUIRY in L3_Templates.ttcn
Change-Id: Idaab4d568cf986b4897ba008f6262c839d1592fb
BSC_Tests: sprinkle logs to illustrate what the dyn PDCH tests expect.
BSC_Tests: tweak comment to mention that inter-BSC HO MT *does* allow N-CONNECT
from MSC.
f_tc_assignment_fr_a5_1_codec_missing: mark the missing IE beyond doubt.
Change-Id: I93c2914e766e200d89308cc81dd803e939b9b28c
Sometimes TC_chan_rel_hard_rlsd_ms_dead could fail because the Immediate
assignment command would arrive in the RSL queue after it was cleared in
f_expect_chan_rel. The alt statement would now never complete since the
Immediate Assignment was blocking/hogging the queue. Wait explicitly for
the IMM ASS in f_chreq_act_ack before continuing.
Change-Id: I2831d4caf7f045b3396d28a978328e8a1097d8d3
Sometimes (under heavy load and when the last paging cmd arrives near
the reset ack) some messages are not enqueued in the IPA_RSL port after
we have received the reset ack from BSSAP.
In the failures I have seen wireshark reports that no paging cmd arrived
after the reset ack, see jenkins job 285:
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/285/
Adding a sleep is always a bit crude, but since the paging cmd is
scheduled through TCP while the reset ack is sent through sctp I don't
see another way.
Running the test under load in a loop showed improvements where I was
not able to reproduce the failure with this patch.
Change-Id: Ib2d60e2c59baf98e437e078d844adcc6dbdbfcd8
It seems mtc.stop() alone does not really solve the race conditions when
shutting down components. The error happens when messages are sent on
ports which are no longer connected since the receiving component has
terminated.
Some web search
http://www.ttcn-3.org/TTCN3UCAsia2007/Presentations/TTCN3%20UC%202007%20Concurrent%20TTCN.pdf
suggested that one should stop all components before
calling mtc.stop (slide 38). Slide 33 also mentions the difference
between .stop and .kill. Kill removes the port connections while stop
does not. And I think looking at the logs when the testcase teminates
(through mtc.stop or otherwise) it is internally calling kill on all the
components. So hopefully stopping all components and then stopping the mtc
will fix this nasty issue.
I verified locally that the situation improves between commits now when
running BSC_Tests.TC_paging_imsi_nochan_all 20 times in a loop and
otherwise generating load on the system. It reliably failed before this
patch and I wasn't able to get it to fail with it.
Change-Id: I398883492919ceabcf94b5cc2361c63ec772d9d5
This test suite acts as an SCCP server on top of M3UA.
SCCP tests are run against the sccp_demo_user program which
can be found in libosmo-sccp/examples. This program must be
started in client mode: sccp_demo_user -c
The SCCP test suite should then work out of the box with
the provided SCCP_Tests.cfg file and this additional change
to sccp_demo_user default point codes:
https://gerrit.osmocom.org/#/c/libosmo-sccp/+/9652/
There is currently only one test, for the libosmo-sccp crash
reported as issue OS#2666. The implementation of this test
is currently using an ugly workaround due to shortcomings of
the M3UA Emulation layer (see source code comments). Whether
a better solution is feasible is still to be determined.
The test requires a patch to the SCCP Protocol Emulation which
has been submitted upstream: https://git.eclipse.org/r/#/c/124552/
Change-Id: I03f5e8b282a7396b45417495c88d8fb81b26cda8
Related: OS#2666
Call mtc.stop after setverdict(fail), add reasons to most failures and
fail with verdict error for internal errors.
Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
as_media handles the MGCP interaction for most of the tests. However,
it does not make sure if transactions are missing or if too many
transactions are performed (e.g. if an SCCP-Lite tests still creates
the connections pointing to the core network, even if they must not
created by the BSC in this case). So lets make sure that the MGCP
transactions are performed as expected by counting them.
- Add counters to count CRCX and MDCX transactions
- Check those counters after call establishment and handover
Change-Id: Ib073b097a840ca3a8ee99c4ed41f59f574191d98
Related: OS#3292
At the moment LCLS is only tested using GSM-FR. There are not LCLS
tests that test with GSM-HR yet. Lets make GSM-HR available and see
what happens when we run BSC_Tests_LCLS.TC_lcls_gcr_bway_connect
on HR instead of FR.
- set channelType depending on g_pars.ass_codec_list.codecElements[0]
- add testcase TC_lcls_gcr_bway_connect_hr
Related OS#1602
Change-Id: I2421519a642bdb7453ae4a9058e177845690a489
The current osmo-bsc refactoring causes an erratic MR Config IE. This patch
ensures that the ttcn3-bsc-tests catch this error.
Add MR Config IE expectations to g_pars, set these in the two tests that expect
an MR Config IE in the Chan Activ message:
BSC_Tests.TC_assignment_codec_amr_{f,h}
All other tests now verify that there is *no* MR Config IE in RSL Chan Activ
messages -- all other tests request no voice or a non-AMR codec for Chan Activ.
Change-Id: Ie841feed9d5e478bab1fea2bb86f300e84799013
When leaving TS 6 in Osmocom style dyn TS mode, the initialization of the BTS
will cause a RSL Chan Activ, which the tests BSC_Tests.TC_early_conn_fail and
BSC_Tests.TC_late_conn_fail will interpret as the channel activation that they
expect to come from the Channel Request. They will hence issue the Conn Fail
message before the lchan is established, and are getting confused on what they
expect to happen.
Change-Id: I2bde987eefe7129c9f7c3b81b624d55cb66a75d0
The intention is to ignore RLL REL requests, and not to actually block the alt
statement in f_expect_chan_rel() if any RLL REL messages show up.
Change-Id: I3bbcdc41d186a3464cd4adb5c5b770bdec056993
Those test cases simulate a BTS-originated RLL CONN FAIL IND at
"unusual" time:
a) before we actually establish any RLL
b) after / while we're tearing down the RLL
This is triggering an osmo-bsc segfault, see OS#3182.
Change-Id: I324c410d7565c189dbc91df577d92b87c036732c
Related: OS#3182
There's a sequence of commands which was repeated over at least
four test cases. Let's factor this out into the new
f_exp_chan_rel_and_clear() function, and use that function from
all the former copy+pasted sections.
Change-Id: Ic6791fce4e8787e38b818a12ed526d3e47f313ef
In this test case, the MSC performs a hard SCCP release of the
SCCP connection. This makes the BSC send a RLL REL REQ on the lchan,
but we simulate a broken/lost MS which doesn't respond to that.
Current OsmoBSC master will fail this test, and that's exactly why we
need it.
Change-Id: I800168499c2ab30af72625aba6fc740bc16e5653
Related: OS#3333
This test establishes an SDCCH for each iteration. However,
* due to OS#3333, osmo-bsc is currently not properly releasing those
lchan's,
* due to OS#3222, we furthermore don't allocate "larger" channels like TCH
and as a result on a combined CCCH system we only have 4 SDCCH, which
is less than the 8 that we try to use here.
Change-Id: I0f7fff54248a505387bdfe105259e8ad10ce6c77
Related: OS#3333
Related: OS#3332
For each of the SCCP/BSSMAP connections we create, let's make sure we
use a different RA and frame number, to make sure the test is more
realistic, and to aid any debugging.
Change-Id: I35540979c38d46f03702812e93742d7db772c533
This is an early WIP, we actually will need to establish two calls/legs
before the BSC is able to locally correlate them.
Related: OS#1602
Change-Id: Ie6d0b9c38027abf65c7c564fc79b889d013fa6a7
In case we want to derive other component types by extending
MSC_ConnectionHandler, we will want to connect additional ports
before starting the component.
Hence, split the connect part into f_create_handler(), while keeping
the create + start part in f_start_handler().
Change-Id: If272816b7e720e8b8f000f7ab8baa20619b35fb7
The helper function f_tc_ciph_mode_a5(), thich performs all of the
three tests currently disables the ASSIGNMENT COMMAND since due to
a bug in OsmoBSC a MODE MODIFY would be attempted by the BSC,
causing the testcase to fail.
The problem in OsmoBSC is now fixed and the ASSIGNMENT COMMAND can
be re-enabled again for this test. However, the test function
includes and expects an AoIP transport layer address, which is
not included for signalling assignments.
- Make sure no AoIP transport identifier is included in ths
ASSIGNMENT COMMAND
- Do not expect an AoIP transport identifier in the
ASSIGNMENT COMPLETE from the BSC
- Re-Enable the generation of the ASSIGNMENT COMMAND
Change-Id: Ib39d7dd2d1b3665570d7b287e431d10111316437
Closes: OS#2936
In non-handler mode, the SCCP emulation is currently started before
there's a user registered to SCCP_SP_PORT. If the first BSSMAP
package arrives from the network, then the SCCP_Emulation will crash
as it cannot deliver the resulting SCCP user primitive to the user.
Let's split start from initialization, so user code can still register
something to SCCP_SP_PORT before starting SCCP_Emulation.
Change-Id: I55c94f18531bb7e5369500dc90f4b0ff3a420774
In SCCPlite, the codec list is always missing, and that's the
successful situation, not a failure case. Let's run this test
only in AoIP scenarios.
Related: OS#2544
Change-Id: I01db7628c2b1c58419d544fc6fa311b9d9b59fb9
Of course a "CIC only" assignment will succeed in AoIP, so let's
invert the logic: Test "AoIP only" assignment in that case, and expect
it to fail.
Related: OS#2544
Change-Id: I3b8e5e6ec001f3cab6a00072ef0a7b97c13c278d
In classic non-AoIP-cases, OsmoBSC should simply return the
chosen speech version, but not any codec list in the BSSMAP ASSIGNMENT
COMPLETE message. Let's adjust the expectations accordingly.
Related: OS#2544
Change-Id: Id8e2a749bce91cfadd316bc2d56d1289412b9026
When sending BSSMAP Assignment Request, we need to decide if we want
to fill in the AoIP TransportIdentifier or the CIC. The former
is needed in AoIP, the latter is needed for SCCPlite and classic SCCP.
Related: OS#2544
Change-Id: I8aa0cf2189101de49a6da81625226bdcbbaff027
The existing encryption related test cases are all testing a case
involving the assignment procedure.
This patch adds some new testcases that test encryption without
any assignment, like e.g. in a typical LU.
Change-Id: I443cd8127e76f70fcaa7bf1638c2219524fa9381
Closes: OS#3183
In addition to the existing 3GPP AoIP stacking, allow BSSAP to
run on top of a SCCPlite stacking. Implement both the server and the
client role for IPA.
Related: OS#2544
Change-Id: Ie844c4de62e0ef5d5c4c366185968211a7f6d676
The testcase TC_assignment_sign does not assign g_pars in its
test function. However, it assigns local variable pars but then
never uses it.
- remove local variable pars and assign g_pars instead
Change-Id: Iad65d8ff8bfb98df2b212c69916f1e74dc2c61af
Related: OS#2762
This adds a set of four new testcases relted to dynamic PDCH switching:
One successful and one unsuccessful for each Osmo + IPA style dynamic
PDCH.
Closes: OS#3099
Change-Id: I7a7a937548a35461d86e93ead79c39a37a59563e
At the moment we use onle TCH/F and PDCH in our osmo-bsc config,
but the tests TC_assignment_codec_amr_h and TC_assignment_codec_h
requre a half rate channel in order to work. Configuring one TCH/F
to TCH/H seems not to hurt any tests except TC_chan_exhaustion
- also regard half rate channels in TC_chan_exhaustion
- change included sample osmo-bsc.cfg
Change-Id: Idd5a9602f1b49b5aa0fc510faa151fe16c0b404d
Related: OS#3100
Let's not only match if the BSSMAP ASSIGNMENT COMPL matches what codec
was requested in BSSMAP ASSIGNMENT CMD, but also verify that the
RSL side channel was activated with the right channel mode IE.
Change-Id: I6ef24b5b82a5c100ffffe056adadd26e69b968b9
The problem is that Junit-XML doesn't have a mapping for inconclusive
results, and hence they show up as 'passed'.
By introducing this change, we make sure all tests that don't pass
show up as failed.
Change-Id: Iddd13d0055c91f9bd304ce9833fba0485abf4c4e
Verify that the BSC does not page a subscriber when a cell identifier
with an unknown MCC/MNC is provided by the MSC.
This test introduces a magic value which represents an unknown MCC/MNC
combination: MCC=678 MNC=f90
Change-Id: I0b0af14a9a1cb7e5a7a4ec12cc489473fd7ead02
Related: OS#2980
After all, we don't want stale queue entries especially in those where we
are not expecting any paging.
Change-Id: Id876b68087ef13d58177027b7e664404e6b7b2d9
The TTCN-3 data types are abstract data types, Encoding artefacts
like 'F' for padding shouldn't be seen by the user. Hence, let's
pass a 2-digit-long or 3-digit-long hexstring into the encoder
functions and let them determine if they should introduce any 'F'
for padding or not.
Change-Id: If4d3dfc16381493d7e710be746ed963975051fc1
If 5 seconds expire, the BSC will automatically re-fill a credit
of 20 paging slots [to work with BTSs where the paging buffer space
indications somehow are missing]. Let's make sure we don't hit
that case, even if the operating system sleeps for more than 5s
in this test .
Change-Id: I1c65096a685b70dc5183592382ec03553ba3628f
We are testing purely IPA/RSL/OML, and half-starting the BSSAP/M3UA
emulation is not a good idea, if it generatees events that we don't
catch
Change-Id: Ie90cd88e63ba6062e4ea2592045e9c97bc11887e
The cell identifier used by the paging tests is 001-01, i.e. uses a
2-digit MNC. With the introduction of 3-digit MNC support in osmo-bsc,
the paging tests became incompatible with a osmo-bsc config with:
network country code 1
mobile network code 1
Explicitly declare a Cell_Identity with 2-digit MNC (includes an 'f').
Also, fix f_enc_mcc_mnc to properly encode 2-digit MNC values.
Related: OS#2847
Change-Id: Ide5228b403e43de8649b6eda18749ea2a9f592a9
bsc: add TC_bssmap_clear_does_not_cause_bssmap_reset(), but the same triggered
by an MS Rel Ind and a BSSMAP Clear Request sent to the MSC first.
This test will only succeed once TC_chan_rel_rll_rel_ind() succeeds, i.e. with
below osmo-bsc fix.
Related: OS#3041
Depends: I0f8c9c4e6b6850b15c70250fd3f88bdf75f9accf (osmo-bsc)
Change-Id: Ie4aa2f01c83b40303fa40ed64dbfce372b7cd96c
This test sends a REL IND from the MS and immediately expects an lchan release.
Instead, osmo-bsc patch I0f8c9c4e6b6850b15c70250fd3f88bdf75f9accf decides to
signal full BSSMAP Clear Request to the MSC first, so expect that first.
Note that this test currently fails, and said osmo-bsc.git patch will make this
test pass.
Change-Id: I737be141b69a250eb6eb38007f8042981c1a31cf
Same as TC_bssmap_rlsd_does_not_cause_bssmap_reset(), but with a proper BSSMAP
Clear from the MSC first.
Related: OS#3041
Change-Id: If6ca85d7b80a727cbfdabbf07529ced22602734e
A test with BSSMAP Clear involved would also be a nice addition, but this so
far tests a direct RLSD from the MSC.
(One way to invoke a typical release situation would be a scenario like in
TC_chan_rel_rll_rel_ind(), but that test currently fails; another would be to
directly invoke a BSSMAP Clear from the MSC first.)
Related: OS#3041
Change-Id: I168cf240383485a5ffbbde377b4f89c5d1f5ab93
If the T_guard runs out, unless we self.stop, we might run into this
potentially confusing follow-up error:
00:23:04.206712 mtc BSC_Tests.ttcn:322 Dynamic test case error: Copying an unbound value of type @RSL_Types.RSL_Message.
00:23:04.206778 mtc BSC_Tests.ttcn:322 setverdict(error): fail -> error
Change-Id: I1d373159483bdd9f74e8944e430913e73c289e03
Currently we use isbound() in f_start_handler() to check if the BTS
which we want to connect is indeed populated. However. isbound()
seems never become true in this particular situation.
- Use isvalue() instead of isbound()
Change-Id: I25ddd55b7626087570311999b85ec7632b162c06
When the test component ends and the underlaying
components are shut down. Messages from the system
under test may still be picked up and forwared. When
a message is handed from one component to one that
is already shut down, the testcase is flagged as
errornous setverdict(error).
An idea to fix thisis to stop all test ports using
all port.stop. However, this does not solve the
problem entirely. We still observing errors.
- add f_shutdown_helper() and call it from the
end of each testcase
- perform an all port.stop; in f_shutdown_helper()
to freeze all communications between the ports
of the different components.
Change-Id: Id3bc840c0428d08dfbeedacc408b3dd1cd0fa7ec
The testcase TC_paging_imsi_a_reset sends a paging request that
causes pagings on all cells. Then it performs a BSSMAP reset and
checks if the paging has stopped. In order to be sure that paging
requests from before the reset procedure are not mistakenly
detected as after-reset-pagings the RSL queue is cleared. However
this is only done for IPA_RSL[0], which means IPA_RSL[1] and
IPA_RSL[2] still contain old paging requests, which lets the test
fail.
- Clear IPA_RSL[1] and IPA_RSL[2] as well.
Change-Id: If0cdc0325fd0e1dcf3e4ce52e4de27adb4d9cf48
RSL_Emulation has recently gained a port for the common channel
management messages, but BSC_Tests was not updated with this port,
resulting in RSL_Emulation enqueuing messages to the port which then
creates dynamic test case failures.
Let's simply connect to the port, even though we currently are not
interested in any of the messages received there (mainly
RSL_MT_BCCH_INFO during startup).
Change-Id: Id8a3c4409599783ca4cd0b49f2570bcb3bb34952
The testcase TC_paging_imsi_nochan assumes that a paging for no
channel, with no specifc cell associated and without TMSI is
illegal. This is not correct. All these fields have legal values
and the TMSI field is optional.
- Replace the testcase implementation, use f_pageing_helper() to
create the paging.
Change-Id: I6a56fb0ee06ae7e72a7ac2b6b058ad54f94127ab
This adds two new tests: One for RSL, and a second one which performs
the same test on the OML port. Both tests open an IPA connection and
send a unit ID which is unknown to the BSC. The tests expect the BSC
to close the connection immediately.
We need to add handling for a socket error in IPA_Emulation because
otherwise these tests do not pass reliably as some closed connections
are not properly detected.
Change-Id: I6a947d7411a016e4d7650031396cae3575756453
The testcase TC_paging_counter is missing in the control section.
This means that if it is not started explicitly, it is not executed.
- Add TC_paging_counter to control section
Change-Id: Ie37b8cb554ea1db64a8d7927eb300d368ce67137
When f_expect_chan_rel() is called after receiving the BSSMAP
RESET and DISC.ind f_expect_chan_rel() is called. The flush
parameter is not set, which means the default flush = true is
valid. This leads into an early flush of the RSL Queue and
tosses the RSL RELEASE REQUEST we expect, so the test can not
pass, even when the BSC sends the RLEASE REQUEST.
Looking further up in the code. IPA_RSL[0].clear is called,
so the Queue is flushed to get rid of unwanted messages from
the IMMEDIATE ASSIGN. There is no need to flush the queue
a second time anyway.
- Do not flush the RSL queue, set flush=false when calling
f_expect_chan_rel()
Change-Id: I2962f741e0b13dec08ac6c918d326828beb65a6a
When we page an unknown/unsupported CellIdentifier format, OsmoBSC
decides to page on all BTSs to be safe. This way we have a chance of
making communication happen, rather than breaking it.
Change-Id: Ibd0ba986d9e18758b519e852c36f4dbbb6b367ea
We now test all of the cell identification types specified in BSSMAP,
and also lists with a length != 1 entry.
Change-Id: I261f948d6054d0c90078c1dd0b2785a967b0a49b
We have to wait for sime time until some RSL paging command would have
arrived, rather than continuing too quickly.
Change-Id: I63827aa3c42f77648ecad401b3cc4bae927b3b94
During assignment or hand-over, a given TTCN-3 component may be
interested in registering more than one channel number. Add an explicit
procedure port with associated registration procedure, similar to what
we already do in GSUP, MNCC and others.
Change-Id: Iba37bf9541c779b79e179f995cdfa677633fadeb
The point of this test is to verify that *no* paging messages are sent
if "No cell" is given as cell identifier list by the MSC. We can thus
not use the existing pageing_helper function, but have to handle this
a bit differently.
This makes TC_paging_imsi_nochan runs pass.
Change-Id: Iec1086bd42f42de1986bb00b91af718977f73b30
This test case was incomplete in that it didn't account for a RLL REL
REQ/RESP before RF_CHAN_REL.
Together with OsmoBSC Change-Id
I64a46b5bcd4272e3fa2ff4ee824c2f3fdff6854b, this test now passes.
Change-Id: Ia5af254d4fc572c1d324f70b5ec99d87bdaf9eb9
This test case was incomplete in that it
* applied the wrong timeout T3101 instead of T3210
* didn't account for a RLL REL REQ/RESP before RF_CHAN_REL
Let's fix it. Together with OsmoBSC Change-Id
Ie11d7d06353ba1b1e2fab6763dd7b032ce8a5d2c this check now actually
passes for the first time.
Change-Id: I9ed41d246cf153735fd4e71cc6cc174ede32a76b
In OsmoBSC Change-IdI68286d26e2014048b054f39ef29c35fef420cc97 we
introduce a proper subscriber connection state machine which fixes
the order of events during channel release after connection failure.
Change-Id: Ibe9c3205ec11dafcc305ea72aeb33e9152a6458c
When Change-Id I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1 was merged,
OsmoBSC started to always allocate SDCCH first, no matter what the
establishment cause. This basically means we don't do very early
assignment anymore. TC_exhaustion must be adapted to allocate all
SDCCH and all TCH before failing.
Change-Id: I9d8bbfca0deebc738385f2a1a20d4a17c3853082
We create a new Osmocom_CTRL_Adapter module which can be used by
test suites using the 'extends' functionality.
Change-Id: I3ef6cfaa738900e008155013a05b8ccf3d4b7aeb
This new test exercises the new 'msc.0.connection_status' control
command which is added in https://gerrit.osmocom.org/#/c/5630/
Change-Id: I55faa1ec413629234e24831dbc05d8b0afec8099
Related: OS#2729
Don't expect the ASSIGNMENT to fail in case of unsupported A5/4,
but expect a CIPHERING MODE REJECT.
Change-Id: I15024f61e67795b7e5ce72e1b641db6ca92ff76d
Let's verify the operation of the CIPHERING MODE COMMAND as issued
by MSC, performed by BSC and implemented by simulated BTS/MS.
Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78
This way we benefit from the ability to handle the RR MODE MODIFY,
RSL MODE MODIFY, IPA CRCX and IPA MDCX capabilities of the MSC_ConnHdlr
component. While each test case now needs a separate function in
addition to the actual testcase, this allows for more flexibility
and a more complete emulation of BTS behaviour.
Change-Id: Iba50663cb5104bf34bd6fc8aac2aa3b47155fe99
Using the MSC_ConnHdlr component, we can now handle the BSSAP (MSC)
and RSL (BTS) side of a single radio channel.
Change-Id: I00dcf1e4eaa7f133788cc01fbbcd4148a0258ef4
The existing tests were implemented directly on top of the BSSMAP
and RSL CodecPorts. If we loop in the RSL_Emulation and
BSSMAP_Emulation components, we can properly multiplex/demultiplex
multiple MS (radio channels) on both the RSL and the MSC (SCCP
connection) side.
In order to have a single component that handles both the RSL and the
BSSAP side of a given channel/subscriber/call, we introduce the concept
of BSSMAP "Expects", where the test csse can register the L3 INFO that
it sends in the RLL ESTablish INDication on the RSL side, so the BSSMAP
handler cna route the BSC-originated SCCP connection with that L3 INFO
back to the same component. This is a bit inspired "in spirit" of the
"expect" mechanism of netfilter connection tracking.
Change-Id: I71f777cd4f290422fa68897952b6505875e35f0e
We ensure that all channels are allocated, and that the first allocation
beyond the avialable channels will fail and generate an IMM_ASS_REJ.
WE also verify that the related counters are incremented as expected.
Change-Id: Iade77321588190cec89cfcd9c18d84a7144e0198
This allows us to verify if the BSC pages *only* where it is supposed
to page based on the cell identity list in the 08.08 PAGING.
Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457
We use the "oml-connection-status == degraded" to determine if
the OML connection has been brought up by the external helper.
However, this status is advertised from the moment the ID_ACK was
issued on the OML connection, and *not* only from the moment on
when we're expecting the RSL connection (after initializing all MO).
Let's introduce some delay to avoid running into a race condition here.
The proper solution is to implement OML inside the test suite, which
is too large of a task to be done right now, where the focus is on
RSL+BSSAP testing.
Rather than using the more complex RSL Emulation and BSSAP emulation
components, we attach to the RSL and BSSAP Codec Ports and send some
messages back and forth for low-level testing such as timeouts, response
to RACH requests, failure of MSC to react to CR requests, etc.