Commit Graph

72 Commits

Author SHA1 Message Date
Vadim Yanitskiy 117c176de7 library/RSL_Types: fix RSL_IE_BS_Power: Power Level is 4 bit long
Unlike the RSL_IE_MS_Power, where power_level is 5 bit long, in
the RSL_IE_BS_Power it's 4 bit long. Fix this.

Change-Id: Ic0cb2275ef585754b9ae5e3d8077ca652afd9365
2020-06-16 01:40:24 +07:00
Vadim Yanitskiy c06688efe2 library: cosmetic: fix misleading comment in RSL_Types.ttcn
Change-Id: Id7974dc666d61025453b79b7e054306c8122ca65
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 15:22:53 +07:00
Vadim Yanitskiy cc4623dff2 library/RSL_Types: use MobileIdentityLV for MS Identity IE
Change-Id: I5436dcbbc961d5b572e10e4f1a3f806d252d7818
2020-03-28 06:21:02 +07:00
Philipp Maier dd841d3a05 BTS_Tests: tolerate empty measurement result on chan est.
On channel establishment the first measurement result may lack the
measurement reports from the MS. This is normal behavior, so lets
tolerate that.

Change-Id: Ib2f511991349ab15e02db9c5e45f0df3645835a4
Related: OS#2975
2020-01-06 10:32:15 +00:00
Pau Espin f7630a6498 bsc: Verify ms power level value from RSL IE MS Power during CHAN ACT
Change-Id: I0a632156420251b14d1bbfd4ca19dc2bdf5a5f1e
2019-10-28 15:15:43 +01:00
Harald Welte 09538f8bfd bsc: Test suite for CBSP (Cell Broadcast Service Protocol)
In this testsuite, we simulate BTS and CBC by attaching to RSL and CBSP
protocol interfaces of the BSC.  We then issue a variety of CBSP
commands to the BSC and check for corresponding action on both the BTS-
facing RSL as well as responses on the CBSP side.

Change-Id: Ia6ffac181f50586d06d2f29bca1c57285179e861
2019-09-05 13:13:35 +02:00
Harald Welte 908ce54531 bts: Add test for ETWS Primary Notification via P1 Rest Octets
Change-Id: I247ea0f336e4ae9eecb1e8166f2326bdd2c299f4
Related: OS#4047
2019-09-05 12:44:13 +02: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
Eric Wild 61edb7e974 BTS: add some dynamic power control tests
Change-Id: I57489ba22542d859ced767e856634f9060c060f0
2019-06-12 20:16:44 +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
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
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
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 4a129f83ce bts: Add tests for CBCH LOAD IND (underflow, overflow)
Change-Id: Ia0a82771ba2912ef06fb0d9ee0816e8150701005
Related: OS#4011
2019-05-21 16:40:57 +02:00
Harald Welte a3ff670c5f bts: Refactor code to support mixed DEFAULT + NORMAL and EXTENDED CBCH
The existing code structure could only test for normal messages with a
NULL default, but didn't handle situations where normal and/or schedule
messages were superimposed on top of DEFAULT messages.

Also, prepare the infrastructure for testing both CBCH BASIC and CBCH
EXTENDED.

No new tests are introduced, the code should behave identical before
and after this patch.

Change-Id: I144c7d833b79c648b1ac69a6155f3603025ede5c
Related: OS#4011
2019-05-21 16:36:50 +02:00
Harald Welte 1028017e14 RSL_Types: Add ts_RSL_IE_MS_Power() template for MS Power IE
Change-Id: I646208c3c6e755978162e207a4f2030be117883d
2019-05-20 00:15:09 +02:00
Harald Welte 921f9e0732 RSL_Types: Add dissected RSL_IE_ActivationType and related templates
This is required for supporting normal and handover assignments.

Change-Id: I116d589d0ec4aa6bffba4da6e3bfe1974dd04db2
2019-05-20 00:15:09 +02:00
Harald Welte c8d363cd3c bts: Add TC_sacch_chan_act() to test SACCH INFO at RSL CHAN ACT
According to 3GPP Ts 48.058, every logical channel can receive some
specific SACCH filling at the time of RSL channel activation.  This
overrides the global SACCH FILLING.

Related: OS#3750
Change-Id: I8adb371a7e0b80792dd2fa35e5204802068df5ba
2019-05-19 20:43:51 +02:00
Harald Welte a670615e5a RSL_Types: Add support for RSL_IE_MSG_ID as used in ERROR REPORT
Change-Id: I5f971dc7ec797a311841ac5b947c5c493780786f
2019-05-19 20:41:28 +02:00
Philipp Maier 4d1e9c9254 BTS_Tests: Verify RSL MS POWER CONTROL and SACCH MS POWER LEVEL
Usually the MS power is controlled by the BTS and there is no continous
supervison by the BSC needed. However, a scheme where the BSC takes care
of the power control loop exists. The power is then set via RSL using an
RSL MS POWER CONTROL message.

This tests establishes a dchan and then sends MS POWER CONTROL messages
with differen power levels and then checks the presence of the power
level set in the MS POWER LEVEL field of the SACCH L1 header.

Change-Id: I82b04a3bf94d355175f7f6ff3fdc43672e8080a2
Related: OS#1622
2018-12-23 10:36:58 +00:00
Vadim Yanitskiy 8f98d3fcc4 library/RSL_Types.ttcn: expect any l3_info for 'tr_RSL_UNITDATA_*' by default
This is quite useful when one needs to expect an RSL UNITDATA
message with any payload. Let's set 'l3_info' to '?' by default,
like it's already done for 'ts_RSL_DATA_*'.

Change-Id: I45260343b34d8d054e7efa72de11dd4cb510a8cc
2018-10-03 21:37:40 +00:00
Vadim Yanitskiy fabe0f202a library/RSL_Types.ttcn: fix inadequate template restriction
The 'tr_RSL_UNITDATA_IND' is a 'response' template, so there
is no reason to restrict 'link_id' to any obvious value.

Change-Id: I29ac0a2828b565baa1d2f3ac0a922bc441378f94
2018-10-03 21:37:40 +00:00
Harald Welte cc373205ad rsl: Add SMSCB related RSL types / templates
Change-Id: I203e72a203ffa7538aadc7b96e1ae7e21956c160
2018-09-16 12:41:11 +02:00
Stefan Sperling 4880be4385 add DTX fill frame BTS tests
Add tests TC_tch_sign_l2_fill_frame and TC_tch_sign_l2_fill_frame_dtxd.

TC_tch_sign_l2_fill_frame is already passing and verifies that fill
frames are sent if there is nothing else to transmit on a SDCCH4/SDCCH8,
TCH/H, or TCH/F signalling channel where DTX is disabled for downlink.

TC_tch_sign_l2_fill_frame_dtxd is currently failing. It verifies that
only specific fill frames are sent, as required by GSM 05.08 for TCHF
signalling channels with DTX enabled for downlink. At present, our
implementation generates no fill frames in this case, which is one
piece of the problem described in issue OS#1950.

Change-Id: Id4e0de6e78b62cd408f600a57a28617d91da64af
Related: OS#1950
2018-08-09 11:08:44 +00:00
Harald Welte 15de8ba162 bts: Extend Osmocom-specific RSL "supplementary meas info IE"
In osmo-bts Change-Id Iea4a4781481f77c6163d82dcd71a844a5be87bf2
we introduce an Osmocom specific "supplementary measurement info IE"
into the RSL MEAS REP message.  This commit adds the related type
definitions and extends the related matching in BTS_Tests.ttcn.

Change-Id: I5d1114c73508c67ad7cd9864d7370367612b1241
2018-06-29 17:53:10 +00:00
Neels Hofmeyr 378a49ce60 bsc: handover: actually send Handover Detect
Until now, the test went from RR Handover Command directly to RR Handover
Complete, and osmo-bsc didn't mind it. However, the normal handover procedure
requires an RSL Handover Detect to be sent in-between those. Send that.

Change-Id: I6e54edcc3a99e116d852eca8e48c7a5bc685e832
2018-06-18 17:54:33 +02:00
Harald Welte e8d750e668 bts: More complete AGCH / IMM.ASS testing
The existing test simply sent 1000 messages via RSL without checking
what actually arrived on the radio interface, or without
expecting/counting any RSL DELETE IND.

Let's fix this by introducing test sending IMM.ASS at three different
rates, with related expectations in terms of nubmer of IMM.ASS arriving
on Um vs. RSL DELETE IND arriving at BSC.

Change-Id: Ib6043b76ba1d7aaff107bb612f63b5a747d8720c
Related: OS#2990
Related: SYS#2695
2018-06-10 21:44:29 +02:00
Harald Welte e613f96593 bts: ciphering tests
Change-Id: If450e36cfd8cde713f304e57ec09bc1239bdf7ea
2018-05-10 18:36:59 +02:00
Harald Welte 0472ab4415 bts: Add RLL tests
This adds a series of test cases to BTS_Tests.ttcn implementing testing
of the RLL sub-layr of RSL, i.e. the translation between LAPDm frames
on the Um interface and the RLL frames on the Abis side (and vice vrsa).

Related: OS#3174
Change-Id: I336378de6106e5369600cbb49e0c47cc59864630
2018-05-09 08:54:53 +02:00
Harald Welte efa7d919f5 RSL: Introduce template (value) annotations
Change-Id: I18828ccbc7d28dd190e745f020c724acdb0cdc8b
2018-04-18 23:23:22 +02:00
Harald Welte 94e0c3428e bsc: Testing of dynamic PDCH (both IPA style and Osmocom style)
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
2018-04-07 19:28:01 +02:00
Harald Welte ee19c73d81 RSL_Types: Fix msg_disc of IPA PDCH ACT/DEACT + inverse templates
The MDISC_IPACCESS is only used for the media (CRCX/MDCX/DLCX) related
commands, not for the PDCH activation/deactivation.  The latter uses
normal MDISC_DCHAN.

Also, add the inverse templates for PDCH actiation/deactivation, so we
now have both receive and transmit template for each of the 6 related
messages (activation, deactivation, plus each their ACK + NACK).

Change-Id: I170a90391859d71e1f96a72205487cccba5b6ae7
2018-04-05 09:35:01 +02:00
Harald Welte 3618d9d748 RSL: Add tr_RSL_ChanMode
Change-Id: I938b8898db1cd9638cf2858b3b593fa3fd39bf1e
2018-03-21 22:48:18 +01:00
Harald Welte ea17b91e78 bts: Add TC_sacch_info_mod and TC_sacch_filling
Change-Id: I38b3e302eddb699b2dbdae06fc929dd59de7b2dc
2018-03-12 16:04:54 +01:00
Harald Welte 9912eb5824 bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)
Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
2018-02-25 13:30:15 +01:00
Harald Welte 2a7e7163c1 RSL: Make ts_RSL_IPA_DLCX require a conn_id value
The way how TTCN-3 templates work it's not possible for us to have
a parametric template for both generating DLCX with conn_id and without :(

Change-Id: Icb772ca5b9661ab39b1c161fa4ebc70544275d8f
2018-02-25 13:00:42 +01:00
Harald Welte 30527454ac RSL: Add more IPA related templates
Change-Id: I432c75c25e20dd211c8a429bfd9d407999f6e99a
2018-02-25 13:00:03 +01:00
Harald Welte 6cb400ae89 RSL: ts_RSL_IPA_MDCX_ACK contains *local* IP+Port, not remote
the IPA_MDCX_ACK contains the BTS-side IP/Port, despite the MDCX
containing the BSC-side IP/Port!

Change-Id: Ided8acff720aeb52232d17c8f142a97557f4b424
2018-02-25 12:59:59 +01:00
Harald Welte 8bd0f82b00 RSL_Types: Remove RT_PT2 from tr_RSL_IPA_CRCX_ACK
The way how TTCN-3 templates work we cannot use a template parameter
to decide if we want to match only on messages that contain a matching
RTP_PT2, or (alternatively) on any messages whether or not they have
a RTP_PT2 IE at all :(

Change-Id: I7a4f5d7e1d44994316717da5b769e278ea188b12
2018-02-25 12:59:56 +01:00
Harald Welte a871a38a18 bts: Add TC_ipa_dlcx_not_active()
Change-Id: I5c8eec8ba56b35aa8d7df87649389392ffd1a78c
2018-02-25 12:59:36 +01:00
Harald Welte 01d982cced bts: low-level RSL ERROR REPORT Testing
Change-Id: If1cc6c672d5a0cf8eb8ef23b96eb1e80ceef30f1
2018-02-25 12:59:33 +01:00
Harald Welte 68e495b48a bts: Add paging related tests
We're testing at 80% and 200% of PCH capacity, both for either IMSI-only
or TMSI-only paging requests.  The way how we test ensures:

* the expected number of paged mobile identities end up on the Um interface
* we implicitly check the queuing limit of 200 paging records by
  overflowing it in the 20-seconds-of-200%-load cases
* we implicitly check the batching of mobile identities into different
  paging types
* we test the PCH load reporting over RSL

As a side note, in case you were ever wondering what's the expected
paging throughput / capacity, there are now helper functions to compute
it.  For our combined CCCH/SDCCH4, it's about 16 IMSIs per second or
about 32 TMSIs per second.

Change-Id: I0b80b72bdab3d80d915296d70e1174623fbd8610
2018-02-25 12:58:36 +01:00
Harald Welte 874c22393e RSL_Types: Add ts_RSL_BCCH_INFO() for sending BCCH_INFO
Change-Id: Id9ad914f67137e38c7ad259c7a74de0e98c8f50d
2018-02-24 04:52:43 +01:00
Harald Welte 39b47be947 RSL_Types: Add tr_RSL_MEAS_RES_OSMO()
This is a template that goes beyond the 3GPP specs, as it expects
presence of certain optional IEs which we know are always present
in the OsmoBTS case.

Change-Id: Ibf37565ab4fe70515b598a2757953628aa780241
2018-02-23 19:03:54 +01:00
Harald Welte 2691adf843 RSL: Add definitions for RSL MEAS REP parsing/encoding
Change-Id: Ib04b81891def2c15a62767a29b53c0fb605d45be
2018-02-23 19:03:54 +01:00
Harald Welte 9abd1289ec RSL_Types: Add templates for "BSC side"
So far, the RSL templates have been used for BSC testing, i.e.
TTCN3 behaving like a BTS.  Now we want to test the BTS, so we
have to "invert" the receive/send direction and hence also need
the inverse templates.

This doesn't add *all* of them, but a sufficiently large number for our
first testcases against OsmoBTS.

Change-Id: Ica9cfae5a691e4d967d046b04e5bb16a71a89adf
2018-02-20 16:10:41 +01:00
Harald Welte 6a8199dda3 RSL_Types: More templates, f_rsl_find_ie() for finding an IE in a message
Change-Id: Id7fa7d672c1fde97882fa44959501e8bf7b8dc0b
2018-01-29 21:35:12 +00:00
Harald Welte e540822967 RSL_Types: Make tr_RSL_MsgTypeDR match non-transparent RLL
There are quite a number of non-transparent RLL messages, such as
RLL_RELEASE_REQ.  Make sure we match those as intended.

Change-Id: I30260a57fc01613450e6ac66e0af97c29041b4fa
2018-01-29 21:35:12 +00:00
Harald Welte 35bb716610 Add comments with short module description on top of each file
Change-Id: Id934d7a763b619d52cbec7de439b3708225b81f3
2018-01-03 21:09:29 +01:00