Commit Graph

86 Commits

Author SHA1 Message Date
Neels Hofmeyr afe2ea5c4f bsc: show bug: do inter-BSC-out HO by measurement report
So far all handover tests trigger handover via VTY command. This means
that any bugs introduced in measurement report handling and handover
target selection are by definition not caught.

Almost a year ago, fixing a handover oscillation bug for intra-BSC
handover introduced a segfault for inter-BSC handover targets, because
for those the target.bts is NULL. Show this bug.

Related: OS#5324 SYS#5259
Related: I5a3345ab0005a73597f5c27207480912a2f5aae6 (osmo-bsc)
Change-Id: Iba033c32015173f57dbb1c211aefab1a9094e29d
2021-11-24 15:26:50 +01:00
Vadim Yanitskiy 66d3c338c3 library/RSL_Types: add templates for RSL_IE_OSMO_TopAcchCap
Change-Id: If2e287699925c6bb7f93439d0729e16682fab019
Related: SYS#5319
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy a203d3b5e2 library/RSL_Types: add missing RSL_IE_OSMO_TOP_ACCH_CAP
Change-Id: I3bd491fba5b72f0fdd262992a97895f037be69d8
Related: SYS#5319
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy 1f53215f45 library/RSL_Types: add missing RSL_IE_OSMO_REP_ACCH_CAP
Change-Id: I198cbfd176e41c55f67d625d9587ba5b6062f0c4
Related: SYS#5114
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy fc63164bac library/RSL_Types: use OCT4 for local/remote address fields
This way functions like f_inet_addr() and f_inet6_addr() can be
used directly without converting between bytes and integers.

Change-Id: I389a8cb95c025c9dddc751789223621c15d9b48f
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy e9141c22b1 library/RSL_Types: add remote addr/port to ts_RSL_IPA_CRCX()
Change-Id: Iffcac2f1c9b877393fef547fb67ee24cc1e27a11
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy 2a5a1ef401 library/RSL_Types: add matching templates for BS Power Control
Change-Id: Iceba738f71043dc22880d085836f8be9d14821ab
Related: SYS#4919
2021-06-30 10:20:33 +00:00
Neels Hofmeyr 9f3e6ac649 add bsc/BSC_Tests_VAMOS.ttcn
BSC_Tests_VAMOS.ttcn is separate from BSC_Tests.ttcn in order to
instruct osmo-bts-omldummy to pass BTS_FEAT_VAMOS == true in the OML BTS
attributes.

Add tests:
TC_chan_act_to_vamos()
TC_mode_modify_to_vamos_fr()
TC_mode_modify_to_vamos_hr()
TC_assign_to_secondary_lchan_fr()
TC_assign_to_secondary_lchan_hr()
TC_vamos_multiplex_tch_f_tch_f()
TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h()

Change-Id: I2c504099163a30ea102cbd26d3615ca2e5ce1e64
2021-06-05 20:24:35 +00:00
Vadim Yanitskiy 9f69953a37 library/RSL_Types: complete definition of RF RESOURCE INDICATION
Change-Id: If3eedfaea6de252b8dc3ca238f6ffd45448065d1
Related: SYS#5313, OS#1569, OS#1866
2021-06-03 17:29:44 +02:00
Neels Hofmeyr 2bef0ddb12 RSL_Types: add VAMOS chan rates and OSMO_TRAINING_SEQUENCE IE
Prepare for upcoming VAMOS tests in BSC_Tests_VAMOS.ttcn.

Change-Id: Idbe9014754eff9c8b2bff19828581bae5b36fadf
2021-05-25 23:10:58 +02:00
Vadim Yanitskiy 802508e696 library/RSL_Types: add 'bs_power_params' to 'RSL_IE_Body'
The value part of this IE is defined as vendor-specific.

Change-Id: I48703c45d26cd88c1d9b5fda1a9df42616cb7cc0
2020-11-24 11:58:49 +01:00
Vadim Yanitskiy 8fc43df69f library/RSL_Types: reorder the arguments of ts_RSL_ChanMode_SIGN
This way it's consistent with ts_RSL_ChanMode, and there is
no need to pass dtx_downlink := false as the first param.

Change-Id: I0b87ef87f8cfff1c96b0beead29d549d5fe0b7c6
2020-10-20 02:24:14 +07:00
Philipp Maier ac693462dd BTS_Tests: fix CHANnel ACTIVation message in TC_meas_res_sign_tchX
The testcase TC_meas_res_sign_tchX activates a traffic channel in
signalling mode and checks the RSL resulting measurement reports.

The CHANnel ACTIVation message sets "SDCCH" as "Channel rate and Type"
value. This is invalid, the "Channel Rate and Type" sould be set to "Half /
Full rate TCH Channel Lm / Bm" (while the speech or data indicator is
still set to "Signalling")

Change-Id: I51887b0d0379fcc1f4483d08dfdd6869e7a9f963
Related: OS#4799
2020-10-19 19:07:44 +00:00
Vadim Yanitskiy e02dbcce9f library/RSL_Types: add missing Channel Identification IE
Change-Id: I4698fd15a14ee55aa4004d80e65912531f78cf06
2020-08-31 15:05:57 +00:00
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