Commit Graph

455 Commits

Author SHA1 Message Date
Neels Hofmeyr 9041c3b8b2 bsc-VAMOS: add cfg files to run BSC_Tests_VAMOS locally
A local tccn3 test run for VAMOS looks like:

  while sleep 1; do osmo-bts-omldummy -f vamos 127.0.0.1 1234; done

  osmo-stp

  osmo-bsc -c osmo-bsc-vamos.cfg

  make compile
  make -j 5
  ../start-testsuite.sh BSC_Tests BSC_Tests_VAMOS.cfg
  ../log_merge.sh BSC_Tests --rm

Change-Id: Iabda4c864b02e6ddbf03386c75d67a37f92992f4
2021-06-05 20:24:35 +00:00
Neels Hofmeyr 1470fc668a allow ASP_RSL_UD on MSC_ConnHdlr RSL
In BSC_Tests_VAMOS.ttcn, in f_est_and_reassign_to_secondary_lchan()
there is a missing channel release ack. By allowing ASP_RSL_UD, this rel
ack can be sent trivially.

Change-Id: Icd04184ed87c359349d86c5e0893c2ce9de2f7f1
2021-06-05 20:24:35 +00:00
Neels Hofmeyr 9f3e6ac649 add bsc/BSC_Tests_VAMOS.ttcn
BSC_Tests_VAMOS.ttcn is separate from BSC_Tests.ttcn in order to
instruct osmo-bts-omldummy to pass BTS_FEAT_VAMOS == true in the OML BTS
attributes.

Add tests:
TC_chan_act_to_vamos()
TC_mode_modify_to_vamos_fr()
TC_mode_modify_to_vamos_hr()
TC_assign_to_secondary_lchan_fr()
TC_assign_to_secondary_lchan_hr()
TC_vamos_multiplex_tch_f_tch_f()
TC_vamos_multiplex_tch_h_tch_h_tch_h_tch_h()

Change-Id: I2c504099163a30ea102cbd26d3615ca2e5ce1e64
2021-06-05 20:24:35 +00:00
Neels Hofmeyr 8746b0d9fe bsc: adjust to changed 'vamos modify' vty command syntax
Related: SYS#5315 OS#4940 Ibf53f4797d7491b17a33946fd7d920f038362b4c
Change-Id: I94988ee64edbecbe19c41d8cac5b055360f76547
2021-06-05 20:24:35 +00:00
Neels Hofmeyr b5b7a6ea27 bsc: test TSC in various messages
In a recent osmo-bsc patch:

"allow explixit TSC Set and TSC on chan activ / modif / assignment"
c33eb8d56943b8981523754b081967e6ff5f245d
Ic665125255d7354f5499d10dda1dd866ab243d24

I accidentally changed the default behavior of the Training Sequence
Code sent to BTS and MS. So now, make sure that we verify the expected
Training Sequence Code in BSC_Tests, in:

RSL Channel Activate
RR Immediate Assignment
RR Assignment Command
RR Channel Mode Modify
RSL Mode Modify

Related: OS#5172 SYS#5315
Change-Id: Id67a949e0f61ec8123976eb8d336f04510c55c01
2021-06-05 22:14:46 +02:00
Neels Hofmeyr c9d321eb9c bsc: fix osmo-stp.cfg: missing smlc routing
Without the SMLC routing in place, virtually all BSC_Tests fail with:

VirtSMLC-BSSAP_LE(8)@x42: setverdict(fail): none -> fail reason: "BSSMAP-LE: Timeout waiting for RESET-ACK after sending RESET"

Copy the SMLC part of osmo-stp.cfg from
docker-playground/ttcn3-bsc-test/osmo-stp.cfg and localhost-ize it.

Change-Id: I274515e7e9205c895cd250abed7361aef5a33f56
2021-06-05 22:11:29 +02:00
Neels Hofmeyr d601f9c0d6 MSC_ConnectionHandler: fix race in f_create_chan_and_exp()
During f_create_chan_and_exp() (part of f_establish_fully()), announce
the BSSAP L3 expectation before activating the lchan.

In RSL_Emulation f_chan_est(), we go through Chan Request, Channel Act
and Immediate Assignment followed by EST IND. Right after that, osmo-bsc
sends a Complete Layer 3 on BSSAP. But in f_create_chan_and_exp(), we
only create the expectation of the BSSAP right after the call to
f_chan_est(), i.e. only after sending the EST IND. So far it was always
juuust in time to work, but when I added a little check to the end of
f_chan_est(), or alternatively an f_sleep(0.2), then BSC tests always
fail with:

Test case TC_reassignment_fr finished. Verdict: fail reason: Couldn't find Expect for incoming connection { [...] pdu := { bssmap := { completeLayer3Information... }

With the BSSAP expectation done first, this error is avoided.

Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c
2021-06-05 22:11:20 +02:00
Neels Hofmeyr 9c3b82f5dc GSM_Types, bsc: add VAMOS cbits
Change-Id: I2d98495b8c4c9a8466f2154af9bb29124c2cb0b5
2021-05-29 21:50:11 +02:00
Neels Hofmeyr 48483ce335 bsc: fixup for f_TC_refuse_mode_modif_to_vamos
The VTY command changed in the course of development, forgot to update
the test case.

Change-Id: I761b186c19b1307cc15d0bcf6f632b4bb967e254
2021-05-27 02:01:54 +00:00
Neels Hofmeyr d2d9f3350f bsc: add TC_reassignment_fr()
osmo-bsc does now support intra-cell re-Assignment of lchans with active
voice. Test re-Assignment of TCH/F, triggered by VTY command.

Change-Id: I05fecefb9d6f9f23a0362f133170bca4da92e308
2021-05-25 22:42:44 +02:00
Neels Hofmeyr 87857ecf37 bsc: refuse VAMOS mode without BTS_FEAT_VAMOS
Change-Id: I73b8eb5e6073ae46b83bed9fddd4762861029a84
2021-05-25 22:42:01 +02:00
Neels Hofmeyr 9d68630a74 bsc: f_establish_fully: verify lchan ESTABLISHED state
Change-Id: I341e2fa1e8946e7516705fa079e6e54fce9e58b0
2021-05-25 22:27:08 +02:00
Neels Hofmeyr 559d5d0f86 bsc: add TC_assignment_codec_fr_by_mode_modify
Test the lchan mode modification code path of OsmoBSC, in preparation of
adding VAMOS bits to the mode modification procedure.

Related: SYS#4895
Change-Id: Idf4efaed986de0bbd2b663313e837352cc139f0f
2021-04-28 22:35:27 +00:00
Neels Hofmeyr c2425cc580 f_channel_needs_modify(): ask actual TCH lchan mode via VTY
I am introducing a BSC test case that runs through a assigning a TCH
channel for signalling, and then using Channel Mode Modify to change its
mode from signalling to speech. For this to work,
f_channel_needs_modify() needs to actually look up the channel mode of
the TCH and not assume that a TCH is always in speech mode.

Related: SYS#4895
Change-Id: If30e2cec65da91cb5899ee29e2afb6696437a4c9
2021-04-28 22:35:27 +00:00
Harald Welte 79ed4b1685 remove deprecated 'logging level all everything' from configs
it has been deprecated in libosmocore.git 2.5 years ago:

commit 7e0686c6b4b456ec4e6e15689694b1bcf96c301f
Author: Neels Hofmeyr <neels@hofmeyr.de>
Date:   Mon Sep 10 20:58:52 2018 +0200

Change-Id: Ieb9e958278e7bb9d5e798f83b70dcb873a25d06d
2021-04-21 16:40:49 +00:00
Pau Espin 35801c3edc bsc: Introduce test TC_srvcc_eutran_to_geran_ho_out
Related: SYS#5337
Change-Id: Id34924bbf0a5cf08b4b6f5ea56a10cef6b69c877
2021-04-20 16:19:25 +00:00
Pau Espin d004631c82 bsc: Fix tests TC_si2quater_*_earfcns
Update TC_si2quater_*_earfcns test to trigger Tx of SI2quater eutran
neigh list properly, by sending a CommonID with "Last Used E-UTRAN PLMN
ID" IE. This should have been updated in a recent commit (see
below).

Fixes: 841b90daf2
Related: SYS#5337
Change-Id: I3073152475a338b29214393a9b550891d52e1f24
2021-04-20 16:19:25 +00:00
Pau Espin c08d552544 bsc: Introduce TC_srvcc_eutran_to_geran
Related: SYS#5337
Change-Id: If26cc9241b1b0eb4112f1227427008ece242bb41
2021-04-19 11:38:18 +02:00
Pau Espin 841b90daf2 bsc: Update and add tests checking Last Used EUTRAN PLMN Id
CSFB indicator shouldn't be used as stated in the specs. Rather, BSC
should act based on "Last Used E-UTRAN PLMN Id" found in messages such
as Common Id, or Handover Request/Required.

Related: SYS#5337
Related: osmo-bsc.git Change-Id I5d290ac55eca5adde1c33396422f4c10b83c03d5
Change-Id: I7b2e5a3ad24c10e279a7f1c447804100168203ba
2021-04-19 11:38:18 +02:00
Pau Espin 36bd4fa06a Remove CSFB references from RR Chan Release CellSelectionIndicator IE
The IE contains a cell list for the MS to register after the channel
is released. The IE is used in CSFB, but not only in that case: it's
also used in SRVCC.
Hence let's remove the CSFB references since the scope is more wide.

Related: SYS#5337
Change-Id: Ia1eeda98fc21aa92bb2e41b5e4761c5cf6516a7e
2021-04-19 08:49:36 +00:00
Vadim Yanitskiy 4ffa56380e {bsc,bts}/osmo-bsc.cfg: remove deprecated parameters
Change-Id: I39fe349a9c1011c8ba3160d4f5f3744d30e9fe24
2021-03-19 07:19:19 +00:00
Pau Espin 9d788c9028 bsc: Get rid of module param mp_media_mgw_offer_ipv6
This param is not needed anymore sincenew releases used in -latest don't
need to disable it.
Let's keep the possibility to change behavior from within test and leave
v6 enabled by default as it used to be.

Related: OS#5042
Change-Id: Ic693885dd3d4259dc6ce80643d25c7d432148d3d
2021-02-26 12:55:21 +01:00
Pau Espin 4858184bd4 StatsD_Checker: Enable by default
It was previously disabled by default in order to avoid test breakage
with older versions of osmocom projects not supporting them. Since we
just did a new release, all -latest contian now master which should work
fine.

Don't remove the moduleparam yet in order to avoid breakage with some
cfg files in docker-playground.git still setting it to true.

Related: OS#5042
Change-Id: I4e2049c109986906d3c985ca2282174b1abff581
2021-02-26 12:42:35 +01:00
Pau Espin Pedrol 28652d8724 Implement SystemInformation13 Rest Octets types
Related: SYS#5358
Change-Id: Id8845ebe28a9a6ed79d2d408dc7c1ad8a275b809
2021-02-17 17:08:28 +01:00
Harald Welte bf3976185a Add f_gen_tmsi() to generate a TMSI similar to f_gen_{imsi,imei}()
... and start to use it from BSC_Tests.ttcn

Related: OS#4472, SYS#5002
Change-Id: Iacba62bb740374c28cbcf50d54ba1814c5b4e1c2
2021-01-16 22:50:21 +01:00
Alexander Couzens 7d8c0e3b35 update expected-results.xml
Change-Id: Ib4399aa488afd917e3eda5e79d56ea3797ef7c78
2021-01-14 21:40:30 +01:00
Pau Espin 9a5b8ffc5b CTRL: Introduce support to run osmocom CTRL server
Change-Id: I37db9962f51baf2c63bd58ec47ec89f773d7a255
2021-01-07 15:06:39 +01:00
Vadim Yanitskiy 79ebd5e4d3 BSC_Tests: fix f_recv_next_si1(): skip unmatched RSL messages
Since Idb453fc894584ccf4f5f8b45a24421db958e9478, osmo-bsc does send
ip.access specific Measurement Pre-Processing Defaults.  This message
currently blocks the 'alt' statement in f_recv_next_si1(), so all
test cases calling it fail due to the guard timeout.

What's even worse, both TC_si_acc_rotate() and TC_si_acc_ramp_rotate()
dynamically configure the IUT in order to re-generate and send System
Information messages periodically.  If any of them fails prematurely,
the related configuration parameters would remain active, so the IUT
would continue sending System Information messages, causing failures
in subsequent test cases.

Let's simply ignore all unmatched messages in the 'alt' statement.

Change-Id: I1a85a046e1a8ebcd494354dddcbcc9707fdf5ee9
2021-01-04 00:29:56 +01:00
Vadim Yanitskiy 7815f480dc BSC_Tests: fix expectations in TC_assignment_codec_amr_h_start_mode_4
Change-Id: I791602a0bb56e192c9263982b9f20ac0738281a2
Related: OS#4898
2021-01-03 22:13:36 +00:00
Vadim Yanitskiy b02e8020e3 BSC_Tests: drop redundant f_init() in f_test_si2quater()
There is a global boolean flag that would make f_init() return
early if it's called twice.  This is exactly the case here.

Change-Id: Ic33786c4851d2682deec7c22fafb99043c1c1cf6
2021-01-03 14:21:03 +01:00
Vadim Yanitskiy 292e5961af BSC_Tests: fix unreachable code after f_shutdown_helper()
This function does 'mtc.stop', so it must be always called last.

Change-Id: If2c991d6ac23e43aafd32814ca17cf2093cb1522
2021-01-03 14:18:51 +01:00
Vadim Yanitskiy 8ca840eb04 BSC_Tests: add missing f_shutdown_helper() statements
Change-Id: I1a89e3776d7705d3d54b096ef420b2bbe574ab07
2021-01-03 14:16:35 +01:00
Vadim Yanitskiy e18aebbeb2 BSC_Tests: fix early mtc.stop in TC_chan_rel_rr_cause()
Calling f_shutdown_helper() in f_tc_chan_rel_rr_cause() leads to
premature test case termination, so only one out of 6 cause values
gets checked.  Move it to TC_chan_rel_rr_cause().

Change-Id: Ic7df15b496fc0750e4f694b1ae79398216f498a7
2021-01-03 13:10:56 +01:00
Pau Espin Pedrol 8ab62e4911 cosmetic: bsc: Fix tab<->space indent
Change-Id: I8b8670fb820d258a5a56f3fdb007f7e59bfd374f
2020-12-18 16:19:11 +01:00
Neels Hofmeyr 3eb9456f5a bsc: add tests with nonzero AMR start-mode
This test shows that in current osmo-bsc, the start-mode fails to
propagate to the MultiRate Config IE, the only start-mode so far has
always been zero.

Change-Id: I75515baf8cda04567cad8a93c5aa88361c2d259f
2020-12-01 11:54:08 +00:00
Neels Hofmeyr 454d792388 bsc: add TC_assignment_codec_amr_startmode_cruft
Make sure that when a 'start-mode auto' is set, that the previous start
mode setting does not linger in the unused bits.

- after I577ff590d7588fd7e3ee4846c7955ab8f84cf2b1, osmo-bsc sets its
  ICMI bit properly, but passes this test only because it *always* sends
  smod (start-mode) bits as zero.

- in I49691df01745a7c485bf165e897872c35fc4b147, the smod bits are
  properly sent on RSL, but this test shows that when ICMI becomes zero
  for 'start-mode auto', the smod bits will remain whatever start-mode
  was set in the previous osmo-bsc config. Instead, osmo-bsc should
  clear the smod bits for 'start-mode auto' so that its MultiRate Config
  does not vary depending on what was previously configured.

- in I1ec5bad0bce01cc425ee05ecf70c83ec662a226a, clearing smod is
  implemented and this test is expected to pass.

Change-Id: I151678f64e680f30f35b6bb2b0036d63efde9f2c
2020-11-30 15:59:14 +00:00
Neels Hofmeyr 21863560a2 bsc: add tests for AMR 'start-mode auto'
These tests will fail until osmo-bsc
I577ff590d7588fd7e3ee4846c7955ab8f84cf2b1

Related: OS#4868
Change-Id: Iec74b940009c8ec78a6da5c00615259e2edc1781
2020-11-30 15:59:14 +00:00
Neels Hofmeyr a6ab821704 bsc: set the AMR start-mode that the tests expect
osmo-bsc currently has a bug that fails to reflect the correct
start-mode in the AMR MultiRate config IE.

And it went unnoticed that the ttcn tests expect a MultiRate config of
ICMI = 1, even though the used configuration should yield ICMI = 0.
See mr_conf = '2804'O, where the '8' indicates ICMI = 1.

As a first fix of the ttcn3-bsc-tests, configure the BSC according to
the expected ICMI value and Start Mode, i.e. ICMI = 1 and StartMode = 0,
which is configured by 'amr tch-[fh] start-mode 1'. This should make
these tests pass as-is for both the current osmo-bsc as well as an
osmo-bsc where the bug is fixed, with minimal changes to the current
tests. See also OS#4868.

An upcoming patch will add tests for 'start-mode auto'.

Related: OS#4868
Change-Id: I4cff01c37d5c7e301e9a01f773b7e009a789519b
2020-11-30 15:59:14 +00:00
Neels Hofmeyr 2a5670be4f add f_vty_cfg_bts(), f_vty_cfg_msc()
These allow passing N vty configurations on the bts / msc node without
requiring subsequent 'exit'.

As an example, use f_vty_cfg_msc() in BSC_Tests.ttcn AMR config.

Change-Id: I9f3e485f692acb3d2a7620e9b454b372651be78e
2020-11-30 15:59:14 +00:00
Neels Hofmeyr 5f14421b6f bsc: add TC_ho_int_radio_link_failure
Change-Id: Ia94176a997dbdaf87d6b433cb24ffcfa06241d74
2020-11-09 10:52:52 +00:00
Neels Hofmeyr bf03705e4d bsc: add TC_no_msc()
Related: OS#4832
Change-Id: I4ffcfd4be551e0647abe00c4eaa8e9c490887190
2020-10-29 21:38:59 +00:00
Neels Hofmeyr 4f5d7be579 bsc: clarify RESET logging: BSSMAP vs RANAP vs BSSMAP-LE
When a RESET-ACK times out, the logs currently are indistinguishable between
BSSMAP and BSSMAP-LE. Add protocol naming for each RESET / RESET-ACK logging to
make sure the information does not need guesswork.

Example of a test failure shown in jenkins:

  BSC_Tests.TC_unsol_ass_compl
  Stacktrace

  Timeout waiting for RESET-ACK after sending RESET
        BSC_Tests.ttcn:8295 BSC_Tests control part
        BSC_Tests.ttcn:4274 TC_unsol_ass_compl testcase

Nothing conveys that it is (presumably) the background *BSSMAP-LE* timeout
halting the test 5 seconds in, and not an A-interface failure.

Change-Id: I874567e68b8279bf2460b9474241f0a9fe5ff0ff
2020-10-16 16:31:52 +02:00
Neels Hofmeyr 1708d1bf1b bsc: mark test start in OsmoBSC's logging output
Change-Id: I896a02403c9933323a9d7807a66be0afc4028d0f
2020-10-15 02:09:13 +00:00
Neels Hofmeyr 2b910dc91c bsc: implement initial LCS tests for OsmoBSC
Change-Id: Id3df9439752c088cff5618d21254af42365690ca
2020-10-15 02:09:13 +00:00
Neels Hofmeyr cfe440680f bsc: LCS: add mp_enable_lcs_tests
We want to switch off Lb iface for 'latest', etc

Change-Id: Idf463c3c2169cad953b4ebc5b5845b31d5efb848
2020-10-15 02:08:32 +00:00
Neels Hofmeyr ffd2ef1de4 as_handover: fix for signalling channel, without MGCP
Change-Id: I276f82841c07f8a885ee0659002d4a41e5b180e4
2020-10-13 08:43:10 +00:00
Neels Hofmeyr 66e1509ae1 f_perform_compl_l3: make receiving bssmap optional
Adding LCS to OsmoBSC creates the possibility of a Paging for LCS, where the
Paging Response should not emit a Complete Layer 3 on the A-interface.

Change-Id: Icb402b7436d844d939790f3cfb3725ffcf1136d2
2020-10-13 08:43:10 +00:00
Neels Hofmeyr 0aa719bca4 add rsl arg to f_mo_l3_transceive, f_mt_l3_transceive
Change-Id: I6c42418cc4dcc98573a78c3fd5d905ddf6dc3a87
2020-10-13 08:43:10 +00:00
Neels Hofmeyr 269c73c674 bsc: connect PROC for BSSAP-LE
Change-Id: Id787ed6e36f6f6e96658cd74b8aaa17cc57ec1e0
2020-10-13 08:43:10 +00:00
Neels Hofmeyr ac086c15e9 bsc: fix SMLC point code
Change-Id: Icfd1d564f20d9229c5b17c94dda3b7177787079a
2020-10-13 08:43:10 +00:00