Commit Graph

1171 Commits

Author SHA1 Message Date
Pau Espin ecd1225858 library/rua: Add some more templates
Change-Id: Iab2afbc6ebaa8a41d3e951155609d4c0a2d6866b
2021-12-13 18:58:31 +01:00
Vadim Yanitskiy c041e9902f library/Osmocom_Types: use f_rnd_bitstring() in f_rnd_ra11_ps()
Change-Id: I122d386b0c8ce320687016b6cab883b8a36bdffc
2021-12-11 02:11:35 +03:00
Vadim Yanitskiy 6a2a11ff4c library/Osmocom_Types: fix maximum values passed to f_rnd_int()
It's clearly stated in a comment to this function that the returned
value is 0 <= x < max, so it's always less than the maximum.

Change-Id: If127fc6a2feeddbdd3ea636b56dadf8957941758
2021-12-11 02:08:46 +03:00
Pau Espin 17e0f8c5a0 break GTP_Templates dependency on Osmo_Gb_Types, BSSGP_Types, NS_Types
The resulting set of dependencies needed just to have one simple CellId
struct is huge. That was fine for sgsn testsuite since anyway those were
being used, but it's not acceptable for other testsuites (hnodeb) which
only really require the GTP side.

After this change, GTP_Templates only requires GSM_Types, which ends up
in a much smaller subset of dependencies being pulled in.

Change-Id: Icd8234908af445b798517fe110cd0648969179a4
2021-12-09 15:25:50 +00:00
Vadim Yanitskiy a47cd4e6aa library/BSSMAP_Templates: parametrize codec list for tr_BSSMAP_ComplL3
Change-Id: I4abd77ebe47791adf2708e1c31614383d18e54b8
2021-12-07 07:38:33 +00:00
Oliver Smith 8b6d1804e1 library/Misc_Helpers: add f_osmo_repo_is()
Create functions to check which from Osmocom repository the SUT is
running. Put it in Misc_Helpers instead of a new library file since
Misc_Helpers is already available in many/all? tests and it fits there
too.

Depends: docker-playground Ic06532f7a67e59458652c5cf4c8f6fee8113e703
Related: OS#5327
Change-Id: Ic33d08992ea84af006d133db6aec508a7b7c7f28
2021-11-29 21:15:31 +00:00
Daniel Willmann ef8e50ef30 BSSGP_Emulation: Handle FLUSH_LL_ACK differently
The BVCI that this message might contain should not be used to route it.
It referes to the BVCI that the PDUs were transferred to (BVCI (new)).

Instead broadcast to all components.

Change-Id: Ia1df35da44ef28d91501bb898e1059bf1390129b
2021-11-26 12:05:20 +01:00
Pau Espin b54acca15f hnb: Introduce HNB_Tests testsuite
A new Iuh CodecPort + Emulation is introduced to (de)mux RANAP and RUA
in the same SCTP socket.
The Iuh_CodecPort.ttcn file has currently a hack to be able to test
HNBAP, since titan seem to be reporting sinfo_ppid=0 when in fact it
received sinfo_ppid=20 (HNBAP).

A couple tests are added to validate HNBAP HNBRegister Request  + Accept
or Reject. In current osmo-hnodeb state, both tests pass if run
separately, but fail if run sequentially since osmo-hnodeb still doesn't
re-connect properly after first test finishes and connection is dropped.

Related: SYS#5516
Change-Id: I7227917148e98a2c777f4b05d8d2eca6e9c121b7
2021-11-24 17:52:49 +00:00
Neels Hofmeyr afe2ea5c4f bsc: show bug: do inter-BSC-out HO by measurement report
So far all handover tests trigger handover via VTY command. This means
that any bugs introduced in measurement report handling and handover
target selection are by definition not caught.

Almost a year ago, fixing a handover oscillation bug for intra-BSC
handover introduced a segfault for inter-BSC handover targets, because
for those the target.bts is NULL. Show this bug.

Related: OS#5324 SYS#5259
Related: I5a3345ab0005a73597f5c27207480912a2f5aae6 (osmo-bsc)
Change-Id: Iba033c32015173f57dbb1c211aefab1a9094e29d
2021-11-24 15:26:50 +01:00
Vadim Yanitskiy 89f198cb8c library/DNS_Helpers: type 'char' was substituted with 'charstring'
Change-Id: I0c93002cf915a8ce7e63f208693b2b63ae52ac38
Related: SYS#5602
2021-11-19 03:31:19 +03:00
Pau Espin e8a9444356 pcu: Introduce test TC_t3172_*
Related: OS#3928
Change-Id: I3f4368c99b00453b471c3d741fecb8864ecdc628
2021-11-16 11:32:25 +01:00
Neels Hofmeyr b758187c86 bsc: add test for CM Service Reject counter
Related: I79b1261e5a281d9797eaaf9c27d90edd8e27c78b (osmo-bsc)
Related: SYS#4878
Change-Id: I0214b27da18af87eca9715ebf7eeeff945e3e12a
2021-11-10 14:32:50 +01:00
Neels Hofmeyr bd94fe7236 bsc: add TC_ratectr_all_available_allocated and _dyn
Test new rate counters all_allocated:{sdcch,tch,static_sdcch,static_tch}

Related: SYS#4878
Depends: I2fa14531f16d3f07085620f1c50eb839c420da6a (osmo-bsc)
Change-Id: Ib3997a827c9cc43d1361bb0cf3bfab9f6d91bf82
2021-11-10 13:31:48 +00:00
Vadim Yanitskiy f9e31d281b BTS_Tests: add test cases for Temporary ACCH Overpower
Change-Id: Ibdb94aa2779ae4b08f08cfef78c2959ae451a784
Related: SYS#5319
2021-11-10 03:35:19 +03:00
Vadim Yanitskiy e243ef6bf0 library/L1CTL_PortType: add f_L1CTL_rx_data() helper
Change-Id: I254171c6dc83f046b5ad1a72586c097deebb0fa7
Related: SYS#5319
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy 66d3c338c3 library/RSL_Types: add templates for RSL_IE_OSMO_TopAcchCap
Change-Id: If2e287699925c6bb7f93439d0729e16682fab019
Related: SYS#5319
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy a203d3b5e2 library/RSL_Types: add missing RSL_IE_OSMO_TOP_ACCH_CAP
Change-Id: I3bd491fba5b72f0fdd262992a97895f037be69d8
Related: SYS#5319
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy 1f53215f45 library/RSL_Types: add missing RSL_IE_OSMO_REP_ACCH_CAP
Change-Id: I198cbfd176e41c55f67d625d9587ba5b6062f0c4
Related: SYS#5114
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy 9cbb86ff2a library/GSM_RR_Types: remove misleading PADDING attributes
Unfortunately, TITAN has a weird (and often unusable) model of
defining padding in records.  According to its reference guide,
padding length is counted from the beginning of the message.
So if the 'MeasurementResults' is a part of another record, and
there are other fields preceeding it, the encoded representation
of the 'MeasurementResults' may still be shorter than 16 octets.

Change-Id: Ia1c87ae85ee402369dad0dfd81159f179095c8d2
2021-11-09 12:57:48 +00:00
Vadim Yanitskiy 9ff4780505 library/MNCC: implement MNCCv8 encoding/decoding support
Change-Id: I5488c5a4cc671e1d6a0d35b2ff4bdda0b0b48c00
Related: OS#5164, OS#5282
2021-10-28 16:16:33 +03:00
Vadim Yanitskiy f39627432c library/MNCC_Types: set 'sdp' field to omit by default
It's defined as 'optional', so let's rather use omit.

Change-Id: I96b03fe5363cc9bf1df622f7436d1a7c2da7514a
2021-10-28 16:10:27 +03:00
Vadim Yanitskiy d376063719 library/MNCC_EncDec.cc: fix encoding of optional 'sdp' field
Decoding was implemented in [1], but encoding was not.

Change-Id: I82f8afd3e64d83d165a7070a1b82a6276ef0b020
Fixes: [1] Ic9568c8927507e161aadfad1a4d20aa896d8ae30
2021-10-28 16:10:10 +03:00
Vadim Yanitskiy aff226fb03 library/MNCC_EncDec: rip out MNCC version 6 support
The latest release of osmo-sip-connector (1.5.0, 23 Feb 2021) does
support MNCCv7, so there is no need to maintain MNCCv6 support.

Change-Id: Ie45158e805a62e86b9496b46f323b83a74630460
Related: I5448ff931ec33f24f4837a51376f1703fe97683b
Related: OS#5282
2021-10-28 16:10:10 +03:00
Harald Welte 4038d4c4bd sccp: Add TC_process_rx_xudt, verifying reception of SCCP XUDT
Test if a XUDT SCCP message is processed by libosmo-sigtran.  We
assume any XUDT is received (and echoed back) just like normal UDT.

Related: OS#5281, SYS#5674
Change-Id: Idbf6db7a684e51858129618b2fcffcbe55b1b70f
2021-10-26 14:43:33 +02:00
Vadim Yanitskiy 42525ac97b library/TRXC_Types: add definitions for FAKE_TRXC_DELAY
Change-Id: Ic5034f244374d4368d4fcb9a382c984cc730c408
Related: OS#5245
2021-10-04 12:37:23 +00:00
Vadim Yanitskiy 418066a05c f_TRXC_transceive(): accept 'template (value)' parameter
Change-Id: I98012607f3e9da71234333aac77d59936cd3ee20
Related: OS#5245
2021-10-04 12:37:23 +00:00
Neels Hofmeyr 596393abe5 RSLEM: add f_chan_act_verify_tsc()
Will need this code again to verify the TSC during handover, so cast
this in a separate function.

Related: SYS#4895
Change-Id: I7a3f68ed1deba6a4a0a1cc4df7613638225c1640
2021-10-02 13:10:58 +02:00
Neels Hofmeyr ad26fc0017 RSLEM: add f_rslem_auto_chan_act_ack(boolean)
Allow to switch off automatic Channel Activation ACK via a new port
signature.

Required for upcoming BSC_Tests.TC_lost_sdcch_during_assignment().

Related: SYS#5627
Change-Id: I9a9d191aa66ec27f4f80c2baa2c5aa3c7b668d66
2021-09-29 16:02:01 +02:00
Daniel Willmann c5bbcc6279 gbproxy: Check SGSN-orignated BVC RESET if BSS BVC is gone
IF the BSS-BVC is gone gbproxy blocks the BVC towards the SGSN (this is
the only thing it can do since there is no BVC-REMOVE). If the SGSN ever
decides to reset that BVC the gbproxy should not ACK it, but instead
consider the BVCI unknown.

Change-Id: Ic57b39a77adf71abda99ef8af7da1592e2225a0d
Related: SYS#5628, OS#5236
2021-09-27 12:10:17 +00:00
Pau Espin f28fd080fc pcu: Support Neighbor Address Resolution over PCUIF
New versions of osmo-pcu support Neighbor Address Resolution over this
interface, and deprecated the old CTRL interface.
Let's use it by default while still keeping support for the old one for
a while to avoid breakage of existing deployments.

Tests run to validate:
* Old osmo-pcu still passes tests using CTRL interface
* New osmo-pcu (with new iface support) still passes tests using CTRL
  interface
* New osmo-pcu (with new iface support) passes tests using new iface

Related: SYS#4971
Change-Id: I05f1aabc64fc5bc4740b0d8afd8990b485eacd50
2021-09-14 09:11:14 +00:00
Neels Hofmeyr 8f17e05e25 fix errmsg in f_ctrl_set() which said "GET"
Change-Id: I56cd20c3c1b22ac0b1e5c03727c4e6d6cbfa6973
2021-09-07 17:23:17 +00:00
Neels Hofmeyr b07b295bb0 bsc: add TC_imm_ass_pre_chan_ack
Add tests for the new early IMM ASS feature in osmo-bsc:
  'immediate-assignment (post-chan-ack|pre-chan-ack)'

Related: 0b44493d3de03d2750527e224df67b473fe39f93 (osmo-bsc)
Related: SYS#5559
Change-Id: If71f4562d532b6c5faf55f5fd073449a8a137ebf
2021-08-17 22:06:57 +00:00
Neels Hofmeyr f8aa6c1a25 SMPP_Emulation: replace previous entries in f_create_smpp_expect()
Will be used by MSC_Tests.TC_call_re_establishment_auth in
I8110a6b432de734d53b111c7b69aabca12129691
to re-plug SMPP handling for an imsi to another vc_conn.

Related: SYS#5130
Change-Id: I63856fc158f5db9ced9185c208035b26e7ed7a74
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 2c4f7d8dde GSUP_Emulation: allow moving HLR handling to another test component
Will be used by MSC_Tests.TC_call_re_establishment_auth in
I8110a6b432de734d53b111c7b69aabca12129691
where a call from one vc_conn gets re-established in another vc_conn.

Related: SYS#5130
Change-Id: I235492185cda68f9f8e845085e3f6efe76a13501
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 2edc2cd742 MNCC_Emulation: allow moving call handling to another test component
Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864
where a call from one vc_conn gets re-established in another vc_conn.

Related: SYS#5130
Change-Id: If7e952e54ebd1bb88cce11ec5f0ff4826e02cb63
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 5c449f346e MGCP_Emulation: allow moving ep handling to another test component
Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864,
where a call from one vc_conn gets re-established in another vc_conn.

Related: SYS#5130
Change-Id: Id46035e53c2870e1fdef1335dce42b2020f7cd54
2021-08-06 14:03:28 +00:00
Neels Hofmeyr e51ce49fbf L3_Templates: add ts_ML3_MO_CC_DISC
To simulate an MS initiated call release at the MSC, a MO CC DISCONNECT
is required. So far msc's f_call_hangup() has some really weird
sequences of MNCC events. This is one preparation to fix that.

Will be used by MSC_Tests.TC_call_re_establishment in
Ifdff5573eeb3b3d41e8599b9b0228411d2576864

Related: SYS#5130
Change-Id: Ie152f8760c9bd6df04a20fdbb7ce9bbde9cb3d68
2021-08-06 14:03:28 +00:00
Neels Hofmeyr c0ef35ca62 bsc: improve error log for "RSL for unknown Dchan"
The failure verdict includes the RSL message that could not be
associated with a handling component, but ttcn_logformat does not format
that message. Add an identical log() that gets formatted nicely.

Change-Id: Ibb8f60671e78075492783cba560a8229ba5a380b
2021-08-06 14:03:28 +00:00
Neels Hofmeyr feda88e51d bsc: add TC_cm_reestablishment
Related: SYS#5130
Change-Id: I1e7d446644f46b8a0a94688e618ffb4f23a8900e
2021-08-06 14:03:28 +00:00
Neels Hofmeyr 3222e0eee8 bsc: add RSL port args in MSC_ConnHdlr, RSLEM
Add explicit RSL_DCHAN_PT and RSLEM_PROC_PT args to functions and
altsteps related to channel establishment and assignment. This allows
establishing and assigning a channel on cells other than bts 0.

This is required for upcoming BSC_Tests.TC_cm_reestablishment().

Related: SYS#5130
Change-Id: Ic3206b7125ee22bf98330080d9b136cefe7da03f
2021-07-27 07:28:26 +00:00
Vadim Yanitskiy ed5129f313 library/RTP_Emulation: add optional port for RTP sniffing
Change-Id: I224d25aa298b5b512ab9e2a36c144e19c23d8462
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy 8c978ec94f library/RTP_Emulation: improve readability of guard statements
Change-Id: Ic25646cca5c276feae8dda52153991a8d16913e1
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy fc63164bac library/RSL_Types: use OCT4 for local/remote address fields
This way functions like f_inet_addr() and f_inet6_addr() can be
used directly without converting between bytes and integers.

Change-Id: I389a8cb95c025c9dddc751789223621c15d9b48f
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy e9141c22b1 library/RSL_Types: add remote addr/port to ts_RSL_IPA_CRCX()
Change-Id: Iffcac2f1c9b877393fef547fb67ee24cc1e27a11
2021-07-05 12:09:07 +00:00
Vadim Yanitskiy 2a5a1ef401 library/RSL_Types: add matching templates for BS Power Control
Change-Id: Iceba738f71043dc22880d085836f8be9d14821ab
Related: SYS#4919
2021-06-30 10:20:33 +00: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 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
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 6924ef7199 bts: Support passing PCUIF messages over IPA multiplex
Related: SYS#5303
Change-Id: I3cd0988cb654f1c5816d1c4717255a5e802d7925
2021-06-25 13:28:20 +02:00