Commit Graph

398 Commits

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