Commit Graph

1538 Commits

Author SHA1 Message Date
Harald Welte 97ae972c4a start-testsuite.sh: Add commented-out section for using custom TITAN
Sometimes it's useful to test with a non-installed locally-compiled
version of Eclipse TITAN.  This adds an example on how to do that.

Change-Id: I6a8c26becff868a3d2fcd3a01e2c03adfc748e0a
2019-08-15 09:49:11 +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
Vadim Yanitskiy de535e03ca BTS_Tests.ttcn: fix: use reasonable minimum default for C/I
Since [1] we additionally filter Access Bursts by the link quality
(defined by C/I) in L1SAP, and since [2] we do provide the actual
C/I values for osmo-bts-trx, as was received from the transceiver.

[1] https://gerrit.osmocom.org/r/I893ec9c6c2ebad71ea68b2dc5f9f5094dfc43b78
[2] https://gerrit.osmocom.org/r/I8d86dec7ebc039cbfd038c4342ff328b11281865

The default minimum C/I for Access Bursts in OsmoBTS is 50 cB,
while the TTCN-3 test cases configure fake_trx.py to send 0 cB,
so all Access Bursts are getting dropped, as expected.

Let's use 60 cB (or 6 dB) by default. This change makes Access
Bursts pass again, and thus fixes some broken test cases.

Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
2019-07-26 09:50:13 +00:00
Oliver Smith 91bfa1c436 msc: check IMEI: move reject LU into new function
Change-Id: Ifad259e21df035a89e97831a57c0675502308eb6
2019-07-23 15:07:48 +02:00
Oliver Smith 690d60fd89 msc: use f_expect_clear() in check IMEI tests
Fix the broken pipe race condition caused by closing the RAN connection
too early. Properly wait for clear command and send clear complete.

TC_lu_imsi_auth_tmsi_check_imei_{nack,err} do not pass anymore, because
OsmoMSC is sending the LU reject twice. Patch [1] fixes it.

[1] I127b27937613ea0ff29d67991c0414fca6d441d9 (osmo-msc)
Fixes: 1d118ff753 ("msc: add check IMEI tests")
Change-Id: I836f76242463789c4c003feec757714827f2a31b
2019-07-23 15:02:44 +02:00
Oliver Smith be4c531626 msc/expected-results.xml: update from jenkins
Change-Id: I9110f7bcda2919ff04c63a99d554b53a793f0037
2019-07-23 15:00:04 +02:00
Oliver Smith af2f1f8d89 library: allow "?" in tr_ML3_MT_MM_ID_Req again
Fix MSC test TC_lu_by_imei, which uses tr_ML3_MT_MM_ID_Req with the
default "?" (AnyElement) parameter. It was failing with the following
runtime error:

Dynamic test case error: Performing a valueof or send operation on a non-specific template of enumerated type @L3_Templates.CmIdentityType.

Fixes: 3289845913 ("L3_Templates: add enum CmIdentityType")
Related: https://www.eclipse.org/forums/index.php/t/1099816/
Change-Id: Ie7fbe52ac3c0c8f233680dcc311febec77d2ed0b
2019-07-22 11:35:23 +02:00
Vadim Yanitskiy a2c68e81f9 BTS_Tests.ttcn: introduce TC_pcu_data_ind_lqual_cb
The idea of this test case is to verify that the link quality
measurements, in particular C/I (Carrier-to-Interference ratio),
are delivered to the PCU (as a part of PCUIF_DATA.ind).

The C/I ratio needs to be calculated by the transceiver from the
training sequence of each burst, where we can compare the "ideal"
training sequence with the actual training sequence and then
express that in cB (centiBels).

This test case can only be executed with fake_trx.py and trxcon,
because this pair allows us to simulate C/I values. Also, the
new TRXD header format needs to be supported (see OS#4006).

Change-Id: I67d89b2f0e13a7a6f74f001b19d37add77ec06f5
Depends: (OsmocomBB) I7080effbbc1022d1884c6d6f0cb580eba8e514ff
Related: OS#1855
2019-07-16 04:06:31 +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
Eric Wild 5b9ef14b90 unbreak some measurement tests
Trxc port mapping got lost.

Change-Id: I8eb766685dbf16e2eb2a973567016be3976e5840
2019-07-14 00:07:50 +00:00
Oliver Smith 1d118ff753 msc: add check IMEI tests
Extend BSC_ConnHdlr with new check IMEI related parameters. Add tests
for check IMEI and check IMEI early for multiple auth variations, as
well as variants where the HLR would respond with NOK or ERR.

Note that we can safely set "check-imei-rqd 0" in f_init(), because the
latest OsmoMSC version already suppors this VTY command.

Two tests do not always pass, sometimes the RAN connection breaks
before the test finishes (TC_lu_imsi_auth_tmsi_check_imei_err and
TC_lu_imsi_auth_tmsi_check_imei_nack). I have added them as expected
errors in the expected-results.xml.

Related: OS#2542
Change-Id: Ic34bb8dc8547cafb5a53df03884554dd4f72956d
2019-07-12 06:05:39 +00:00
Oliver Smith 3289845913 L3_Templates: add enum CmIdentityType
Change-Id: Ibe50669663e641cdfd6a88f22c5404e2d90323b7
2019-07-10 02:01:46 +00:00
Oliver Smith b4bf2b2438 Cosmetic: L3_Templates: fix comment: fro -> for
Change-Id: I239bbf21202300ac9883b5a0b5608d10db0fd721
2019-07-10 02:01:46 +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
Oliver Smith 745ed95c4c L3_Templates: fix IMEI length: 14 (not 15)
The right length is 14. The 15th additional checksum digit is not
intended for digital transmission.

A good overview of the IMEI/IMEISV structure is here:
https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version)

Related: Iaf2569c099874b55acbd748b776394726cc5ce54 (osmo-msc)
Change-Id: I7121f29a90f19d92c7bf26f26e76f1978c648459
2019-07-09 11:25:40 +00:00
Vadim Yanitskiy a2a8a115e6 MSC_Tests.ttcn: cosmetic: move TC_gsup_mt_multi_part_sms() back
The mentioned test case doesn't cause any problems anymore.

Change-Id: Ic8d456f4becade9010d4eb27159e6c2806b11810
2019-07-08 20:04:34 +07:00
Oliver Smith e1def665c3 hlr: update expected-results.xml
Add check imei, create-subscriber-on-demand tests.

Change-Id: I8ea4a90d5da8367f369522cfd9133e2c6061dd5c
2019-07-08 12:25:57 +00:00
Vadim Yanitskiy f3cc649673 library/L1CTL_Types.ttcn: introduce TRAFFIC_{REQ|IND} templates
Change-Id: Ic9f412579da33d0c76b7dd616bd1b305aacf5884
Related: OS#1855
2019-07-07 08:14:10 +00:00
Vadim Yanitskiy 71136df433 library/TRXC_Types.ttcn: add FAKE_CI command for C/I simulation
Change-Id: Ibbab8df117a97a3dce160c67d1adbc67c31637e2
Depends: (OsmocomBB) I7080effbbc1022d1884c6d6f0cb580eba8e514ff
Related: OS#4006
2019-07-07 08:14:10 +00:00
Harald Welte f82985484b ggsn: Add TC_pdp4_act_deact_ipcp_pap_broken()
This test case reproduces a real-world PCO capture including a broken
PAP AuthenticationReq.  It triggers some weird behavior in OsmoGGSN
1.3.0 where it would send duplicate IPCP repsonses and no PAP response.

Change-Id: Ie89d984ed9e26fbbb2e4914bdb8623446d462a4c
Related: OS#3914
2019-07-03 16:24:19 +00: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
Oliver Smith 280536b782 mgw: add module param mp_enable_conn_timeout_test
Fix ttcn3-mgw-latest by not running "conn-timeout 0" during f_init_vty
at the start of every test case. The latest osmo-mgw release does not
have that command yet.

Change-Id: I8bbf15baa45679d5812a5a9184520ef9b9e73bba
2019-06-28 11:04:48 +02:00
Oliver Smith 021141e6dc mgw: add connection timeout test
Change-Id: I020b682b347045818fd28de240daa0aa33fe43b4
2019-06-26 16:16:20 +02:00
Oliver Smith 216019fdd0 RTP_Emulation: allow expecting connection refused
Prepare for upcoming connection timeout test, where we want to run into
connection refused.

Change-Id: Id6365bc59e19368a87b951367742a0b7cc5e9574
2019-06-26 16:15:13 +02:00
Oliver Smith 350eb681e2 mgw: add osmo-mgw.cfg
Change-Id: I3dd498902db4ea0233f43099ec5b6b4292714908
2019-06-25 13:45:25 +02: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
Harald Welte aba42164fb BSSMAP_Templates: Provide complete set of CellID related rx/tx templates
Change-Id: I07c5fb9b621b09e11fec025b56f971fb61060839
2019-06-21 09:34:14 +00:00
Harald Welte 0cdf071e8a Put build / run scripts under Apache 2.0 license
The license of the build or execution scripts doesn't affect the license
of the actual program, and we want to explicitly state that these scripts may
be used in any kind of context.

Change-Id: I553925cd88b05903aab52ae1afb093aa9ab9d035
2019-06-21 09:34:09 +00:00
Vadim Yanitskiy ba0b0aae45 MSC_Tests_Iu.ttcn: fix TC_iu_lu_and_mo_ussd_mo_release(): use proper BSC number
Change-Id: I58149f0e9cbae9684a8a899bfee81b0de609ccac
2019-06-20 22:26:33 +07:00
Vadim Yanitskiy f2c3fa9144 library/RAN_Emulation.ttcnpp: fix: properly handle SAPI / DLCI for RANAP
Some of our SMS related test cases are failing. The problem is
that SMS related RAN messages shall be sent on SAPI 3, as per
GSM TS 04.11, section 2.3, while they actually being sent on
SAPI 0.

For the messages coming from the TCs towards OsmoMSC over RANAP,
we need to convert from DLCI to SAPI in f_xmit_raw_l3(). OsmoMSC
also needs to be patched, because it seems to ignore SAPI IE.

Change-Id: I6199fd5f26774fb1ec419bc1ef9e1caeca3a0d35
2019-06-20 22:25:50 +07:00
Vadim Yanitskiy e06f228be1 library/ranap: enrich both t(s|r)_RANAP_DirectTransfer templates
Instead of having two similar variants of RANAP_DirectTransfer:

  - t(s|r)_RANAP_DirectTransfer, and
  - t(s|r)_RANAP_DirectTransferSAPI,

let's make the first one more flexible, and drop the last one.
This is achieved by introducing two supplementary functions:

  - f_gen_ts_dt_ies(), and
  - f_gen_tr_dt_ies,

which dynamically compose DirectTransfer.protocolIEs.

Change-Id: I7333d08c4d5a72159bfbd50fe8e7b1084cd61b9e
2019-06-20 22:13:25 +07:00
Pau Espin 43021cbbf7 lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()
Function will be re-used in forthcoming commits.

Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
2019-06-19 10:52:11 +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
Eric Wild ae8f262651 BTS: BS power tests
osmo-bts does currently not use the signaled lchan BS power level, nor
does it update the BS power IE returned in the measurement results.

Change-Id: If91fb57b4070c60bb277d0b55d69ee3dde47ee48
2019-06-18 17:08:09 +02:00
Oliver Smith bc690ffcd3 sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
Base on the docker-playground.git's config, but with 127.0.0.*.
All tests passing in jenkins are passing locally with this config.

Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
2019-06-18 13:09:26 +00:00
Oliver Smith 1b257806a1 hlr: add create-subscriber-on-demand tests
Test all possible code paths where a subscriber on demand can be
created:
* Check IMEI early
* Location Update
* Send Auth Info

Related: OS#2542
Change-Id: Id544fa906ad442c2bbbccff437c18d04ddccde2e
2019-06-18 12:50:37 +00:00
Vadim Yanitskiy 78329c7761 msc/expected-results.xml: update SS and SMS related expectations
Change-Id: I7c67fa71e2157063c13605267ec34779c5603ed9
2019-06-17 23:20:00 +07:00
Vadim Yanitskiy c3c07d4c6e MSC_Tests.ttcn: introduce TC_mo_ussd_for_unknown_trans
The new test case is aimed to verify that OsmoMSC properly does
reject (call independent) SS/USSD messages for non-existing
transactions.

Change-Id: I231142c88b0d3308039c797aa2bccadd79dce18b
Related: OS#2931
2019-06-17 23:02:44 +07:00
Eric Wild 095024b599 BTS: test that RSL MS POWER does not activate MS power control without PP IE
Change-Id: I8776ed4af83dc9f9f32ac14f5d4c9e35f4a286d6
2019-06-17 15:08:57 +02:00
Eric Wild 280ccb83a0 BTS: add another failing power control test
Change-Id: I8b3bdf374c96fa3368f90ae524859f30ceefa5f5
2019-06-17 11:12:21 +02:00
Vadim Yanitskiy 29ba8d6295 MSC_Tests.ttcn: introduce TC_proc_ss_abort
This test case is aimed to verify HLR-/EUSE-initiated abort of an
active SS/USSD session according to the following scenario:

  1. (HLR/EUSE -> MSC) GSUP_PROC_SS_REQ with random facility;
  2. Network-originated connection establishment:
  2.a. (MSC -> BSC -> MS) Paging Request;
  2.b. ...
  2.c. (MS -> BSC -> MSC) Paging Response;
  3. (MSC -> MS) GSM 04.80 REGISTER with random facility;
  4. (HLR/EUSE -> MSC) GSUP_PROC_SS_ERR (abort);
  5. (MSC -> MS) GSM 04.80 RELEASE COMPLETE;
  6. Connection release.

As can be seen, HLR/EUSE initiates the session abort right after
the GSM 04.80 REGISTER message is delivered to the MS, and just
before the MS sends anything back in response.

Change-Id: I5586a88136c936441a842f49248824680603672e
Related: OS#2931
2019-06-16 15:30:29 +07:00
Vadim Yanitskiy e5f4ed9da8 MSC_Tests.ttcn: introduce TC_proc_ss_paging_fail
The idea of this test case is to check that OsmoMSC does inform
HLR/EUSE that a subscriber did not respond to Paging Request in
case of network-originated SS/USSD.

Both f_expect_gsup_msg() and f_expect_dtap_msg() were extended
with optional timeout value, as we need to wait longer than
2.0 seconds (default). Let's stick to 10.0 seconds.

Change-Id: I1f53c56d569c8ac4071835685bbe3bc9e0ebd7f0
Related: OS#2931
2019-06-16 02:38:07 +07:00
Vadim Yanitskiy d612d28619 MSC_Tests.ttcn: introduce TC_proc_ss_for_unknown_session
The idea of this test case is to check that OsmoMSC properly
rejects GSUP PROC_SS messages for unknown sessions.

As it turned out, OsmoMSC doesn't send GSUP PROC_SS ERROR
as expected. The fix has been submitted.

Change-Id: Ie267ee174c5061cd3fc102a2824abe03d73f3aac
Related: OS#2931
2019-06-15 14:58:55 +07:00
Vadim Yanitskiy 851798c051 MSC_Tests.ttcn: use f_expect_gsup_msg() in f_tc_mt_ussd_for_unknown_subscr()
Change-Id: Id067cee3b7d06613d8387e0fa9d8a5c1dbcc49cf
2019-06-15 14:46:17 +07:00