Commit Graph

2938 Commits

Author SHA1 Message Date
Vadim Yanitskiy 79e15161c2 BTS_Tests_SMSCB: ensure f_shutdown() is called in all test cases
This fixes sporadic test case failures due to race conditions.

Change-Id: I3f2c327e1e44d5decd4a936f063af649687f950a
2021-06-30 08:01:09 +00:00
Neels Hofmeyr 666d39abb9 msc: add inter-MSC HO tests with A5 encryption
Related: SYS#5324
Change-Id: Ia1df783be33bf752d291acb857d3c48882c65975
2021-06-29 16:17:54 +02:00
Neels Hofmeyr 0d841d98b6 msc: add inter-BSC HO tests with A5 encryption
Related: SYS#5324
Change-Id: I57e43c60d4389bd301d0195179321a34401bd1dc
2021-06-29 16:17:54 +02:00
Neels Hofmeyr b00c5b095d msc: add vec_keep to lock the AuthVector
Next to AuthVector vec, add boolean vec_keep. When set to true,
as_GSUP_SAI() skips the vector regeneration.

An upcoming patch adds encryption to inter-BSC handover, which will use
vec_keep := true. (See I57e43c60d4389bd301d0195179321a34401bd1dc )

Rationale:

Usually, a random auth vector is generated during as_GSUP_SAI(). For
inter-BSC handover, there are two separate virt-BSC components running.
But to be able to verify that the correct key is passed on from the old
to the new BSS, both titan components need to have the same AuthVector
data. The easiest solution is to generate the AuthVector before
launching the components, and then prevent that it is changed by
as_GSUP_SAI().

Related: SYS#5324
Related: I57e43c60d4389bd301d0195179321a34401bd1dc
Change-Id: I4bca739c2aad8342915e00a218f90fc19be7eafe
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f6eff81417 msc: generate Milenage ck in f_get_expected_encryption()
Instead of overwriting the ck of the original auth vector, generate the
Milenage-on-GERAN Ck key only for the expected ciphering IEs, centrally
in f_get_expected_encryption().

Related: SYS#5324
Change-Id: Iec618ba7fddb2290fc0137d99a9b8d5e2b428b98
2021-06-29 16:17:54 +02:00
Neels Hofmeyr f7831cbcd9 msc: cipher mode: move cipher expect to new function
Move the ciphering calculations from f_mm_common() to new function
f_get_expected_encryption(), so that it can be re-used for ciphering in
inter-BSC handover (upcoming patch).

Add tr_BSSMAP_CipherModeCmd2() to conveniently use the values returned
by f_get_expected_encryption().

To verify the Ciphering Mode Command in f_mm_common(), use the new
tr_BSSMAP_CipherModeCmd2(), and rely on template matching instead of
checking each IE individually.

Related: SYS#5324
Change-Id: I1f775889fb801d441ea6c8b0f0c34718b814c09e
2021-06-29 16:17:54 +02:00
Pau Espin 64adf3791f cosmetic: bsc: Fix wrong dyn ts type mentioned in comment
Change-Id: I020c1ee909a12540774d665f914f1115870bea7e
2021-06-28 16:25:47 +02:00
Philipp Maier ca058278c9 BTS_Tests: add testcase TC_paging_imsi_200percent_with_ps
The current paging load tests only test what happens when the paging
load is introduced from the PS side. However there are no tests that
tests what happens when PS pagings are introduced from the PCU side
into an already overloaded system.

osmo-bts was equipped recently with a mechanism that detects congestive
situations. Once a congestion is detcted osmo-bts will drop pagings from
the BTS side. The rationale of the new testcase is that the behavior
must not change when the PS pagings start since osmo-bts is dropping
them.

Change-Id: Ie72e788d9ebff6ca4e50314746127a9689948062
Depends: osmo-bts I30f97672d7a0c369c4a656e878ab8cbbd83e31ea
Related: SYS#5306
2021-06-28 08:47:04 +00:00
Pau Espin 65d712e973 bts: Test forwarding PCUIF<->IPA/OSMO/PCU
Change-Id: I78880098a55d1cb456011746efa0a47832a86ca8
2021-06-28 10:43:21 +02:00
Pau Espin 6c864ec07a bts: Rename function issuing OML SetAttributes
GetAttributes support will be introduced next, and current naming is
misleading.

Change-Id: Id84eda70e97364b7ec6a8d351f0b54f07faba670
2021-06-25 13:52:30 +02:00
Pau Espin 6924ef7199 bts: Support passing PCUIF messages over IPA multiplex
Related: SYS#5303
Change-Id: I3cd0988cb654f1c5816d1c4717255a5e802d7925
2021-06-25 13:28:20 +02:00
Pau Espin 52c5485462 CSN1: Support enc/dec of Packet Measurement related messages
Related: SYS#5303
Change-Id: I5567a0d86c70d67e2012ba284146952a40c279d7
2021-06-25 13:28:20 +02:00
Neels Hofmeyr 0d6fd3eff2 msc: f_auth3g_kc(): take vec as argument, drop "runs on"
It is more elegant to have one arg and not require a "runs on".

Related: SYS#5324
Change-Id: Iec21710edaa6ad3d20e23c7ee055909c642e8220
2021-06-23 23:53:06 +02:00
Neels Hofmeyr 2822d07ab2 msc: inter-BSC HO test: use CGI cell ID, not LAI
In the inter-BSC 'Handover Required', do not send a LAI cell identifier,
but a CGI one.

Rationale:

As explained in OS#5188, 3GPP TS 48.008 allows a LAI identification only
in the Cell Identifier List IE, but not in the single Cell Identifier
IE.

In the inter-BSC HO test's Handover Required message, we so far send a
LAI identifier in a List IE to osmo-msc. And so far, osmo-msc simply
echos that in the Handover Request message's single Cell Id IE.

The LAI is, as actually defined in the spec, omitted from the single IE
in deps/titan.ProtocolModules.BSSMAP/src/BSSAP_Types.ttcn, and when
osmo-msc sends the non-standard LAI Id, ttcn3 fails to parse the BSSMAP
Handover Request message: the Cell Identifier IE gets wrong values, and
all remaining IEs are parsed as 'omit' even though they are present on
the wire. So as long as osmo-msc sends back a LAI Id, we cannot sanely
verify the Handover Request received from the MSC.

The CGI identifier type is supported in both IEs. So when the test sends
a CGI identifier in the Handover Required, osmo-msc will also reflect a
CGI identifier in the Handover Request, and ttcn3 parsing works.

This prepares for adding verification of the ciphering in inter-BSC
handover, in turn a preparation for adding tests of A5/4.

Related: OS#5188 SYS#5324
Change-Id: I48276acf923626db171683dfa03ef43614a71380
2021-06-23 03:55:26 +02:00
Vadim Yanitskiy 83852c171b BTS: add a testcase for PDCH interference reports
Change-Id: I39e70524ad3d2ee51b537c8f786b7754a02949b1
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Vadim Yanitskiy d0766b28da library/PCUIF_Types: add definition for PCU_IF_MSG_INTERF_IND
Change-Id: I07d25d694c2f39a79295c2948ab6155f46e5c639
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Vadim Yanitskiy 98c4a1a3b9 BTS: add a test case for RF RESource INDication
Change-Id: I78b6d8beffa5228a28231b75728e7aebdd3cb23c
Related: SYS#5313, OS#1569, OS#1866
2021-06-22 20:07:48 +02:00
Neels Hofmeyr 8ebf19cfdf bsc: add tests for inter-BSC HO with encryption A5/{0,1,3,4}
Only ho-into-this-bsc tests are required, since the out-of-this-bsc
message (Handover Required) does not involve any encryption information.

Related: SYS#5324
Change-Id: I8de65eb9a5bd9a58add55e821f2a559c9a81edc1
2021-06-21 20:18:35 +00:00
Neels Hofmeyr 1d8decea8b BSSMAP: add encr params to ts_BSSMAP_HandoverRequest
Related: SYS#5324
Change-Id: Idadc0e0a7a960a0ef88b3dca97c4fbaa16975b61
2021-06-21 20:18:35 +00:00
Neels Hofmeyr af88d9dbf3 bsc: add intra-BSC handover tests with encryption
In f_tc_ho_int(), verify encryption information for the handover
target's chan act.

Add test cases calling f_tc_ho_int() with various A5/n encryption modes.

Related: SYS#5324
Change-Id: Iaab26c708c106a61b762234d42ed9a52cdc2998c
2021-06-21 20:18:35 +00:00
Neels Hofmeyr 58ffceb4ec bsc: split f_verify_encr_info() from f_cipher_mode()
The verification of correct encryption information so far is part of
f_cipher_mode(); put it in a separate new function f_verify_encr_info()
so that it can be re-used for handover channel activation.

Related: SYS#5324
Change-Id: I11602d23670f436a22b891fc744fe07e470f2b79
2021-06-21 20:18:35 +00:00
Neels Hofmeyr 3fe8460494 bsc: also allow empty key for A5/0
Change-Id: Id54abc09dd62d7247a970a03ed8c2209b641f511
2021-06-21 20:18:35 +00:00
Vadim Yanitskiy beda697221 [VAMOS] BTS: call f_shutdown() in f_TC_vamos_exec_async()
Sometimes, VAMOS related test cases fail due to a DTE:

  Dynamic test case error: Sending data on the connection of port
                           CCHAN_PT to 1:RSL_CCHAN failed. (Broken pipe)

Call f_shutdown() to ensure that all components are properly
terminated, so there will be no race conditions like this.

Change-Id: I690412a29b24571109415d32b09543de459076d1
Related: SYS#4895
2021-06-21 20:18:05 +00:00
Neels Hofmeyr 5f7a9dfcf4 bsc: f_tc_ho_int: do not override TestHdlrParams
Related: SYS#5324
Change-Id: Ibd1a887b197100bf7ffe1e37c6567690bc4c8f8c
2021-06-21 16:26:26 +00:00
Neels Hofmeyr 2bb1f0e09a bsc: drop unused kc variables
Change-Id: I08323cbe079d357dfdd44ecddacd1c772941abaa
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 0faeb7afc9 bsc: add BSC_Tests.TC_assignment_fr_a5_4_fail
Allow only A5/4, but omit the Kc128 IE from MSC's msg. Expect Cipher
Mode Reject.

Related: SYS#5324
Change-Id: I7734a4a59797a9b21523c33f48815a8094f4e6ec
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 0d8ec5366d bsc: add TC_assignment_fr_a5_4
Establish a TCH/F with A5/4 encryption.

Related: SYS#5324
Change-Id: I9ad899bd15a1f7ba0a44764f7d2a94f5b627053f
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 81ad27fca9 bsc: add TC_ciph_mode_a5_4
Establish a Signalling channel with A5/4 encryption.

Related: SYS#5324
Change-Id: I2428c21663dfa7d67e769da0127f74e8c01dfb97
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 5e31cfc63d bsc: f_cipher_mode(): verify enc alg in Cipher Mode Complete msg
Related: SYS#5324
Change-Id: I88b386c55e23cc180131e95a005d08cbc3ec102b
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 7274934057 bsc: f_cipher_mode(): fail quicker on key mismatch
Related: SYS#5324
Change-Id: Ia79779f4229da4a5af271235a5e82c6fd59ea3a2
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 0588cadcfd bsc: implement ttcn API and cfg for A5/4
Implement tools for OsmoBSC a5/4 support testing:

- in f_cipher_mode() and f_check_chan_act(), expect Kc128 key as
  appropriate, using recently added g_pars.encr.enc_kc128
- osmo-bsc.cfg: allow a5/4

Related: SYS#5324
Change-Id: Ifa48a8498dde7d04fb29f497013bdb5a1e5f3597
2021-06-21 16:26:08 +00:00
Neels Hofmeyr 6c388f209d bsc: reduce args to f_cipher_mode()
Instead of passing each part individually, simply pass the entire
TestHdlrEncrParams to f_cipher_mode().

Preparation for A5/4.

Add the kc128 to TestHdlrEncrParams instead of a function arg. kc128 is
so far unused, but will be used in an upcoming patch adding A5/4.

Related: SYS#5324
Change-Id: I2cb8282e55436da5ae64ab569df87d5d5a0dd2f0
2021-06-21 16:26:08 +00:00
Pau Espin 14b5fea25f GSM_SystemInformation: Fix trailing whitespace
Change-Id: Ie910d376c472f23bde7c357baca004a25053f5ce
2021-06-21 15:42:48 +00:00
Neels Hofmeyr 04d6e6acb6 bsc: replace TC_assignment_fr_a5_4 with TC_assignment_fr_a5_not_sup
reasons:

* TC_assignment_fr_a5_4() runs an unusual sequence of messages: it first
  fully assigns an lchan, and after that sends a Cipher Mode Command.
  Usually, the ciphering happens as part of attaching (Compl L3).
  The new test TC_assignment_fr_a5_not_sup() does the ciphering in the
  usual sequence, and properly expects a Cipher Mode Reject.

* TC_assignment_fr_a5_4 means to ask for an *unsupported* encryption
  algo. Since we are going to introduce A5/4 support shortly, we'll need
  to free up this name, for a successful A5/4 encryption test.

New test TC_assignment_fr_a5_not_sup() asks for A5/5 encryption, which
is not supported.

Related: SYS#5324
Change-Id: I83eca18d1b3d8d58177aa3750935ec5a3a985ca4
2021-06-21 12:41:21 +00:00
Vadim Yanitskiy 40bc162398 PCU: remove deprecated 'alpha 0' from osmo-pcu.cfg
Change-Id: I38d2d141a0743cc4bb61f62a98d7cc5c1384cff5
2021-06-21 09:36:13 +00:00
Vadim Yanitskiy 6b4404a717 BTS: release the channel in TC_ms_pwr_ctrl_{constant,pf_ewma}
Since recently, we do have NOPE indications in the virtual Um
environment.  Somehow this broke test cases for the MS power
control.  Releasing the channel makes everything work again.

Change-Id: I6a204bbecfe116aa302eae28ff24d6bb899fa8b7
Related: SYS#5313, OS#1569, OS#1866
2021-06-18 16:00:55 +00:00
Pau Espin 81a55e686d OML: Add types/templates for GetAttributesResponse
Change-Id: Iec7198cc164b6e33e708d59c3f214efb3e1ac33b
2021-06-18 12:29:19 +02:00
Pau Espin 211a714661 bsc: Validate new SRVCC counters
Change-Id: Icf2cd00f4024533a1bd8ba52816750a836bc0cb2
2021-06-17 14:05:09 +00:00
Pau Espin 9ae36d5e8c bsc: Validate new 'srvcc fast-return' VTY command
Related: SYS#5337
Change-Id: I227abc3793255e3916eba0dbc1460f46ec9926fe
2021-06-17 14:05:09 +00:00
Eric Wild c555be597f sgsn a54 tests
This adds a few tests that ensure that the encryption algorithm dynamically chosen is
1) one actually supported by both the sgsn and the UE
2) the strongest one available both have in common

Change-Id: Iad65cbf9840aa883cb34e53554b94a4142c82638
Related: SYS#5324
2021-06-16 06:32:53 +00:00
Alexander Couzens bd6e9a1da9 RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
RAW_NS used previous a single TTCN3 port for a single UDP port
(source/listen side).
This has the limitation that only a single NSVC could be tested for a
local UDP port. However SNS tests require multiple NSVCs over a single UDP port.
NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation.
Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use
multiple NSVCs.

Related: OS#5036
Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976
2021-06-15 20:20:44 +00:00
Pau Espin 0619995974 bsc: Fix race condition exiting f_ho_out_of_this_bsc
The function didn't wait to receive the 2 messages from the BSC. As a
result, they may have arrived while tearing down the test components
shortly after exiting the function and provoke a Dynamic Test Error
while pushing the messages up the stack since some of the stack layers
may already be unavailable.

Test TC_ho_out_of_this_bsc() workarounded this by using a f_sleep(1),
but TC_srvcc_eutran_to_geran_ho_out() didn't, making it fail sometimes.

Change-Id: I590b09353900dfe6c4f648812ab675fed1908589
2021-06-15 16:43:03 +00:00
Alexander Couzens 1650b165ea ns: test if SNS fails when all signalling NSVCs failes
As 3GPP TS 48.016 § 7.4b.1.1 specifies this behaviour.
1. do success SNS configuration
2. change sig weight of the seconds inactive bind
3. add second bind to SNS
4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
5. expect SNS SIZE

Related: OS#5039
Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
2021-06-13 04:08:51 +02:00
Alexander Couzens e23387a188 NS_Tests: add test case TC_sns_bss_add_change_del
1. do SNS configuration
2. add a bind
3. receive the SNS_ADD
4. before answering the SNS_ADD, change the weight via vty and remove the bind

Related: OS#5036
Change-Id: Ibc565bba4c7e0a0b4dd28a48847dbdb998c8528d
2021-06-10 12:47:41 +00:00
Vadim Yanitskiy 2372db6aee BTS: ignore other RSL messages in function f_TC_paging()
Recent changes [1] to osmo-bts make it periodically send the
RF RESource INDication messages for each transceiver over the
A-bis/RSL.  These messages block the queue of 'RSL_CCHAN' port
and make the paging related test cases fail.  Ignore them.

Change-Id: I18b879235c6eefb2dd89a3f4502b0830efeac6bb
Related: [1] Id80fdbef087de625149755165c025c0a9563dc85
Related: SYS#5313, OS#1569
2021-06-09 01:11:28 +02:00
Alexander Couzens 7a62502721 NS_Tests: reset the weights of all udp binds
Some test cases change the weight of the binds. Ensure all test cases
starts with the same configuration.

Related: OS#5036
Change-Id: Iae2ba130b2f7d29ec8b417f07d0bef87f74ce5a4
2021-06-07 01:11:17 +02:00
Alexander Couzens 2d10ee65e4 RAW_NS: f_incoming_sns_chg_weight() allow to receive/send the chg_weight over a different
The SGSN/PCU will use a different NSVC as the NSVC which will be changed weight'ed.

Related: OS#5036
Change-Id: I5766afaa74db30d94318312ab775e7933b9df783
2021-06-07 01:11:13 +02:00
Alexander Couzens 6f17ecc877 NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
Allow to test add and remove a bind via vty.

Related: OS#5036
Change-Id: I98c04c083521ab38b58e8df9f1aee89445ab536d
2021-06-07 01:11:05 +02:00
Neels Hofmeyr 9041c3b8b2 bsc-VAMOS: add cfg files to run BSC_Tests_VAMOS locally
A local tccn3 test run for VAMOS looks like:

  while sleep 1; do osmo-bts-omldummy -f vamos 127.0.0.1 1234; done

  osmo-stp

  osmo-bsc -c osmo-bsc-vamos.cfg

  make compile
  make -j 5
  ../start-testsuite.sh BSC_Tests BSC_Tests_VAMOS.cfg
  ../log_merge.sh BSC_Tests --rm

Change-Id: Iabda4c864b02e6ddbf03386c75d67a37f92992f4
2021-06-05 20:24:35 +00:00
Neels Hofmeyr 2336ba5f6b gitignore
Change-Id: Iedd6aeb17b1c774a5d96b28e69827796ff769bc1
2021-06-05 20:24:35 +00:00