Commit Graph

2824 Commits

Author SHA1 Message Date
Harald Welte 4998a09917 NS_Emulation: Don't respond to NS-STATUS with NS-STATUS
Change-Id: Id9544ed1a7686fe113c4f6671e482bffc84bd2cc
2021-02-04 14:58:22 +01:00
Harald Welte e58e5b74da fr-net: Echo back DL-UD in UL-UD when LLC SAPI '0010'B is used
This allows us to have bi-directional tests

Change-Id: I7637ee5f1a7cce0ed282c972b9cd0702ba86cbaa
2021-02-04 14:58:22 +01:00
Harald Welte 8525764791 fr: UE_CT: Store BVCI + CellId in each UE
Change-Id: I1a25a03e17b3d957763512dc4acda134338df3be
2021-02-04 14:58:22 +01:00
Harald Welte bfff717e1c fr/fr-net: Use four parallel FR NS-VC instead of just one
Related: OS#4974
Change-Id: I366ceea525c09236f5432ba043a757e593d4ed0e
2021-02-04 10:48:21 +01:00
Harald Welte 76eca4dcd8 fr-net: Don't generate junit-xml output. It's not a test suite
Change-Id: Id296e62fb86731492d42370173a48f217b2fbdc0
2021-02-04 10:35:03 +01:00
Harald Welte db7892ad5f Makefile: add fr + fr-net
Change-Id: Ifc5ceca0fdaa697838de8c87e247a188e633a5cb
2021-02-03 20:21:16 +01:00
Harald Welte 106ba34a26 fr: TC_bvc_bringup
Change-Id: I91d61e01158802496a1058748c51506f0472b24e
2021-02-03 19:28:05 +01:00
Harald Welte f1f23bf785 fr: Generalize and document functions
This prepares a lot of the FR_Tests functionality to be re-used in more
test cases.

Change-Id: I95b759ad85d9d1cba1533122672e7ff5628bc014
2021-02-03 19:28:05 +01:00
Harald Welte 02cdc7cf2c fr: Add component id in logs; add 15s timeout waiting for BVC-UNBLOCK
Change-Id: If62d54517ee9af828d6fa56d83073260ceced1e8
2021-02-03 19:28:05 +01:00
Harald Welte 5e78788c4e fr: Make TC_foo() actually terminate
Rather than running in an endless loop (useful for manual tets),
terminate each UE_CT after sending 50 packets.  Also adjust the ramping
and timeouts in a way that it manages to terminate ahead of the guard
timeout.

Change-Id: I7f40f5c59d399d528072986d067b5014fbd085c4
2021-02-03 19:28:05 +01:00
Harald Welte 681949b047 fr: Implement per-UE guard timeout
Change-Id: Ie52b1923ca81f7717be446891df1bfdb67ed7ed7
2021-02-03 19:28:05 +01:00
Harald Welte 056858ac62 fr: Don't wait indefinitely, but wait until all UE components terminate
Change-Id: Ifdf9c7fb625ccdb467b3b87f79431da18fea5f2e
2021-02-03 19:28:05 +01:00
Harald Welte 633805b1c8 BSSGP_Emulation: Support up to 64 BVCs with 64 users each
Increase this from the previous limit of 16 BVC with 16 users each

Change-Id: I8abca1c020d0ba4b89a6045e99d3a9eb7bcc4648
2021-02-03 19:28:00 +01:00
Harald Welte c0c67ff14f NS_Emulation: Handle NS_PROV_LINK_STATUS_DOWN
This happens e.g. if FrameRelay detects a "service affecting condition",
i.e. the link is considered dead.

Change-Id: I7409079f5e2b77cc08ccc93d1b0baa72720cefb8
2021-02-03 19:28:00 +01:00
Harald Welte ce2e4976be deps: Use latest version of AF_PACKET
... as this contains a fix to FrameRelay_Emulation to disable T392 if a
service affecting condition is detected.

Change-Id: I8b266577f738b7c12514eb8671e11d7a75be6034
2021-02-03 19:28:00 +01:00
Harald Welte 61b3a8729f deps/SCTPasp: Update to master (uses epoll instead of select)
The old version of SCTPasp we use
* had no IPv6 support
* didn't support file descriptors > 1024

See also https://www.eclipse.org/forums/index.php/m/1837587/#msg_1837587

Change-Id: I446dfb2f885999e40478b9332162a2584b0b71a3
2021-02-03 19:28:00 +01:00
Alexander Couzens 87e44cfe55 ns: fix broken tests by adding weight
The NSConfiguration now requires signalling_weight and data_weight.
Otherwise the tests will fail to an unbound integer.

Change-Id: I4484d48d945d5e6e1711f9bedf3248a24ecc4e76
2021-02-03 15:43:07 +01:00
Pau Espin f7e947af0b pcu: TC_bssgp_dl_unitdata_with_invalid_imsi: Expect BSSGP STATUS on correct port
Change-Id: I0457302fef24a362f0720247ea653b06af9e1c87
2021-02-03 08:38:47 +00:00
Pau Espin Pedrol 2abbba90f1 pcu: Introduce test TC_nacc_outbound_success_no_ctrl_ack
Related: OS#4909
Change-Id: I371033604db8ae845e7c3fb03aef1821520064d9
2021-02-03 08:34:32 +00:00
Pau Espin Pedrol a846e619a7 pcu: ACK Pkt Cell Change Continue
Related: OS#4909
Change-Id: I73aaa80e73b2abb06fd0084433122337dc9c4e3f
2021-02-03 08:34:32 +00:00
Philipp Maier 94c0848113 BTS_Tests: test forwarding of SI1, SI3 and SI13 via PCUIF
Whenever the BSC is updating SI1, SI3 or SI13 via RSL, the PCU should be
informed about the change via PCUIF as well. For SI13 this is already
the case and a testcase exists. The PCUIF protocol is
now capable to update SI1 and SI3 as well.

 - Update BTS_Tests.TC_pcu_ver_si13 so that it works with the current
   protocol version
 - Add BTS_Tests.TC_pcu_ver_si3 and BTS_Tests.TC_pcu_ver_si1 that test
   SI1 and SI3 as well.

Depends: osmo-bts Ib7aeb41e634ad6fcab3766a4667b0267c749436a
Change-Id: I5138ab183793e7eee4dc494318d984e9f1f56932
Related: SYS#5103
2021-02-03 08:27:16 +00:00
Philipp Maier d55fe7e7c2 PCU_Tests: add testcase TC_rim_ran_info_req_single_rep and _no_si
Perform a full RAN information request (single report) against the PCU
and check the results. Also test what happens when the request is issued
at a time where osmo-bts has no system information available.

Depends: osmo-pcu Id72118120c14984d2fb1b918b41fac4868150d41
Change-Id: I9054ab0e969c0fbfdc671c92d44cc61360959adc
Related: SYS#5103
2021-02-02 21:56:31 +01:00
Pau Espin 853666813e pcu: Introduce test TC_nacc_outbound_success_twice_nocache
Change-Id: I64369eb02fa611f9249696ffe249b0d6d917fa70
2021-02-01 12:24:59 +01:00
Philipp Maier 14d3a8e7c3 GBProxy_Tests: fix TC_rim_* tests
The TC_rim tests do not use the RIM templates from Osmocom_Gb_Types as
intended.

Change-Id: Ie484f288aa0515ef4df4a3cf7f8a347a3f3cf587
Related: SYS#5103
2021-01-30 19:18:36 +00:00
Pau Espin 77783caf84 CTRL_Adapter: Keep server alive after first client disconnects
It can be expected from CTRL clients to connect and disconnect several
times as several commands are sent, so let's by default enable it (only
user of this CTRL servcer in PCU_Tests needs it).

Change-Id: Idddc27671d1b823dfbc62bcf7be673e51b574d63
2021-01-30 19:18:18 +00:00
Pau Espin 2dc137ccd1 IPA_Emulation: Support keeping server alive after first client disconnects
Change-Id: I4c133a889df0a5a060b5c52a1ca40fa9b8695c2e
2021-01-30 19:18:18 +00:00
Pau Espin a948d14d4d CTRL_Adapter: Add function f_ipa_ctrl_wait_link_down
Change-Id: Ia9f08dae76774925de8a08c7e313965280cb51b0
2021-01-30 19:18:18 +00:00
Pau Espin e51c17ae4a pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_conn_refused
Change-Id: Ia0452879edb958098598e9e1c943f4e1e458a9bf
2021-01-30 19:17:49 +00:00
Pau Espin 43be42557e pcu: Introduce test TC_nacc_outbound_success_twice
Change-Id: Ia7b1584b3f7abfa2697a1f155c8b7788a3b0722e
2021-01-30 19:17:49 +00:00
Pau Espin 4b5227ccf1 pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_fail_parse_response
Related: SYS#4909
Change-Id: If7efddb1ae2ccb580fe85c8df45c9ccdb818c6f3
2021-01-30 19:17:49 +00:00
Pau Espin 9076ee7412 pcu: Introduce test TC_nacc_outbound_si_resolve_timeout
Related: SYS#4909
Change-Id: If0032b940685efaaa8f65357c56c3383fab3e283
2021-01-30 19:17:49 +00:00
Pau Espin 31e30646cf pcu: Introduce test TC_nacc_outbound_rac_ci_resolve_timeout
Related: SYS#4909
Change-Id: Ia09fbfe9aba34a51e0715d1c307de280e3ae0249
2021-01-30 19:17:49 +00:00
Pau Espin 0637ba0728 pcu: Introduce test TC_nacc_outbound_success
Related: SYS#4909
Change-Id: I951db4af731e5a7c207f0f407dd78d166e2d3d26
2021-01-30 19:17:49 +00:00
Harald Welte 920c7c45ec fr + gbproxy: Start to use AF_PACKET ENOBUFS work-around
If send() on AF_PACKET returns ENOBUFS, usleep for 2ms and re-try
until it succeeds.

Change-Id: Id7bdd2c690eae3bec1df7634944cd73f0bf0b29a
Closes: OS#5343
2021-01-30 14:08:16 +00:00
Vadim Yanitskiy bc1e66a3f1 library/Osmocom_VTY_Functions: make VTY prompt timeout configurable
Change-Id: Iadec95446b98d9767d08a841fa1c28f8c71c5eea
2021-01-30 14:23:10 +01:00
Vadim Yanitskiy 26e30aa4e0 library/Osmocom_VTY_Functions: cosmetic: coding style changes
Change-Id: Idccdf6fcbda2d020d2263ea1440ea1c5d9ea0e45
2021-01-30 14:23:10 +01:00
Philipp Maier e00776c5db Osmocom_Gb_types: add minimum requred tr_ templates for RAN INF
When testing the serving BSS part of the RIM application in osmo-pcu, we
will need receiving templates that allow us to verify the response (RAN
INFORMATION) rim container.

Change-Id: I964d7504f3c4aeaa4ce537316b3140e8b893003d
Related: SYS#5103
2021-01-29 21:18:18 +00:00
Pau Espin 9df362a94f rlcmac: introduce initial support for NACC related messages
Change-Id: I4d2f123479c34e6afffe0bc8d91409e6b0529a62
2021-01-29 21:16:25 +00:00
Harald Welte d5b7e74403 gbproxy: Use Misc_Helpers.f_shutdown() whenever applicable
This should avoid some of the "known" races during shut-down

Change-Id: I4fdd47e9c5887597dca89580f856ddc6cd8f54f1
2021-01-29 08:59:27 +00:00
Alexander Couzens 61c5532366 sgsn: change configuration to the new NS2
Change the whole vty configuration for NS to be more flexible
and support more setups. Old configurations are invalid.

For further information see:
https://osmocom.org/projects/libosmocore/wiki/Network_service_(NS)

Depends-on: If5bd6b86e130772e6c93d640b0c637985416136d (osmo-sgsn)
Change-Id: I37d010bc4ae553c30feb2ebd2be66d23b96bf42a
2021-01-28 21:29:01 +01:00
Harald Welte 92009302c9 fr-net: use 'hdlcnet1' as default netdev
The gbproxy tests and our scripts have started to use
hdlc0..7 paired with hdlcnet0..7.  Let's adjust fr-net to
also use 'hdlcnet1' as the pairing 'fr' test uses 'hdlc1'

Change-Id: If456a575cc2ae0ab2fc63730b329131dfcc70a47
2021-01-27 09:52:11 +00:00
Harald Welte 2dd230a63c fr-net: Fix regen_makefile.sh
regen-makefile.sh should not include generated c++ code.

Change-Id: I0fecfb0d3c33f8d87923d4843fee718916001978
2021-01-27 09:52:11 +00:00
Harald Welte 14d23ef014 gbproxy: Increemnt many timeouts from 1s to 2s.
Sending a message [even over a real or simulated E1 line] should always
be less than 1s end-to-end.  But just to see if increasing the timeouts
to 2s will result in less test failures, let's change from 1s to 2s.

Change-Id: Iebb43283ad7c267c6ed7f49989ec453be38956a9
2021-01-26 15:47:07 +01:00
Pau Espin 46e3604fc8 pcu: Ignore dummy rlcmac packets in f_ms_rx_pkt_ass_pacch
Allow ignoring for received dumy packets while waiting for a Pkt Ass on
PACCH. This fixes some tests failing sometimes due to race condition
where rlcmac packet is requested too quicky, after the PCU has received
the BSSGP packet we sent to it.

The function is splitted into an internal altestep + a wrap function
which is compatible with tests already using it.

Related: OS#4779
Change-Id: I0a10d3a7383d8534e9263864b4130a96392e6198
2021-01-26 12:46:56 +00:00
Alexander Couzens 20cd41ec89 Introduce NS test cases
Related: SYS#5208
Change-Id: Ic619a374b88879d3116f8f28afb14401c3e3192b
2021-01-25 14:14:47 +01:00
Harald Welte 3f82089977 NS_Emulation: Add CTRL port to administratively disable a NS-VC
This feature is useful in simulating intermittent or permanent transport network
outage by simply halting processing of all rx+tx in the specified NS-VC
until it is administratively re-enabled.

Change-Id: I742ecf01de15e3edbf0719371f0217a5739b7c8e
RelateD: OS#4521
2021-01-25 12:48:38 +00:00
Daniel Willmann c38c85d474 gbproxy: Fix pooling expectations of TC_bvc_reset_*_from_bss
With pooling enabled these tests now need to verify that the reset/block
is propagated to all SGSNs in the pool.

Change-Id: I34ed4bffce564dbaf08f9388bd5247351dd0725e
Fixes: OS#4964
2021-01-21 18:11:12 +01:00
Harald Welte 388057da54 gbproxy: Use separate NS-VC for data / signalling on SGSN side
As we know, many production deployments have SGSN architectures with
clear control / user plane split.  In such situations, IP-SNS of the
SGSN informs us of two (classes of) IP endpoints:

    some that have control_weight > 0 and data_weight 0
    some that have control_weight 0 and data_weight > 0

Let's adjust the GBProxy_Tests.ttcn to use such a configuration for
each of the two simulated SGSNs.

Change-Id: If0e404bdf2c30a5e18748695608611be83f61109
Closes: OS#4953
2021-01-20 15:57:19 +01:00
Harald Welte be7afce974 NS_Emulation: Respect data_weight==0 or signalling_weight==0
* allow configuration of signalling + data weight for each NS-VC
* advertise per-NSVC signalling/data weight in SNS-CONFIG
* keep track of unblocked NS-VCS separately for data / signalling
* transmit BVCI=0 traffic only over signalling NS-VC
* transmit BVCI>0 traffic only over data NS-VC
* accept incoming BVCI=0 traffic only if signalling_weight > 0
* accept incoming BVCI>0 traffic only if data_weight > 0

Related: OS#4953
Change-Id: I9798e639b4bc8658482945970775b012b5840779
2021-01-20 15:56:31 +01:00
Pau Espin efe66646aa pcu: Connect to RIM port from BSSGP_Emulation
It will be used in next commits to test RIM related topics (such as
NACC).

Change-Id: I8113d9ef5433ae0976227408133a53397aeae41a
2021-01-20 14:42:23 +00:00