Commit Graph

395 Commits

Author SHA1 Message Date
Vadim Yanitskiy 8f5b61ba52 bts: also test TCH/A[FH]S in TC_speech_no_rtp_tch[fh]
Change-Id: I3c7f91034079169c40c4f20966d9f5fb7c855b27
Related: OS#4823, OS#6049
2024-03-18 16:41:17 +00:00
Vadim Yanitskiy 3d4b001513 bts: dequeue L1CTL {DATA,TRAFFIC}.cnf in as_l1_{sacch,dcch,tcp}_loop()
This fixes sporadic failures in testcases using those altsteps.

Change-Id: I3538d40ff1a585ccbe37f3a90f3c374c5f0b5767
Related: osmocom-bb.git I0046f9c103bcb9207f0c2643c6a806bd56553d77
2024-03-18 16:41:17 +00:00
Vadim Yanitskiy 7e6b832b85 bts: rename as_l1_sacch() -> as_l1_sacch_loop()
For the sake of consistency with as_l1_{dcch,tch}_loop().

Change-Id: I076efac80ae08551c1098a6baa15a2ca99213ee2
2024-03-18 16:41:17 +00:00
Vadim Yanitskiy 8f86bbee5a library/PCUIF_Types: clean up, drop remains of PCUIFv10
Change-Id: Ibfe8558cb9f335d8c29348063b0ff02b138dd4c7
Related: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8
Related: docker-playground.git If0b2209af645f391817f65b4227736b52ca59e2e
Related: docker-playground.git I70f0c30d6c514614095dcbbcac5d025001861fbc
Related: OS#6191
2023-12-15 13:15:30 +00:00
Andreas Eversberg 2e7d39878c Fix TC_rll_est_ind (contention resolution on DCCH SAPI 0)
The BTS rejects establishment without contention resolution on DCCH SAPI
0. This only applies if channel activation type is for immediate
assignment. The Test expects the establishment on DCCH SAPI 0 to fail,
if channel activation type is for immediate assignment and to pass, if
the channel activation type is for normal assignment.

Related: OS#6309
Change-Id: I8143c6e9448a663fee2111a91415cc58fbcb2133
2023-12-14 15:04:57 +00:00
Vadim Yanitskiy e2d2a5d677 BTS_Tests: extend TC_early_immediate_assignment: run on trx_nr=1
This patch demonstrates the problem with handling of the Early IA:

* the first part remains unchanged: assign a channel on C0 (arfcn=871);
* the second (new) part tests channel assignment on C1 (arfcn=873).

As of now, osmo-bts does not meet our expectations for the second part.

Change-Id: I7517574a8095ddfa05c34c4c3d4accf2bd07894b
Related: SYS#6655
2023-11-22 02:48:17 +07:00
Vadim Yanitskiy dd718d0ec6 BTS_Tests: fix TC_rsl_rf_resource_ind: update mp_interf_band
At some point (see related commit) we changed the ordering of default
interference boundaries from descending to ascending in osmo-bsc.
However the testsuite was not updated.  Fix this.

Change-Id: I4f0d0814c343c626f6f7e5bafb7ac46cd7f362f6
Related: osmo-bsc.git Ie9bf4bf0c89418685b8ea5096332d22cfba7c521
Related: SYS#5313, OS#5956
2023-10-06 23:08:24 +07:00
Vadim Yanitskiy 0677dcd8c5 BTS_Tests: fix TC_rsl_rf_resource_ind: handle dynTS and PDCH
Change-Id: I2d13fd3f0fd15d1762bf6f2f61de85cbe990ec36
Related: osmo-bts.git I56f83db5264c246ec1b4b8a973105a4fc09931fb
Related: SYS#5313, OS#5956
2023-10-06 05:28:24 +07:00
Vadim Yanitskiy 2270e44fcf BTS_Tests: separate generating g_AllChannels[] into a function
Change-Id: Iab2d009b977255b16028c77a9b96df48d270ed1c
Related: SYS#5313, OS#5956
2023-10-06 05:09:10 +07:00
Vadim Yanitskiy f8ee84c22b Revert "BTS_Tests: execute TC_dyn_osmo_pdch_{tchh,sdcch8}_race_act last"
This reverts commit 46f199271e.

Crashing the IUT is no longer the case, so return these back.

Change-Id: I004b55a79a04a20209d8a91e1f307f55c2b6ea13
2023-09-05 16:10:48 +07:00
Vadim Yanitskiy 981bc2cccb BTS_Tests: add TC_data_rtp_tch* for CSD
Change-Id: I9a0dc0fcf722f862d8dcf04660d4448662210f44
Related: osmo-bts.git I08ffbf8e79ce76a586d61f5463890c6e72a6d9b9
Related: osmocom-bb.git I0d7389a9a5f7019b9316ab1c0115797ff54a0e41
Related: OS#1572, OS#4396
2023-09-04 20:27:44 +00:00
Vadim Yanitskiy fde1b81183 BTS_Tests: decouple payload generation from f_rtpem_activate()
This function is going to be used by the upcoming testcases for CSD
specific channel modes.  Generating the Rx/Tx payload(s) now becomes
the duty of the calling function.  So far the only user of this API
is f_TC_speech_rtp(), so move the speech payload generation there.

Change-Id: I9e823c33b1dbbadd57bc63df25b8ddf368d76232
Related: OS#1572
2023-09-04 20:27:44 +00:00
Vadim Yanitskiy 4d728c9670 BTS_Tests: f_rtpem_activate(): make RTP payload type configurable
Change-Id: I84f576f578ffc48c8b5e545bc1700000eb693efb
Related: OS#1572
2023-09-04 20:27:44 +00:00
Philipp Maier 436e8b84d0 BTS_Tests: add new testcase TC_pcu_data_req_imm_ass_agch
In PCUIF v.11 we support getting confirmations for IMMEDIATE ASSIGNMENT
messages that are sent through the AGCH.

Related: OS#5927
Change-Id: Iec00d8144dfb2cd8bcee9093c96a3cc98aea6458
2023-08-29 13:18:03 +02:00
Philipp Maier 779a5e5f33 BTS_Tests: use f_PCUIF_tx_mac_block_agch in TC_pcu_data_req_agch
The testcase TC_pcu_data_req_agch uses SAPI PCU_IF_SAPI_AGCH. Since we
now have a function f_PCUIF_tx_mac_block_agch() to send MAC blocks over
the AGCH using the recently introduced SAPI PCU_IF_SAPI_AGCH_2, lets use
this function instead.

Related: OS#5927
Change-Id: I341bbd01e8132fab913d307bfb4b2fb873cdde3c
2023-08-29 13:18:03 +02:00
Philipp Maier 0221248078 PCUIF: use confirm flag in struct gsm_pcu_if_pch
In the recent PCUIF change of osmo-pcu (see Depends) a confirm flag
is added to struct gsm_pcu_if_pch. This flag tells the receiving end
(OsmoBSC or OsmoBTS) that the sending of the received MAC block has
to be confirmed towards the PCU. OsmoBTS and OsmoPCU now rely on the
conformation flag.

Let's update the BTS_and PCU testsuites accordingly.

Related: OS#5927
Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04
Change-Id: I7017ca20ca7e0b77d0f363121e4f17280e39e8ac
2023-08-29 13:18:03 +02:00
Philipp Maier 957d4a9587 BTS_Tests: rewrite outdated comment
We are no longer "appending" imsi digits. This is now done properly
using a struct but let's still mention what we use the IMSI for.

Related: OS#5927
Change-Id: I3d943cd96e1d9627ad68e3439b2a649baa5785f1
2023-08-22 15:08:10 +02:00
Philipp Maier e683828c34 PCUIF_Types: get rid of _DT, _dt (Direct TLLI)
Since we now no longer refer to TLLI when we mean "message ID" (msg_id),
we should also remove the "_DT" / "_dt" suffix from structs and define
constants and replace it with "_2" if required.

Depends: osmo-pcu.git If641b507dcb6b176109c99dce7cff2a7561364b0
Related: OS#5927
Change-Id: I15e754ce3ceed92a517586a073d3e3ed008b5eef
2023-08-22 10:33:56 +00:00
Philipp Maier 83697dd286 PCUIF_Codec port, do not return fn in f_PCUIF_tx_imm_ass_pch
The function f_PCUIF_tx_imm_ass_pch() retuns the frame number, that is
sent back from osmo-bts via PCUIF / gsm_pcu_if_data_cnf_dt. Since we are
about to remove this field from gsm_pcu_if_data_cnf_dt, lets no longer
access it here as well. Also the return code is never used anywhere in
the tests. (In osmo-pcu the fn parameter was used for logging only, in
osmo-bts it was set to constant 0)

Related: OS#5927
Change-Id: I0e5bad7a0d74e5032f2818f6fdf5b9b2ecb531cc
2023-08-17 16:29:11 +02:00
Philipp Maier a6708cf613 PCUIF: rename tlli to msg_id
To confirm downlink IMMEDIATE ASSIGNMENT messages, we use the TLLI as an
identifier and the related record member is also called "tlli".
Unfortunately this is misleading since the message identifier does not
necessarly have to be a TLLI. It is just an implementation detail that
osmo-pcu uses the TLLI as a message identifier.

To make that clear, lets rename the tlli member (and variable and
parameter names where it is passed on) to "msg_id".

(Since this change only renames variables and struct members it will not
break compatibility with other programs that use the PCUIF)

Related: OS#5927
Depends: osmo-pcu.git I4a25039dfe329e68879bc68936e49c4b190625e6
Change-Id: I1db29d5b1920e351c452b798c3260654c2cbe0cb
2023-08-17 14:12:14 +00:00
Philipp Maier 5515715ebc BTS_Tests: fix log line (AGCH->PCH)
The testcase TC_pcu_data_req_imm_ass_pch uses the PCH to transmit the
IMMEDIATE ASSIGNMENT message but the log line mentions the AGCH.

Related: OS#5927
Change-Id: I7cb8d91f2c3f92009d33134167eab856ee02fdab
2023-08-03 12:14:26 +02:00
Philipp Maier 9aeafbd8d4 BTS_Tests: fix comment
The testcase is about PCH, not AGCH

Related: OS#5927
Change-Id: I5c2aa1aab261a0f4bfb24b4be7af29c1d814d37a
2023-08-03 11:46:20 +02:00
Philipp Maier 2291bf6cb6 BTS_Tests: call f_pcu_data_req with correct timeslot
We are calling f_pcu_data_req() with SAPI PCU_IF_SAPI_AGCH or SAPI
PCU_IF_SAPI_PCH and use ts_nr 7.

In this particular case, the parameter ts_nr has no effect (see pcu_sock.c in
osmo-bts.git). However, to prevent confusion, lets use ts_nr 0 since AGCH and
PCH are actually is on TS 0 (on TRX 0).

Related: OS#5927
Change-Id: I20566de992809d6c857c9062bf0fb799efa43e45
2023-08-03 11:46:20 +02:00
Andreas Eversberg 083202ae4f BTS_Test_ASCI: Add Talker establishment/release test
A VGCS channel is activated. The BSC sends UPLINK FREE message. The MS
sends RACH on VGCS channel. The MS receives VGCS UPLINK GRAND and
establishes layer 2. Then the BSC forces to releases the uplink. The MS
receives UPLINK FREE again.

Change-Id: Ic86bc34890c7d1e6e0b255c3d40eda3dfaa59285
Related: OS#4851
2023-07-20 17:27:49 +02:00
Andreas Eversberg 4801baa0da BTS_Test_ASCI: Add UPLINK FREE / UPLINK BUSY test
A VGCS channel is activated. The BSC sends UPLINK FREE message and
UPLINK BUSY message. When the UPLINK FREE message is sent, the MS is
expected to receive several UPLINK FREE messages. Then the UPLINK BUSY
message is sent, the MS is expected to receive one UPLINK BUSY message.

Change-Id: I2f70adb4a6f71eb8972feccf9dda0f77e7a942b9
Related: OS#4851
2023-07-20 17:27:49 +02:00
Harald Welte 5a1d727678 BTS_Test_ASCI: Add first ASCI test to check NCH support
Send Notification command to start and stop notifying an ASCI call.
When it starts, it is expected that NCH is received. Also it is expected
that NCH is received again. When it stops, it is expected that NCH is
not received anymore.

Change-Id: I3727c471663b731117a264f60d2f1ba5fd16928e
Related: OS#4851
2023-07-20 17:27:49 +02:00
Andreas Eversberg 3699b11139 Add LAPDm Bter frames to LAPDm_Types.ttcn and BTS_Tests.ttcn
The new type LapdmFrameBter and its send and receive template is used to
send and receive Bter frames, which has a short L2 header and uses all
23 octets for payload.

Bter frames are DCCH UI frames with SAPI 0 and 23 octets sent on
downlink only.

Change-Id: I07a4fd9879dfd9de441c0348a84b7dd5c9864eb4
2023-07-20 17:27:49 +02:00
Vadim Yanitskiy ce65a0f61a BTS_Tests: also test TCH/EFS (EFR) in TC_speech_no_rtp_tchf
Also add TODO comments for TCH/AFS and TCH/AHS.

Change-Id: I272b4343f895889f6cb3e0d3aba2c63b4eab08a2
Related: SYS#5919, OS#4823
2023-07-14 14:48:01 +00:00
Vadim Yanitskiy 982ac2d1e2 BTS_Tests: call f_shutdown() in TC_speech_no_rtp_tch[fh]
We need to call f_shutdown() to properly terminate all components.
All (at least speech related) testcases do this function call.

Change-Id: Ib706fe3d9901f9cd1a0efa7d9ffd3b5b8a4472d7
2023-07-14 14:48:01 +00:00
Vadim Yanitskiy cc92ba77ab BTS_Tests: properly release TCH in f_TC_speech_no_rtp()
Otherwise we're getting a DTE when trying to run this function more
than once in a single testcase (e.g. when testing different channel
modes).  This is already done properly in f_TC_speech_rtp().

Change-Id: I290789153bea4b128af29dcf7c52da16b64c4108
Related: SYS#5919, OS#4823
2023-07-14 14:48:01 +00:00
Vadim Yanitskiy 75ad9a63bb BTS_Tests: fix expectations in TC_speech_no_rtp_tch[fh]
This testcase is currently passing for both -master and -latest
versions of osmo-bts, despite their behavior is different:

* the -latest is sending FACCH frames with dummy LAPDm func=UI,
* the -master is sending invalid speech frames with inverted CRC3.

There is a bug in the 'tr_bad_frame' template definition: we expect
the payload to be present, while in real BFIs it's omitted.  So these
two testcases would always pass, even if the IUT would be sending dummy
bursts or sending nothing at all, because they were designed to fail on
receipt of a never-matching TRAFFIC.ind template.

Let's fix this and align our expectations with the current behavior
of the -master version of osmo-bts.  Note that sending invalid speech
frames with inverted CRC3 is not osmo-bts-trx specific behavior;
it's actually a replicated behavior of DSP based osmo-bts-sysmo.

Change-Id: Ic680002f60e598cfeeb448c517581b3506355e5b
Related: osmo-bts.git I78106802a0aa4af39859c75d29fe0e77037899fe
Related: SYS#5919, OS#4823
2023-07-14 14:48:01 +00:00
Vadim Yanitskiy 89264bcee1 BTS_Tests: run TCH and SACCH loops in f_TC_speech_osmux()
I forgot to update this function in [1].  Let's make it consistent with
the f_TC_speech_rtp().  More details can be found in the linked patch.

Change-Id: I8c2f8bb4cc4b44378af5536893bc73fde368b3fe
Related: [1] Ifb69669b75df5b390d7056cefaf0ef1df69d9bd4
2023-07-12 22:26:27 +07:00
Vadim Yanitskiy 25823b7da1 BTS_Tests: print DL TCH length in f_TC_speech_osmux()
I forgot to update this function in [1].

Change-Id: I2a2dccd32aaf94afc31bd44f14fdc1cfdf554d2d
Related: [1] I5848bd8acd220c1c4d2db01b71bb57e785dc9de7
2023-07-12 22:26:27 +07:00
Vadim Yanitskiy 803af35d25 BTS_Tests: print length of received TCH payloads
Change-Id: I5848bd8acd220c1c4d2db01b71bb57e785dc9de7
2023-07-09 07:55:15 +00:00
Philipp Maier 3b4abb8618 BTS_Tests: Add support for PCUIF protocol version 11
The PCUIF protocol version 11 uses a more distinct (direct TLLI) way
to signal PAGING COMMAND and IMMEDIATE ASSIGNMENT messages towards the PCU.

Since OsmoBTS will soon fully support v.11 of the PCUIF protocol we need
to add compatibility in the OsmoBTS TTCN3 testsuite early. We also have
to stay compatible with older versions of OsmoBTS. The BTS_Tests.default
config still sets up mp_pcuif_version to version 10, so this will be the
default until we have full version 11 support in current master and
latest.

Related: OS#5927
Change-Id: I08de02e951e10bc8b4381cc2ad32e63f2747e3c4
2023-07-07 13:19:26 +00:00
Vadim Yanitskiy f4b7147805 BTS_Tests: enlarge Tguard for TC_acch_overpower_rxqual_thresh
With recent osmocom-bb.git patches [1][2][3] this testcase needs
slightly more time to execute all 8 TopTestCase steps.

Change-Id: Ia693e91b2bcf71cac0bcda07124ab99e97d27dcd
Related: [1] Ia42550d5c2d8b49efbdf8ef0ce46b26afd1c464e
Related: [2] Ic8a5b6277c6b16392026e0557376257d71c9d230
Related: [3] I838b1ebc54e4c5d116f8af2155d97215a6133ba4
2023-06-14 12:43:50 +00:00
Philipp Maier 55e6635af3 BTS_Tests: craft a more realistic IMMEDIATE ASSIGNMENT message
In change I8b8264d28b1b1deb08774cdba58dd4c6dafe115d we modify osmo-bts
so that it will only confirm IMMEDIATE ASSIGNMENT messages. In order to
detect whether the message is an IMMEDIATE ASSIGNMENT, it has to look
into the message.

In testcase TC_pcu_data_req_imm_ass_pch we use f_rnd_octstring(23) to
generate the IMMEDIATE ASSIGNMENT message. Since osmo-bts now looks into
that message this is no longer enough. so let's generate a more realistic
IMMEDIATE ASSIGNMENT message where only the request reference and the TLLI
is randomized.

Related: OS#5927
Change-Id: Ic597154df01bdd04515edf882a567656f2a54d8c
2023-06-08 14:26:29 +00:00
Vadim Yanitskiy 8bf2dc4094 BTS_Tests.TC_pcu_data_ind_lqual_cb: remove lqual threshold
Since recently [1], osmo-bts does submit all PCUIF DATA.ind regardless
of the Uplink link quality (C/I ratio in case of osmo-bts-trx).

Change-Id: If801e9112c1207ccdc40f9e675c52fadccdd1411
Related: [1] osmo-bts.git I8f1856dd9061c1bfca8b15be30df7a51760231b0
2023-06-01 11:39:09 +00:00
Vadim Yanitskiy c70a62691a BTS_Tests.TC_pcu_data_ind_lqual_cb: properly send UL BLOCK.req
We must be using a valid TDMA Fn when scheduling UL BLOCK.req,
so wait for a DL BLOCK.ind, take the current Fn from there and
calculate a proper TDMA Fn for the next UL block.

Change-Id: If0fb615a4136a76a939588af0131ddcfb7acd877
Related: OS#5954
2023-06-01 11:39:09 +00:00
Vadim Yanitskiy c7fe3430c9 BTS_Tests.TC_pcu_data_ind_lqual_cb: log lqual values
Change-Id: Ia8cb340005b58331e1e032a53c0a93163a517fb0
Related: OS#5954
2023-06-01 11:39:09 +00:00
Vadim Yanitskiy 73b39cf2f6 BTS_Tests: cosmetic: add as_pcuif_msg() for convenience
This altstep eliminates the need to wrap the actual PCUIF message
template into another (port specific) template t_SD_PCUIF.

Change-Id: Iabefddd54a4a2e2183feea04fdb8526e74efc7ac
2023-06-01 11:39:09 +00:00
Vadim Yanitskiy 6c0644970a BTS_Tests: properly release DCCH in f_TC_acch_overpower()
Currently the TC_acch_overpower_* testcases are all passing without
any sporadic failures.  However, most of them start failing due to
a DTE (some RSLEM related race condition) if I apply a patch [1] to
trxcon removing its internal TDMA clock module.

I don't know why this happens, but releasing the DCCH after executing
all testcase steps in f_TC_acch_overpower() makes that DTE go away.

Change-Id: I658e78ad8d4dc86403d22b5380ddd9a140f8c71c
Related: [1] osmocom-bb.git Ic8a5b6277c6b16392026e0557376257d71c9d230
Related: OS#5500
2023-05-31 20:06:07 +07:00
Vadim Yanitskiy 31a88d49e3 BTS_Tests: cosmetic: fix wrong altstep name in a comment
Change-Id: I4e63f309f2a7d22752f7991ebd7e672939d4e52b
2023-05-31 20:01:08 +07:00
Vadim Yanitskiy d1bbe72d7e BTS_Tests: f_TC_speech_rtp(): run TCH and SACCH loops
All testcases based on f_TC_speech_rtp() consist of two parts:

* In the first part we expect to receive a Downlink frame at the MS,
  and, once received, we echo the received frame back to the BTS.
* In the second part we expect to receive an Uplink frame, the one
  that was echoed back during the first part.

Let's keep echoing Downlink TCH frames while executing the second
part in order to reduce possibility of race conditions and keep
filling-up the Tx queue in the virtual MS (trxcon).  Also keep
sending dummy Measurement Reports on SACCH.

Change-Id: Ifb69669b75df5b390d7056cefaf0ef1df69d9bd4
Related: OS#1572, OS#4396
2023-05-29 15:51:26 +07:00
Vadim Yanitskiy 8fd78f7b4d BTS_Tests: f_est_dchan(): add support for CSD channel modes
Change-Id: I066657941dd751183aa5e937a6bfe9ab7837d46b
Related: OS#1572, OS#4396
2023-05-26 19:26:45 +07:00
Vadim Yanitskiy eaaa1d6af6 library: add a receive equivalent for ts_RSL_ChanMode_SIGN
Also take a chance to enrich the already existing send template.

Change-Id: Id39ca75a9194d7c62b9e5e2d96e766c4940c8281
Related: OS#1572, OS#4396
2023-05-26 19:26:45 +07:00
Vadim Yanitskiy b82fcd05dd BTS_Tests: f_rtpem_activate(): pad TCH/FS frames with 'FF'O
Since recently [1], osmo-bts started to preen incoming FR and EFR RTP
frames for SID errors.  In other words, if an incoming frame is a SID
frame, osmo-bts may modify some bits causing a mismatch on our side.

Use 'FF'O as padding pattern for TCH/FS to prevent pseudo-random frames
being treated as SID and modified by osmo-bts.  Keep using '00'O for
other modes, because only TCH/FS specific SID frames must have specific
bit positions set to '0'B;  for TCH/EFS and TCH/HS it's '1'B.

Change-Id: Ib42b783574caf5cbaf64b2eb5dd1d2b2a6637c2f
Related: [1] osmo-bts.git I89df2f12c49dd5378667cf149d19bde654f80134
Related: OS#6039
2023-05-19 19:47:10 +07:00
Vadim Yanitskiy ece325feb4 BTS_Tests: f_TC_speech_rtp(): log channel mode being tested
Change-Id: I3781720633af54d19c4a71d64498fb7e4aa4159f
Related: OS#6039
2023-05-19 19:12:30 +07:00
Philipp Maier bbe454d27d MGCP_Test: support multiple codecs
At the moment The RTP emulation and MGCP_Test only allow to specify one
codec and one set of RX/TX fixed payload octet strings to verify against.

This is quite limiting since it might be necessary to test against
different types and formats of payloads simultaneously in order to see
if osmo-mgw converts or forwards them correctly.

Let's extend this to support multiple codecs on MGCP/SDP level plus
support for multiple RTP payloads on RTP emulation level.

Related: OS#5461
Change-Id: I8422313fccad1bfcee52c933f643068bebdaf2d5
2023-05-04 09:54:06 +00:00
Vadim Yanitskiy d744d45dfc BTS_Tests: keep pchan configuration unchanged in TC_pcu_*
Change [1] fixes support of dynamic timeslots in osmo-bts-virtual,
so we don't need to change the pchan configuration anymore.

Change-Id: I98397ac0fc17ece8f0e41b1ef1c158b47c9de026
Related: [1] osmo-bts.git I5db5b7dd6a8e84cf9a0d84f04a650c2ed8a4e368
2023-03-27 12:11:52 +00:00