Commit Graph

2514 Commits

Author SHA1 Message Date
Philipp Maier 149c392f25 BTS_Tests: add FAACH to TC_meas_res_speech_tchX
The current TC_meas_res_speech_tchX tests only test a pure voice
transmission. A voice transmission can be occasionally interrupted by
FACCH transmissions. This should also be tested. Lets ad a _facch
variant for the two speech test variants we already that injects a FACCH
from time to time.

Related: OS#4799
Change-Id: Ie9cd39739d4b972f4e533a7bc90f79e914888aab
2020-10-22 17:33:57 +02:00
Pau Espin d6d69b50fc bts-lapdm: Early termination on f_lapdm_transceive_mo() failure
Change-Id: Ib0db631bc4c203cc1aeaad2640656e3f6942516f
2020-10-21 11:52:23 +00:00
Pau Espin faf97060a5 bts-lapdm: Introduce test TC_normal_reestablishment_state_unacked
Related: OS#4819
Change-Id: I551beaa29b9a1d3af0b1517e06ae1badf7e1bd3f
2020-10-21 11:52:23 +00:00
Pau Espin 820b4746eb bts-lapdm: Introduce test TC_normal_reestablishment
Related: OS#4819
Change-Id: I5eb07a6abf5a260e2f62c177f8c100305d44155a
2020-10-21 11:52:23 +00:00
Vadim Yanitskiy 5fa8561b99 BTS_Tests: introduce TC_speech_no_rtp_{tchf,tchh}
The purpose of these new test cases is to demonstrate a problem
described in OS#4823: the IUT sends *dummy bursts* in absence of
MT RTP frames, so on the MS side it looks like RF failures.

It's not yet clear what needs to be sent by the BTS in this kind
of situation, but at least we can verify that whatever is sent
can be decoded on the MS side without CRC errors.

Change-Id: I620ea84ae92c976a62c1f8334ec14a2a7685aa21
Related: OS#4823
2020-10-21 11:51:18 +00:00
Alexander Couzens 7b1e44f791 PCU: add IPv6 support for SNS
With PCUIF 10 the remote can be IPv4 or IPv6.
Add all missing parts including SNS IPv6 elements,
the support to omit IPv4 elements and a PCU_Tests_SNSv6.cfg
configuration to run all tests with IPv6

Change-Id: I43d64caca600fff78f3fbbb3e8179f447f235d46
2020-10-21 11:49:54 +00:00
Neels Hofmeyr 02ce0b61fd smlc: remove temp dev artifact that skips most tests
Change-Id: I4feb4fe4578e4c15800d7dad82fb1a345241345d
2020-10-21 00:50:26 +02:00
Harald Welte 5ebf798131 bts: Run everything over 127.0.0.1
When the test is executed outside of docker, having to manage all
those different IP addresses while manually starting programs can be
quite cumbersome.  Let's just run everything over localhost, like
we always do with other tests.

Now the only cumbersome command to start is trxcon, as it defaults to
only one TRX and adding additional TRX is rather complicated:

./fake_trx.py --trx TRX1@127.0.0.1:5700/1 --trx TRX2@127.0.0.1:5700/2 --trx TRX3@127.0.0.1:5700/3

Change-Id: Iea8519685da7d73696ce9cc2541e93c45c099828
2020-10-20 18:04:57 +02:00
Harald Welte 629fb2ab68 bts/osmo-bts.cfg: Enable GSMTAP for FACCH on TCH/F and TCH/H
Change-Id: I8aa118b733ea36e9ba591de7b935a31bdbe07129
2020-10-20 18:04:57 +02:00
Harald Welte 96200af9d5 bts/osmo-bsc.cfg: Remove deprecated config directives
Change-Id: Ib3406913a2f7c07b817fd143550be9f46efd4375
2020-10-20 18:04:57 +02:00
Vadim Yanitskiy 780bc07a25 BTS_Tests: introduce TC_meas_res_speech_tchh_toa256()
Change-Id: Ib35e5a1ac0b25e6a1f0f395e4e2693ca99548217
Related: OS#4799
2020-10-20 02:46:13 +07:00
Vadim Yanitskiy 0b65219ec5 BTS_Tests: fix DTE in TC_meas_res_sign_tchh_toa256()
Change-Id: Iecd9dd968ad8ee648bfb8a5c32364f53c7ae0c97
Related: OS#4799
2020-10-20 02:45:13 +07:00
Vadim Yanitskiy 8fc43df69f library/RSL_Types: reorder the arguments of ts_RSL_ChanMode_SIGN
This way it's consistent with ts_RSL_ChanMode, and there is
no need to pass dtx_downlink := false as the first param.

Change-Id: I0b87ef87f8cfff1c96b0beead29d549d5fe0b7c6
2020-10-20 02:24:14 +07:00
Philipp Maier ac693462dd BTS_Tests: fix CHANnel ACTIVation message in TC_meas_res_sign_tchX
The testcase TC_meas_res_sign_tchX activates a traffic channel in
signalling mode and checks the RSL resulting measurement reports.

The CHANnel ACTIVation message sets "SDCCH" as "Channel rate and Type"
value. This is invalid, the "Channel Rate and Type" sould be set to "Half /
Full rate TCH Channel Lm / Bm" (while the speech or data indicator is
still set to "Signalling")

Change-Id: I51887b0d0379fcc1f4483d08dfdd6869e7a9f963
Related: OS#4799
2020-10-19 19:07:44 +00:00
Pau Espin 5fa5b8823c cosmetic: library/LAPDm_Types.ttcn: Fix trailing whitespace
Change-Id: I1fa46a10ca714f63c782004c877f7df96c591fad
2020-10-19 20:19:47 +02:00
Vadim Yanitskiy 652e60eb83 BTS_Tests: add TC_ms_pwr_ctrl_pf_ewma: test EWMA based power filtering
This test case is very similar to TC_ms_pwr_ctrl_constant(), but the
key difference that we simulate sharp UL RSSI changes between -50 dBm
and -100 dBm on each iteration.

The 'uplink-power-target' (-75 dBm) is right in the middle of the
change range, so with EWMA filtering and 80% smoothing it's expected
that all averaged UL RSSI values would be around -75 dBm.

It's expected that the Uplink power level remains constant, however
this test case fails at the moment.  The problem is that the IUT is
still quite sensitive to small deviations from 'uplink-power-target',
so ideally we should introduce a 'hysteresis' defining a range:

  ['target' - 'hysteresis' ... 'target' + 'hysteresis']

in which the MS power loop should not trigger any power changes.

For example, let's say:

  'uplink-power-target' is -75 dBm (default), and
  'hysteresis' is 8 dBm,

so then the range would be: -83 dBm ... -67 dBm.

Change-Id: I3be1a4a4a0ab7eebb9a930eee7039295c045a791
Depends: Iacedbd4d69d3d74e2499af5622a07a8af0423da0
Related: SYS#4916
2020-10-19 18:08:32 +00:00
Vadim Yanitskiy ceb1f9888f PCU_Tests: fix readability of code using t_RLCMAC_UL_DATA_TLLI
Change-Id: I175f8ce2606050c6b4ea54eae4e00846291d462f
2020-10-19 18:02:15 +00:00
Vadim Yanitskiy 8e6df0c811 PCU_Tests: add missing f_shutdown(final := true) statements
Otherwise those test cases may sporadically fail due to DTE:

  Sending data on the connection of port CLCK to 8:CLCK failed. (Broken pipe)

Change-Id: Ia8c934697a4e7bc39e762bf81587fea3bbe11b17
2020-10-19 18:02:01 +00:00
Vadim Yanitskiy 204b98c5a7 BTS_Tests: introduce TC_meas_res_speech_tch{f,h}
The new test cases are similar to TC_meas_res_sign_tch{f,h}, with
the only difference that TCH channels are activated in speech mode.

Change-Id: I8455e3749ab72a463c00dd0ed28b69ef6f389aa1
Related: OS#4799
2020-10-19 17:36:19 +00:00
Vadim Yanitskiy dc00811b7f BTS_Tests: introduce and use TCH loop - as_l1_tch_loop()
Change-Id: Icd4c86e04a5f7a88ff8874a6be194fe13bb9e80c
Related: OS#4799
2020-10-19 17:36:19 +00:00
Vadim Yanitskiy a4f88c6949 BTS_Tests: cosmetic: rename 'as_l1_dcch' to 'as_l1_dcch_loop'
Change-Id: I06083e2352408f5832603fa88232d2008bce218d
Related: OS#4799
2020-10-19 17:36:19 +00:00
Vadim Yanitskiy 161858372a library/L1CTL_Types: use traffic forwarding mode by default
Calypso PHY (unlike trxcon) needs to be explicitly configured to
enable forwarding of the TCH traffic.  Otherwise it's handled
internally by the DSP and routed to/from the built-in speaker/mic.

Change-Id: I5b9ca5683627716868e85dc33f91d8ca4824cd61
Related: OS#4799
2020-10-19 17:36:19 +00:00
Vadim Yanitskiy 52787bf97f BTS_Tests: indicate TCH mode to the L1 in f_est_dchan()
Otherwise the L1 (trxcon or Calypso PHY) would 'think' that we're
in signalling mode, and would not send us Bad Frame Indications.

Change-Id: I0ade3bd63f604c7f0665124b182a023d50030d0b
Depends: I6f403ed0506b4b1872361d9976d3186bfe514b52
Related: OS#4799
2020-10-19 17:36:19 +00:00
Pau Espin d0ec1490c6 bts-oml: Verify BTS obj becomes Enabled durig OPSTART ACK
Change-Id: Iabe2677a458e169e646eb5a105ec9897c48eecc4
2020-10-19 17:33:37 +00:00
Pau Espin d431248f67 bts: Drop duplicated f_establish_dcch
A private copy of the function already exists in LAPDm_RAW_PT.ttcn where
it is used.

Change-Id: I141269b432d85b18b273992419b5ae3470569cde
2020-10-19 18:42:00 +02:00
Daniel Willmann 44940c0459 gbproxy: Fix config formatting, disable handle_sns explicitly
Related: SYS#5002
Change-Id: I23bac78a6b96e72752ceb1702179bcb46a10d988
2020-10-19 14:57:18 +00:00
Vadim Yanitskiy 3b1fae4529 library/L1CTL_Types: add missing template for L1CTL_TCH_MODE_REQ
Change-Id: I7641c373dca7280d208f4eac85185a9899f0cb71
Related: OS#4799
2020-10-19 17:37:02 +07:00
Vadim Yanitskiy 7ce605fc8b library/L1CTL_Types: add missing 'loop_mode' to 'L1ctlTchModeReq'
Change-Id: Ia62cfc949603780b36f76bd6a9c16815b6152fcd
2020-10-19 17:37:02 +07:00
Vadim Yanitskiy 3240312a16 library/L1CTL_Types: relax some params of tr_L1CTL_TRAFFIC_IND()
A TRAFFIC.ind with 'num_biterr' > 0 or 'fire_crc' != 0 is still
a valid TCH frame - Bad Frame Indication.  Let's relax those
parameters for tr_L1CTL_TRAFFIC_IND().

Change-Id: Ia3357e06f986ae59dd0438f9ace3042cae8d3684
Related: OS#4799
2020-10-19 15:46:53 +07:00
Vadim Yanitskiy 2cdb97f166 library/L1CTL_Types: fix definition of L1ctlDmEstReq
In osmocom-bb 'struct l1ctl_dm_est_req' is defined as follows:

  struct l1ctl_dm_est_req {
    uint8_t tsc;
    uint8_t h;
    union {
      struct l1ctl_h0 h0;
      struct l1ctl_h1 h1;
    },
    uint8_t tch_mode;
    uint8_t audio_mode;
  } __attribute__((packed));

so the overall size of the union is size of the biggest member:

  sizeof(struct l1ctl_h0) is 2
  sizeof(struct l1ctl_h1) is 132

Therefore we need to fix our definitions:

  - introduce 'record L1ctlH0' (with padding),
  - introduce 'union L1ctlH0H1':
    - move hopping indicator to L1ctl{H0,H1},
    - use it as 'TAG' in 'union L1ctlH0H1'.

Change-Id: I53964f794260f0676cc2771a7acbb679befb06d5
Related: OS#4799
2020-10-19 14:33:24 +07:00
Vadim Yanitskiy fe052960b2 library/L1CTL_Types: turn L1ctlTchMode into an enumerated type
Change-Id: Ib547b5984078bc6c6a66addb4622a471487c7342
Related: OS#4799
2020-10-19 14:33:13 +07:00
Vadim Yanitskiy e7c4a99160 library/L1CTL_PortType: fix indention in alt() statements
Change-Id: Ic13c2acbe1379558884fa7d11ba0b52ef31544f3
2020-10-19 13:55:15 +07:00
Vadim Yanitskiy c7ef03057f BTS_Tests: introduce TC_ms_pwr_ctrl_constant()
This test case is aimed to verify that the MS power level remains
constant when 'rx-current' does not change and equals 'rx-target'.

Change-Id: Ifdafa03506102ff15f4d6dc304fff7d7e8f48170
Related: SYS#4916
2020-10-18 20:12:44 +07:00
Vadim Yanitskiy 79da4ce0fb library/GSM_RR_Types: declare {enc,dec}_SacchL1Header()
Change-Id: If2acd617d8bb543851e827ec74bb93d8da5b4966
Related: SYS#4916
2020-10-18 20:11:12 +07:00
Vadim Yanitskiy dd82be3c53 BTS_Tests: fix f_TC_imm_ass(): use send template, not receive one
BTS_Tests.ttcn:3647.9-3703.1: In function definition `f_TC_imm_ass':
    BTS_Tests.ttcn:3661.37-99: In the operand of operation `valueof()':
      BTS_Tests.ttcn:3661.58-98: In actual parameter list of template
                                 `@GSM_RR_Types.ts_ChanDescH0':
        GSM_Types.ttcn:125.48-55: warning: Inadequate restriction on
                                  the referenced template parameter
                                  `sub_slot', this may cause a dynamic
                                  test case error at runtime
        GSM_Types.ttcn:126.8-9: warning: Inadequate restriction on
                                the referenced template parameter
                                `tn', this may cause a dynamic test
                                case error at runtime

Change-Id: I7d36d25e5f8d3bb1040c737eeaeddd15f98ec4c2
2020-10-18 10:38:48 +00:00
Vadim Yanitskiy c776ded961 PCU_Tests.cfg: synchronize with docker-playground
Otherwise neither of the test cases would even start.

Change-Id: Ibbef1875b266e3512e5ada731bac5f2246a1446d
2020-10-17 11:27:45 +00:00
Vadim Yanitskiy c67240a021 PCU_Tests: fix f_TC_mt_ping_pong() header readability
Change-Id: I2d2e80fe411c0677b8f8d7833ec2b9ea62888221
2020-10-17 16:03:15 +07:00
Pau Espin 006d195794 bts-oml: Wait for SwActivatedRep before opstarting BTS nm obj
According to TS 12.21 attribute setting is done after the object becomes
sw installed.

Change-Id: I942c55df8ac8af22593e31ac4c501f644e9bee35
2020-10-16 17:11:16 +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
Pau Espin 9a053c07c9 bts: Fix race condition during init_rsl receiving from multiple TRX
When several TRX are set up, it can be that in between a RSLEM_EV_TRX_UP
event and the related tr_RSL_RF_RES_IND for that TRX, we receive a
RSLEM_EV_TRX_UP from another TRX which got just connected in parallel.

Change-Id: I1296c76c1d97e6704340484994ff3921975146b9
2020-10-16 14:06:03 +02:00
Harald Welte 023b61b2cb FR/FRNET: add Frame Relay emulation
Add frame relay testcase for BSS and SGSN side.
The test cases require hdlc interfaces (based on
dadhi with super channels and no lmi).

Change-Id: I95d64dc26a8d2ff02d6cf2bfcd22a97e5481f957
2020-10-16 04:06:39 +02:00
Daniel Willmann 423d8f48f8 Add initial TTCN3 test for GbProxy
The first testcase, TC_BVC_bringup just waits for NS/BSSGP Emulation to
do their thing. If nothing fails there then we pass.

Related: SYS#5002
Change-Id: Ib3dc05fe5598b53e963ca863968e387cc36b9de3
2020-10-15 10:51:00 +02:00
Daniel Willmann 654f85e2b8 Correctly handle ALIVE/TEST procedure with FR/NS-over-IP without SNS
If IP-SNS is not used we should wait for the RESET procedure to finish
before sending NS-ALIVE.
For IP-SNS start NS-ALIVE in both roles (sgsn and bss) and don't handle
NS-RESET.

Also unified the log messages a bit (received -> Rx).

Related: SYS#5002
Change-Id: Ie01fee70297255b3d9c091bc2cec75b0f915c588
2020-10-15 10:48:34 +02:00
Neels Hofmeyr 5c5b276600 smlc: implement initial LCS tests for OsmoSMLC
Change-Id: Ic16b8bdb2d66dcf706bfd09ab15d9f56499dd982
2020-10-15 02:09:13 +00: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 79bd2e93d0 Revert "BSSAP_LE_Emulation: configure sending vs receiving RESET"
This should not have been merged. It is an intermediate attempt to make the BSC
send the BSSMAP-LE RESET, which doesn't work because the BSC is not restarted
across test runs. I dropped the patch from my branch, while it remained on
gerrit accidentally; then someone else merged it without noticing that it was
no longer part of my lcs branch.

This reverts commit b2b3704d2a.

Change-Id: If191cf0ee5c239066fa41621e812efbdcca2a2b8
2020-10-15 01:57:55 +00:00
Alexander Couzens 50493b3503 pcu/PCU_Tests_SNS.cfg: fix configuration to match new NS provider
The NS uses now a provider to support FR and IP at the same time.

Change-Id: I6b0fa97a1098070a4f63228568092084503d6164
2020-10-13 19:49:14 +00:00
Neels Hofmeyr 6ea71cda5a BSSAP_LE_Emulation: on register_imsi, make sure to wait for RESET ACK
Change-Id: Id0d087a90394369ef60846baa4d02289e9d0be1e
2020-10-13 08:43:10 +00:00