Commit Graph

1567 Commits

Author SHA1 Message Date
Oliver Smith 2247f916f9 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 42/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:18:34 +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
Oliver Smith 0d7b7abb00 Revert "RAN_Adapter: invert check for RAN_ops == omit"
This reverts commit 5932cd3463. It caused
a lot of tests in the ttcn3-bsc-test, ttcn3-bsc-test-latest,
ttcn3-bsc-test-sccplite and ttcn3-bsc-test-sccplite-latest testsuites to
fail with:

RAN_Adapter.ttcnpp:179 Dynamic test case error: Text encoder: Encoding an unbound optional value.

Related: OS#4156
Change-Id: I441c701553eef8e9e018d11923359eb3f3b26826
2019-08-19 13:46:35 +02:00
Harald Welte c4148dac35 NAS_EPS: fix 'make deps' (no commit specified)
Change-Id: I790c54568e745ea07afeed35b4d09a45b785711f
2019-08-18 19:42:23 +02:00
Harald Welte 0e0380804a DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS
This is an artefact of copy+paste programming

Change-Id: I10d56ef9971149350812b1504844217195623bd8
2019-08-18 19:40:42 +02:00
Harald Welte 3286eb37c5 IPA_Emulation: Fix building without CTRL support
Back in JUne, Change-Id I4d1eca6b0008a395b7f7449e6ea3f9b6d41133c7
attempted to introduce compilation of IPA_Emulation without CTRL but
it failed to cover all references to CTRL with the correspondign
ifdef/endif blocks.  Let's fix this.

Change-Id: I68349b32f613aacced84011601121f2265243600
2019-08-18 19:40:42 +02:00
Harald Welte 56071b7d7d mme: Add missing link to DIAMETER_EncDec.cc from TITAN
Change-Id: I9214ba6778ed6fc8c576e9d97217ecbb9996fb12
2019-08-18 19:31:26 +02:00
Harald Welte 6ec643950e mme: Integrate DIAMETER support into MME testsuite
The test suite can now send/receive DIAMETER messages via related test
ports.

Change-Id: I1691f87e19cced79ab0f9c3bb87608fc63e21eab
2019-08-18 17:14:20 +00:00
Harald Welte d27ab24dcb library: Add DIAMETER Templates, Emulation, CodecPort
Contrary to the DIAMETER_Types.ttcn, these files are not generated
but written by hand.

Change-Id: Iafbf55ab25bbaa40960eb1744cff36dcd7970c17
2019-08-18 17:14:20 +00:00
Harald Welte 5aadb0ef18 library: Add [generated] DIAMETER_Types.ttcn
The way how the TITAN support for DIAMETER works, is that there's
an awk-based shell script and lots of DIAMETER dictionaries in the
https://github.com/eclipse/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator
repository.

I've used 'AVP.sh Base_IETF_RFC3588.ddf BaseTypes_IETF_RFC3588.ddf
AAAInterface_3GPP_TS29272_f10.ddf GxInterface_PCC_3GPP_TS29212_f10.ddf
S6Interfaces_3GPP_TS29336_f00.ddf MobileIPv6_HA_IETF_RFC5778.ddf
RxInterface_PCC_3GPP_TS29214_f20.ddf' to generate the DIAMETER_Types
file we use here.

DIAMETER is used as signaling protocol between the HSS and other core
element nodes in the EPC, such as the MME and S-GW.

Change-Id: I85834e98e238b7ff6058264a0f365d05c15cd669
2019-08-18 17:14:20 +00:00
Harald Welte 0f7d03a787 mme: Add GTPv2 support
this includes a GTPv2_CodecPort (for the usual transcoding)
as wella as an empty GTPv2_PrivateExtensions.ttcn without which
the TITAN GTPv2 ProtocolModule won't compile.

Change-Id: I1c1b8409077103dd4e64e467d21d33d8c9c4ac95
2019-08-18 17:14:20 +00:00
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