Commit Graph

410 Commits

Author SHA1 Message Date
Vadim Yanitskiy 93ad8143f1 BTS_Tests: tune waiting timeout in TC_rsl_ms_pwr_dyn_up
Since recenly, osmo-bts is using P_CON_INTERVAL=2 by default.  This
means that the MS power loop gets triggered every 4th SACCH block
(1.92s), so we need more time to reach the maximim Tx power.

Change-Id: I9266f7284fcdb0afa3473f575640689e334e89a8
Related: osmo-bts.git I91c505447f68714239a4f033d4f06e91893df201
Related: OS#5517
2022-04-11 12:04:21 +00:00
Vadim Yanitskiy a144e3c786 BTS_Tests: add altstep as_dl_sacch_lapdm_ab
Change-Id: I3ba17683892e8aa1694bb6dd32d8b37660020026
2022-04-05 13:52:53 +00:00
Vadim Yanitskiy d12db41526 BTS_Tests: fix some compilation warnings (template restrictions)
Change-Id: I53286a7b4b78a3e816d94d880ae290771cdd7ee8
2022-03-14 11:30:36 +00:00
Vadim Yanitskiy 1ab332ff86 BTS_Tests: add new test case TC_ho_physical_info
The test case scenario can be summarized as follows:

1. Activate a logical channel for async handover.
1.a. Tune the MS side to that channel.
1.b. Make sure that no Downlink DCCH is received.
2. Send a handover Access Burst to the BTS.
2.a. Expect RR Physical Information to be received Ny1 times.
2.b. Expect no other data to be received on Downlink DCCH.

Currently the new test case fails for several reasons:

* osmo-bts-trx starts transmitting on DCCH before the handover
  Access Burst is received, this is wong;
* trxcon immediately starts sending dummy frames on Uplink
  DCCH, causing osmo-bts to stop sendig RR Physical Info.

Change-Id: I9469027ce88fb2750f1eceef2d8a56d4b8ee4d03
Related: SYS#5838
2022-03-14 10:52:36 +00:00
Vadim Yanitskiy f8a9df558f BTS_Tests: add a hierarchy of L1CTL/LAPDm/DCCH altsteps
In TTCN-3 it's possible to call one altstep from another.  This
allows us to build complex hierarchies of simple altsteps, where
one is built on top of the others.  I call this altstep-oriented
programming.  This change adds the following hierarchy:

* as_l1ctl_dl_msg() - triggers on receipt of a L1CTL DATA.ind
  matching the given RSL chan_nr/link_id and data templates;

* as_dl_lapdm_dummy() - triggers on receipt of dummy LAPDm
  func=UI frames with empty payload (repeats by default);

* as_dl_dcch_lapdm_ab() - triggers on receipt of a Downlink DCCH
  containing a L2 payload that matches the given LAPDm frame;

* as_dl_dcch_pdu() - triggers on receipt of a LAPDm AB frame
  with a L3 payload matching the given template.

All of these altsteps (except as_dl_lapdm_dummy()) expect an 'out'
parameter, which will hold the matched (and possibly decoded) data.

Example:

  var PDU_ML3_NW_MS pdu;
  alt {
  [] as_dl_lapdm_dummy(); /* Ignore empty LAPDm func=UI frames */
  [] as_dl_dcch_pdu(pdu, tr_CM_SERV_ACC) { setverdict(pass); }
  [] as_dl_dcch_pdu(pdu, tr_CM_SERV_REJ) { setverdict(fail); }
  [] as_dl_dcch_pdu(pdu, ?) { setverdict(inconc, "Unexpected PDU"); }
  }

Change-Id: Ia4d502488cbb6bccc4d2656206ae6649bfa71007
Related: SYS#5838
2022-03-14 10:52:36 +00:00
Vadim Yanitskiy 5e05ea1310 bts/expected-results.xml: expect TC_sacch_chan_act_ho_async to pass
Change-Id: I9ceb0a71549d293ff0f270c414f667a0bae4df62
2022-03-14 10:40:16 +00:00
Vadim Yanitskiy ce96d3547f BTS_Tests: exec TC_sacch_chan_act_ho_{sync,async} on g_AllChanTypes[]
Currently we execute both test cases on *all* available dedicated
channels from g_AllChannels[].  Given that SACCH is slow, and in
some cases we intentionally wait for a timeout of 3.0 seconds to
expire, the overall execution time is quite long.  We have a risk
of the test execution being aborted due to the guard timeout.

I agree that using g_AllChannels[] makes sense for TC_ho_rach, which
tests handover RACH detection.  There we want to be sure that detection
works on all slots of all DCCH types (especially when running a setup
with real MS/BTS hardware).

But for both TC_sacch_chan_act_ho_{sync,async} it's enough to run
on different channel types (see g_AllChanTypes[]), because what
we actually want to test is the Downlink SACCH operation.

Change-Id: Ic1937edd72ff842cb619e153d0f6a624ceb95281
Related: SYS#5838, OS#4008, OS#4009
2022-03-14 10:40:16 +00:00
Vadim Yanitskiy f9136a1ec3 BTS_Tests: fix expectations in TC_sacch_chan_act_ho_{sync,async}
According to 3GPP TS 48.058:

* 4.1.3 async handover: "If the MS Power IE is present the BTS
  *may* start transmission also on the SACCH".
* 4.1.4 sync handover: "If only the MS Power IE is present the BTS
  *may* start transmission also on the SACCH".

"May" does not mean "shall", so osmo-bts does not.

Change-Id: I5e97944e56b7860f2d912cd8d3c978a0f1e08645
Related: SYS#5838, OS#4008, OS#4009
2022-03-14 10:40:16 +00:00
Vadim Yanitskiy dc79b328d7 BTS_Tests: remove completed TODO points
* TC_ho_rach - handover RACH detection,
* TC_rsl_rf_resource_ind - RF RESource INDication.

Change-Id: I12b6331b445650437cc66130765369bbcd01ba5f
2022-03-13 14:05:34 +00:00
Vadim Yanitskiy 16e2991bf1 library/LAPDm_Types: add 'padding' field to the LapdmFrameAB record
TTCN-3 offers a very convinient way of matching an octetstring
against a record template (decoding target) on the fly, so that
there is no need to attempt decoding it manually beforehand.
This can be done by using the 'decmatch' keyword (see B.1.2.9).

Unfortunately, decmatch fails if an octetstring is longer than
the encoded variant of the decoding target (e.g. has padding).
Let's work this around by adding a 'padding' field, so during
decoding all remaining octets will be stored in it.

Change-Id: I0151adf7790127617f7cb57c9a9ec6c28721e95a
Related: SYS#5838
2022-03-13 14:04:18 +00:00
Vadim Yanitskiy 77a65f8eb1 BTS_Tests: cosmetic: use setverdict() in f_sacch_{present,missing}()
This eliminates the need for using log2str() and improves readability.

Change-Id: Iaf9b03fb81ec4fa2ca4f0a0b2f0b50491c6a9d80
Related: SYS#5838, OS#4008, OS#4009
2022-03-11 15:00:19 +03:00
Vadim Yanitskiy 5a67f17232 BTS_Tests: remove misleading comments in f_sacch_{present,missing}()
Change-Id: Ib6264da51d17d8d5d932109afad79d6a9916911b
Related: SYS#5838, OS#4008, OS#4009
2022-03-11 14:59:52 +03:00
Vadim Yanitskiy 64eb8ad759 bts/osmo-{bsc,bts}.cfg: tune logging configuration
Change-Id: I0360fa1db2137bf8e68ba87403742e0e8c9c1147
2021-12-14 12:59:04 +00:00
Vadim Yanitskiy e91bbfc3aa bts/osmo-bts.cfg: use default {fn,rts}-advance values
It's better if we run ttcn3-bts-test with the default values, given
that they were significantly reduced some time ago.

Change-Id: Id97e848e5dfd0b6c504d06f62642511cfd5a0f66
Related: I7da3d0948f38e12342fb714b29f8edc5e9d0933d (osmo-bts)
Related: OS#4487
2021-12-14 00:30:51 +00:00
Vadim Yanitskiy a4b7857b77 bts/osmo-bsc.cfg: fix deprecated BTS type 'sysmobts'
Change-Id: If2f81141707e6f2360fc57bbd5f76606294f8db8
2021-12-14 00:30:33 +00:00
Vadim Yanitskiy 3b868cb1aa BTS_Tests: make TC_pcu_interf_ind more stable
The first interference report may contain unreliable values, so we
ignore it and start the actual matching only after receiving it.

Change-Id: I44b0db6675ecf740fba7ad2a6882f86da018febf
Related: SYS#5313
2021-11-10 12:57:22 +00:00
Vadim Yanitskiy d9b60e60b9 BTS_Tests: explicitly configure Intave in TC_pcu_interf_ind
Starting from [1] osmo-bts does average the interference levels as
defined by the Intave parameter before reporting over the PCUIF.

In TC_pcu_interf_ind we expect to receive an interference report
every 480ms (one SACCH period), so let's the Intave to 1.

[1] osmo-bts.git I3fbaad5dbc3bbd305b3ad4cb4bfb431a42cfbffc

Change-Id: I070b195af8c62454edd8de961cce6be2c120ae48
Related: SYS#5313
2021-11-10 12:57:22 +00:00
Vadim Yanitskiy f9e31d281b BTS_Tests: add test cases for Temporary ACCH Overpower
Change-Id: Ibdb94aa2779ae4b08f08cfef78c2959ae451a784
Related: SYS#5319
2021-11-10 03:35:19 +03:00
Vadim Yanitskiy da5964da5a BTS_Tests: execute test cases for BS power control on TRX1
Otherwise they fail, because BS power control is normally not
permitted on the BCCH carrier (unless it's in power saving mode).

Change-Id: Ied3e38986690850f0323d4db072cf59b6975587e
Related: SYS#4918
2021-11-02 10:54:01 +00:00
Vadim Yanitskiy f54db11cbc BTS_Tests: make TRX number configurable for ConnHdlr
This change allows running test cases against additional transceivers.

Change-Id: Ifed3891658501e0a04ff89563d0a02f08211eed3
Related: SYS#4918
2021-10-31 21:47:14 +03:00
Vadim Yanitskiy d0eb659fd2 BTS_Tests: separate RACH / IMM ASS from f_est_dchan()
Given that the test suite acts as the BSC, it's known in advance
which exact logical channel is going to be activated.  Therefore,
it's not necessary to send an Immediate Assignment with the known
Channel Description IE over the Um interface (via L1CTL).

On the other hand, we may still want to validate the process of
dedicated channel establishment, involving the use of Immediate
Assignment procedure.  So instead of doing this every time when
a ConnHdlr component needs to activate a logical channel, let's
split the existing logic into a separate test case - TC_est_dchan.

This change facilitates the goal of running test cases against
additional transceivers (not only against C0).  Currently this
is not possible, because a ConnHdlr component has no access to
C0/AGCH when executed on Cx > 0.

Change-Id: I8df3db36f35190241735629a961f09d73bd0e5f5
2021-10-31 16:33:59 +00:00
Vadim Yanitskiy 8f6eae0813 BTS_Tests: add TC_meas_res_speech_{tchf,tchh}_sapi3()
The idea behind these test cases is to make sure that osmo-bts
does send RSL MEASurement RESult messages regardless of what
was received on SACCH: RR Measurement Report or SAPI=3 data.

Change-Id: I7d17d6e5f413f2de78db944f23ad731b81ad24cf
2021-10-30 02:27:10 +00:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Pau Espin 93a7b8b758 bts: TC_meas_res_sign_*: Properly configure supp-meas-info
Since recently, osmo-bts may not be restarting after each test. Which
means the supp-meas-info is not reset when test starts. Hence, some of
these tests started failing because a previous test set a value
different than the default one.

Change-Id: Iaa16b33781a8f490fc1cdbafda407755371dbe7f
2021-10-12 08:08:44 +00:00
Vadim Yanitskiy 46f199271e BTS_Tests: execute TC_dyn_osmo_pdch_{tchh,sdcch8}_race_act last
These test cases can potentially break the IUT or cause weird/unexpected
behavior.  Ensure that they are executed last, not affecting the others.

Change-Id: I167a9e6eb2e3fe1d9c73994c428d8419074d96c3
Fixes: I3b602ac9dbe0ab3e80eb30de573c9b48a79872d8
Related: OS#5245
2021-10-06 02:38:41 +06:00
Vadim Yanitskiy 64043d8bae BTS: reproduce a race condition described in OS#5245
Change-Id: I3b602ac9dbe0ab3e80eb30de573c9b48a79872d8
Depends: Idb1ef445bc14a6312f08a83ecacc3a938b0e1d70
Related: OS#5245
2021-10-04 12:37:23 +00:00
Vadim Yanitskiy 418066a05c f_TRXC_transceive(): accept 'template (value)' parameter
Change-Id: I98012607f3e9da71234333aac77d59936cd3ee20
Related: OS#5245
2021-10-04 12:37:23 +00:00
Pau Espin f28fd080fc pcu: Support Neighbor Address Resolution over PCUIF
New versions of osmo-pcu support Neighbor Address Resolution over this
interface, and deprecated the old CTRL interface.
Let's use it by default while still keeping support for the old one for
a while to avoid breakage of existing deployments.

Tests run to validate:
* Old osmo-pcu still passes tests using CTRL interface
* New osmo-pcu (with new iface support) still passes tests using CTRL
  interface
* New osmo-pcu (with new iface support) passes tests using new iface

Related: SYS#4971
Change-Id: I05f1aabc64fc5bc4740b0d8afd8990b485eacd50
2021-09-14 09:11:14 +00:00
Neels Hofmeyr af9d6ae0ea bts: add TC_early_immediate_assignment_pre_chan_ack
Related: SYS#5559
Related: Ie52765b238b01f22fb327fe12327fbf10abcad4c (osmo-bts)
Change-Id: Ifb2c62431a91dafa6116b5d6b9410930f00a6e18
2021-08-23 19:15:12 +00:00
Vadim Yanitskiy 18684881bd BTS: add test cases for Downlink and Uplink speech frames
Change-Id: I8d301dfa47c11d9314cdfca8adadcbcb4eee798d
2021-07-16 16:05:52 +00:00
Vadim Yanitskiy dd228c4324 BTS: equip ConnHdlr with the RTP emulation component
Change-Id: Icb04cb73d8d55eb75edc2af2f18bb99d2c3f24a5
2021-07-16 16:05:52 +00:00
Vadim Yanitskiy fc63164bac library/RSL_Types: use OCT4 for local/remote address fields
This way functions like f_inet_addr() and f_inet6_addr() can be
used directly without converting between bytes and integers.

Change-Id: I389a8cb95c025c9dddc751789223621c15d9b48f
2021-07-05 12:09:07 +00:00
Pau Espin 8e57ac1a3c bts: Introduce test TC_dyn_osmo_pdch_sdcch8_act
Change-Id: I16d5f32697d2b5df97419d39a3948777bedfc1b5
2021-07-02 11:48:50 +00:00
Vadim Yanitskiy 6860e864d8 BTS_Tests.ttcn: fix indention and readability of some comments
Change-Id: I95c63c2d2498fec1915a2333d31d05f433560830
2021-06-30 08:01:09 +00:00
Vadim Yanitskiy 79e15161c2 BTS_Tests_SMSCB: ensure f_shutdown() is called in all test cases
This fixes sporadic test case failures due to race conditions.

Change-Id: I3f2c327e1e44d5decd4a936f063af649687f950a
2021-06-30 08:01:09 +00:00
Philipp Maier ca058278c9 BTS_Tests: add testcase TC_paging_imsi_200percent_with_ps
The current paging load tests only test what happens when the paging
load is introduced from the PS side. However there are no tests that
tests what happens when PS pagings are introduced from the PCU side
into an already overloaded system.

osmo-bts was equipped recently with a mechanism that detects congestive
situations. Once a congestion is detcted osmo-bts will drop pagings from
the BTS side. The rationale of the new testcase is that the behavior
must not change when the PS pagings start since osmo-bts is dropping
them.

Change-Id: Ie72e788d9ebff6ca4e50314746127a9689948062
Depends: osmo-bts I30f97672d7a0c369c4a656e878ab8cbbd83e31ea
Related: SYS#5306
2021-06-28 08:47:04 +00:00
Pau Espin 65d712e973 bts: Test forwarding PCUIF<->IPA/OSMO/PCU
Change-Id: I78880098a55d1cb456011746efa0a47832a86ca8
2021-06-28 10:43:21 +02:00
Pau Espin 6c864ec07a bts: Rename function issuing OML SetAttributes
GetAttributes support will be introduced next, and current naming is
misleading.

Change-Id: Id84eda70e97364b7ec6a8d351f0b54f07faba670
2021-06-25 13:52:30 +02:00
Pau Espin 6924ef7199 bts: Support passing PCUIF messages over IPA multiplex
Related: SYS#5303
Change-Id: I3cd0988cb654f1c5816d1c4717255a5e802d7925
2021-06-25 13:28:20 +02:00
Vadim Yanitskiy 83852c171b BTS: add a testcase for PDCH interference reports
Change-Id: I39e70524ad3d2ee51b537c8f786b7754a02949b1
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Vadim Yanitskiy 98c4a1a3b9 BTS: add a test case for RF RESource INDication
Change-Id: I78b6d8beffa5228a28231b75728e7aebdd3cb23c
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Vadim Yanitskiy beda697221 [VAMOS] BTS: call f_shutdown() in f_TC_vamos_exec_async()
Sometimes, VAMOS related test cases fail due to a DTE:

  Dynamic test case error: Sending data on the connection of port
                           CCHAN_PT to 1:RSL_CCHAN failed. (Broken pipe)

Call f_shutdown() to ensure that all components are properly
terminated, so there will be no race conditions like this.

Change-Id: I690412a29b24571109415d32b09543de459076d1
Related: SYS#4895
2021-06-21 20:18:05 +00:00
Vadim Yanitskiy 6b4404a717 BTS: release the channel in TC_ms_pwr_ctrl_{constant,pf_ewma}
Since recently, we do have NOPE indications in the virtual Um
environment.  Somehow this broke test cases for the MS power
control.  Releasing the channel makes everything work again.

Change-Id: I6a204bbecfe116aa302eae28ff24d6bb899fa8b7
Related: SYS#5313, OS#1569, OS#1866
2021-06-18 16:00:55 +00:00
Vadim Yanitskiy 2372db6aee BTS: ignore other RSL messages in function f_TC_paging()
Recent changes [1] to osmo-bts make it periodically send the
RF RESource INDication messages for each transceiver over the
A-bis/RSL.  These messages block the queue of 'RSL_CCHAN' port
and make the paging related test cases fail.  Ignore them.

Change-Id: I18b879235c6eefb2dd89a3f4502b0830efeac6bb
Related: [1] Id80fdbef087de625149755165c025c0a9563dc85
Related: SYS#5313, OS#1569
2021-06-09 01:11:28 +02:00
Vadim Yanitskiy 0d4e3cb070 BTS_Tests.cfg: also execute LAPDm related test cases
Change-Id: If632fdd740634e4e115e4aea56940033b18f5736
2021-06-04 20:05:32 +00:00
Vadim Yanitskiy 4c58c6a377 [VAMOS] BTS: add MODE MODIFY test cases
Change-Id: If4202287902442629bab716e41d3e6b2d05d09fb
Related: SYS#4895, OS#4941
2021-06-01 04:24:39 +02:00
Vadim Yanitskiy 7387813db0 [VAMOS] BTS: add CHANnel ACTIVation test cases
Change-Id: I79817b3504b0d956e9fa52b8640d3a4d0fd2c4ba
Related: SYS#4895, OS#4941
2021-06-01 04:22:11 +02:00
Vadim Yanitskiy 918e2b2834 HACK: allow running parallel BTS_Tests.ConnHdlr components
Unfortunately, trxcon does not support handling more than one
connection in parallel.  If there is already one connection
established, it would reject all other connection attempts.

This causes an error in f_handler_init().  As a quick hack,
let's allow running BTS_Tests.ConnHdlr components without
establishing L1CTL connections at all.

Change-Id: I72bcaed6c3803a0e18c9b787036a441e30c220cc
Related: SYS#4895, OS#4941
2021-06-01 04:16:52 +02:00
Vadim Yanitskiy 1b9a7f663a BTS_Tests: accept templates as parameters in t_EITC()
Change-Id: I56cd32a6ba91c078608d64c95538b9a43e2fada9
Related: SYS#4895, OS#4941
2021-06-01 04:16:49 +02:00