Commit Graph

1931 Commits

Author SHA1 Message Date
Vadim Yanitskiy a2afacc905 library/IPA: use tr_ASP_IPA_EV instead of inline templates
This way we can easily add new parameters to ASP_IPA_Event.

Change-Id: Icc37286fcb4d43836d56a26424ecb9dcba58d1f1
2020-05-18 21:16:35 +07:00
Vadim Yanitskiy 61564be045 library/IPA: split t_ASP_IPA_EVT_UD into send / receive templates
Change-Id: Ib5494bff3f9aa0ac396b729c326e7b4a64c5a5dd
2020-05-18 20:47:14 +07:00
Vadim Yanitskiy 8701b273dd library/IPA: rename ASP_IPA_EventUpDown to ASP_IPA_EventType
The old name was a bit confusing, because this enumerated type
also contains ASP_IPA_EVENT_ID_ACK, among with UP/DOWN events.

Change-Id: I8f73a64de40d1c8e9b7f43f538d6b59dcede065f
2020-05-18 20:37:20 +07:00
Pau Espin a416cb8afe Introduce test TC_ul_intermediate_retrans
Test Verifies that if PCU doesn't get one of the intermediate UL data blocks in a UL
TBF, it will request retransmission through UL ACK/NACK (with missing block
in its bitmap) when CV=0 is received (and hence it knows no more data is to be
transferred).

This test fails as of current osmo-pcu master, and it's fixed there by
osmo-pcu.git Change-Id I9b4ef7b7277efa645bdb5becf2e9f6b32c99a9b1.

Change-Id: I204a470e47fcc5965de758ad9a275837e0c8034d
2020-05-17 18:34:51 +02:00
Pau Espin 487d634726 pcu: Introduce test TC_countdown_procedure
Change-Id: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5
2020-05-17 18:34:51 +02:00
Pau Espin 4cbb96079b pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload sent
These features will be used in test added in next commit.

Change-Id: I7dde6a2e71a9e64cf6c704eda37b47838460102b
2020-05-17 18:34:51 +02:00
Pau Espin 5feace6584 pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocks
Also increment BSN with each new submitted packet.

Change-Id: I685d1535154197bb85e18875e0a4d41122a24fa0
2020-05-17 07:26:34 +00:00
Pau Espin 0c0bf8731b Introduce test TC_force_two_phase_access
Change-Id: Icce25b5d113eb5b37ec1e5b6c6c14aacdb01cd8d
2020-05-17 07:26:34 +00:00
Pau Espin 42acafc9b8 pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_only
Change-Id: I396dbd0ca200fbf9365c534f4d479f903d0417ff
2020-05-17 07:26:34 +00:00
Philipp Maier 4c2a1eaea2 MGCP_Test: do not use leading zeros in endpoint identifiers
The endpoint number of a virtual endpoint must not use leading zeros
but, but the testcase MGCP_Test.TC_crcx_dlcx_30ep does. Lets not do this
as it violates the spec. See also: RFC 3435, section E.3.

Change-Id: I99d2fa76cb60d0d671c9413f3dbd711ec68aeb77
Related: OS#2659
2020-05-15 18:42:20 +02:00
Pau Espin 45b664b8af pcu: Support decoding Egprs Pkt Ul Ass on PDCH
Change-Id: I30fb98aab67303997b803a0359ffc2e0b65ebf01
2020-05-15 13:29:10 +02:00
Pau Espin 2ec84fd0e5 Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn
Some types already available in GSM_RR_Types.ttcn will also be required
by messages sent over PDCH and which belong to RLCMAC_CSN1_Types. Since
GSM_RR_Types.ttcn already requires RLCMAC_CSN1_Types.ttcn, let's move
them there so they can be used in both places.

Change-Id: Iccaaa2743dc44a36046c19d4d4ff882dc02fb479
2020-05-15 11:27:08 +00:00
Pau Espin 02c972d8aa pcu: use correct RA type to properly test 2phase access
Old code was not setting Single Block Packet Access type, and 2phase
access was not properly triggered.

Once it's triggered, message flow changes quite a lot from the 1phase
access, specially because the 2nd Ul Assignment arrives through PDCH
instead of CCCH, which means a different record is received and hence
code for 1phase cannot be easily re-used.

For similar reasons, f_tx_rlcmac_ul_n_blocks() is modified to receive
the only required tfi param instead of a full dl_block.

Some functions are also extended to support SingleBlock Allocation
instead of usual DynamicAllocation.

Change-Id: If636a4898dfa175fdbd6baf04f7f2c955a9c525d
2020-05-15 11:27:08 +00:00
Neels Hofmeyr a26d0a8b8c bsc/osmo-bsc.cfg: remove legacy 'rtp-base' config
osmo-bsc does not use an rtp-base for years, ever since we're using an MGW.

Related: Id14fa3066ca5d472a817593074a6222f159168a8
Change-Id: Ia4866fc603877b2ab8ce16683e9f6145764117c7
2020-05-13 18:02:57 +02:00
Pau Espin 1832cd8fb0 pcu: f_dl_block_ack_fn(): Allow passing ctrl dl_block
Downlink Control blocks like Packet Uplink Assignment (PACCH)
contain rrbp + rrbp_valid in mac headers

Change-Id: I0401b0b378c7770d06a15d14dac6436303b4ccab
2020-05-13 16:44:16 +02:00
Pau Espin 4aac3d0c8f pcu: Properly pass tlli in f_tx_rlcmac_ul_n_blocks()
Change-Id: Idb8febbbff732f02d05b0043c75e2a0729e01d4f
2020-05-13 15:13:49 +02:00
Neels Hofmeyr b58d974ea5 msc: add tests for SMS and voice call while Paging
Start a second
- MT SMS
- MT call
while a Paging is already ongoing.

The second trans being an SMS works.

The second trans being a call fails with current osmo-msc master; a fix is in
the related patch (s.b.).

Related: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be
Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46
2020-05-11 17:33:05 +00:00
Neels Hofmeyr b2168516f3 hlr: add tests for GSUP proxy routing
GSUP proxy routing, as it is implemented in an upcoming osmo-hlr patch,
requires that osmo-hlr returns a received Source Name IE back as Destination
Name IE. Add tests for these, for various situations.

These tests pass since GSUP request handling with request->response association
was introduced to osmo-hlr in I179ebb0385b5b355f4740e14d43be97bf93622e3.

Implement this by adding a source_name to the g_pars, which should be sent out
in ts_GSUP_* to osmo-hlr, and expected back as destination_name in returned
messages.

Add source_name and destination_name to various templates, with default :=
omit.

Add f_gen_ts_ies() and f_gen_tr_ies() to compose expected IEs more generically.

Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa
2020-05-11 17:31:57 +00:00
Neels Hofmeyr b3fc898c2d bsc: make ho_config_tests more robust against timing
In f_probe_for_handover disable the RSL emulation before the vty handover
command.  Otherwise, osmo-bsc may be too fast to issue the handoverCommand, so
that RSLem still handles it and says: "RSL for unknown Dchan".

(f_probe_for_handover() receives the handoverCommand directly, just to detect
whether a handover would be initiated, and then quickly aborts the handover
procedure.)

Related: OS#4264
Change-Id: I7f73ef8cbdf46e31a46c9e1b7ad0fa2bd41c0a12
2020-05-11 17:27:59 +00:00
Vadim Yanitskiy 71238c135d PCU: introduce a new test case TC_dl_flow_more_blocks
Change-Id: I45edbc943194c15b084eb04dda390db75b4bfa0f
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Related: OS#4506
2020-05-11 13:48:11 +07:00
Vadim Yanitskiy b6733a67ec PCU: refactor and simplify f_rx_rlcmac_dl_block_exp_data()
This function was written in a way that it tries to do as
many different (but related) things as possible:

  a) send an RTS.req to the IUT, expect a DATA.ind in return,
  b) decode RLC/MAC message contained in the received DATA.ind,
  c) make sure that it's either GPRS or EGPRS data block,
  d) calculate the last TDMA frame number of RRBP using
     f_rrbp_ack_fn() regardless of its validity,
  e) make sure that the block contains a given LLC payload.

Everything is ok except point d). The problem is that this is
only the case for the first block of RRBP, and not applicable
to the rest having 'rrbp_valid' flag unset. Furthermore, this
function did not match GPRS DL blocks with 'rrbp_valid' flag
unset, for some odd reason.

Let's move RRBP calculation into a separate function called
f_dl_block_ack_fn() and return TDMA frame number of the
received DATA.ind message instead.

Among with that, there are more little changes:

  - simplify matching of (E)GPRS DL data blocks,
  - use 'in' qualifier in parameter list where possible,
  - turn parameter 'data' into a template (present).

Change-Id: I1528408b4399d0a149a23961805277eaab90d407
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-10 21:34:38 +07:00
Vadim Yanitskiy d4f22aaf31 library: enrich tr_RLCMAC_DATA_RRBP, rename to tr_RLCMAC_DATA_GPRS
Let's make this template more flexible, so it can be used to match
any GPRS DL data blocks, not only those with rrbp_valid == true.

Note that behavior of f_rx_rlcmac_dl_block_exp_data() is
intentionally left unchanged, and will be fixed later.

Change-Id: I3940216368cdbb58fe89420675d1d8d5f5e49b05
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-10 21:14:12 +07:00
Vadim Yanitskiy 0a9b148d2c library: fix t_RLCMAC_DlMacH: RRBP is always present
This template is not (yet) used anywhere, but let's fix it
anyway to avoid possible confusion.

Change-Id: Ic819f2b0eb292170de73abc7e200d79fcf02a76c
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-10 14:48:17 +07:00
Vadim Yanitskiy 2742bcd6fd PCU: introduce f_rrbp_ack_fn(), fix poll frame number calculation
The resulting frame number shall be within the period of TDMA hyperframe.

Change-Id: I794a14f69293cbbc937d62d09dd5794956b882db
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-10 12:46:03 +07:00
Vadim Yanitskiy b043b78419 PCU: fix f_pkt_paging_match_tmsi(): drop copy-pasted line
Change [1] broke the following test cases:

  - TC_paging_cs_from_sgsn_sign_ptmsi,
  - TC_paging_cs_from_sgsn_ptp.

Let's fix this!

Change-Id: I9ec798e44138570bed726ffcd842448e199c1b54
Fixes: [1] I6a859687d9605cc08c51ff44d946c279b79bedfa
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07 17:02:59 +07:00
Vadim Yanitskiy 5cbebf8758 PCU: PCU_Tests.default: add 'USER' category to ConsoleMask
Change-Id: I12bffab01e52d92d313edddc000b5f3ec62c5139
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07 02:43:56 +07:00
Vadim Yanitskiy 2e213ae056 PCU: refactor f_imm_ass_verify_{ul,dl}_tbf_ass(): call f_shutdown()
This allows us to reduce code duplication.

Change-Id: Ib74285177a5d8e3c4a27df1321e7eab3462318bc
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07 02:43:56 +07:00
Vadim Yanitskiy 91f8a09220 PCU: introduce f_shutdown() to ensure proper tear down
Most of existing test cases are built on top of the PCU interface
abstraction components (see PCUIF_Components.ttcn). This means
that during the test case execution, additional components are
running in parallel, among with the MTC (Main Test Component).

When a test case terminates, either normally or due to an error,
it may happen that the virtual BTS component is stopped before
the associated TDMA clock generator. In this situation, sending
a clock indication towards the stopped BTS component would
lead to a dynamic test case error.

Let's take the process of tear down under control, and ensure that
the clock generator is stopped first. To achieve that, every test
case needs to call f_shutdown() in case of an error, as well as
in case of the normal termination.

Note we cannot use the existing f_shutdown() from Misc_Helpers,
because doing 'all component.stop' does not gurantee that the
clock generator is stopped first, and I experienced at least
one DTE while trying to integrate it.

Change-Id: I6a859687d9605cc08c51ff44d946c279b79bedfa
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07 02:43:55 +07:00
Vadim Yanitskiy 8685b380b8 PCU: fix TC_ta_rach_imm_ass(): properly match Timing Advance
This test case would not fail even in case of Timing Advance mismatch.

Change-Id: Ife86e5e0e39f0112b854ed9a13e9c6f3c49531c9
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-07 02:42:56 +07:00
Vadim Yanitskiy 5b649ccbc6 PCU: f_imm_ass_verify_{ul,dl}_tbf_ass(): use 'in' qualifier
We don't need a copy of the whole RR Immediate Assignment message.

Change-Id: I44417460126e507a0a47a5aee8c4a995085023fa
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 16:36:17 +07:00
Vadim Yanitskiy 85cb9911b9 PCU: fix f_establish_tbf(): always expect Uplink TBF
In response to a CHANNEL REQUEST received on BCCH, the network
would never allocate a Downlink TBF, so we should always expect
an Uplink TBF assignment.

Change-Id: I6b4c108bed39ba9ac9b6144827bc1e20b04333b4
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 16:29:45 +07:00
Vadim Yanitskiy f74ae99369 PCU: fix f_establish_tbf(): use proper CHANNEL REQUEST by default
Back in September 2019, while writing the first lines of the new
test infrastructure for OsmoPCU, I picked a random value as the
default RA (CHANNEL REQUEST message) for Uplink TBF establishment.

It has been accepted by the IUT so far, and still works, but
according to 3GPP TS 44.018, table 9.1.8.1, value '3A'O has
nothing to do with GPRS - it actually means 'Answer to paging'.

The new value belongs to range '011110xx' - one phase packet
access with request for single timeslot uplink transmission.

Change-Id: Ic036d380af3667d54a3a0a011a9d56a87e0f949b
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 16:21:21 +07:00
Vadim Yanitskiy f561ae0a8f PCU: drop meaningless 'udpReuseAddress' option
The PCU interface has nothing to do with UDP...

Change-Id: I8d919e686c6ef311517eb53496d008987f984794
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 15:35:00 +07:00
Vadim Yanitskiy c06688efe2 library: cosmetic: fix misleading comment in RSL_Types.ttcn
Change-Id: Id7974dc666d61025453b79b7e054306c8122ca65
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 15:22:53 +07:00
Vadim Yanitskiy a8e83a8ea0 BTS: verify presence of GPRS Indicator in SI4 Rest Octets
So far we only checked presence of GPRS Indicator in the Rest
Octets of System Information Type 3, but this indicator is
also included in the Rest Octets of System Information Type 4.

Let's add additional test cases to check this indicator in the
Rest Octets of both message types. In order to achieve this:

  a) refactor f_si3_has_gprs_indicator(), so it can handle
     System Information Type 4 and its Rest Octets too;

  b) separate common part from the existing test cases into
     functions and (re)use them from the new ones;

  c) in f_TC_pcu_socket_noconnect(), make sure to send
     BCCH INFO with System Information Type 4.

Change-Id: Ifc589c35a52a62331b0ad4fbe2eec3fba55b5ff9
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Related: OS#3075
2020-05-06 02:26:03 +07:00
Vadim Yanitskiy 3c18538651 BTS: refactor f_get_si3(), so it can be used to get SI4
This is needed for the follow up change(s) verifying the GPRS
indicator in the Rest Octets of RR System Information Type 4.

Change-Id: I540b43bbe886f8ca3e9a7eb49a4d30d391d45f49
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Related: OS#3075
2020-05-06 02:26:03 +07:00
Vadim Yanitskiy ab5363f33a BTS: fix missing GPRS Indicator in SI4 Rest Octets
We do have GPRS Indicator in SI3 Rest Octets, but for some reason
it was absent in SI4 Rest Octets. Let's finally enable it, so we
can extend the existing test cases to check GPRS Indicator in the
Rest Octets of both System Information Type 3 and 4.

Change-Id: Ib55c2673b53b5981e57372f4f8cfb0af32e04132
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Related: OS#3075
2020-05-06 02:26:03 +07:00
Vadim Yanitskiy 12cf3d908a BTS: manually compose Rest Octets for SI Type 3 and 4
Finally, we can get rid of hard-coded octetstrings and control
every field of the Rest Octets we're sending to the IUT.

Note that template 'ts_SI4_default' did not contain any Rest
Octets at all, thus the GPRS indicator was (and still is)
absent. This will be fixed in a follow up change.

Change-Id: I0a95b34b495267edf1f48692e24fcd5ede8ccdd1
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 02:26:03 +07:00
Vadim Yanitskiy 0217b05050 library: fix enc_SystemInformation(): properly pad messages
Due to a buggy nature of TITAN's padding attributes [1], we cannot
apply them to individual fields of the records that are embedded
into other structured types, like records and unions.

Ensure that encoded System Information messages are padded to
either 23 or 19 octets, depending on their type. In order to
achieve this, rename and wrap the external encoding function.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=562849

Change-Id: I3368df52985e576ad180c9a74d4925dd9c952b55
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-06 02:25:10 +07:00
Vadim Yanitskiy b7bc2e6746 library: relax length constraints applied to SI Rest Octets
As it turned out, the length constraints introduced in [1] were
too strict. In particular, the use of FIELDLENGTH attribute made
it impossible to assign an octetstring of a smaller size and then
pad the remaining octets with '2B'O. TITAN would just use '00'O
instead, ignoring all my attempts to talk some sense into it.

[1] I183d3ba9000e3ced8ecce74a4390b80075ddf25d

Change-Id: Ie1b6d4100c064b6ae08ed55cd797b9416c6faf14
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-05 00:16:38 +07:00
Vadim Yanitskiy 135b45eed9 library: add PADDING attributes to SI3/SI4 Rest Octets
Change-Id: Icce6d1e565edc6dce51310364079fc3840a18d45
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-05 00:16:38 +07:00
Vadim Yanitskiy 4a07c129e8 BTS: fix f_get_si3(): do not return uninitialized SI value
Change-Id: Ie60ef237443043578a218dcf19fe1b474b1d4e10
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 23:07:56 +07:00
Vadim Yanitskiy 5d2cf443ca BTS: refactor f_si3_has_gprs_indicator(): use SI3RestOctets
Change-Id: I2dc970d3d34a7d70c6845558544259e387f1d6fc
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:57:08 +07:00
Vadim Yanitskiy 2b98bda8dc library: clarify length restrictions for SI4 Rest Octets
Change-Id: I54bfe5710f744cdd61752f3e46b1b00e9f2f3e43
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:54:08 +07:00
Vadim Yanitskiy edae16aaa3 library: System Information: use RestOctets where possible
The 'RestOctets' is a sub-type of the 'octetstring' with additional
padding attributes. Let's use it for SI2bis, SI2ter, and SI6 too.

Change-Id: I183d3ba9000e3ced8ecce74a4390b80075ddf25d
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:48:23 +07:00
Vadim Yanitskiy 3c74a1113a library: get rid of Si1RestOctets and Si3RestOctets
Both are basically sub-types of GSM_RR_Types.RestOctets with length
constraints. We don't really need to have them as separate symbols,
especially since we have SI3RestOctets and SI4RestOctets now, so
let's apply these constraints within the corresponding records.

Change-Id: I2b126348ae5c5425fea4267ab2b77ea0192795ac
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 22:20:13 +07:00
Vadim Yanitskiy 72add6d7ed library: implement mandatory part of SI4 Rest Octets
Optional "Rest Octets S" part is left for later.

Change-Id: Ib0814e79f8627f3e2b4746b7e521e06ff82bf2d7
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-03 21:50:34 +07:00
Vadim Yanitskiy 0df8c94d69 library: implement SI3 Rest Octets as per 3GPP TS 44.018
Change-Id: Iaf86f1451a956bf1deef0a9d98fa0513aeb8164b
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-02 17:06:33 +07:00
Vadim Yanitskiy e05d7162a2 library/GSM_RR_Types.ttcn: fix: work around TITAN bug 562488
Commit [1] introduced multiple regressions, because it basically
changed the byte order in all fields of the whole module from
'first' (implicit default) to 'last'. This is not what we need.

Instead, let's apply BYTEORDER(last) to 5 bit 'ext_ra' fields
unless the bug [2] in TITAN's RAW codec is fixed.

[1] I481a40daef3eed4a3daa687ad87c4128a13181b4
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=562488

Change-Id: If998ef72c13787f04fee79e1e646cd9a6787028a
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
2020-05-02 17:06:33 +07:00
Pau Espin 2456dad91e RLCMAC_EncDec.cc: Fix egprs data block encode alignment
Selftests I'm using in the pcu testsuite to verify encoding are attached
too.

Change-Id: Id0e21248853eb5fac89e863822804cfbecf3c865
2020-05-01 15:54:17 +02:00