path: root/library
AgeCommit message (Collapse)AuthorFilesLines
4 daysvty: add f_verify_talloc_count()Neels Hofmeyr1-0/+64
Counts talloc objects via VTY and waits for a specific object count. Useful to test against leaks. The intended use is to check against leakage of bsc_subscr and gsm_subscriber_connection after each BSC_Tests.*, see patch in 'Related' below. Related: OS#5337 Related: I69d4c5c6f8d499bb7f0b96a48af045361433c57b (osmo-ttcn3-hacks) Change-Id: Iafe720a4931270e868f40c4f623d10bb9c14dc80
6 daysPGW_Tests: fix f_create_session(): add missing Serving Network IEVadim Yanitskiy1-0/+19
open5gs-smfd version 2.4.2 requires this IE to be present: [smf] INFO: [Added] Number of SMF-UEs is now 1 (../src/smf/context.c:820) [smf] INFO: [Added] Number of SMF-Sessions is now 1 (../src/smf/context.c:2610) [smf] ERROR: No Serving Network (../src/smf/s5c-handler.c:101) [smf] ERROR: No Data in Serving Network (../src/smf/s5c-handler.c:105) [smf] ERROR: Invalid Len[0] in Serving Network (../src/smf/s5c-handler.c:110) Change-Id: Idf6d147cc4a37996ee4ae6de18158b0e140d9db6 Related: SYS#5602
6 dayslibrary/GTPv2_Emulation: fix timer not being started in f_uecups_xceive()Vadim Yanitskiy1-0/+1
This change fixes the following error: Dynamic test case error: None of the branches can be chosen in the alt statement in file GTPv2_Emulation.ttcn between lines 362 and 370. which may happen when osmo-uecups-daemon fails to create a tunnel due to insufficient permissions. Change-Id: Icb229aed7fa9dedcf999837ec6ad249ab4fdebb7 Related: SYS#5602
2022-01-12bsc: Fix TC_rsl_drop_counter due to IPA_Emulation component being alive-typePau Espin Pedrol1-0/+39
IPA_Emulation component was marked with the "alive" type recently, in order to avoid race conditions leading to errors during tear down of the test. It turns out, the way "alive" keeps the component alive is by means of not closing the sockets when the component is stopped. As a result, TC_rsl_drop_counter test stopped working properly because it was specting a TCP FIN to be sent to osmo-bsc when the component was stopped. In order to fix it, add a new CFG port to the IPA_Emulation component on which one can operate. Add a a new method to tell the component to close the socket. Then, put that in BSC_Tests into a function which was actually unsued until now, and use it in the test in order to have the specific logic enclosed in a function helper. Fixes: 7138913d664c33b2404e3d293ab820fb3516ff73 Change-Id: I68163b053313d9907ba8e40954a5933d14cb7db6
2022-01-07RTP_Emulation: Fix race condition where Init is answered while connect is in ↵Pau Espin Pedrol1-2/+6
progress HNB test connects the RTP socket on the HNBGW side once it receives the Audio-CONN_ESTABLISH.cnf with the ip+port info. However, while doing so, osmo-hnodeb is already sending an Init which then the RTP_Emulation (connection in progress) tries to answer with an Init-ACK. RTP_Emulation.ttcn:201 Called on RTPEM_CTRL to TC_cs_mo_call-RTPEM(6) @RTP_Emulation.RTPEM_connect : { remote_host := "", remote_port := 16384 } ... IuUP_Emulation.ttcn:76 dec_IuUP_PDU(): Decoded @IuUP_Types.IuUP_PDU: { type_14 := { pdu_type := 14, ack_nack := IuUP_ACKNACK_CTRL (0), frame_nr := 0, iuup_version := 0, procedure_ind := IuUP_PRI_INITIALIZATION (0), header_crc := 55, payload_crc := 637, u := { proc_sending := { payload := '060051673C0127000082000000000300'O } } } } ... RTP_Emulation.ttcn:355 Sent on RTP to system @RTP_CodecPort.RTP_Send : { connId := 1, msg := { rtp := { version := 2, padding_ind := '0'B, extension_ind := '0'B, CSRC_count := 0, marker_bit := '0'B, payload_type := 96, sequence_number := 0, time_stamp := '00000000000000000000000000000000'B, SSRC_id := '11011110101011011011111011101111'B, CSRCs := omit, ext_header := omit, data := 'E4002400'O } } } ... RTP_Emulation.ttcn:355 Message enqueued on RTP from system @Socket_API_Definitions.PortEvent : { result := { errorCode := ERROR_SOCKET (4), connId := 1, os_error_code := 89, os_error_text := "Destination address required" } } id 2 Change-Id: I61200ddb035b310eced871a9954dfcbf1dc49360
2022-01-05RTP_Emulation: Several fixes and improvements for IuUP streamsPau Espin Pedrol1-6/+26
* Immediate tx of IuUP (N)ACK control packets. Without this, INIT ACK is delayed until the TX side of the RTP endpoint is enabled. * Allow and handle IuUP control messages even if g_rx_enabled is false. * Properly validate user data payload if IuUP is in use. Change-Id: Id4f8b02a8123bb30b659c40148c8ab4c7c2078a1
2022-01-05RTP IuUP Emulation: Avoid spamming with retransmitted InitPau Espin Pedrol2-2/+11
Until now, an Init was sent on each RTP transmit period, clogging the pcap files. Moreover, this is break by design, since transmitting another Init so close the the previous one would give no time to the transmitter to receive the Init ACk and move state, which means the other end would potentially be reconfigured each time (for each Init). Change-Id: I8e299a3fe49f9d31cae182f7ed4dc0ea3fc22ba2
2022-01-05IPL4asp: Fix ppid always shows 0, remove Iuh workaroundDaniel Willmann1-8/+0
Change-Id: I941a794849c347ed61ca5170bca32f5329818d92
2022-01-05hnbap: Add tr_HNBAP_HNBRegisterAccept templateDaniel Willmann1-0/+20
Change-Id: Iae35653e337acffc9190d2e4dc68f25f00bd6812
2022-01-05library/rua: Add missing templates (ts_/tr_)Daniel Willmann1-0/+92
Change-Id: Iad6525f4a337ac2399bec71d2e16f8540f78b247
2021-12-23hnodeb: Updates in HNBLLIF and HNBGW_COnnectioNHandler to support and test IuUPPau Espin Pedrol2-5/+80
Depends: osmo-hnodeb.git Change-Id Ibe356fa7b1abaca0091e368db8478e79c09c6cb0 Related: SYS#5516 Change-Id: I19612fce8190dfe14f98d346adb5db4e1c2a08d9
2021-12-23Iuh_Emulation: Avoid sending events to HNBAP if socket is not connectedPau Espin Pedrol1-3/+9
This should hopefully fix HNB_Tests errors showing up in jenkins after the test finishes: Iuh_Emulation.ttcn:203 Dynamic test case error: Port HNBAP has neither connections nor mappings. Message cannot be sent on it. Change-Id: Ide201425e81dcfe2fd395d820bdcbd74f5415ef5
2021-12-22IuUP_Emulation: Fix frame number wrap-aroundPau Espin Pedrol1-1/+1
As seen when running a test: IuUP_Emulation.ttcn:150 Dynamic test case error: While RAW-encoding type '@IuUP_Types.IuUP_PDU': There are insufficient bits to encode '@IuUP_Types.IuUP_PDU_Type_0.frame_nr' Change-Id: Ic9e69115c49545a7b9797d8f85568d5e91dfb329
2021-12-20library/RSL_Types: fix CHAN ACT templates for dynamic timeslotsVadim Yanitskiy1-6/+18
* t_RSL_IE_ActType_PDCH is actually a constant, not a template. * tr_RSL_CHAN_ACT_PDCH makes no use of parameter 'mode'. * Accomplish tr_RSL_CHAN_ACT_PDCH with a send template. * Use 'present' qualifier for receive template parameters. Change-Id: Ie62a92daaacf4de5f05dd1f3f5b4a2a5e4ee6dd6
2021-12-16hnodeb: Adapt HNBLIF to latest changesPau Espin Pedrol2-27/+24
Change-Id: I50a1b9be579ace9f0f85c6c68b5648d504f5f51c
2021-12-15Use alive-type components for "infrastructure" componentsHarald Welte1-3/+3
According to feedback received from TITAN developers in 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-15hnodeb: Add gtp SAPIPau Espin Pedrol2-1/+230
Change-Id: Ie4de00641089abbd03273ce5a2d9325659ac7d42
2021-12-15hnodeb: Add audio SAPIPau Espin Pedrol2-2/+253
Change-Id: I20544f67c2450bc3cd4bcb3ee638de1958bf5783
2021-12-15hnodeb: Add initial infra to emulate HNB LL socket ifacePau Espin Pedrol4-1/+626
Change-Id: Ia864a672643a0e42f5afea6fd901e621478c87c0
2021-12-15library/DIAMETER_Emulation: handle DWR/DWA ping-pongVadim Yanitskiy1-0/+8
Change-Id: I0291eccd0467f8fe15ddcb88259618365c33befd Related: SYS#5602
2021-12-15library/DIAMETER_Templates: add missing AVPs to AIRVadim Yanitskiy1-0/+5
Change-Id: I948072dbfa05d158483a727fb708f853741ab23f Related: SYS#5602
2021-12-15library/DIAMETER_Templates: fix missing app_id in ts_DIA_AIRVadim Yanitskiy1-0/+1
Change-Id: I7b06d9cad09f1fd7858bd745d0aaa2fbcb1983dd Related: SYS#5602
2021-12-15library/DIAMETER_Templates: fix flags in AIR templatesVadim Yanitskiy1-2/+2
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-15library/DIAMETER_Templates: add receive template for AIAVadim Yanitskiy1-0/+29
Change-Id: Ie4aca42c3024aa7f46123b2df4a42c5d43f5b9da Related: SYS#5602
2021-12-15library/DIAMETER_Templates: prettify & enrich AIR/AIA templatesVadim Yanitskiy1-31/+48
* 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-15library/DIAMETER_Templates: add missing templates for ULR/ULAVadim Yanitskiy1-0/+54
Change-Id: If0b8daf5717eb4c26da231489118e200faeee9a2 Related: SYS#5602
2021-12-15library/DIAMETER_Templates: rework existing ULR/ULA templatesVadim Yanitskiy1-25/+43
* 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-15library/DIAMETER_Templates: add templates for DWR/DWAVadim Yanitskiy1-0/+86
Change-Id: I2abe33a3ac08c8855342f4277288cacb3545771b Related: SYS#5602
2021-12-15library/DIAMETER_Templates: set default {hbh,ete}_id in ts_DIAMETERVadim Yanitskiy1-2/+2
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-13library/rua: Add some more templatesPau Espin Pedrol1-1/+161
Change-Id: Iab2afbc6ebaa8a41d3e951155609d4c0a2d6866b
2021-12-11library/Osmocom_Types: use f_rnd_bitstring() in f_rnd_ra11_ps()Vadim Yanitskiy1-2/+1
Change-Id: I122d386b0c8ce320687016b6cab883b8a36bdffc
2021-12-11library/Osmocom_Types: fix maximum values passed to f_rnd_int()Vadim Yanitskiy1-4/+4
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-09break GTP_Templates dependency on Osmo_Gb_Types, BSSGP_Types, NS_TypesPau Espin Pedrol1-15/+25
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-07library/BSSMAP_Templates: parametrize codec list for tr_BSSMAP_ComplL3Vadim Yanitskiy1-2/+3
Change-Id: I4abd77ebe47791adf2708e1c31614383d18e54b8
2021-11-29library/Misc_Helpers: add f_osmo_repo_is()Oliver Smith1-0/+17
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-26BSSGP_Emulation: Handle FLUSH_LL_ACK differentlyDaniel Willmann1-0/+23
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-24hnb: Introduce HNB_Tests testsuitePau Espin Pedrol7-0/+644
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-24bsc: show bug: do inter-BSC-out HO by measurement reportNeels Hofmeyr1-0/+40
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-19library/DNS_Helpers: type 'char' was substituted with 'charstring'Vadim Yanitskiy1-1/+1
Change-Id: I0c93002cf915a8ce7e63f208693b2b63ae52ac38 Related: SYS#5602
2021-11-16pcu: Introduce test TC_t3172_*Pau Espin Pedrol2-1/+66
Related: OS#3928 Change-Id: I3f4368c99b00453b471c3d741fecb8864ecdc628
2021-11-10bsc: add test for CM Service Reject counterNeels Hofmeyr1-0/+17
Related: I79b1261e5a281d9797eaaf9c27d90edd8e27c78b (osmo-bsc) Related: SYS#4878 Change-Id: I0214b27da18af87eca9715ebf7eeeff945e3e12a
2021-11-10bsc: add TC_ratectr_all_available_allocated and _dynNeels Hofmeyr1-0/+79
Test new rate counters all_allocated:{sdcch,tch,static_sdcch,static_tch} Related: SYS#4878 Depends: I2fa14531f16d3f07085620f1c50eb839c420da6a (osmo-bsc) Change-Id: Ib3997a827c9cc43d1361bb0cf3bfab9f6d91bf82
2021-11-10BTS_Tests: add test cases for Temporary ACCH OverpowerVadim Yanitskiy1-0/+21
Change-Id: Ibdb94aa2779ae4b08f08cfef78c2959ae451a784 Related: SYS#5319
2021-11-09library/L1CTL_PortType: add f_L1CTL_rx_data() helperVadim Yanitskiy1-0/+23
Change-Id: I254171c6dc83f046b5ad1a72586c097deebb0fa7 Related: SYS#5319
2021-11-09library/RSL_Types: add templates for RSL_IE_OSMO_TopAcchCapVadim Yanitskiy1-0/+23
Change-Id: If2e287699925c6bb7f93439d0729e16682fab019 Related: SYS#5319
2021-11-09library/RSL_Types: add missing RSL_IE_OSMO_TOP_ACCH_CAPVadim Yanitskiy1-0/+11
Change-Id: I3bd491fba5b72f0fdd262992a97895f037be69d8 Related: SYS#5319
2021-11-09library/RSL_Types: add missing RSL_IE_OSMO_REP_ACCH_CAPVadim Yanitskiy1-0/+13
Change-Id: I198cbfd176e41c55f67d625d9587ba5b6062f0c4 Related: SYS#5114
2021-11-09library/GSM_RR_Types: remove misleading PADDING attributesVadim Yanitskiy1-2/+1
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-10-28library/MNCC: implement MNCCv8 encoding/decoding supportVadim Yanitskiy4-5/+74
Change-Id: I5488c5a4cc671e1d6a0d35b2ff4bdda0b0b48c00 Related: OS#5164, OS#5282
2021-10-28library/MNCC_Types: set 'sdp' field to omit by defaultVadim Yanitskiy1-25/+25
It's defined as 'optional', so let's rather use omit. Change-Id: I96b03fe5363cc9bf1df622f7436d1a7c2da7514a