Commit Graph

1185 Commits

Author SHA1 Message Date
Harald Welte 7138913d66 Use alive-type components for "infrastructure" components
According to feedback received from TITAN developers in
https://www.eclipse.org/forums/index.php?t=msg&th=1106652&goto=1848616&#msg_1848616
the use of alive-type components has the following advantage:

> Also the DTE during the shutdown can be avoided to use alive type
> components.  The test ports of the alive components are not
> disconnected/unmapped when the component finished only when killed or
> the MTC terminated.

So the idea of this patch is to use alive-type components for all the
underlying infrastructure, such as the *_Emulation_CT starting from M3UA
to SCCP and further up the stack.  This way, only the MTC and the
highest level of components (such as ConnHdlr) remain as normal
components.

The hope is that using more alive-type components in the lower protocol
layer emulations will reduce the probability of DTE during shutdown if
some message is received during the component shutdown after the MTC
has completed.

Change-Id: I61d791d6d1bfe9226aabbe223baafc5f8f6d4f04
2021-12-15 20:20:30 +00:00
Pau Espin 9e18372690 hnodeb: Add gtp SAPI
Change-Id: Ie4de00641089abbd03273ce5a2d9325659ac7d42
2021-12-15 14:23:23 +00:00
Pau Espin 32fb54e610 hnodeb: Add audio SAPI
Change-Id: I20544f67c2450bc3cd4bcb3ee638de1958bf5783
2021-12-15 14:23:23 +00:00
Pau Espin a6bbb8c45d hnodeb: Add initial infra to emulate HNB LL socket iface
Change-Id: Ia864a672643a0e42f5afea6fd901e621478c87c0
2021-12-15 14:23:23 +00:00
Vadim Yanitskiy 3f7a6dc297 library/DIAMETER_Emulation: handle DWR/DWA ping-pong
Change-Id: I0291eccd0467f8fe15ddcb88259618365c33befd
Related: SYS#5602
2021-12-15 05:42:49 +03:00
Vadim Yanitskiy b57ef873e0 library/DIAMETER_Templates: add missing AVPs to AIR
Change-Id: I948072dbfa05d158483a727fb708f853741ab23f
Related: SYS#5602
2021-12-15 05:42:49 +03:00
Vadim Yanitskiy 463d826cca library/DIAMETER_Templates: fix missing app_id in ts_DIA_AIR
Change-Id: I7b06d9cad09f1fd7858bd745d0aaa2fbcb1983dd
Related: SYS#5602
2021-12-15 05:42:49 +03:00
Vadim Yanitskiy 21fd7db556 library/DIAMETER_Templates: fix flags in AIR templates
According to RFC 6733, section 3 "Diameter Header", if the 'R' bit
is set, the message is a request.  If the 'P' bit is set, the
message may be proxied, relayed, or redirected.

ts_DIA_AIR is a template for Authentication Information *Request*,
so the 'R' bit must be set.  Also, let's allow this message to be
proxied, relayed, or redirected by setting the 'P' bit by default.

In tr_DIA_AIR, do not match all command flags, just ensure that
the message is a request.  Other flags do not matter.

Change-Id: I7db3b632189eed09c1bdf98f9d588491d928e2f5
Related: SYS#5602
2021-12-15 05:29:47 +03:00
Vadim Yanitskiy 446edae4bc library/DIAMETER_Templates: add receive template for AIA
Change-Id: Ie4aca42c3024aa7f46123b2df4a42c5d43f5b9da
Related: SYS#5602
2021-12-15 05:28:41 +03:00
Vadim Yanitskiy 2dba494201 library/DIAMETER_Templates: prettify & enrich AIR/AIA templates
* Make both {hbh,ete}_id parameters last among the others;
* Use more elegant and consistent template formatting;
* Make DestinationRealm value configurable;
* Make SessionId value configurable.

Change-Id: Iaf6472fecbadd58e86b78c59348d9924ab57f97d
Related: SYS#5602
2021-12-15 05:12:13 +03:00
Vadim Yanitskiy 5e1bdc04d1 library/DIAMETER_Templates: add missing templates for ULR/ULA
Change-Id: If0b8daf5717eb4c26da231489118e200faeee9a2
Related: SYS#5602
2021-12-15 05:06:24 +03:00
Vadim Yanitskiy 0e8f516d22 library/DIAMETER_Templates: rework existing ULR/ULA templates
* Make both {hbh,ete}_id parameters last among the others;
* Use more elegant and consistent template formatting;
* Make Origin{Host,Realm} values configurable;
* Make DestinationRealm value configurable;
* Make SessionId value configurable.

Change-Id: I0585e306a87453c212c6b5ac5635181c47b34b4f
Related: SYS#5602
2021-12-15 05:00:54 +03:00
Vadim Yanitskiy f28b2550f2 library/DIAMETER_Templates: add templates for DWR/DWA
Change-Id: I2abe33a3ac08c8855342f4277288cacb3545771b
Related: SYS#5602
2021-12-15 04:59:03 +03:00
Vadim Yanitskiy 00720bd851 library/DIAMETER_Templates: set default {hbh,ete}_id in ts_DIAMETER
Having default values for these parameters allows omitting them
in subsequent send template definitions based on ts_DIAMETER.

Change-Id: I714b18bbe77949593803e999d25e4ef8e1827917
Related: SYS#5602
2021-12-15 04:54:21 +03:00
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