Commit Graph

2528 Commits

Author SHA1 Message Date
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
Vadim Yanitskiy d53fb672c9 PCU_Tests: introduce TC_pcuif_info_ind_subsequent()
This change reproduces a segfault caused by the recent regression [1].
The IUT tries to bind on BSSGP host:port that it's already bound to.

[1] Ib389925cf5c9f18951af6242c31ea70476218e9a

Change-Id: I4c3bc883d795e5d1ee5ab175ac03684924692a7c
Related: SYS#5108
2020-10-10 10:30:06 +00:00
Harald Welte e97e3af203 PCU_Tests_{NS,SNS}: Fix our expectations regarding CellID in BVC-RESET
The BVC-RESET / BVC-RESEt-ACK follow a set of rules:

* Signaling BVCI=0 never has a CellId in BVC-RESET nor BVC-RESET-ACK
* Any BVC-RESET or BVC-RESET ack in BSS->SGSN direction must have CellID
* Any BVC-RESET or BVC-RESET ack in SGSN->BSS direction must NOT have CellID

Let's adjust our test expectations accordingly.

This will break tests against "latest", but the amount of work-arounds
needed in this code outweighs the benefit.

Change-Id: Ic8a83f5214c372faa15178dd9b54364e7d2a60cb
2020-10-09 14:59:56 +02:00
Harald Welte 5339b2e372 BSSGP_Emulation: Support multiple PTP-BVC within one Entity
The existing BSSGP_Emulation is built around the assumption that every
instance of BSSGP_Emulation only servers one signaling-BVC and one
PTP-BVC.  While this is true for osmo-pcu at this point (BTS-colocated
PCU), other BSS/PCU implementations differ.

In general, there can always be any number of PTP BVC (one per cell)
next to the signaling BVC (one per BSS).  Let's represent this in
BSSGP_Emulation so we can create more comprehensive tests.

Change-Id: I7e30b4c4e188518a574e082962fba457b3a97ce3
2020-10-09 12:27:11 +02:00
Harald Welte 23e274919d PCU_Tests_NS: Fix our expectations regarding CellID presence/absence
This is required by the spec, and implemented libosmocore since
Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1

So let's change our test expectations.  Meanwhile, introduce
mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'.

Change-Id: Icebee25b53fef623db6ae91ca0d943e70a3c86b7
2020-10-09 12:27:11 +02:00
Harald Welte 12d19b81a7 BSSGP_Emulation: Ensure BVC-RESET for BVCO=0 has no CellId IE
This is required by the spec, and implemented libosmocore since
Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1

So let's change our test expectations.  Meanwhile, introduce
mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'.

Change-Id: If6245d73ed701e631b67146ace4ba028bdb4226c
2020-10-09 11:44:20 +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
Harald Welte 04ce4c6047 pcu: Don't log timer operations of ClkGen-0 (every 4.16ms)
We don't need to spam the console with that kind of information.

Change-Id: I029193f6e21415f53424ebf4417e3fcd9a53c86c
2020-10-04 23:41:45 +02:00
Harald Welte c967d0e6f2 BSSGP_Emulation: Only add CellId to BVC-RESET[-ACK] conditionally
We always used to include the CellID IE, but 3GPP TS 48.018 is
actually quite specific about when it should be present and when not.

Change-Id: Iffd023f0272c9ccb087bdd225fcfb08424a46bdf
2020-10-04 21:09:11 +02:00
Harald Welte 18ed23cda5 regen-makefile.sh: Put libraries in LINUX_LIBS, not LDFLAGS
Additional libraries to be linked should be in LINUX_LIBS (appended at
the end of the linker command), not part of LDFLAGS (prepended to
the beginning of the linker command).

On binutils 2.35.1 / Debian unstable, without this patch, I get

/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_bindx'
/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_connectx'

which is resolved by this patch

Change-Id: I8a339076f445e3c650e407ae982c7c2dc4a760b2
2020-10-04 21:09:11 +02:00
Harald Welte 847a77e32f NS_Emulation: pass around string idenifier for components created
We want to see useful identification for components in the log, and
hence must be giving every component a name at create() time.

Change-Id: I0fe650243953e4d85161684865acd0354b2e465f
2020-10-03 18:27:05 +02:00