Commit Graph

398 Commits

Author SHA1 Message Date
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