Commit Graph

267 Commits

Author SHA1 Message Date
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
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
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
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
Harald Welte d378a256c7 bts: Verify the PCU protocol interface version
Change-Id: If2033720a38879cd2f4c4f8d3fe3fed1468da3cb
2018-03-13 17:03:46 +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 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