Commit Graph

1454 Commits

Author SHA1 Message Date
Oliver Smith 01eded1f29 hlr: add Check IMEI tests
Change-Id: I97c8462f0817149feadd0c4865e3df6c2af92a80
2019-06-07 12:39:21 +02:00
Oliver Smith 05e8a96767 standalone: add inverted match
Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f
2019-06-07 12:34:46 +02:00
Oliver Smith a37d300216 Add osmo-hlr.cfg
Copy osmo-hlr.cfg from docker-playground.git, but replace all IPs with
127.0.0.1.

Change-Id: I73f673523dab8765ca87851175fafdec9fc20e1b
2019-06-05 12:28:10 +02:00
Harald Welte 7d9f6db401 bts: Implement testcase for RR response frame loss
Test is implemented as BTS_Tests_LAPDm.TC_rr_response_frame_loss()

Change-Id: I32340fff6666fee0ebfb9b31b55e0982d0d917a1
2019-06-04 09:12:03 +00:00
Harald Welte 76771f1cc2 bts: Factor out mobile-originated LAPDm establishment
which avoids us to have to copy+pate this between several test cases.

Change-Id: I8da753bb3d809ec09f9380bb4bac666ceaf61f00
2019-06-04 09:12:03 +00:00
Harald Welte b2a3034826 bts: Add test for expiring T200 N200+1 times
Change-Id: I9e1dbc889575f8952a4581551076829825b3b1cd
2019-06-04 09:12:03 +00:00
Harald Welte a7d81f1761 RSL_Types: Fix definition of RLL ERROR INDICATION
This message uses the "RLM Cause IE" and not the "Cause IE"

Change-Id: If3b92ab475817922c05c9af691d9f79da33804ac
2019-06-04 09:12:03 +00:00
Harald Welte ef6fd44965 bts: Also test SACCH in TC_segm_concat
Change-Id: If9b51b4d6c357aa015f31e1e6851d4d1bb71a58f
2019-06-04 09:12:03 +00:00
Harald Welte 9ea918c2a8 bts: Add TC_segm_concat to test segmentation+concatenation
Change-Id: I6a9ce3e27f4a01412186b3b5d8d2b86573b6f8ac
2019-06-04 09:12:03 +00:00
Harald Welte 2f2b2b7f95 bts: Extend LAPDm test suite with a number of new tests
This adds the following test cases to BTS_Tests_LAPDm.ttcn:
* TC_sabm_retransmit_bts()
* TC_sabm_invalid_resp()
* TC_sabm_dm()
* TC_establish_ign_first_sabm()
* TC_iframe_seq_and_ack()
* TC_iframe_timer_recovery()

Change-Id: I4e1136c0c0f10d5bc8d01e826ae5d92f17a0b2aa
2019-06-04 09:12:03 +00:00
Pau Espin e6f071fe57 sgsn: Add tests to check GTP retransmit queue
Change-Id: I3c4a3573482bb1fa1549c732a0f78c2d00eadd86
2019-06-04 08:38:13 +00:00
Pau Espin f8034480a0 msc: Fix Iu tests timing out due to explicit CM ServiceAccept not recvd
Even if ciphering it not enabled, osmo-msc still sends a
SecurityModeCommand to use IntegrityProtection, and as a result osmo-msc
assumes implicit ACCEPT in all UTRAN CM service requests.

Fixes: OS#3991
Change-Id: Ida91f907dd6dfae68cbc63752ddc6f2948792689
2019-06-03 14:04:50 +00:00
Harald Welte 1365a4e7c5 LAPDm_RAW_PT: Fix handling of LAPDm on SACCH (L1 header)
The  existing implementation dind't account for the two-byte L1 header
preset on the SACCH in both uplink and downlink.

Change-Id: Iae97ad153e9d1688306b39b5fb43ade323dbe500
2019-06-02 23:29:05 +02:00
Harald Welte 66f07549b7 LAPDm_RAW_PT: Switch to dedicated channel without RACH+IMM.ASS
Change-Id: I07dd9191ca441bfd1e43e3521e98f88ad2d0489a
2019-06-02 22:36:15 +02:00
Harald Welte 104740610e bts: don't require users to pass test case name to f_init()
The f_init() function itself can very well derive the identity using
the built-in testcasename() function.  There's no need asking users
to do that - many of them don't do it in the first place :/

Change-Id: I17a61a84fba4df31b8baab1f631c8aa55d894dbd
2019-06-02 22:36:15 +02:00
Harald Welte 61332c0367 bts: BTS_Tests_LAPDm.ttcn: rename f_init() to f_lapdm_init()
This is to avoid name clashes with f_init() from BTS_Tests.ttcn

Change-Id: Ie6272165b1dbda53d2d02af43c8e969da7a54d2e
2019-06-02 22:36:15 +02:00
Harald Welte 72c81e7cbc bts: Remove one indent lvel from BTS_Tests_LAPDm.ttcn
Change-Id: I4637393df9989a97a4d70f08bd334d0f8cfd2284
2019-06-02 22:36:15 +02:00
Harald Welte c38611bab5 bts: Derive test component that talks RSL and LAPDm
Change-Id: I6e24c6f6a904c4c051780c35af82c3bd53c970ce
2019-06-02 22:36:15 +02:00
Harald Welte 97cca2f5cb move lapdm/L1CTL_Test.ttcn to bts/BTS_Tests_LAPDm.ttcn
Change-Id: Ibbc967f0bd9a19ab4bbd17f612654d72cb32d571
2019-06-02 22:36:15 +02:00
Harald Welte ba0c81bf3f lapdm: Rename 'dummy_CT' to more reasonable 'lapdm_test_CT'
Change-Id: If72542f665a814bcda7c41120675a57ccf3407f4
2019-06-01 23:14:50 +02:00
Vadim Yanitskiy 7c2c10cbf0 BTS_Tests.ttcn: introduce TC_ho_rach() for handover RACH
The idea of this test case (as can bee seen from its name) is to
verify handover RACH detection. What we basically do is:

1. Activate a logical channel on the BTS side (HO_SYNC for now);
2. Switch the MS (e.g. trxcon) to that channel without waiting
   for Immediate Assignment and sending Access Burst;
3. Send an Access Burst on that channel using RA = HO_REF;
4. Wait for RSL HANDOver DETected from the BTS;
5. Release a dedicated connection.

There is no way to verify if the Handover Reference received
from the MS matches the one that was sent to the BTS. We can
introduce a separate test case that would just send an Access
Burst with RA != HO_REF.

Change-Id: If2e8d9c9947823df62f4bcc9a7fcd20734ff7858
Depends on: (trxcon) Ia967820a536c99966ba2c60b63d2ea9edb093f46
2019-06-02 02:03:16 +07:00
Vadim Yanitskiy ab448a516a library/RSL_Types.ttcn: t(r|)s_RSL_CHAN_RQD: make chan_nr configurable
Change-Id: I89e9286e86b09ed54eb7749d107f5d8d57b93644
2019-06-01 14:03:42 +07:00
Vadim Yanitskiy e432ba9222 L1CTL_RACH_REQ: make both chan_nr and link_id configurable
Change-Id: Ica6b9551b11c20fa0b8f4a8dcdc91ca07601642c
2019-06-01 14:03:42 +07:00
Vadim Yanitskiy 0a8d6daa65 L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCH
In BTS_Tests.ttcn we used to compose L1ctlDataReq manually. This
can be done by ts_L1CTL_DATA_REQ_SACCH() template itself, so
let's abstract BTS_Tests.ttcn from doing that.

Change-Id: I1ae948bd0314cdf15c21ce4b6346d5e32f1fcf95
2019-06-01 14:03:42 +07:00
Pau Espin 690d6593e9 msc: Add module param to disable osmux (fix msc-latest jenkins job)
ttcn3-bsc-test-latest currently fails on most tests because it tries to
use "osmux off" VTY param and only current osmo-msc master supports
it.

Change-Id: I53d58b2d905905ebf1df322d0389b3715a48212f
2019-05-31 20:42:41 +00:00
Pau Espin 3dd33bc8f6 msc: Enable/disable osmux always based on test
Initially it was thought safe to only enable it since the osmux test was
at the end, but actually IU tests run after it, and those don't expect
osmux to be enabled.

This way we also always match osmo-msc osmux state with whatever the
test expects (and sets through f_init()).

Change-Id: I8fb48af7d37f1a2391a39c19f5ec5064cd5869d2
2019-05-31 20:42:41 +00:00
Vadim Yanitskiy 2f01fbd040 ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed values
Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b
2019-05-31 20:41:57 +00:00
Harald Welte 32658b31c9 lapdm: fix comment 'thinko' about which type of message is retransmitted
Change-Id: I6585fc9f7e5e9fb57fe65372d0a14d68a939b73a
2019-05-30 15:44:05 +02:00
Harald Welte c97c09858b lapdm: Enable all tests in control section
Change-Id: I0f402110c4387b334a55455221f596fcb5c7bc59
2019-05-30 15:43:44 +02:00
Harald Welte 9de7f64922 LAPDm_RAW_PT: Always pad MAC blocks to their size
If a LAPDm message is shorter than the MAC block size, we must pad
it before seding it to L1.  trxcon e.g. would ignore any frames with
the wrong length since Change-Id I258ee9f6d0124b183b1db23a73f1e523fcea89a8

Change-Id: I30bcce27f95974eaca4168a156d1548586c924d6
Related: OS#3415
2019-05-30 15:08:57 +02:00
Harald Welte bb9512e640 bts: move f_pad_oct() to Osmocom_Types as it's generally useful
Change-Id: I4df99e5612c67006eb2998529425956fb4a664af
2019-05-30 15:06:12 +02:00
Harald Welte ed0c1560d0 bts: Initial set of OML tests
The test coverage is far incomplete, but it at least is a starting
point.

Related: OS#4031
Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b
2019-05-29 18:39:22 +02:00
Harald Welte be03048ae8 bts: Verify SI3 GPRS indication reflects PCU interface status
When no PCU is connected to the BTS, the BTS should mask the GPRS
indicator from the SI3 rest octets to indicate "no GPRS support"
in the cell.  This will cause phones not even trying to send us
RACH requests for GPRS ATTACH, RAU, etc.

Change-Id: I37efb712ee0c513aea230beeb35e7dabce698a34
Related: OS#4023
Related: OS#3075
2019-05-29 06:07:07 +00:00
Pau Espin 58cf682d82 bsc: Add module param to disable osmux (fix bsc-latest jenkins job)
ttcn3-bsc-test-latest currently fails on most tests because it tries to
use "osmux off" VTY param and only current osmo-bsc master supports it.

Change-Id: I61e4c59b2926f3f70cb6d0190a8683861e54179a
2019-05-29 06:06:31 +00:00
Vadim Yanitskiy 2a92e2a75c L1CTL_Types.ttcn: do not restrict the length of L1ctlDataInd
In the existing TC_pcu_* test cases we use L1CTL_DATA_* messages
to send / receive (E)GPRS related MAC-blocks. The length of such
blocks can be greater than 23 octets (i.e. fixed MAC-block
length in GSM), up to 162 octets to be precise.

Change-Id: Iced78796882b757016d02a266d55bc2a98b62a3d
2019-05-28 21:04:39 +00:00
Pau Espin 9a5f42f997 ggsn: Add test to verify retransmit queue_resp
Related: OS#3997
Change-Id: I8d937d0af9af8462418b174a54022655f9d77a5f
2019-05-28 21:03:16 +00:00
Eric Wild f1827a7baa Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IE
This test will currently fail due to a MODE MODIFY NACK, even though the
channel mode is not modified.
Related: OS##3750

Change-Id: I4cbea499bb6a331d314e6573548a4540945208b5
2019-05-28 21:02:20 +00:00
Eric Wild e57e1a6942 Extend BTS_Tests.ttcn with test for RSL channel activation with static MS Power
Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e
Related: OS##3750
2019-05-28 18:09:48 +00:00
Harald Welte c761c547cd bts: TC_pcu_{time,rts}_ind: Higher tolerances
When executing the test on our build slaves, we ran into the following:

> Number of TDMA Frames (1100) not matching (1073 .. 1093)
> Number of TDMA Frames (1096) not matching (1073 .. 1093)

So it seems the tolerance was a bit too tight.  If the timer runs
for a bit more than the requested amount of seconds (e.g. due to
high system load), the number of TDMA frames is likely a bit higher
and hence we need to permit a larger tolerance.

Change-Id: Ib00bb7e7f223fb0329d00e3835127b8c31299e27
2019-05-28 12:18:40 +02:00
Harald Welte c8effb7e0f bts: Verify PCU socket can disconnect + re-connect
Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243
Related: OS#4023
2019-05-27 21:31:56 +00:00
Harald Welte a2e0e94457 bts: Add test ensuring only one connection to PCU interface accepted
This adds TC_pcu_socket_connect_multi, which verifies that a second
connection to the PCU Intrerface socket is denied while the first
connection is still established.

Change-Id: Ib484a0a39e719cb2ce00a9464fc1207357ec9e93
Related: OS#4023
2019-05-27 21:31:56 +00:00
Harald Welte 6b86b3471f Fix use of osmocom-extended RSL Channel Numbers
Bring our TTCN-3 view of how RSL channel numbers are defined in sync
with that of our other implementations (BTS, libosmocore, trxcon, ...)

Change-Id: I48908058ac2501a3b5ae7c74e4e8527cbaee1b01
Related: OS#4027
2019-05-27 21:31:56 +00:00
Harald Welte 990a36138b L1CTL: Add support for CCCH_MODE_COMBINED_CBCH
In OsmocomBB/trxcon Change-Id Ia94ebf22a2ec439dfe1f31d703b832ae57b48ef2
we introduced a new mode CCCH_MODE_COMBINED_CBCH to indicate that the
channel combination is a CCCH+SDCCH/4 with one SDCCH stolen for CBCH.

Let's make sure we actually use that mode in our CBCH related tests

Change-Id: I27ee2c81bec7175c1ea09d4f3f6037f2866fe242
2019-05-27 21:31:56 +00:00
Pau Espin f3c12228fb bsc-nat: Introduce Osmux test
Depends: openbsc.git Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d
2019-05-27 20:05:25 +02:00
Harald Welte 34b5a95d09 cosmetic: Update copyright statement, license notice and SPDX
Some of our files didn't have a copyright notice at all, let's add
it.  Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.

Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
2019-05-27 10:00:06 +00:00
Harald Welte 1490695778 bts: Add copyright + license header + short summary/explanation
Change-Id: Ia31427595b6d9fde883cfcd49f92767b69ead114
2019-05-27 10:00:06 +00:00
Harald Welte eaa9a86e0a bts: Add TC_pcu_rr_suspend() to test forwarding of RR SUSPEND via PCU socket
This test opens a SDCCH and sends a RR SUSPEND message from the
simulated MS.  It then expects the BTS to pick that up and forward
it to the PCU socket rather than via RSL to the BSC.

Change-Id: I4da6e9d7c5dfbd0e017d2a63c6474da700c38e52
Related: OS#2249
Related: OS#4023
2019-05-27 10:00:06 +00:00
Harald Welte 928622b092 bts: Add TC_pcu_data_req_pch() for testing PCU-originated PCH
Change-Id: I0f2c4f053ef1b8d61d565f94a548c47fe3666f16
Related: OS#4023
2019-05-27 10:00:06 +00:00
Harald Welte 7162a61f16 bts: Fully implement TC_pcu_data_req_{wrong_{bts,trx,ts},ts_inactive}()
The four existing test in BTS_Tests.ttcn so far didn't have any chance
to verify if the invalid messages actually ended up on the air interface
or not.  By using virtphy instead of trxcon, we can finally add that missing part.

Change-Id: Ie05d6b1530bd4d4cf4eaa574b068870682439ee4
Related: OS#4023
2019-05-27 10:00:06 +00:00
Harald Welte ad033dc6f1 bts: Fully implement TC_pcu_data_req_{pdtch,ptcch}
As trxcon+fake_trx don't have GPRS (TBF) support yet, we cannot do
any PCU related tests involving the Um interface yet.  Instead, let's
use virtphy to fill that gap.  Using virtphy, we can actually
receive/transmit GPRS blocks on the simulated Um interface.

TC_pcu_data_req_{pdtch,ptcch} are moved to a new test suite
"BTS_Tests_virtphy.ttcn" which should symbolize that the related tests
are to be executed with osmo-bts-virtual + virtphy instead of
osmo-bts-trx + fake_trx + trxcon.

You also have to set the following module parameter to make this work:
	BTS_Tests.mp_bts_trxc_port := -1

Related: OS#4023
Change-Id: I677f660b1076148b3317b08b06eb3d6551d9b577
2019-05-27 10:00:06 +00:00