Commit Graph

2306 Commits

Author SHA1 Message Date
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
Pau Espin 956bfd247d msc: Validate RTP addr+port passed from MNCC to MGCP MDCX
Change-Id: I0b53643ed3a8f8550b2ea6e8832068d603a676e1
2020-09-16 10:36:44 +00:00
Pau Espin 563b3d013b mncc: Support IPv6 addresses (new version mncc 7)
Apparently commit 06b859ca31 forgot to
bump the MNCC_SOCK_VERSION field from 5 to 6.

Change-Id: I5448ff931ec33f24f4837a51376f1703fe97683b
2020-09-16 10:36:44 +00:00
Pau Espin 28aa466dd9 library: CBSP_Adapter: Improve robustness of rebind and reconnect
Change-Id: Ibafbc8496eeadd0ea1b97056ef3b8a92bc43e9f1
2020-09-16 10:24:40 +00:00
Pau Espin 609f1d6c10 msc: Introduce module param to disable crashing test in latest
Otherwise all tests run after ruing MSC_Tests_Iu.control fail.

Change-Id: I46f1066323e19dfe708402a8c9c68e257f62751c
2020-09-15 20:46:00 +00:00
Pau Espin 9a732a4f48 msc: Drop parameter mp_enable_osmux_test
That was needed for osmo-msc <= 1.3.0, and we are at 1.6.1 now.

Change-Id: I8bc0551ec91a5fd8ea2f291a1e16a06a739c7a75
2020-09-15 20:46:00 +00:00
Vadim Yanitskiy 220fa204da fixup library/PCUIF_Types: version 10: do not add redundant padding
Unlike osmo-pcu, osmo-bts does check length of the messages received
over the PCU interface, so I7a532d7abff8af354e40c5d706bb882efc6f905f
caused all the related test cases in ttcn3-bts-test to fail.

Reverting it is not a solution, because we cannot maintain different
padding attributes for two different protocol versions.  Let's add
a wrapper function that would call enc_PCUIF_Message() and append
padding depending on the configured protocol version.  In addition,
let's add a module parameter that would allow us to (optionally)
disable padding for ttcn3-pcu-test.

This change makes all broken PCUIF specific test cases pass.

Change-Id: Ica9e0c49c8b16e7d585a481670762c6433c61118
2020-09-15 19:15:22 +07:00
Alexander Couzens ad70991d51 RAW_NS: remove usage of mp_gb_cfg
RAW_NS uses module parameter from SGSN_Components. To decouple
RAW_NS from SGSN_Component pass the cell_id via a function argument.

Change-Id: I91d9db85519675054aaab83c85fac43e67391f33
2020-09-14 12:01:42 +00:00
Alexander Couzens 2beaa20295 RAW_NS: remove usage of mp_nsconfig
RAW_NS uses module parameter from SGSN_Components. To decouple
RAW_NS from SGSN_Component pass the NSConfiguration via f_init_ns_codec()

Change-Id: Ida8b8a6af815dc11b2ff4c65e19cc5ec25f18ae2
2020-09-14 12:01:42 +00:00
Alexander Couzens b3d4c670ad RAW_NS: f_init_ns_codec: add argument tc_idx to modify the port
In preparation for the SGSN tests allow to change the source udp port
for every test case.

Change-Id: I465ad2c8580e74cce4dab46f4ec29a9043df9938
2020-09-14 12:01:42 +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
Vadim Yanitskiy 7fefceea71 BTS_Tests_SMSCB: handle frequency hopping parameters
Change-Id: I1fd0a46b3d23afabae81fd1da5d2466e61e4a806
Related: SYS#4868, OS#4708
2020-09-14 09:04:39 +00:00
Vadim Yanitskiy ca81392360 BTS_Tests: group hopping parameters into a separate record
Change-Id: Iedb5d858a2d4f5d5a45e7465ae6586b3ae4bbb72
Related: SYS#4868, OS#4708
2020-09-14 09:04:39 +00:00
Vadim Yanitskiy cc4e149a2f BTS_Tests: simplify MA length calculation in f_resolve_fh_params()
Change-Id: I13f1d45162b520eff0d2e9823604fda85b71970b
Related: SYS#4868, OS#4708
2020-09-14 09:04:39 +00:00
Vadim Yanitskiy 9308cd665d BTS_Tests: also match MA length in TC_pcu_info_ind_fh_params()
Change-Id: Ibebbedecaed0a3f24a1bc7b520013fa563c4bbda
2020-09-14 09:04: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
Harald Welte 501e070d6e deps: switch TELNETasp and M3UA back to upstream
the respective changes we had have long been merged upstream, so
let's switch back from our own forks to upstream

Change-Id: I52bdac20745bc3f5ce618ea804686781483a6f4c
2020-09-13 11:34:28 +02:00
Harald Welte 93331e736b BSSGP_Emulation: Make L3 (SM/GMM) decoding a compile-time option
This allows us to build low-level tests that don't require all of L3.

Change-Id: I7ef7e93e2cd1d37e7e4a62947ca8dfde30d93b95
2020-09-13 10:18:41 +02:00
Harald Welte 6ce47c3ea7 lib: Move ts_RaCapRec from RLCMAC_CSN1_Templates to L3_Templates
There is no reason whatsoevery why a L3_Templates.ttcn file should
ever include types from RLC/MAC.  This creates a dependency nightmare.

The type for which ts_RaCapRec is written (MSRACapabilityValuesRecord)
originates from titan.ProtocolModules.MobileL3 so it's completely
unclear how any of that ever related too RLC/MAC.

Change-Id: Ie1ccef090ad51e26ccae17998e4294c6e27cf9c8
2020-09-13 10:18:41 +02:00
Harald Welte 557c9f8cb8 move some key types from GSM_RR_Types to GSM_Types
This in turn means Osmocom_Gb_Types doesn't need to depend on
GSM_RR_Types anymore, which is particularly ugly as the latter
now depends on RLCMAC_*, creating a long chain of dependencies.

Change-Id: I8c8da7709695ff0023f71b3999291e2515b22e46
2020-09-13 10:18:41 +02:00
Alexander Couzens 4231de67fc library: Osmocom_Types: fix extra indention tab
The top level context doesn't have an indent.

Change-Id: Ib94fa74a7752f21ba8203a5de17ce2b10d800d16
2020-09-11 20:24:19 +02:00
Alexander Couzens 5e6ae79d0c library: GSM_Types: fix extra indention tab
The top level context doesn't have an indent.

Change-Id: Ifece2e9fa782f173665e10fa9174403cccac7eb6
2020-09-11 20:24:19 +02:00
Alexander Couzens 5283f55777 BTS_Tests: verify NSVC IPv4/IPv6 in the INFO.ind message
Change-Id: Iae854875a45dbc29cd46a267ccaf60f1f2ac2973
Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Related: SYS#4915
2020-09-11 12:58:00 +00:00
Vadim Yanitskiy a93088ae64 library/PCUIF_Types: version 10: do not add redundant padding
Change-Id: I7a532d7abff8af354e40c5d706bb882efc6f905f
2020-09-11 12:58:00 +00:00
Alexander Couzens f57ff03acb PCU_Tests_NS: add missing bound of nrf
Otherwise it will try to use setverdict() with an unbound PDU

Change-Id: Ieafe9017126dd293aad09dad3c8a4180c9c29fa0
2020-09-11 12:56:39 +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