Commit Graph

340 Commits

Author SHA1 Message Date
Eric Wild 61edb7e974 BTS: add some dynamic power control tests
Change-Id: I57489ba22542d859ced767e856634f9060c060f0
2019-06-12 20:16:44 +00:00
Alexander Couzens a063483b8b BTS: pcu_rr_suspend clean up and release the channel
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-08 10:09:26 +00:00
Harald Welte d48c0c7f87 bts: Check if BTS_TRXC port is mapped before attempting UDP socket connect
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-05 10:09:33 +02:00
Harald Welte a39ac756d3 bts: Add LAPDm test for SABM with wrong C/R bit
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-04 23:13:47 +02:00
Harald Welte 44479781b0 bts: Add test csse for I frame with wrong C/R value
Implemented as BTS_Tests_LAPDm.TC_incorrect_cr()

Related: OS#4032
Change-Id: I19e50049625bd31662a1e22b1394b69b2d249104
2019-06-04 23:13:41 +02:00
Vadim Yanitskiy dc8db92c86 BTS_Tests.ttcn: fix name of f_trx_fake_toffs256()
Change-Id: I83a1d68ffbfc4d588e143fecc62517baac9b31af
2019-06-04 22:27:55 +07:00
Vadim Yanitskiy 10d72468f4 BTS_Tests.ttcn: indicate default RSSI=-60 to FakeTRX
Change-Id: Ib13e3f8d9fbcd2722c6522a1bb5c513e34adfb18
2019-06-04 22:27:52 +07:00
Vadim Yanitskiy f4e997c5d4 BTS_Tests.ttcn: fix TRXC port mapping between test_CT and ConnHdlr
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-04 22:24:40 +07:00
Vadim Yanitskiy fc1a3ca32b BTS_Tests.ttcn: correct error messages about TRXC connection
Change-Id: Ie3dbe925b8840c0c8d8047ee5878fcdaa1395ab3
2019-06-04 19:35:13 +07: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 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
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
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 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
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 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
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
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
Harald Welte 4832c86acd bts: Add TC_pcu_rts_req() to verify PCUIF_RTS_REQ
This new test verifies that the expected amount of PCUIF_RTS_REQ are
observed on the PCU Interface for both PTCCH and PDTCH.

Change-Id: Ic27cdd4f4adf11f871b84bd72692a03280274fe2
Related: OS#4023
2019-05-25 14:57:18 +02:00
Harald Welte 07bd2d265b Add TC_pcu_oml_alert() for testing PCU-originated OML alerts
As we don't yet speak OML directly from the TTCN3 test suite,
this requires a currently "RFC/WIP" state patch turning OML
Failure Event Reports into CTRL TRAP on the BSC, see
https://gerrit.osmocom.org/#/c/osmo-bsc/+/14177

Change-Id: I6c7641b37b6ee2177d43127140cc0b625409379c
Depends: osmo-bsc I4f8a9737c6ef1b951ea8e742cdbd3689371a99d5
Related: OS#4023
2019-05-25 11:03:30 +02:00
Harald Welte d66c9b8d13 bts: Add Test for receiving PCUIF_TIME_IND on BTS PCU interface
Change-Id: Ib6b99a52790162b0227847d9aec5143cf959e2d0
Related: OS#4023
2019-05-25 09:06:27 +02:00
Harald Welte 3453ab48d6 bts: Add tests for CCCH LOAD IND (RACH)
Add three BTS_Tests.ttcn test cases for verifying the BTS behavior
regarding CCCH LOAD IND (RACH).

Related: OS#3750
Change-Id: I6c9dee1d7d3eaa218fdce7ebb8e334858aedb736
2019-05-24 21:24:36 +02:00
Eric Wild 6833cc9464 bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from initial activation onwards
Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb
Related: OS##3750
2019-05-23 19:34:44 +02: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 60bd92bddb bts: Add TC_sms_cb_cmd_sdcch{4,8}_extd_multi
Those tests verify operation of the EXTENDED CBCH.

Change-Id: I06c193d59f21472fb5e4c69a7af1ccb18fba7487
Related: OS#4011
Related: OS#3535
2019-05-21 16:36:51 +02:00
Harald Welte d522ca09dc bts: Test case for mixed NORMAL and DEFAULT SMSCB
This adds TC_sms_cb_cmd_sdcch{4,8]_default_and_normal() which test
the correct behavior in case of a DEFAULT SMSCB and normal one-shot
SMSCBs.

Change-Id: I0782b121cd69158903b09f935b298ddbf5a9ffb5
Related: OS#4011
2019-05-21 16:36:51 +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 df4d0f0b8c bts: Test for removal of CBCH DEFAULT message
Add a new testcase TC_sms_cb_cmd_sdcch4_default_then_null() which first
installes a DEFAULT message, verifies that, then removes the default
message and verifies only NULL CBCH blocks are sent anymore.

Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011
Related: OS#4011
2019-05-21 16:36:50 +02:00
Harald Welte 88e5dffd19 bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_default_only
Add a most basic CBCH DEFAULT message test: Ensure *only* the
default message is sent if a default is set.

Related: OS#4011
Change-Id: Iab03fa88b759759a493516d43090c4df63f7b06f
2019-05-21 16:36:50 +02:00
Harald Welte e0026c3fb5 bts: Add TC_sms_cb_cmd_cbch_sdcch{4,8}_multi()
These new tests verify that multiple SMSCB commands are equeued,
and that each related message is sent exactly once.

Change-Id: Ice22fd2689a42c3b1951a02e65664102d4eaccc2
Related: OS#4011
2019-05-21 16:36:50 +02:00
Harald Welte 505cf9b519 bts: CBCH related tests for OsmoBTS
This introduces a set of CBCH related tests for osmo-bts.

Warning: Those tests currently require a patched trxcon to work.

Related: OS#4011
Change-Id: I955b4000c12180a39b0205b69b7b2c8cee8c9da3
2019-05-21 16:36:50 +02:00
Harald Welte 8b01c794f0 bts: Add TC_sacch_chan_act_ho_async + TC_sacch_chan_act_ho_sync
Those two new tests test the subtle rules related to how the presence
of certain IEs in the RSL CHAN ACT influence when exactly DL SACCH
transmission should start during hand-over related channel activation.

Change-Id: Ia88f3ab160891cdbbb8fa6e765f137edd04c6e81
Related: OS#3570
Related: OS#4008
Related: OS#4009
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 ee25aaed96 bts: Extend BTS_Tests.ttcn with test for RSL error handling
Section 7 of the RSL specification (3GPP TS 48.058) describes how the
BTS shall respond in various error situations, including wrong message
type, wrong message discriminator and invalid message sequences.

Let's add three test cases for the above three scenarios.

Change-Id: If507a14bbed9cdcc62cd966468222186590fc965
Related: OS##3750
2019-05-19 14:34:58 +02:00
Philipp Maier e63229e920 BTS_Tests: use 0.0 as default for mp_ipa_up_delay
The module parameter mp_ipa_up_delay ads a delay after the ipa bring up.
This is relevant for the tests with real BTS hardware, but it is not
relavent for the regular TTCN3 tests.

Lets set the default to 0.0, since the delay caused problems with
TC_rsl_ms_pwr_ctrl and TC_si_sched_13_2bis_2ter_2quater.

Change-Id: I7663cad5df1ee5a8bcdbbf522881999f1be9f4fe
Related: OS#3960
2019-04-26 12:37:06 +00:00
Philipp Maier d95f340a01 BTS_Tests: wait until BTS supplies stable signal
When running tests with real hardware it is important to wait for some
time (3 sec. should be enough) before exiting f_init(). This is to
ensure that the BTS supplies a stable carrier before the test proceeds.

Change-Id: Ib78633a33a15cd40514e15b6ebf9a0a8fb7b9c68
Related: OS#3863
2019-04-24 14:55:19 +02:00
Philipp Maier 12567e45c2 BTS_Tests: default value for mp_ipa_up_timeout too low
The default value for the module parameter mp_ipa_up_timeout is set to
10 sec. Given that the sysmobts needs around 10-11 sec. to perform one
restart cycle this is to low and causes tests to fail occasionally. Lets
increase the default value to 15 sec to get reliable.

Change-Id: I5bb290d00a02a25672305688352a03f3bf484ff3
Related: OS#3863
2019-04-24 12:26:43 +02:00
Vadim Yanitskiy 51cbc104c6 BTS_Tests.ttcn: add TC_pcu_ext_rach_content() for 11-bit RACH
According to 3GPP TS 04.60, section 11.2.5a, the extended (11-bit)
Access Burst on RACH/PRACH is used by the MS to indicate its EGPRS
capability. One of the alternative synch. sequences (see 3GPP TS
05.02, TS1 and TS2) shall be used.

Add a test case to verify extended (11-bit) RACH decoding.

Depends: (OsmocomBB) I36fd20cd5502ce33c52f644ee4c22abb83350df8
Change-Id: I8fe156aeac9de3dc1e71a4950821d4942ba9a253
Related: OS#1854
2019-04-23 14:49:36 +00:00
Max 2c6f563e51 BTS: use PCU-related test cases as version string
When running PCU-related tests against BTS use name of the test as a PCU
version string sent from TTCN-3 code. This makes it easier to separate
OsmoBTS log output related to different test cases.

Change-Id: I9ef9e46061ef116529bdea196050f914804615b3
2019-03-21 16:00:04 +00:00
Max 6e05304843 Log FN and RA in TC_rach_max_ta
Similar to other RA-related tests, log FN and RA values in case of test
failure.

Change-Id: I815b10d0f0e9f29de7d306fa052b72b9e483dd9d
2019-03-14 16:39:29 +01:00
Max ba06feb0ce TC_rach_content(): fail test explicitly
By default Misc_Helpers.f_shutdown() will set test verdict to
'none'. Let's fail test explicitly if we had any timeouts.

Related: OS#1854
Change-Id: Ifff8b3b83eeedea0d308f7ab0bfe347e2dc278c8
2019-03-11 13:37:46 +00:00
Max a199a2e0a2 Log all RA values which cause test failure
Previously the first timeout in TC_rach_content() caused test to
fail. Related TC_rach_count() test shows that there're some (13-16 out
of 1000) RA values which are problematic. Let's log all such values in
TC_rach_content() before failing the test to, hopefully, spot the
pattern which sets such RA values apart.

Change-Id: Ibfeb377101f406608c0193f08729c0e6d084281e
Related: OS#1854
2019-02-25 16:31:11 +01:00
Max 1181f2d105 Log FN and RA on RACH test timeouts
Change-Id: I6caac582649e38e77938602fa675d50bdde57790
2019-02-21 16:46:05 +01:00
Pau Espin 446e07bc77 bts: Fix race condition in f_dyn_ipa_pdch_(de)act
Test BTS_Tests.TC_dyn_osmo_pdch_act_deact was sporadically failing due
to receiving IND_INFO on the PCU port with pdch_mask related TS bit set
to 0 after sending a PDCH ACT. That happened due to a race condition
because PCU send IND_INFO periodically. As a result, it can happen that
BTS sends an IND_INFO after PCU.clear was called and before the PDCH ACT
is handled.

Change-Id: If11ef05d97aa5f6caaa731f3817c1fecfc3edf7c
2019-02-21 13:31:35 +00:00
Neels Hofmeyr 2caf349752 update expected results
Change-Id: Idacaf8343bed4a37878eacdf338c4d5eb46bf7a7
2019-01-23 12:44:42 +01:00
Vadim Yanitskiy 44ff214356 BTS_Tests.ttcn: fix: use TRXC interface of the BTS side, not BB
It was observed that 'BTS_Tests.TC_rach_max_ta' started to fail
with the following reason: "BTS_Tests.ttcn:1091 : RACH passed
but was expected to be dropped: -2560".

My initial assumption was that the test case basically sends
FAKE_TOA command on a wrong TRXC interface, and it was
confirmed using trx_sniff.py:

  # TRXD of the BB side
  $ ./trx_sniff.py -p 6700
  [DEBUG] trx_sniff.py:110 L1 -> TRX burst: fn=616 tn=0 pwr=0
  [DEBUG] trx_sniff.py:110 TRX -> L1 burst: fn=597 tn=0 rssi=-60 toa256=-2560
  [DEBUG] trx_sniff.py:110 TRX -> L1 burst: fn=598 tn=0 rssi=-60 toa256=-2560
  ...

  # TRXD of the BTS side (Uplink bursts only)
  $ ./trx_sniff.py -p 5700 --direction L1
  [DEBUG] trx_sniff.py:110 TRX -> L1 burst: fn=719 tn=0 rssi=-60 toa256=0

and additionally be enriching logging messages of fake_trx.py:

  [DEBUG] fake_trx.py:186 (trx@0.0.0.0:6700) Recv FAKE_TOA cmd

Sending FAKE_* commands on TRXC interface of the BB side affects
the bursts being forwarded to this side, so we should use the
TRXC interface of the BTS side to simulate Uplink delay.

The reason why the test case has been passing some time ago is
that there was a bug in fake_trx.py, that has been fixed recently.

This patch makes 'BTS_Tests.TC_rach_max_ta' green again ;)

Change-Id: I7736abd85407c186856be9f1a22613a1fa6e0c32
2019-01-12 07:23:05 +07: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
Pau Espin a14a8af5fd bts: Disable PCU related tests if PCU socket not configured
With some real HW setups, there's no PCU (osmo-pcu) available locally,
for instance when using a sysmobts, or when using a nanoBTS. There's no
need to waste time and generate extra output by running this tests in
this case.

Furthermore, some tests seem to crash sometimes in that setup, probably
due to using invalid fd (-1):
MTC@801a0da9866a: Setting RSL_SYSTEM_INFO_4 (4): '31061C62F224002A4740E50400'O
 /osmo-ttcn3-hacks/bts/BTS_Tests: Segmentation fault occurred
/usr/lib/titan/libttcn3-parallel-dynamic.so(_Z14signal_handleri+0xa3)[0x7f0c33b48073]
/lib/x86_64-linux-gnu/libc.so.6(+0x33060)[0x7f0c321aa060]
/osmo-ttcn3-hacks/bts/UD_PT.so(_ZN12UD__PortType15UD__PT_PROVIDER13outgoing_sendERKN9UD__Types14UD__send__dataE+0xf0)[0x7f0c349e42f8]
/osmo-ttcn3-hacks/bts/PCUIF_CodecPort.so(_ZN16PCUIF__CodecPort16PCUIF__CODEC__PT4sendERKNS_17PCUIF__send__dataERK9COMPONENT+0x19e)[0x7f0c37e1731a]
/osmo-ttcn3-hacks/bts/PCUIF_CodecPort.so(_ZN16PCUIF__CodecPort16PCUIF__CODEC__PT4sendERKNS_26PCUIF__send__data_templateE+0x5f)[0x7f0c37e174f7]
/osmo-ttcn3-hacks/bts/BTS_Tests.so(_ZN10BTS__Tests20f__TC__pcu__act__reqERK7INTEGERS2_S2_RK7BOOLEAN+0x411)[0x7f0c3eec3210]
/osmo-ttcn3-hacks/bts/BTS_Tests.so(_ZN10BTS__Tests28testcase_TC__pcu__deact__reqEbd+0x15d)[0x7f0c3eec4f27]
/osmo-ttcn3-hacks/bts/BTS_Tests.so(+0xfb65d)[0x7f0c3eeef65d]
/usr/lib/titan/libttcn3-parallel-dynamic.so(_ZN11Module_List15execute_controlEPKc+0x1c)[0x7f0c33af3fbc]

Change-Id: I773c7ec52dd8532bf160e92ffefc8d936ca55de2
2018-11-20 13:30:07 +01:00
Pau Espin 315e471bee bts: Introduce mp_ipa_up_timeout parameter
Some test env may take more than 10 seconds to (re-)start a BTS, so
let's make it variable through this parameter.
For instance it was observed that running osmo-bts-sysmo through ssh
inside a sysmobts can sometimes take a good number of seconds (specially
because ssh connection can take a while to be established successfully).

Change-Id: Ieb046358d8266ac94bd7b9e916e85f84de3ad319
2018-11-06 21:47:36 +00:00
Pau Espin 6451b04aed bts: f_est_dchan: verify Chan Rqd originated by RACH arrives on RSL
We cannot notify RSL Emulation layer about expecting a specific FN
(during ts_RSLDC_ChanRqd) because we only know the FN after sending the
RACH request, and since notification to RSL Emulation happens async, it
can happen (verified) that ChanRqd message from BTS arrives and is
handled before we register the RACH req into the ConnectionTable.

Change-Id: I438fd3ee82d88498d928dbcc89ce9bd80d37ab64
2018-11-06 16:22:57 +00:00
Daniel Willmann 0fcc4d357f BTS_Tests: Use Misc_Helpers.f_shutdown consistently
Replace all calls to setverdict(fail) with f_shutdown() since I'd rather
fail and stop early in case we encounter an error.
Only replace setverdict(pass) with f_shutdown() if it is followed by
mtc.stop

Remove internal function f_shutdown and use the one from Misc_Helpers

Change-Id: Ia8b01a1876e969d6f0760ea625e4df83af4f54ca
2018-10-24 15:10:13 +02:00
Pau Espin 3dcf38f7dc bts: Disable testing FACCH/H with real HW
Temporary disable testing on FACCH/H because Calypso PHY is not stable.
Otherwise some tests fail half of the time due to this unstability.

Related: OS#3653
Change-Id: I078cdfbf8d27e543a723eab90f66b2fcda016b5d
2018-10-23 10:35:15 +00:00
Pau Espin e9571aaee5 bts: Introduce mp_ul_rxlev_exp and use mp_rxlev_exp to craft meas rep
Change-Id: I1c8f05bde6f9dc8e8a649e877209192d829dd923
2018-10-23 10:34:43 +00:00
Vadim Yanitskiy 4ebdad65a2 BTS_Tests.ttcn: fix: don't overwrite the expected meas results
Since OS#2988 was fixed, we should not overwrite nor ignore the
measurement results in f_build_meas_res_tmpl().

Change-Id: Ie902bfc7619181b528eafbce367c87e0b062243a
2018-10-21 12:29:50 +00:00
Stefan Sperling aa1e60f584 add an IPA test which sends a chopped payload
Add another IPA test to the BTS and BSC test suites.
This new test sends the header in one burst, followed by the
payload which is transmitted byte-per-byte.

The test uses an ID REQ message. If acting as a server, the test
can expect an ID RESP message. However, if acting as a client, the
server will close the connection when it receives the ID REQ.
The CTRL interface port on the BSC does not close the connection in
this case, so that particular port is skipped by the test for now.

Change-Id: If75cb90841bb25619b414f0cabe008a2428a9fdf
Related: OS#2010
Depends: I4804ccabd342b82d44e69dbc6eaaae220ec7d4e4
2018-10-15 16:41:16 +02:00
Stefan Sperling 0ec1c26808 add chopped IPA ping test to BTS tests
Run the chopped IPA ping test from the IPA_Testing module
as part of the BTS test suite. Contrary to the BSC version
of this test, this test listens for an IPA connection rather
than connecting to an IPA server. Make code in the IPA_Testing
module for accepting connections actually work.

Change-Id: I4804ccabd342b82d44e69dbc6eaaae220ec7d4e4
Related: OS#2010
2018-10-15 15:19:32 +02:00
Pau Espin a0fb42a11c bts: f_tx_lapdm: Build SacchL1Header with proper values
Change-Id: I2c77d9d6262bd4763b3fb53a4a595d2c61f45f4b
2018-10-10 17:47:45 +00:00
Vadim Yanitskiy 35677870c5 BTS_Tests.ttcn: fix: expect RSL_MEAS_RES messages
Since both Calypso PHY and trxcon (since OS#2988 is fixed) are
always sending the Measurement Reports in dedicated mode, the
test cases should expect to 'see' the RSL_MEAS_RES messages,
and ignore them if they are out of the testing scope.

This change makes the following test cases pass:

  - TC_rll_est_ind,
  - TC_rll_rel_ind_DCCH_0,
  - TC_rll_rel_ind_DCCH_3,
  - TC_rll_rel_ind_ACCH_0,
  - TC_rll_rel_ind_ACCH_3,

by adding the 'lazy' version of as_meas_res() alt-step.

Change-Id: I34227b981f76377c338fad4ff9560ba2042abce4
2018-10-05 11:14:58 +00:00
Vadim Yanitskiy e0b91a764a BTS_Tests.ttcn: fix: properly detect Measurement Reports
The altstep for detecting Measurement Results, that was introduced
in I15782ec93d68a0dc54b2ed7a84cb70d780ba0ce1, was implemented in a
wrong way. Basically, the DL Measurement Reports (coming from the
MS) are being combined with the UL measurements, and then being
send as a RSL_MEAS_RES message, not RSL_INITDATA_IND.

Let's use the existing as_meas_res() in 'lazy' mode for that.

Change-Id: Iea5ee868ede8bfe1e2b1cbf5abcbf2844d3fe9a4
2018-10-05 11:14:56 +00:00
Vadim Yanitskiy 41baf00d99 BTS_Tests.ttcn: add 'lazy' mode for as_meas_res()
This mode would be useful for test cases, which expect to receive
the RSL_MEAS_RES messages, but don't care about their correctness.

Change-Id: I39118d6e64c767fad2c9618ec0ef4532dc60e715
2018-10-05 11:14:53 +00:00
Pau Espin 99a7aca62d bts: Use f_L1CTL_PARAM to set expected ms power level for dummy MeasRep
If for whatever reason (eg. CPU scheduling saturation) the L1CTL cli
(TTCN3) doesn't send Measurement Reports on time and no previous one
is cached or has been erased by L1CTL_DM_REL_REQ, lower osmocombb layers
will generate their own dummy Measurement Reports since SACCH must
always be filled.
Those dummy Measurement Reports are filled from
parameters previosuly set using L1CTL_PARAM_REQ (implemented by
f_L1CTL_PARAM() in TTCN3).
Since that function is never called, we need to call it to set the
expected MS power level values in case the cache is empty and we don't send
expected values in case we don't send the Measurement Report through L1CTL
on time.

Change-Id: Ie1fd9cee3472c7aa6580f846d277f485d3401641
2018-10-04 06:38:41 +00:00
Pau Espin ed359cb59f bts: Add parameter to set and expect a specific MS power level
This change uses recently added ts_L1CTL_DATA_REQ_SACCH to be able to
set the L1 Header parameters to match the expected MS power level
announced by the BTS.

Change-Id: Iedab8681a0ba4652a6bb1c001418599a4ff746b6
2018-10-04 06:38:35 +00:00
Vadim Yanitskiy b992050365 BTS_Tests.ttcn: don't tolerate any RSL messages by default
Change-Id: I70dc8af999eed8f7ed6a0d9dad4d3a9406340017
2018-10-04 06:21:00 +07:00
Vadim Yanitskiy 4d78a70802 BTS_Tests.ttcn: fix: properly expect I-frames in f_TC_encr_cmd()
For some reason, in f_TC_encr_cmd() it was expected / assumed that
when a ciphered I-frame is sent from MS on L1CTL, nothing else
than this frame would arrive. But since we have fixed Measurement
Reporting in trxcon (see OS#2988), the MR related messages do
appear on A-bis interface now!

This change introduces a new function f_data_mo(), which should
be used to send I-frames from MS and expect them on A-bis.

So, the following test cases:

  - TC_encr_cmd_a51;
  - TC_encr_cmd_a52;
  - TC_encr_cmd_a53;

should pass with both trxcon and Calypso PHY now :)

Change-Id: I08cb28dd9fa23f3ef8b0c9ede3d4c47f5702a1c1
2018-10-04 06:20:58 +07:00
Vadim Yanitskiy 8d8f91c18b BTS_Tests.ttcn: mark f_unitdata_mo() as private
Change-Id: Idd31608cd91631a92ea9d73e1db508605d7314d4
2018-10-04 06:19:45 +07:00
Vadim Yanitskiy ad131c874a BTS_Tests.ttcn: share as_rsl_sacch_ind() and as_rsl_any_ind()
Change-Id: I7ace54643c10df38a3ea941242f8b65264ef1322
2018-10-04 06:18:59 +07:00
Vadim Yanitskiy 98e0315878 BTS_Tests.ttcn: extend f_unitdata_mo() with tolerance parameters
The ability to control which kinds of RSL messages are permitted
in a given use case (and which are not) makes f_unitdata_mo()
function much more flexible.

Let's introduce two new parameters, one of which would make its
'alt' statement tolerant to SACCH messages (Measurement Reports),
and another to other kinds of RSL messages.

Please note that the original behaviour of f_unitdata_mo()
went untouched, so it's still tolerant to any other messages.

Change-Id: I15782ec93d68a0dc54b2ed7a84cb70d780ba0ce1
2018-10-03 21:37:40 +00:00
Pau Espin 121724cc99 bts: Add timing offset tolerance module parameter to support real HW
When we don't use trxcon (ie we run real HW) we need to relax template
matching when we receive UL measurements in that case.

Change-Id: Icf1d2216d29c1ebf68c672e6ca06c54a7457304b
2018-10-03 21:28:01 +00:00
Pau Espin 9c3ff4e3ec bts: Account for elapsed time in paging timer
Previous implementation always waited for "interval" time until sending
next paging cmd, and didn't finish the test until all expected paging
cmds were sent. As a result, each time it triggered it accumulated some
delay which could go from 2 seconds to 12 seconds depending on machine
load.
As a consequence, the expected number of paging cmd messages to be sent
in 20 seconds was being sent in 22-32 seconds, hence changing the load
on osmo-bts and as a result changing the test results.

Low threshold needs to be adapted since now they are sent in exactly 20
seconds max and the load handled by osmo-bts is bigger.

Fixes: OS#3025
Change-Id: I9651136d6810420e0a4d887bfb11c913a24f0457
2018-09-26 20:42:36 +02:00
Harald Welte f50e3ae532 bts: Add second VTY connection to BSC
Change-Id: If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a
2018-09-16 12:41:11 +02:00
Harald Welte 43c5464370 bts: update TODO comments; remove tests already covered
Change-Id: I35003e20b9b511e5d514549a9ad0acc32b243651
2018-09-16 12:41:11 +02:00
Vadim Yanitskiy 7b8c522741 BTS: enable encryption + RLL tests for Lm (TCH/H) channels
Since OS#3419 is resolved and TCH/H channel is supported by
trxcon, both encryption and RLL tests can be finally enabled
on Lm (TCH/H) channels.

Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Related: OS#3256
2018-09-16 16:58:57 +07:00
Philipp Maier 82cb0b1e14 BTS_Tests: check paging channel fn (bs_ag_blks_res)
BTS_Tests.ttcn contains numorous tests that issue pagings via RSL and
observe if these pagings are visible on the UM interface as well.
However, it is not checked whether the frame number of the blocks on
which those pagings are sent actually falls into the range that is
specified for PCH. We should check this as well.

(The PCH is part of the CCCH, which also contains the
AGC. How many blocks of the CCCH are to be used by the PCH is set by the
parameter bs_ag_blks_res.)

- Check the FN of each paging message that arrives on L1CTL and make
  sure that those FN are part of the PCH.

Change-Id: I839e75ece05166518bf7132acd3017434b3d3bc2
Related: OS#1575
2018-09-12 15:59:28 +00:00
Neels Hofmeyr 873ae201bd update expected results
Change-Id: I32c29e62ca317937db771f8fb1540bb1fe9da2ab
2018-09-06 14:13:34 +02:00
Stefan Sperling 91d4c9dcf5 update DTX fill frame test expectations
Fix an off-by-one in frame number comparison: Ensure that we
won't stop testing until after fn + 104 has been received.

The DTX test case would never pass since the alt statement
was always repeated even if enough frames had been received.
Fix this by moving code which runs before frame fn + 104 is
received into an 'else' cause.

We receive SACCH frames in DTX mode so we must account for them.
Introduce separate counters for SACCH and non-SACCH fill frames
to make test failure diagnosis easier. Note that we cannot expect
a specific amount of SACCH frames during a particular test run
since their amount depends on what the current frame number window
happens to be. We can however add the counters for SACCH and
non-SACCH fill frames and obtain a meaningful result.

Change-Id: Ie573b54ab5654f027c470aa7a565d2b5b97dc74b
Related: OS#1950
2018-09-04 11:55:50 +02:00
Philipp Maier d65d05634c bts_tests: do not define bs_ag_blks_res in multiple locations
The parameter bs_ag_blks_res is currently defined in ts_SI3_default and
in each PagingTestCfg record. When the parameter is changed in
PagingTestCfg it must be changed in ts_SI3_default as well in order to
have coherent settings in the stestsuit and in the BTS. This can be
quite confusing so lets use the setting from ts_SI3_default when
populating PagingTestCfg to have the value of the constant in one place
only.

Change-Id: I5cbdb31c8398aa241faca34e850388d5e1682167
Related: OS#1575
2018-08-30 18:15:10 +00: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
Stefan Sperling 23b45974ce detect VTY TELNET port connection failures (attempt #2)
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to
the TELNET port by default. This allows tests to make progress
into an error handling path if they are started while the osmo-*
program they want to connect on VTY is not running.

Observed with osmo-ggsn tests, where if the one test runs
into a VTY connection failure the subsequent test would get
stuck forever in a map() call on the VTY TELNET port.

Teach the function f_vty_wait_for_prompt() about connection
reports by the TELNET module. We may now receive an integer which
represents the socket file descriptor for the telnet connection.
This case was not handled by the previous change made in
commit cb111b21ab. As a result,
BSC tests started failing with "VTY Timeout for prompt" because
the alt-statement in f_vty_wait_for_prompt() would not progress
past the integer sitting on the VTY port's receive queue.

Change-Id: I56925f93af6c55e93f3f417099db135744da6a40
Related: OS#3149
2018-07-27 17:20:38 +02:00
Vadim Yanitskiy b0970093dd BTS: enable encryption + RLL tests for Bm (TCH/F) channels
Due to OS#3418, both encryption and RLL tests have been failing.
It's time to enable Bm (TCH/F FACCH) channel related tests now!

Please note that Lm (TCH/H) remains disabled because of OS#3419.

Change-Id: I7c0f9f9f695e089e4a30f63ec362d1e6c18abff0
Related: OS#3256
2018-07-27 13:05:53 +00:00
Vadim Yanitskiy 31e7c67772 BTS: fix: pad LAPDm frames before sending via L1CTL
Thanks to Stefan Sperling, a critical bug was discovered in trxcon.
The problem was that length of LAPDm frames was not checked before
passing them to the libosmocoding API. So, if a received LAPDm
frame is shorter than expected (i.e. 23 bytes), then:

  - in case of xCCH, there was a heap overflow (detected by ASAN),
    so a short frame has been encoded together with some garbage
    outside the primitive buffer...

  - in case of FACCH, as the length != 23, a frame was recognised
    as a speech frame, and also encoded together with some garbage.

Since the bug is fixed (OS#3415), some TTCN-3 BTS tests started
to fail, because most likely it was assumed that trxcon would
pad the frames automatically, but it doesn't and shouldn't.

Let's automatically pad LAPDm frames with 0x2b before sending.

Change-Id: I16cba4e4179456bebabf0638760af011a27fd333
Related: OS#3418
2018-07-27 13:05:53 +00:00
Neels Hofmeyr bf3cf5c8bc Revert "detect VTY TELNET port connection failures in TTCN3 tests"
With this patch, I see all ttcn3-bsc-tests failing with
"Verdict: fail reason: VTY Timeout for prompt"

This reverts commit cb111b21ab.

Change-Id: I215d7ab5eee75cf6d3afaac760af64356c943140
2018-07-27 13:01:26 +00:00
Stefan Sperling cb111b21ab detect VTY TELNET port connection failures in TTCN3 tests
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to
the TELNET port by default. This allows tests to make progress
into an error handling path if they are started while the osmo-*
program they want to connect on VTY is not running.

Observed with osmo-ggsn tests, where if the one test runs
into a VTY connection failure the subsequent test would get
stuck forever in a map() call on the VTY TELNET port.

Change-Id: I9acf7793d5d68aec6d087cff254a10d8b673dab1
Related: OS#3149
2018-07-27 07:40:10 +00:00
Stefan Sperling cd9e86f618 update expected test result for TC_sacch_multi_chg
This test has been passing since osmo-bts commit
eee7247ebe0d0a54a54b53b739bdd434dfceb511, so expect
it to pass instead of fail.

Change-Id: I576f881fcb40c4fcbe6b6f767220111a0e9ffd3c
Related: OS#3173
2018-07-26 20:36:55 +00:00
Daniel Willmann b85a629395 bts: Stop all components before mtc.stop in f_shutdown
This is the bts version of patch 637ef6c8

Again I picked a test that sometimes failed -
BTS_Tests.TC_sacch_info_mod - and ran it 20 times before and after this
commit. Before it failed roughly half the time with a DTE and after I
was not able to make it fail.

Change-Id: I96f02037283b79a93ef4d659b00a90ac519c0a75
2018-07-26 08:08:12 +02:00
Stefan Sperling c4181915f7 fix length of frame generated by f_TC_rll_ud_ind
Because trxcon now requires frames of a minimum size some
BTS tests which send unpadded frames with a short payload
have started to fail.

Extend the payload size generated by f_TC_rll_ud_ind()
to make TC_rll_unit_data_ind_DCCH pass again.

Change-Id: Ibaa4124ebdec96623f48c38fac702e9bbd843869
Related: OS#3415
2018-07-25 18:42:09 +00:00
Stefan Sperling 603d98eb23 BTS: fix length of frames generated by f_TC_chan_act_encr
Since trxcon now drops L2 frames of an incorrect length, some
BTS tests which send unpadded frames with a short payload
have started to fail.

Extend the payload size generated by f_TC_chan_act_encr()
to make these tests pass again:

TC_chan_act_a51
TC_chan_act_a52
TC_chan_act_a53

Found by: Vadim Yanitskiy
Related: OS#3415

Change-Id: I0f9a40503a4ed4fce10d9655f845ac49d33f4041
2018-07-25 14:58:38 +00:00
Harald Welte fcf27c9f24 bts: add missing BTS_Tests.cfg config file
Change-Id: I2b1f9b6f910dfdb828bbe95836a2b72ee35ef1d8
2018-07-22 15:02:08 +02:00
Daniel Willmann 17ddd852b0 BTS_Tests: Ensure mtc.stop is called after setverdict(fail, ...)
This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.

Change-Id: Iba59a69127e845cadbe9aaa1dabd87ff5ce8b43b
2018-07-06 18:04:52 +02:00
Pau Espin 425b62f03e BTS_Tests: altstep as_meas_res: Check for meas timer timeout only if previously set
Should fix following spotted message in TTCN3 logs:
BTS_Tests.ttcn:1297 Timeout operation on timer g_Tmeas_exp failed: The timer is not started.

Change-Id: Ia28c40e8cb338ecc23f72474832307bba2b09503
2018-07-06 16:11:46 +02:00
Daniel Willmann a59afab67f Call f_shutdown after setting the verdict in TC_paging_*
Since f_shutdown now ends the testcase by calling mtc.stop we need to
set a verdict first.

Change-Id: Ia9dfcb1dd90e0f6fe61cf88a8de4c10a0cad4009
2018-07-05 16:53:30 +02:00
Daniel Willmann 3487a85d84 Stop testcase execution after failing
This hopefully prevents the verdict from changing to a dynamic test case
error during an unclean termination

Change-Id: I20e156982ae8150a9e7a145f66283de4a5d8e0bd
2018-07-05 16:53:30 +02:00
Daniel Willmann cc7bbebff3 BTS_Tests: Call mtc.stop in f_shutdown() to fix sporadic test failures
mtc.stop cleanly shuts down a testcase. This avoids errors influencing
the result after the test completed (such as ports being shutdown with
messages arriving on them causing a dynamic test case error).

Change-Id: I0f6e10006f46db0d68796c7082497af90f74cd07
2018-07-05 16:50:05 +02: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
Pau Espin a4cecf5af7 Add README.md file for several suites
Content grabbed from [1] and converted to markdown as it's more probable
to have it displayed correctly on popular git repo hosting platforms.
Syntax for embedded graphviz taken from [2].

[1] http://git.gnumonks.org/laforge-slides/plain/2018/osmodevcon2018-ttcn3_test_suites/osmodevcon2018-ttcn3_test_suites.adoc
[2] https://github.com/stlehmann/markdown-graphviz

Change-Id: I9aad03e605569e9613665a7585d60bf308bcb54f
2018-06-14 18:55:36 +02:00
Alexander Couzens 02496257f6 *.default: change logging filemask from ERROR | WARNING to += PARALLEL | VERDICTOP
PARALLEL | VERDICTOP will log when the port is dying or when other
components will change to fail. This helped to find a timeout in the
SGSN tests where a function call message timed out.

Change-Id: I770ac964dc37e2752e7d35e493f707b091c739b0
2018-06-12 13:51:14 +02:00
Harald Welte 1b1be37288 bts: no need to import GSM_RR_Types twice
Change-Id: Ie3c45df74baebfefb36e09a27b820093f7b9218b
2018-06-11 15:22:59 +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
Pau Espin 752ffd565a bts: Set L1CTL rxlev_exp as module parameter
Change-Id: If63e5c2d6abe1dd6dddd1a12e703ed069b940ab4
2018-06-07 17:15:27 +00:00
Harald Welte 83f6dbfa34 BTS_Tests: Don't wait indefinitely for ASP_IPA_EVENT_UP
Change-Id: I5150660319896fe7f597ca333395923f128c8d87
2018-06-03 19:07:25 +02:00
Harald Welte 9220f6336e Print more self-explanatory error message on bind/connect failures
When sockets cannot be bound or connected, the existing TTCN-3 code prints
the following rather cryptic error messages:

"IPA-CTRL-IPA(47)@f70ff1fd5cfd: Dynamic test case error: Using the value of an optional field containing omit. (Transport endpoint is not connected)"

The "Transport endpoint is not connected" sort-of gives it away, but
let's make it more explicit by introducing explicit checks for the
res.connId and manual setverdict(fail) statements with proper error
message.

Change-Id: Id22a1b5189d81c4fca03d5e7aff60ffdd1ad56bf
2018-05-23 20:27:02 +02:00
Neels Hofmeyr 4fefb305ed expected results: pass BTS_Test.TC_rll_rel_req
Change-Id: Ic436e89c4333b49f39e1e9c387a5a9c79abdba15
2018-05-14 14:20:09 +02:00
Harald Welte 8e8cd67b81 update expected results
Change-Id: I65f72e9a8a9031a9715c7c2237824a45d7d8bef1
2018-05-10 23:11:54 +02:00
Harald Welte bc6199ff49 bts: Fix TC_rll_rel_req()
The test case was broken (c/r bit), the BTS operated correctly.

Change-Id: I07285aa715fa218c62b9fd2d81c88e73a4117f08
2018-05-10 19:38:18 +02:00
Harald Welte e613f96593 bts: ciphering tests
Change-Id: If450e36cfd8cde713f304e57ec09bc1239bdf7ea
2018-05-10 18:36:59 +02:00
Harald Welte 7aacbbf1e5 bts (RLL): DCCH/SAPI0 LAPDm without contention resolution is legal
The diffrence is whether we establish the LAPDm link
* after RACH + IMM.ASS (we must include L3 payload for contention
  resolution required)
* after assignment from one channel to another (we must not include L3
  payload, i.e. no contention resolution)

Change-Id: Ib67763856ffc5f5fd04a87f4192705777931c400
Related: OS#3252
2018-05-09 16:58:40 +02:00
Neels Hofmeyr df936a2192 bts: fix TC_dyn_osmo_pdch_double_act
Do not expect success on second activation.

Change-Id: I6b1ef158e1fdb32b392aa15bff71d0fe30ce6f1f
2018-05-09 12:50:17 +00:00
Neels Hofmeyr 9c50ca5488 bts: fix TC_dyn_osmo_pdch_unsol_deact
TC_dyn_osmo_pdch_unsol_deact sends a release request on an already released
lchan, which obviously would never trigger a change in the PCU configuration
and hence it makes no sense to expect a PCU info ind to be sent.

Instead of f_dyn_osmo_pdch_deact(), which expects a PCU info_ind, just send a
CHAN_REL and expect a trivial REL_ACK.

Drop some unused local vars.

Change-Id: I6b790e866ce4e66d9385b286b727ae41a83d3e67
2018-05-09 12:50:17 +00:00
Neels Hofmeyr 29402a1efd add bts/expected-results.xml
Change-Id: I677b65cbfd5762ff016b188a0f18ce1e5710f45d
2018-05-09 12:50:17 +00: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 d879bd9aa0 LAPDm: Re-structure: Merge Frame type A+B which are really the same
A is B with zero-length payload.  No need to separate them.

Change-Id: I7b3079899f42a61d67be03e3a17346af80d7b3be
2018-04-18 23:23:22 +02:00
Harald Welte 0803cde5e8 bts: Reduce threshold for BTS_Tests.TC_paging_tmsi_200percent
for some reason, the number of TMSI paging requests that arrive
on the jenkins build slave is quite a bit lower than those I see
on my laptop.  Let's adjust our expectations to make the test pass.

Change-Id: I548dedd1b3391d059a141a2eef71c32be4b97cc1
Closes: OS#3025
2018-04-15 21:36:54 +02:00
Harald Welte 5618c2a7e4 bts: Fix SI13 related scheduling tests
Closes: OS#3027
Change-Id: I9363763035007bd11877b867fe360c3614e4c7ce
2018-04-15 16:24:59 +02:00
Harald Welte 9bbbfb5466 bts: Add first tests about IPA style dynamic PDCH
Change-Id: I56d8b0284e8e4eee4ce6454f7a495ee09c40fe42
2018-04-05 17:25:25 +02:00
Harald Welte 3d04ae6c55 bts: Add first five dynamic PDCH tests
NOTE: This needs changes to your osmo-bsc.cfg, as it will now need
an osmocom-style dyn PDCH on TS4, and an IPA-style dny PDCH on TS3.

--- a/ttcn3-bts-test/osmo-bsc.cfg
+++ b/ttcn3-bts-test/osmo-bsc.cfg
@@ -154,10 +154,10 @@ network
     phys_chan_config TCH/F
     hopping enabled 0
    timeslot 3
-    phys_chan_config TCH/F
+    phys_chan_config TCH/F_PDCH
     hopping enabled 0
    timeslot 4
-    phys_chan_config TCH/F
+    phys_chan_config TCH/F_TCH/H_PDCH
     hopping enabled 0
    timeslot 5
     phys_chan_config TCH/H

Corresponding change in docker-playground.git has Change-Id
I229000ce7609845fdf24cafe1f5ec2bfa3f507e8

Change-Id: I2a42531dc5555ab4772d538fda462343605b8feb
2018-04-05 09:34:53 +02:00
Harald Welte f26de0b65a BTS_Tests: Prepare for ConnHdlr with PCU socket access
For upcoming dynamic PDCH activation/deactivation tests we would
like to access the PCU socket from ConnHdlr, rather than test_CT.

Let's prepare for that.

Change-Id: Ib8811dd87f737f326f7ed8f652aa6f552c3f05f8
2018-04-04 20:28:05 +02:00
Neels Hofmeyr 6a84b23f25 bts: enable CTRL interface tests
Start and stop the CTRL interface and provide CTRL bind interface config
modulepars.

Possibly everyones' local setups may need modification to allow the
ttcn3-bts-tests to reach osmo-bts-trx's CTRL port.

WARNING: This commit has to be merged "at the same time" as
I1ec86b157ebd46bf622a0ca51eba225f15c99fbb or the jenkins ttcn3-bts-tests will
fail.

a) if we want to set a modulepar mp_ctrl_ip here, it needs to be added to
osmo-ttcn3-hacks.

b) if we have the f_ipa_ctrl_start() in osmo-ttcn3-hacks, we need to configure
the proper IP and bind interface here, or all tests will fail because
f_ipa_ctrl_start() cannot connect.

Change-Id: I502b4891e6720ae2fb251c03542f707880a6f728
2018-04-03 19:30:55 +02:00
Harald Welte b1726c90dc bts: new f_rsl_transceive_ret(): like f_rsl_transceive() with return value
Change-Id: I0cdc6b87566b9d101ecb12a77eac18a50689e088
2018-04-02 18:19:05 +02:00
Harald Welte 557006605b bts: Add TC_sacch_multi_chg
Change-Id: I0b002488729f30cc8d0ff6f4ca16637c35ee956f
2018-03-17 18:21:48 +01:00
Harald Welte 075d84c895 bts: Add TC_sacch_multi to test for scheduling of multiple SI on SACCH
Change-Id: I2b9a68a0dc004c2ebc8a39f0c7b7aad690675a2d
2018-03-17 18:21:48 +01:00
Neels Hofmeyr cd11223c0f ignore results of .ttcnpp files
Add another macro ignore_pp_results to gen_links.sh.inc and call from all
gen_links.sh files, to add results of *.ttcnpp files, i.e. generated *.ttcn
files, to .gitignore.

Change-Id: Ic7fb176226771212d7700dafaf27ac71f12a4a61
2018-03-16 18:25:58 +01:00
Neels Hofmeyr 1a4c4601d7 fix gen_links.sh: don't include source dir as link target
First of all, use one common place to define the gen_links() macro, in
gen_links.sh.inc.

In this new file, add a 'shift' to exclude the $DIR arg from also appearing in
$FILES.

This prevents the following wrong symlinks in the source dirs:

  M3UA_CNL113537/src/src
  MTP3asp_CNL113337/src/src
  SCCP_CNL113341/src/src

Change-Id: Ia8493e77df1ba8723f2c5d2a49816247b0fb55f7
2018-03-16 00:08:02 +01:00
Harald Welte d378a256c7 bts: Verify the PCU protocol interface version
Change-Id: If2033720a38879cd2f4c4f8d3fe3fed1468da3cb
2018-03-13 17:03:46 +01:00
Harald Welte 99ca30ce2e remove *.default from [EXECUTE] in *.default files
The problem is that the .cfg file cannot override the [EXECUTE]
provided list of tests

Change-Id: I7e1e0499b3b32014b25ae4b515263f57a4ea6daf
2018-03-13 14:30:55 +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 21240e63f9 bts: Add f_rsl_transceive() flag to ignore all unrelated messages
f_rsl_transceive() is currently using a number of default altsteps,
but those are not applicable in all cases.  Let's make this
configurable, and use that flag during channel release.

Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad
2018-03-12 16:04:53 +01:00
Harald Welte 629cc6b77a bts: Add TC_deact_sacch()
This test case checks on each logical channel if the DEACT SACCH RSL
message actually deactivates downlink SACCH as expected.

Change-Id: Id8219ffce0635071cb50669b89368de51fe82843
2018-03-12 16:04:48 +01:00
Harald Welte 294b0a299c bts: Add f_shutdown() for clean shutdown; use it from tests
Change-Id: I225d2363c77dce969bda95ff27506bece586a34a
2018-03-12 16:04:45 +01:00
Harald Welte 3dc2046427 bts: Send DM_REL_REQ to L1 when closing logical channel
Change-Id: I0c0bb52b4de20dfd2d4ea8d0045ea63d84686ac5
2018-03-12 16:04:44 +01:00
Harald Welte 3c0a0f8a40 bts: f_rsl_transceive: Add altsteps for sacch/facch/meas_rep
It may be that during CHAN DEACT we still receive any of those messages,
which is not an error condition.  Let's activate the related altsteps.

Change-Id: Ic27b28ead3fc4bff82655d0e8d88fda01b71eca7
2018-03-12 16:04:42 +01:00
Harald Welte 5398d5e6f7 bts: Make f_TC_meas_res_periodic work with real BTS
In a real BTS + OsmocomBB-L1, we cannot control fake ToA/RSSI, but we
simply assume the signal is strong/good.

Change-Id: I55a79f9e23118d2bb28f27cbcc7ab28712570ef1
2018-03-12 16:04:41 +01:00
Harald Welte fa45e9ed8c bts: Ignore first MEAS REP as it often contains bogus values
The first measurement report typically has bad performance as
it contains measurements taken before the MS actually started
to transmit on it.  Let's make sure we only validate all but
the first MEAS REP

Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c
2018-03-12 16:04:39 +01:00
Harald Welte d5684396e5 bts: Introduce RxLev/RxQual tolerance values
In real-world measurements there's always some tolerance.  Use
templates for integer ranges of rxlev + rxqual and add some module
parameters to make them configurable.

Change-Id: I41396ad081706a0dbd6cc992b81d9bba266b6d6d
2018-03-12 16:04:38 +01:00
Harald Welte 84271629d7 bts: Make PCU and TRXC sockets optional
If we want to test with a real (remote) BTS, we can neither access
the PCU socket nor is there any fake_trx control socket for fake
toa/rssi

Change-Id: Ibb02cf289b0d2e77170f146463822c164efc21cd
2018-03-12 16:04:37 +01:00
Harald Welte 0fd1fb08ef bts: Align default SI contents with what we see from OsmoBSC
Change-Id: I8d0fa73e1a9b859e1833b0d2ce8cb6bbf07938cc
2018-03-12 16:04:36 +01:00
Harald Welte b9585f840c BTS_Tests: Access Control Classes are inverted
No normal phone would ever send us a RACH request due to all ACC
being barred in the SI of BTS_Tests

Change-Id: I149dca67971bde3072ec2081d9ad7e8f43434ebf
2018-03-12 16:04:34 +01:00
Harald Welte f8df4cb339 L1CTL/bts: Fix tons of compiler warnings by splitting rx+tx templates
Change-Id: I9c8be0856516a6a168795c792f76d14c08c3dabb
2018-03-12 16:04:22 +01:00
Harald Welte 0cae455d2c bts: Add test for SI1 scheduling
We so far only tested combinations without SI1 present, let's change
that.

Change-Id: I5a62901a9477a75dce12299a0b1359d7744f75f3
Related: OS#3051
2018-03-12 14:29:20 +00:00
Harald Welte 3778acc5d5 BTS_Tests: Fix SI L2 pseudo-length and rest octets
Now the cell is actually recognized by phones

Change-Id: I76b5b178b6884241cfa9b86550aac4865419ef76
2018-03-12 14:28:55 +00:00
Vadim Yanitskiy c81d6e4483 bts/BTS_Tests.ttcn: update TC_rach_max_ta test case
Since the I662294fe3136cf7a259be13816a3e63f7db9a948, OsmoBTS
should pass RACH requests with ToA > -2 symbol periods only.

We do allow early signal arrival up to 2 symbols, otherwise
it is most likely noise, interference or a ghost.

Change-Id: Icccc88545ed3aabd6da28a40599a8a77d1de477d
2018-03-05 22:42:45 +07:00
Harald Welte 544565ae36 bts: f_validate_si_scheduling(): Print correct TC value
We always claimed "No SI messages for TC=0" even in cases where
TC is actually a different value.

Change-Id: I53e357c21b3f1090e4e396e292fcd193581d5bb8
2018-03-02 10:35:05 +01:00
Harald Welte b3e3094884 f_rach_toffs: Print toffs256 value in verdict when failing
Change-Id: I82a8f7c8dd3ce3327aa43bfb9f03795531718320
2018-03-02 10:35:05 +01:00
Harald Welte d3a88a684c bts: ensure fake_trx BB CTRL IP is used from main component
.. not just from the ConnHdlr component, as in previous patch

Change-Id: I3db2884d2519dfd4ae08ff1a4dae5b488677da4c
2018-03-01 16:04:52 +01:00
Harald Welte a4d8f35c20 bts: Make IP address of fake_trx BB CTRL port configurable
Change-Id: Idbfe9e0327ed6acefd87afc8596485a488fc44d9
2018-03-01 15:47:58 +01:00
Harald Welte ef3e1c9a89 bts: Update towards most recent "laforge/trx" branch
The existing BTS testing code was based on a ~1 week old version
of trxcon+fake_trx from osmocom-bb.git fixeria/trx branch, which
has meanwhile evolved:

* port number change for TRX protocol
* FAKE_TIMING -> FAKE_TOA
* we can now expect responses to our UDP control commands

Let's adapt the testsuite to those changes

Change-Id: I6d0122202e5d23308421e76b75e608d206aab56e
2018-02-28 23:44:00 +01:00
Harald Welte 883340c719 bts: Add PCU Interface testcases
Change-Id: I671b8e2c61705485f46602f648eb5fdc01db12f7
2018-02-28 21:05:51 +00:00
Harald Welte 56c0580c5f bts: Fix bugs in RACH Tests (timer not started, wrong CS/PS function)
Change-Id: I619264654bfeafe4b76c8702ede5876a82c32f13
2018-02-28 21:05:51 +00:00
Harald Welte 685d598171 bts: Add test for high-resulotion timing offset / TOA256
this adds a new test that uses VTY to enable TOA256 support in
the uplink supplementary measurement and then tests TCH/H measurement
reports

Change-Id: Id39a71429596d46289a82e539796308816ad86f3
2018-02-27 22:32:54 +01:00
Harald Welte 8da4824ecb bts: Add TELNET/VTY module so we can interact with BTS VTY
Change-Id: Ia1d6ba2c3534d2daaa5ea1fe60b32a99fa4ddad9
2018-02-27 22:32:54 +01:00
Harald Welte 57fe8232db bts: Instruct trxcon for TA=2 at every testcase start
as fake_trx keeps running during the entire test suite run, and
the protocol being UDP based, it doesn't know when BTS_Test will
re-start and hence the old TA/FAKE_TIMING value will remain until
it is set.

Let's explicitly set a FAKE_TIMING of two bits at start-up of each
test case during f_init()

Change-Id: I9f07768346e0d68a4dbe36780e36b799d27a7f06
2018-02-27 22:32:54 +01:00
Harald Welte c3a3f45268 Add new f_timer_safe_restart() function for warning-safe restart
TITAN will print warnings if a still-running timer is res-started.
It will also warn if a not-started timer is stopped, so we need
a conditional stop + start if we want to avoid any warnings in a
convenient way.

Change-Id: Iee83b4905cce3a84eb007ffd189b55f4b54f7cb6
2018-02-27 22:32:54 +01:00
Harald Welte 54a2a2dcd2 bts: TC_rach_max_ta
Change-Id: Idd7335f753f8b1a7d91274dc2c99d51d882309d3
2018-02-27 22:32:54 +01:00
Harald Welte 8c24c2b7d2 bts: Add TC_rach_content and TC_rach_count
Change-Id: I87abd7172b52aaaaf59bb079de1df99a9edd7381
2018-02-27 22:32:54 +01:00
Harald Welte 6fc784e3c8 L1CTL: Add message segmentation helper via getMsgLen()
As L1CTL is using a stream socket, we need to give the UNIX_DOMAIN
port some clue as to where our L1CTL message boundaries are in the
stream.

This requires a patched UNIX_DOMAIN_SOCKETasp test port with the
following commit applied:

commit 655cb4ab2ac006b3a73d1b679c83081d9743410a
Author: Harald Welte <laforge@gnumonks.org>
Date:   Sun Feb 25 23:25:46 2018 +0100

    Add "getMsgLen" function similar to IPL4asp_PT

Change-Id: Iab33f57cb4311180e521a76307a552d16287b062
2018-02-27 22:32:49 +01:00
Harald Welte 48494ca245 WIP: bts: SI scheduling tests
This imports those tests from ../sysinfo/Tests.ttcn which deal with
the scheduling of SI, not with the actual payload/correctness of their
contents. (the latter tests must move to the BSC test suite, as the BTS
is only concerned with scheduling the opaque SI blocks as received from
the BSC).

Change-Id: I65f4b91e81174717a0c484ba5c22bede68683ae1
2018-02-25 17:25:04 +01:00
Harald Welte 93640c6e25 bts: Add some more comments for better code grouping
Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
2018-02-25 16:59:33 +01:00
Harald Welte f10153fc36 bts: Set not only SI3 but also SI2+SI4 during initialization
Change-Id: I9146792285cdb7225150320d1949aaec28290abf
2018-02-25 16:34:05 +01:00
Harald Welte 82ccef7c18 Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation
Let's have one SI3 definition rather than multiple...

Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
2018-02-25 16:17:33 +01:00
Harald Welte 3ae11dade5 bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on lchan)
Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
2018-02-25 13:36:06 +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 2d14259658 bts: Sleep for some time after RSL is up before using it
This is a work-around for an OsmoBSC bug, see OS#3000

Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Related: OS#3000
2018-02-25 13:19:44 +01:00
Harald Welte a3f1df9cd7 bts: TC_ipa_crcx_twice_not_active + TC_ipa_crcx_mdcx_dlcx_not_active
Change-Id: Ie643203c4fa4ba0baf5c640d9fd8eaf9fd85cd5b
2018-02-25 13:01:19 +01:00
Harald Welte 1eba37487b bts: Introduce f_rsl_transceive() and reduce code duplication
Change-Id: I56de61e08bd1508a0531f720561ead84d1075de3
2018-02-25 13:01:17 +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 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 7484fc41b4 bts: Type Definition + Template for SI3; Send SI3 at start of test
The BTS needs some of the SI3 parameters like BS_AG_BLKS_RES for
internal computations, so make sure we send it after the connection
has been established.

Change-Id: I5dc3724f79e669f52593cd776806d84b4dd4bf5c
2018-02-25 12:57:21 +01:00
Harald Welte 7076738db4 Add initial OsmoBTS test suite
This Test suite implements the BSC-side of Abis RSL and is used to
test OsmoBTS.  It contains provisions for using L1CTL against
(virt_phy + osmo-bts-virtual) or (trxcon + fake_trx + osmo-bts-trx)
to also simulate the MS/Um side, bu those provisions are not used
yet.

Implemented tests currently are only related to RSL dedicated channel
activation / deactivation.

We still terminate OML inside OsmoBSC, and let the test suite deal
exclusively with RSL to keep complexity low.

Change-Id: I8ced0d29777aad3ec842d54eabea87dfcc943c79
2018-02-24 01:20:38 +01:00