Commit Graph

1556 Commits

Author SHA1 Message Date
Harald Welte 95333a16eb mme: Extend MME tests to also include S1AP interface testing
The tests so far only tested SGsAP alone, which doesn't get us very
far.  Let's add interfacing with the S1, too.

Change-Id: Id54071b901db720a0f88b91cdc5a8e09bea0fb58
2019-08-18 17:14:20 +00:00
Harald Welte c918e4e373 TTCN-3 native function wrapper for SNOW-3G
Change-Id: I7fca69ea8b4aed48d5a64885b762ab85be71ef03
2019-08-18 17:14:20 +00:00
Harald Welte 4a2bfcb77f remove ogslib dependency from snow
* don't use ogslib specific header files
* don't use ogs_{malloc,free} but simply use the stack

Change-Id: I5604c594934b03d2fd83e1e465fc150fc542a475
2019-08-18 17:14:20 +00:00
Harald Welte 135af53c48 snow-3g.c: Mark all internal primitive functions as static
We don't need to pollute the public namespace

Change-Id: I55347320383b173d1aca622997e7cfb98cd9caff
2019-08-18 17:14:20 +00:00
Harald Welte 051fd8611c snow-3g: const-ify S-boxes
Change-Id: I3a85120aad95011954f25bb42900133cb30cddb7
2019-08-18 17:14:20 +00:00
Harald Welte 867ca29ad9 Import snow-3g.[ch] from nextepc source code
Change-Id: I938de2ad17210aa1561240c0a96d0df216243be1
2019-08-18 17:14:20 +00:00
Harald Welte fc5f637505 library: Add initial set of LTE/EPC NAS templates
Change-Id: I53a598011041d642f03dcd9cca128f4e9da4adfd
2019-08-18 17:14:20 +00:00
Harald Welte 3549811565 library: Add S1AP CodecPort/Emulation
Change-Id: I9bfba3ab2a3830e590b203c44c03b9c9383fff99
2019-08-18 17:14:20 +00:00
Philipp Maier d01fc8fefb MSC_Tests: do not send an SGsAP-MO-CSFB-INDICATION when testing MT-Call
The TTCN3 tests MSC_Tests.TC_bssap_lu_sgsap_lu_and_mt_call and
MSC_Tests.TC_sgsap_lu_and_mt_call initate an MT-CSFB call for testing
purposes, but they also send an SGsAP-MO-CSFB-INDICATION to make the MS
come back to LTE. This is wrong. SGsAP-MO-CSFB-INDICATION just informs
the VLR that the UE has initiated a MO CSFB call on the LTE side. On MT
CSFB calls this message should not appear. Lets remove it.

Related: SYS#4624
Change-Id: I2e9fda4fe97866c4cbc77224ba1930ca81411fd6
2019-08-18 17:13:20 +00: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
Harald Welte 26fbb6e017 sgsn: Integrate RANAP
Integrate RANAP support to SGSN_Tests.ttcn.

Related: OS#2857
Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22
2019-08-18 17:12:46 +00:00
Alexander Couzens 5932cd3463 RAN_Adapter: invert check for RAN_ops == omit
The SGSN_Tests.ttcn run into bugs when doing the isvalue() check on a const object.
Check explicit for "omit" to skip creation of the vc_RAN object

Change-Id: I639ab6d0586174c0f20b93a53169f0aa254970fa
2019-08-18 17:12:46 +00:00
Alexander Couzens d7b2950ac1 RAN_Adapter: protect RAN_EMULATION_CTRL with ifdef
Change-Id: I1ff98c933b00a90f54ceedf290121d61d35c6063
2019-08-18 17:12:46 +00:00
Harald Welte 717c730731 RAN_Emulation: Support for PS domain
So far, the RAN_Emulation only supported the CS domain, and not PS. Let's
change that so we can start having IuPS related tests.

Change-Id: I7ba4662e5a7ba31a2582b0c133b3140c8057678f
2019-08-18 17:12:46 +00:00
Harald Welte 955aa94504 BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure
It originally seemed like a great idea to define a custom record
which aggregates the decoded BSSGP, LLC, L3 and/or SNDCP and passes
it to the individual ConnHdlr.  However, particularly with testcase
interoperability for IuPS in mind, this seems bogus.  Also, we
never really took advantage of this.

Let's now decode as far as we can decode any PDU, and then send the
decoded version of that PDU via the ports between the BSSGP_Emulation
and the ConnHdlr component.

Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a
2019-08-18 17:12:46 +00:00
Harald Welte ce818da5b0 library: Add S1AP Templates
Change-Id: I148b33eb5074d3549e7cd533af2cbf90f1c6d23f
2019-08-15 09:49:18 +00:00
Harald Welte 799049cbd5 library: S1AP encoding/decoding using libfftranscode and ASN.1 from V15.5.0
This allows us to encode/decode 3GPP S1AP messages, as used on the S1
interface control plane between eNodeB and MME.

Change-Id: Ie019bef1f3ef9cc5f6c94a64c7f352c510fb5633
2019-08-15 09:49:18 +00:00
Harald Welte b8a4ac80a6 mme: initial skeleton for MME / SGsAP tetss
Change-Id: Idbd54838daaf12acccc3253dc4278de75eaaaf31
2019-08-15 09:49:11 +00:00
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