aboutsummaryrefslogtreecommitdiffstats
path: root/bts
AgeCommit message (Collapse)AuthorFilesLines
2019-09-06bts: Test if BTS forwards ETWS Primary Notification to PCUHarald Welte1-0/+30
All MS/UE must be notified of ETWS Primary Notifiations. Depending on their state, the notification goes different paths: * CS dedicated mode: BSC sends it as L3 message over LAPDm / DCCH * CS/PS idle mode: BTS sends paging messages on PCH * PS TBF active: PCU send Packet Application Info This tests the last of the three methods by checking that a ETWS Primary Notification sent on RSL to the BTS is received by the PCU socket. Change-Id: I2661df7f7d870a0ac1c89bb8a85df81644b00b0a Related: OS#4047, OS#4048 Depends: osmo-bts Ic0b3f38b400a0ca7e4089061ceb6548b0695faa6
2019-09-06Revert "bts: f_init_pcu: sleep before connect"Oliver Smith1-4/+3
This reverts commit c089b415f5e3bbf5eb2de435b925581ca42d8872. The additional sleep caused other tests to break, probably because it triggered race conditions: * TC_pcu_socket_connect_multi * TC_pcu_socket_connect_si3gprs * TC_si_sched_13_2bis_2ter_2quater Adjust TC_pcu_socket_verify_info_ind test case error message to mention OS#4179. This test is flapping now, most of the time the BTS sends a CellID 0 because it did not receive the real CellID from the BSC yet. Related: OS#4179 Change-Id: I2115c337f4601a4614b140715323c42803b003ee
2019-09-05bts: Add test for ETWS Primary Notification via P1 Rest OctetsHarald Welte1-0/+175
Change-Id: I247ea0f336e4ae9eecb1e8166f2326bdd2c299f4 Related: OS#4047
2019-08-29bts: add configs for running without dockerOliver Smith3-4/+225
Base on docker-playground.git's ttcn3-bts-test/*.cfg files, change IPs from 172.18.9.* to 127.0.0.* (last octet unchanged). Change-Id: I9eb2bb4599a4e874424f73483d9658a4467b8b8c
2019-08-29bts: add test TC_pcu_socket_verify_info_indOliver Smith1-0/+23
Verify that the CellID of SI3 (TS 04.08 9.1.35) and other values are passed properly to the PCU socket. A bug in OsmoBTS is currently causing it to send a byte-swapped CellID, related fix is in [1]. [1] I68faf4558f0686fb2a3db24077dceaae05bf0262 (osmo-bts) Related: OS#3854 Change-Id: I6516808f4b9e9a2301f9ccc1e55ded14e7334c33
2019-08-29bts: f_init_pcu: sleep before connectOliver Smith1-0/+3
Give the emulated BSC side some time to send the various SI via RSL. This workaround makes OsmoBTS send the correct CellID and other information instead of empty values to the PCU socket. The next commit tests these values. Related: OS#4179 Change-Id: I547f2b8e0796b6976506c28b1b493b1f5bce28f8
2019-07-26BTS_Tests.ttcn: fix: use reasonable minimum default for C/IVadim Yanitskiy1-2/+2
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-16BTS_Tests.ttcn: introduce TC_pcu_data_ind_lqual_cbVadim Yanitskiy1-0/+77
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-14unbreak some measurement testsEric Wild1-3/+6
Trxc port mapping got lost. Change-Id: I8eb766685dbf16e2eb2a973567016be3976e5840
2019-06-18BTS: BS power testsEric Wild1-0/+95
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-17BTS: test that RSL MS POWER does not activate MS power control without PP IEEric Wild1-1/+62
Change-Id: I8776ed4af83dc9f9f32ac14f5d4c9e35f4a286d6
2019-06-17BTS: add another failing power control testEric Wild1-0/+56
Change-Id: I8b3bdf374c96fa3368f90ae524859f30ceefa5f5
2019-06-14bts: clean up old tests and make them work againEric Wild1-133/+83
Change-Id: Ie9d73cd9777b6fdda5115ed5dc103979d79c8cd9
2019-06-14bts: more lapdm testsEric Wild1-2/+266
Change-Id: I0db71de5f600022935f47573aa919990de4bfec0
2019-06-13lib/IPA_Emulation: Build IPA_CTRL conditionally based on definePau Espin Pedrol1-1/+1
Change-Id: I4d1eca6b0008a395b7f7449e6ea3f9b6d41133c7
2019-06-12BTS: add some dynamic power control testsEric Wild1-2/+354
Change-Id: I57489ba22542d859ced767e856634f9060c060f0
2019-06-08BTS: pcu_rr_suspend clean up and release the channelAlexander Couzens1-0/+5
The testcase failed becaues of an unexpected RSL Error Indication from the LAPDm system which was in the RSL emulation queue when tearing down the test environment. By calling f_rsl_chan_deact() the queue gets flushed until the RSL deactivate channel is received. It's also more clean to release the channel. Fixes: OS#4051 Change-Id: I55827626803ca81b68f905fd0df3126367951f39
2019-06-05bts: Check if BTS_TRXC port is mapped before attempting UDP socket connectHarald Welte1-1/+1
A large number of our tests is currently failing with BTS_Tests.ttcn:341 Dynamic test case error: IPL4 Test Port not mapped which was introduced by Change-Id Ie7d311bf8f03bf9b1d29b5bb28ffad793f215fd1 Change-Id: Ia1ef4ac7dcfec137a8613bc49a7f312d81a86153
2019-06-04bts: Add LAPDm test for SABM with wrong C/R bitHarald Welte1-0/+50
Test that the BTS will take no action when it receives an SABM frame with the C bit set wrong (R); Inspired by TS 51.010-1 25.2.5.2 Implemented as TC_sabm_incorrect_c(). Related: OS#4032 Change-Id: I4fbe7e708c9b1a2c04e5d24a205b5b5af20ff8c7
2019-06-04bts: Add test csse for I frame with wrong C/R valueHarald Welte1-0/+54
Implemented as BTS_Tests_LAPDm.TC_incorrect_cr() Related: OS#4032 Change-Id: I19e50049625bd31662a1e22b1394b69b2d249104
2019-06-04BTS_Tests.ttcn: fix name of f_trx_fake_toffs256()Vadim Yanitskiy1-3/+3
Change-Id: I83a1d68ffbfc4d588e143fecc62517baac9b31af
2019-06-04BTS_Tests.ttcn: indicate default RSSI=-60 to FakeTRXVadim Yanitskiy1-1/+2
Change-Id: Ib13e3f8d9fbcd2722c6522a1bb5c513e34adfb18
2019-06-04BTS_Tests.ttcn: fix TRXC port mapping between test_CT and ConnHdlrVadim Yanitskiy1-37/+37
Before this patch, sending special TRXC commands to FakeTRX, such as FAKE_TOA and FAKE_RSSI, from ConnHdlr resulted in a receive timeout waiting for the response. As it turned out, both the test_CT and the ConnHdlr have a TRXC port, as depending on the test one would want to globally control it from test_CT or from within a ConnHdlr. However, only one of the two should be active (connected) at any given point in time. Otherwise we'll have two UDP sockets on the same bind port, and it's more or less random on which of them it ends up. Let's add an optional parameter 'trxc_comp', which would indicate whether we need to control TRXC from ConnHdlr or not. Let's get rid of both f_trxc_connect() and f_main_trxc_connect(), which basically do the same, but run on different components. Change-Id: Ie7d311bf8f03bf9b1d29b5bb28ffad793f215fd1 Closes: OS#4039
2019-06-04BTS_Tests.ttcn: correct error messages about TRXC connectionVadim Yanitskiy1-2/+6
Change-Id: Ie3dbe925b8840c0c8d8047ee5878fcdaa1395ab3
2019-06-04bts: Implement testcase for RR response frame lossHarald Welte1-0/+58
Test is implemented as BTS_Tests_LAPDm.TC_rr_response_frame_loss() Change-Id: I32340fff6666fee0ebfb9b31b55e0982d0d917a1
2019-06-04bts: Factor out mobile-originated LAPDm establishmentHarald Welte1-24/+29
which avoids us to have to copy+pate this between several test cases. Change-Id: I8da753bb3d809ec09f9380bb4bac666ceaf61f00
2019-06-04bts: Add test for expiring T200 N200+1 timesHarald Welte1-0/+91
Change-Id: I9e1dbc889575f8952a4581551076829825b3b1cd
2019-06-04bts: Also test SACCH in TC_segm_concatHarald Welte1-16/+45
Change-Id: If9b51b4d6c357aa015f31e1e6851d4d1bb71a58f
2019-06-04bts: Add TC_segm_concat to test segmentation+concatenationHarald Welte1-0/+124
Change-Id: I6a9ce3e27f4a01412186b3b5d8d2b86573b6f8ac
2019-06-04bts: Extend LAPDm test suite with a number of new testsHarald Welte2-6/+458
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-02bts: don't require users to pass test case name to f_init()Harald Welte2-41/+42
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-02bts: BTS_Tests_LAPDm.ttcn: rename f_init() to f_lapdm_init()Harald Welte1-7/+11
This is to avoid name clashes with f_init() from BTS_Tests.ttcn Change-Id: Ie6272165b1dbda53d2d02af43c8e969da7a54d2e
2019-06-02bts: Remove one indent lvel from BTS_Tests_LAPDm.ttcnHarald Welte1-213/+215
Change-Id: I4637393df9989a97a4d70f08bd334d0f8cfd2284
2019-06-02bts: Derive test component that talks RSL and LAPDmHarald Welte1-0/+7
Change-Id: I6e24c6f6a904c4c051780c35af82c3bd53c970ce
2019-06-02move lapdm/L1CTL_Test.ttcn to bts/BTS_Tests_LAPDm.ttcnHarald Welte1-0/+252
Change-Id: Ibbc967f0bd9a19ab4bbd17f612654d72cb32d571
2019-06-02BTS_Tests.ttcn: introduce TC_ho_rach() for handover RACHVadim Yanitskiy1-0/+70
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-01library/RSL_Types.ttcn: t(r|)s_RSL_CHAN_RQD: make chan_nr configurableVadim Yanitskiy1-2/+2
Change-Id: I89e9286e86b09ed54eb7749d107f5d8d57b93644
2019-06-01L1CTL_Types.ttcn: accept SacchL1Header in ts_L1CTL_DATA_REQ_SACCHVadim Yanitskiy1-16/+16
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-05-31ts_TRXC_FAKE_RSSI(): define RSSI range, allow signed valuesVadim Yanitskiy1-1/+1
Change-Id: I8944e690c0da648eae3005777f2487c77b66a17b
2019-05-30bts: move f_pad_oct() to Osmocom_Types as it's generally usefulHarald Welte1-8/+0
Change-Id: I4df99e5612c67006eb2998529425956fb4a664af
2019-05-29bts: Initial set of OML testsHarald Welte4-2/+628
The test coverage is far incomplete, but it at least is a starting point. Related: OS#4031 Change-Id: I82bb85b684d2db3a6b1e96a68ffde03e22affa6b
2019-05-29bts: Verify SI3 GPRS indication reflects PCU interface statusHarald Welte1-1/+172
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-28Extend BTS_Tests.ttcn with test for RSL MODE MODIFY with encryption IEEric Wild1-0/+66
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-28Extend BTS_Tests.ttcn with test for RSL channel activation with static MS PowerEric Wild1-0/+43
Change-Id: Icecf18c77bfe8b049cc0896c4c5b441187be1c0e Related: OS##3750
2019-05-28bts: TC_pcu_{time,rts}_ind: Higher tolerancesHarald Welte1-2/+2
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-27bts: Verify PCU socket can disconnect + re-connectHarald Welte1-0/+21
Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Related: OS#4023
2019-05-27bts: Add test ensuring only one connection to PCU interface acceptedHarald Welte1-0/+26
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-27Fix use of osmocom-extended RSL Channel NumbersHarald Welte1-4/+14
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-27L1CTL: Add support for CCCH_MODE_COMBINED_CBCHHarald Welte2-3/+3
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-27cosmetic: Update copyright statement, license notice and SPDXHarald Welte2-1/+5
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