Commit Graph

2588 Commits

Author SHA1 Message Date
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
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 e52bc2d9df BSSMAP templates for LCS
Both BSSMAP-LE and BSSMAP use the LCS Cause IE with identical definition. In
order to not add further dependencies from BSSMAP_Templates.ttcn to
BSSAP_LE_Types.ttcn to BSSLAP_Types.ttcn, duplicate the LCS Cause enum.

Change-Id: Ifee698c128a5345f6bf0301ad4dac9e083285d56
2020-10-13 08:43:10 +00:00
Neels Hofmeyr fc64f53c49 BSSMAP_LE template tweaks
Change-Id: I9728690e412266001b2a02b0e14d382152d5ab4e
2020-10-13 08:43:10 +00:00
Neels Hofmeyr 0d774653c0 BSSLAP: add some templates
Change-Id: I6774bb6aefed67ebbfd5da8e52bb463cd6279ed4
2020-10-13 08:43:10 +00:00
Neels Hofmeyr 8a6863ccba BSSMAP_LE_IE_LcsCause: fix IEI value and len
Change-Id: I8ea9d91745dc7bcbfdb69779487a1e9fc6cc7fcd
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
Neels Hofmeyr b2b3704d2a BSSAP_LE_Emulation: configure sending vs receiving RESET
Expecting OsmoBSC to send a RESET to the SMLC implies that the virtual SMLC
stays quiet until a RESET is received. Add flag to configure RESET behavior of
BSSMAP-LE.

Change-Id: I49a749b037b614f922044165a4357fe20b68860b
2020-10-12 18:28:20 +00:00
Neels Hofmeyr a7326888e8 fix ts_BSSMAP_LE_ResetAck
Change-Id: Ia3b3e02f0ea71546e36a7612d77e3e55f2d3810d
2020-10-12 18:28:20 +00:00
Harald Welte d0aed4f1b6 bts: Update osmo-bsc.cfg and osmo-bts.cfg
Somebody seems to have forgotten to update the osmo-bsc.cfg file here,
as osmo-bsc wouldn't even start using the file here.

Change-Id: I8453da3bda36912ee42fb0c8d862f75b2065965f
2020-10-12 17:19:20 +02:00
Harald Welte 9b965d5350 bts: Increase SI sampling duration if SI2quater is involved
The existing sampling duration of 8s was insufficient to collect
sufficient samples to confirm the scheduling rules.

Change-Id: I2f631935c86fb840cdd733c28b2df503512341fa
2020-10-12 13:15:53 +00:00
Harald Welte a616ec9260 bts: Log more details in case SI sampling returned insufficient results
Change-Id: I2b853dfff0800cd87e49a3360019ff7198aeafb2
2020-10-12 13:13:04 +00:00
Harald Welte c87d81f916 bts: Avoid race condition in TC_pcu_deact_req
When our emulated PCU sends a DEACT.req to the BTS, there is no way
of knowing when exactly that command will have been completed: There is
no confirmation sent in response.

Let's introduce a f_sleep(1.0) to give the BTS sufficient time for
deactivating the channel.

This will make  TC_pcu_deact_req pass reliably.  It currently fails
in about one third of all test executions on jenkins.

Change-Id: Id9a559b8b208a60f71c3eb9a23830e4d2dbc5df9
2020-10-12 13:13:04 +00:00
Harald Welte c935fad594 bts: Adjust to VTY text change
In osmo-bts Change-Id If53fb07ec38f6bbc368ce84d14e59fa8167691d3
unfortunately the wording / syntax of the VTY was changed.  Let's
adjust to the new wording.

Change-Id: I4a6d37febde104e70ce03992b7e2e8fb793b5a00
2020-10-12 13:12:26 +00:00
Harald Welte 194b691b18 bts: Make f_power_from_band() fail in case of unknown band
Otherwise we get into weird error cases about unbound variables that are hard to debug.

Change-Id: I5716a5dc6ce95daa663be87a1a4fe611b719495e
2020-10-12 13:12:26 +00:00
Harald Welte 52ae168480 bts: Fix TC_rach_load_count
The first RACH LOAD IND may only cover a fractional reporting
interval, and hence must be ignored.

Change-Id: I32a703847fbf2b95993e910e6510613902e2bb1a
2020-10-12 13:12:26 +00:00
Harald Welte e37f9a504f bts: Fix TC_rach_load_idle_thresh0()
The first RACH LOAD IND may only cover a fractional reporting
interval, and hence must be ignored.

Change-Id: I43ee8e846803e2ef6218a3e7ac385ed8af30c217
2020-10-12 13:12:26 +00:00
Harald Welte 762202288b bts: Make TC_pcu_socket_verify_info_ind pass
f_init / f_init_pcu simply save the first PCU_INFO_IND
in g_pcu_last_info.  That first one might still be wrong as
the PCU might connect to the BTS before the BTS is configured
accordingly.

Let's wait for 2 seconds and actually use the last (most recent)
PCU_INFO_IND for the test.

Change-Id: I45717605fde66bf870bcb6e2560f0fc753d05d95
2020-10-12 13:12:26 +00:00
Alexander Couzens 475074bd3b bsc: copy osmo-bsc.cfg from docker-playground
The old file wasn't valid anymore.

Change-Id: Ic72bd755828d0cb6c5858e2fb7800e875f64369a
2020-10-12 02:25:17 +00:00
Harald Welte cb14e0665c Osmoocm_Gb_Types.ttcn: Add various additional templates
Those can help to match if messages meet certain constraints stipulated
in the BSSGP specification.

Change-Id: I05c768f5a9e4f0b5c1375c2603135a349c38e849
2020-10-11 16:34:39 +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
Harald Welte f3d3a72caf Common.cfg: Always log VEERDICTOP on Console
This will keep the console posted about any verdict changes.

Change-Id: I11c7568df5ff63066cdf1f6868b3da005e960495
2020-10-10 18:15:37 +02:00