Commit Graph

430 Commits

Author SHA1 Message Date
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
Harald Welte 47cd0e3350 bsc: Add Lb interface support
This introduces the Lb interface stack, which allows BSC_Tests.ttcn
to emulate a SMLC towards the BSC.

In accordance with https://osmocom.org/projects/cellular-infrastructure/wiki/Point_Codes
we use 0.23.6 as point code for emulating the SMLC.

Change-Id: Id41246f0dd812f7ddee9d920bfd07a4e3aac3504
2020-10-13 08:43:10 +00:00
Neels Hofmeyr b6ed80c0c6 bsc: fix missing vty exit in f_vty_allow_emerg_bts()
Without this, subsequent vty commands become "% Unknown command".

(Triggered by the test start vty "logp" in f_start_handler() that is going to
be added by subsequent patch.)

Change-Id: I51ace11883256ee0725caae46ea22adb2ea5eb39
2020-10-13 08:43:10 +00:00
Harald Welte c46ea3cefc bsc: Fix random failures in BSC_Tests.TC_early_conn_fail
We cannot use a random 8bit value as RACH request, as some of that
space actually maps to emergency call RACH, which is rejected unless
we enable it in the config.

Change-Id: Ie073fe721022c392278e8632ab52122b4b89cbe1
2020-10-11 18:19:44 +02:00
Vadim Yanitskiy 2ef6a2f7fb BSC_Tests: fix f_mo_l3_transceive(): relax DLCI matching
Since If4d479a54cad467f53b49065c1c435a4471ac7d2, osmo-bsc started
to send more concrete DLCI values on the A/BSSAP interface.  In
particular, the control channel identification bits now indicate
whether it's SDCCH/FACCH or SACCH channel.

Let's use '?' as the default DLCI template that we expect to get
from the IUT, so those test cases, for which DLCI is not a part
of the testing scenario, would not fail.

Change-Id: Ida659d53e0d31f9aa0ea2ccccefc94d8c659eb76
2020-10-08 23:17:44 +07:00
Vadim Yanitskiy 61f784a436 BSC_Tests: introduce TC_tch_dlci_link_id_sapi for OS#3716
The aim of this test case is to verify DLCI / RSL Link ID conversion
for MO/MT L3 messages on SAPI0/SAPI3.  In particular, the test suite
verifies the following scenarios:

  - RSL -> BSSAP:
    - 16 MO messages on FACCH/F with SAPI0,
    - 16 MO messages on SACCH/F with SAPI3;
  - BSSAP -> RSL:
    - 16 MT messages on FACCH/F with SAPI0,
    - 16 MT messages on SACCH/F with SAPI3.

Change-Id: Ica69ae95b47a67ba99ba9cc36629b6bd210d11e4
Related: OS#3716
2020-10-03 03:40:03 +07:00
Vadim Yanitskiy 0033a3b4e8 BSC_Tests: introduce f_mt_l3_transceive() sending BSSAP -> RSL
Change-Id: I5f1685815a4477b4d50351d3518ae21dd7d20139
Related: OS#3716
2020-10-03 03:40:03 +07:00
Vadim Yanitskiy b93aa4375c BSC_Tests: parametrize f_mo_l3_transceive()
Change-Id: I617a103e9dae8f16e3f3996c89e53ace49f7bfa8
Related: OS#3716
2020-10-03 03:40:03 +07:00
Vadim Yanitskiy 74ae5eb448 BSC_Tests: s/f_verify_active_layer3/f_mo_l3_transceive/g
The new name is more concrete and better reflects what the
function does: transmit a MO L3 payload to the IUT over the
A-bis/RSL and receive it back on the A/BSSAP.

Change-Id: Ic2b60b60c49ae7788ce03503b8b867bb9e55244b
Related: OS#3716
2020-10-03 03:36:15 +07:00
Neels Hofmeyr 929b406940 update expected results
Change-Id: Icb534a2b00fc48c3ead009a620e6061e595cb581
2020-10-01 06:48:55 +02:00
Neels Hofmeyr 4365481254 bsc: undup f_verify_active_layer3()
Change-Id: Ia4433618787b58f8789c9e97cdfbb8b320a09395
2020-10-01 06:48:55 +02:00
Neels Hofmeyr 767548a82b bsc: f_logp(): add VTY pt so it works on various components
So far only worked on test_CT, now also on MSC_ConnHdlr by passing the
respective BSCVTY.

Change-Id: I85ad0a59af72aa72e26a1252f946ada43388dc17
2020-10-01 06:48:49 +02:00
Philipp Maier a208389c07 MSC_ConnectionHandler: allow to use IPV4 as default
When the BSC sends a CRCX without an IP address in it, the testcase will
automatically assign an IPV6 address in the response. However, this
breaks compatibility with older versions of osmo-bsc that do not have
IPV6 support. Lets add a module parameter in order to be able to use
IPV4 as default if required.

Change-Id: I30c77abef63636bb02db12d2f2b2d79ea244b96c
2020-09-29 21:28:59 +00:00
Pau Espin 6ed083c6c8 bsc: Call f_shutdown_helper() on all tests missing it
This should hopefully avoid sporadic errors during tear down of tests
such as TC_si_acc_rotate.

Change-Id: I8c8a1061b546576b7a5c4b11f20dfc887aaab6e0
2020-09-25 20:37:58 +00:00
Pau Espin 00f40e8a0d cosmetic: bsc: Fix indentation alignment
Change-Id: I5484784fca254044055a9f131e1ebb19de8ceba5
2020-09-25 09:57:53 +00:00
Daniel Willmann c5398f73de bsc: Check attempted/successful channel requests
Change-Id: I5b5c7c72eea28314da2ee7725d94d85917aa3ad3
Related: SYS#4877
2020-09-23 15:06:53 +00:00
Philipp Maier 09f1c6da7d MSC_ConnectionHandler: do not allow as_Media_mgw to exit
The altstep as_handover needs to repeat until the IPACC and the MGCP rtp
negotiation is done (MDCX). By setting the norepeat flag of the sub
altsteap as_Media_mgw to true, we allow as_handover to exit early, even
when the handover is not done yet, which eventually causes the testcase
to fail.

Change-Id: I303879a9153d25a02743dc1d4713ae74918b9be7
fixes: OS#4752
2020-09-20 10:05:06 +00:00
Pau Espin 62adaaf8e3 bsc: Rework CBSP tests to support testing IPv6
Change-Id: I859edebd24634ec9b448cd114f5541c93e552b0b
2020-09-18 08:31:11 +00:00
Vadim Yanitskiy 3e99736933 BSC_Tests/hopping: also verify handling of ARFCN 0 in MA
According to 3GPP TS 44.018, table 10.5.2.21.1 "Mobile Allocation
information element", in the cell allocation frequency list the
absolute RF channel numbers are placed in increasing order of ARFCN,
except that ARFCN 0, if included in the set, is put in the last
position in the list.

Let's verify that the IUT handles this corner case correctly.

Change-Id: I3afadfde03f6ea766c0756a181ef129e4b05c383
Related: SYS#4868, OS#4545
2020-09-14 10:13:39 +00:00
Vadim Yanitskiy e7c8c6e00e BSC_Tests/hopping: fix: consider ARFCN of the transceiver itself
The Mobile Allocation IE generated by the IUT includes not only
the list of hopping ARFCNs, but also ARFCN of the transceiver
itself.  This is the correct behaviour, and that's why we see
sporadic test case failures like this one:

  Mobile Allocation IE does not match (tn := 1):
    { len := 3, ma := '001010101011111100000000'B }
  vs expected
    { len := 2, ma := '0010101010111111'B }

The last '0'B bits may look like redundant padding, but actually
only 7 of them are.  The MSB '0'B bit in the last (third) octet
corresponds to pre-configured ARFCN 871.

Since f_TC_fh_params_gen() generates all ARFCNs in GSM-900:

  - in f_TC_fh_params_gen(), pick an ARFCN value from GSM-900;
  - in f_TC_fh_params_set(), change ARFCN of a given transceiver;
  - in f_TC_fh_params_gen_tr_ma(), consider that ARFCN;
  - in f_TC_fh_params_unset(), bring it back to 871.

Change-Id: Id11be94087c18d8159af4b7988826023832f9944
Related: SYS#4868, OS#4545
2020-09-14 10:13:39 +00:00
Vadim Yanitskiy 1b99661d25 BSC_Tests/hopping: turn FHParamsTrx into a record, add ARFCN field
This record must contain not only the hopping parameters, but
also ARFCN of the transceiver they belong to.  Since ARFCN of
the transceiver also becomes part of the Mobile Allocation,
we need to take it into account in the matching functions.

Change-Id: I4722dc3f758a097806811cb0b59aa4093374c74c
Related: SYS#4868, OS#4545
2020-09-14 10:13:39 +00:00
Vadim Yanitskiy bc6654a3fe BSC_Tests/hopping: fix ArfcnList: use GsmArfcn instead of integer
Change-Id: I63adf2ffaaf789a97d29ec5c1b7b7a551e56769c
Related: SYS#4868, OS#4545
2020-09-14 10:13:39 +00:00
Philipp Maier 104f4c0399 BSC_Tests: set verdict to pass when TC_emerg_premption is done
The testcase TC_emerg_premption does not set a verdict when done. Make
sure that the verdict is set to pass when the test is done.

Change-Id: Ie612b32cfa9cedd1e0f1d51e48911da94ec325cf
Related: OS#4549
2020-09-13 16:14:08 +00:00
Alexander Couzens f74b5cba34 BSC_Tests: check for the same measurement bandwidth as in SI2quater on Channel Release
osmo-bsc is using the same LTE neighbors of the SI2quater in the Channel Release -
Cell selection indicator after release of all TCH and SDCCH IE. Ensure the same measurement bandwidth
is present to not overwrite the measurements bandwidth from the SI2quater.

Change-Id: I9aa30dfd1e2c1b80e037bd71ebc4cdd3752638b4
2020-09-11 14:40:47 +02:00
Alexander Couzens 4ad3a356f3 BSC_Tests: fix whitespace typo
Change-Id: I68d7b6ef1d35b798f66a04bce4de29fdd75ff7f1
2020-09-11 11:23:01 +00:00
Pau Espin 24c0599541 bsc: Fix race condition waiting for RESET-ACK
This scenario appeared in jenkins runs of BSC_Tests making
TC_ctrl_msc_connection_status fail (the first test in the suite). I
could however not reproduce it on my local docker setup because it
really seems like a timing race condition.

The scenario is:
TTCN3 -> BSC: RESET
TTCN3 <- BSC: RESET
TTCN3 -> BSC: RESET-ACK

In there, TTCN3's f_legacy_bssap_reset() expected a RESET-ACK to be
received, but it may well be that the other end never saw the RESET and
hence it will never sent the RESET-ACK, since it indicated it became
available afterwards. In that case (RESET received), let's not fail if a
RESET-ACK is never received, since the connection is actually in the
desired state and this scenario can happen and it's all fine.

Change-Id: Ic92e0fb7033e5134b66e485a11371394adaba78a
2020-09-09 16:50:53 +00:00