Commit Graph

2285 Commits

Author SHA1 Message Date
Harald Welte 5f1b6c5357 stp: Add TC_rapid_init_shutdown()
Change-Id: I3d37cd80acfaf042b60f1590ee12a0e26d8853b5
Related: OS#4625
2020-10-09 11:44:20 +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
Harald Welte 3dd8355d7d NS_Emulation: Delay Tx of first NS-RESET until Provider tells us it's up
Change-Id: I300cfeb120540940990a834596b0a83a539df080
2020-10-03 18:27:05 +02:00
Harald Welte 4a6a663654 NS_Emulation: Refactor if/elseif/... clause to altsteps with guard
This makes for much more readable code, and we can even do without
activating any default altsteps.

Change-Id: I4c38dd55b7c27899735f5730851d36c1410d96a8
2020-10-03 18:27:05 +02:00
Harald Welte bd612cd328 NS_Emulation: Introduce status events from provider -> emulation
This allows NS_Emulation to react to changes of the underlying
transport layer (e.g. Frame Relay Link/DLCI up).

Change-Id: If00e9c50dc664ce62b6c0cbde99d741e8173169b
2020-10-03 18:26:59 +02:00
Harald Welte 867243a3ec NS_Emulation: Add [optional] support for FrameRelay transport
This adds a NS_Provider_FR which interfaces between FrameRelay_Emulation
and NS_Emulation.  Include support for it only if enabled at compile
time to avoid pulling in a dependency on the FrameRelay stack for every
user of NS_Emulation.

Change-Id: I42ca811d23e383e362d2527c8ff2c916a62a5b42
2020-10-03 18:24:50 +02:00
Pau Espin 8c0f2fc0b0 stp: wait until IPA handshake is done in f_connect_ipa
Otherwise when trying to send stuff to an IPA ASP in some test, it may
fail because the ASP is till not active in the STP (because IPA
handshake was yet not finished, race condition).

Change-Id: I8ea11fe331baf2b65ce0b7b3c1a2b480332faa2a
2020-10-03 08:16:56 +00: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 67de93784e BSSAP_LE: comment/log tweaks
Change-Id: I39ae5abc932c8cb5eb37b8c25a84621bd9ff30ca
2020-10-01 06:48:55 +02:00
Neels Hofmeyr 7b562bfe42 fix typo BSSMAP_LE_LCS_CAUSE_UNSPEIFIED
Change-Id: Iff154cba13febf1a2e623b6de64fb39ffb91b302
2020-10-01 06:48:55 +02:00
Neels Hofmeyr c4c2a9176b fix BSSAP_LE_Types FIELDORDER
Change-Id: I6f3d5b238912923431db36a1ba7b4973ae4e2e91
2020-10-01 06:48:55 +02: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 37cf40843e sip: ACK on SIP failure message to avoid it being retransmitted
Otherwise the SIP message is retransmitted by osmo-sip-connector around
10-11 times, even when next test has started, making it fail since it's
not expected.

Change-Id: Icd0f7a7fac4be2aa97eb986c3d3d27dd70a49357
2020-09-28 10:38:07 +00:00
Harald Welte 5e8573e9b7 NS_Emulation: Prepare NSConfiguration for non-IP providers
NSConfiguration currently contains parameters relevant only for IP
based transport.  Move IP/UDP parameters into a sub-structure in
anticipation of Frame Relay support.

Change-Id: I6904520d8c2f546327029777d68b1907611a8cf5
2020-09-27 09:15:32 +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
Daniel Willmann 535aea686e pcu: Check stats for pcu channel allocation, bytes transferred
Change-Id: I90964b32fa11ed2582afc5fb56bd302b06606f86
Related: SYS#4877
2020-09-25 12:31:36 +00:00
Harald Welte 9a7c512bbd NS_Emulation: Fix Tns-alive/Tns-test expiration detection
Change-Id: Icb7d076f57c166b498c1b3edd84edcf13ea9739d
2020-09-25 10:01:53 +00:00
Pau Espin 00f40e8a0d cosmetic: bsc: Fix indentation alignment
Change-Id: I5484784fca254044055a9f131e1ebb19de8ceba5
2020-09-25 09:57:53 +00:00
Alexander Couzens 8e1dfd0d0f SGSN: introduce NS tests
Similiar to the PCU_Tests_NS introduce SGSN_Tests_NS.

Change-Id: Ib2bffbb110961474928f35d212cb492d4b6fdee0
2020-09-25 01:31:44 +02:00
Alexander Couzens 904f50115d Move RAW_NS to library to use it in SGSN NS tests
Change-Id: I5a0e62cc9f032c515188530c0ceee29061fe11d2
2020-09-25 01:31:44 +02:00
Alexander Couzens 299ec648dc SGSN_Tests.cfg: fixup renaming remote_proto -> address family
In an old version of the PCUIF version 10 this field was named remote_proto
but got renamed into address_family before it was merged.

Change-Id: Ia49169afe2db2503e99b62bb55639b2aeea546f2
2020-09-25 01:31:44 +02:00
Daniel Willmann c5398f73de bsc: Check attempted/successful channel requests
Change-Id: I5b5c7c72eea28314da2ee7725d94d85917aa3ad3
Related: SYS#4877
2020-09-23 15:06:53 +00:00
Pau Espin befd3aaca4 mgw: Introduce test TC_crcx_osmo_ign
Related: SYS#5063
Change-Id: I79415c385e89fe859854430bb20940f078fccea0
2020-09-22 19:32:11 +00:00
Vadim Yanitskiy befa21c5c9 {BTS,PCU}_Tests: bump default PCUIF version: 9 -> 10
Both osmo-bts and osmo-pcu are switching to PCUIFv10 soon, so let's
use the new version by default.  For older (latest) IUT versions
not supporting PCUIFv10, one would need to override this module
parameter in {BTS,PCU}_Tests.cfg.

Change-Id: I9350c4a54434c3d46ce9424f382ca0057e58d053
Related: SYS#4868, SYS#4915
2020-09-22 00:53:26 +07:00
Vadim Yanitskiy 4b7473d99c pcu/GPRS_Components: allow passing/matching of TS/TRX/BTS/BLK numbers
This change will facilitate adding test cases for multi-slot TBF
allocation across several TS and/or TRX instances of a BTS.

Change-Id: I9bff9e912bf73ad6259946a6ea5b08f3e2f728c8
Related: OS#4756
2020-09-21 17:06:08 +07: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
Alexander Couzens eaab57ea5a sgsn: update expected-results.xml
Change-Id: Ic06dc761508addd0e2ca85d0cd9f996f13cf84fb
2020-09-18 08:37:11 +00:00
Alexander Couzens 2416830547 sgsn/SGSN_Tests.cfg: also run Iu tests
Change-Id: Ia6ee4b2776cfbb9295334617d8c201c21d1663f7
2020-09-18 08:36:50 +00:00
Pau Espin 62adaaf8e3 bsc: Rework CBSP tests to support testing IPv6
Change-Id: I859edebd24634ec9b448cd114f5541c93e552b0b
2020-09-18 08:31:11 +00:00
Harald Welte e18fccd5ab {PCU,SGSN}: Add missing address_family field in NSConfiguration
Change-Id: If63a96ec7ad28e87ff8bd18bf189d9395dda9c0d
2020-09-18 01:03:46 +02:00
Alexander Couzens 3ee8268e91 NS_Provider_IPL4: map the IPL4 port to the system port before using it
Change-Id: Ia588ff82764e531c14665454eed035cd17b047ad
2020-09-17 23:54:42 +02:00
Alexander Couzens e0f7c543b7 NS_Emulation: remove dependency on PCUIF_Types
The dependency of PCUIF_Types creates also a dependency on

Replace the PCU_AddrType by an unix like address family defined
in the Osmocom_Types to reduce the dependency.

Change-Id: I0b4fda96accef401ffc009010f9f5621583fd6dd
2020-09-17 23:29:16 +02:00
Harald Welte 60408e3f57 Don't map NS_Emulation_CT:NSCP anymore
NS_Emulation_CT:NSCP used to be a NS_CODEC_PT, which is a translation
port on top of the IPL4asp.  Such ports need to be mapped to a system
port at start-up.

However, in I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0 we introduced
a new underlying component called NS_Provider.  Hence, NSCP is actually
connected to that underlying component, and no longer mapped.

The corresponding change in pcu/SGSN_Components.ttcn and sgsn/SGSN_Tests.ttcn
has unfortunately been missed in the above-mentioned change.  Fix that.

Change-Id: I4c085210e6021e38a38ebc052ec3d9b345638cd2
2020-09-17 20:32:37 +02:00
Vadim Yanitskiy 7e1d0a23fe fixup BTS_Tests: verify hopping parameters in the INFO.ind message
Pass transceiver number to f_resolve_fh_params(), otherwise the
hopping parameters would always be generated for TRX#0, and thus
the expectations for TRX#N > 0 would be wrong.

Change-Id: If1a25f5ff1b1bca900d54cc56e2045df5a81f4e2
Fixes: I9bb164fd2c7c48b91e0d7bd1abaf3cfec155342c
Related: SYS#4868, OS#4547
2020-09-17 15:27:37 +00:00
Vadim Yanitskiy aa553eda65 fixup BTS_Tests: also match MA length in TC_pcu_info_ind_fh_params()
The bit-mask in fhp.ma_map.ma is octet-aligned, so we cannot use
its length.  Use the number of transceivers instead, since they
all belong to the same BTS.

Change-Id: I772d13841babd2856b6b2fcf126ba47fb20b055a
Fixes: Ibebbedecaed0a3f24a1bc7b520013fa563c4bbda
Related: SYS#4868, OS#4547
2020-09-17 15:27:37 +00:00
Harald Welte 013d65af1e NS_Emulation: Introduce NS_Provider underneath NS_Emulation
This is a step to prepare the NS_Emulation for operating on top of
Frame Relay, not just UDP/IP.  We replace the NS_CodecPort (mapping to
a IPL4asp) with a newly introduced NS_Provider_CT, specifically a
NS_Provider_IPL4_CT.

This change removes any IP specific bits from NS_Emulation and moves
it into the newly-created NS_ProvideR_IPL4.

Change-Id: I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0
2020-09-17 15:26:52 +00:00
Harald Welte 07cb87a90c BSSGP_Emulation: Fix build without BSSGP_EM_L3
Change-Id: Ic58e2d6bc37cb8fd8f0235b8497f674db7cfdd85
2020-09-17 15:26:52 +00:00
Alexander Couzens efca79da05 PCUIF_Types: fix version 9 remote address
Change-Id: I8a337399632e11d8a376e7a7fa3ff7a2396a80b1
2020-09-16 18:41:27 +00:00
Pau Espin bdd874a2f9 sip: Set & validate IP addresses and ports
Change-Id: Ie382f31b8b414daf598220c2e1b325b821129a40
2020-09-16 10:36:44 +00:00