Commit Graph

291 Commits

Author SHA1 Message Date
Harald Welte d0aed4f1b6 bts: Update osmo-bsc.cfg and osmo-bts.cfg
Somebody seems to have forgotten to update the osmo-bsc.cfg file here,
as osmo-bsc wouldn't even start using the file here.

Change-Id: I8453da3bda36912ee42fb0c8d862f75b2065965f
2020-10-12 17:19:20 +02:00
Harald Welte 9b965d5350 bts: Increase SI sampling duration if SI2quater is involved
The existing sampling duration of 8s was insufficient to collect
sufficient samples to confirm the scheduling rules.

Change-Id: I2f631935c86fb840cdd733c28b2df503512341fa
2020-10-12 13:15:53 +00:00
Harald Welte a616ec9260 bts: Log more details in case SI sampling returned insufficient results
Change-Id: I2b853dfff0800cd87e49a3360019ff7198aeafb2
2020-10-12 13:13:04 +00:00
Harald Welte c87d81f916 bts: Avoid race condition in TC_pcu_deact_req
When our emulated PCU sends a DEACT.req to the BTS, there is no way
of knowing when exactly that command will have been completed: There is
no confirmation sent in response.

Let's introduce a f_sleep(1.0) to give the BTS sufficient time for
deactivating the channel.

This will make  TC_pcu_deact_req pass reliably.  It currently fails
in about one third of all test executions on jenkins.

Change-Id: Id9a559b8b208a60f71c3eb9a23830e4d2dbc5df9
2020-10-12 13:13:04 +00:00
Harald Welte c935fad594 bts: Adjust to VTY text change
In osmo-bts Change-Id If53fb07ec38f6bbc368ce84d14e59fa8167691d3
unfortunately the wording / syntax of the VTY was changed.  Let's
adjust to the new wording.

Change-Id: I4a6d37febde104e70ce03992b7e2e8fb793b5a00
2020-10-12 13:12:26 +00:00
Harald Welte 194b691b18 bts: Make f_power_from_band() fail in case of unknown band
Otherwise we get into weird error cases about unbound variables that are hard to debug.

Change-Id: I5716a5dc6ce95daa663be87a1a4fe611b719495e
2020-10-12 13:12:26 +00:00
Harald Welte 52ae168480 bts: Fix TC_rach_load_count
The first RACH LOAD IND may only cover a fractional reporting
interval, and hence must be ignored.

Change-Id: I32a703847fbf2b95993e910e6510613902e2bb1a
2020-10-12 13:12:26 +00:00
Harald Welte e37f9a504f bts: Fix TC_rach_load_idle_thresh0()
The first RACH LOAD IND may only cover a fractional reporting
interval, and hence must be ignored.

Change-Id: I43ee8e846803e2ef6218a3e7ac385ed8af30c217
2020-10-12 13:12:26 +00:00
Harald Welte 762202288b bts: Make TC_pcu_socket_verify_info_ind pass
f_init / f_init_pcu simply save the first PCU_INFO_IND
in g_pcu_last_info.  That first one might still be wrong as
the PCU might connect to the BTS before the BTS is configured
accordingly.

Let's wait for 2 seconds and actually use the last (most recent)
PCU_INFO_IND for the test.

Change-Id: I45717605fde66bf870bcb6e2560f0fc753d05d95
2020-10-12 13:12:26 +00:00
Alexander Couzens 475074bd3b bsc: copy osmo-bsc.cfg from docker-playground
The old file wasn't valid anymore.

Change-Id: Ic72bd755828d0cb6c5858e2fb7800e875f64369a
2020-10-12 02:25:17 +00:00
Vadim Yanitskiy befa21c5c9 {BTS,PCU}_Tests: bump default PCUIF version: 9 -> 10
Both osmo-bts and osmo-pcu are switching to PCUIFv10 soon, so let's
use the new version by default.  For older (latest) IUT versions
not supporting PCUIFv10, one would need to override this module
parameter in {BTS,PCU}_Tests.cfg.

Change-Id: I9350c4a54434c3d46ce9424f382ca0057e58d053
Related: SYS#4868, SYS#4915
2020-09-22 00:53:26 +07:00
Vadim Yanitskiy 7e1d0a23fe fixup BTS_Tests: verify hopping parameters in the INFO.ind message
Pass transceiver number to f_resolve_fh_params(), otherwise the
hopping parameters would always be generated for TRX#0, and thus
the expectations for TRX#N > 0 would be wrong.

Change-Id: If1a25f5ff1b1bca900d54cc56e2045df5a81f4e2
Fixes: I9bb164fd2c7c48b91e0d7bd1abaf3cfec155342c
Related: SYS#4868, OS#4547
2020-09-17 15:27:37 +00:00
Vadim Yanitskiy aa553eda65 fixup BTS_Tests: also match MA length in TC_pcu_info_ind_fh_params()
The bit-mask in fhp.ma_map.ma is octet-aligned, so we cannot use
its length.  Use the number of transceivers instead, since they
all belong to the same BTS.

Change-Id: I772d13841babd2856b6b2fcf126ba47fb20b055a
Fixes: Ibebbedecaed0a3f24a1bc7b520013fa563c4bbda
Related: SYS#4868, OS#4547
2020-09-17 15:27:37 +00:00
Vadim Yanitskiy 7fefceea71 BTS_Tests_SMSCB: handle frequency hopping parameters
Change-Id: I1fd0a46b3d23afabae81fd1da5d2466e61e4a806
Related: SYS#4868, OS#4708
2020-09-14 09:04:39 +00:00
Vadim Yanitskiy ca81392360 BTS_Tests: group hopping parameters into a separate record
Change-Id: Iedb5d858a2d4f5d5a45e7465ae6586b3ae4bbb72
Related: SYS#4868, OS#4708
2020-09-14 09:04:39 +00:00
Vadim Yanitskiy cc4e149a2f BTS_Tests: simplify MA length calculation in f_resolve_fh_params()
Change-Id: I13f1d45162b520eff0d2e9823604fda85b71970b
Related: SYS#4868, OS#4708
2020-09-14 09:04:39 +00:00
Vadim Yanitskiy 9308cd665d BTS_Tests: also match MA length in TC_pcu_info_ind_fh_params()
Change-Id: Ibebbedecaed0a3f24a1bc7b520013fa563c4bbda
2020-09-14 09:04:39 +00:00
Alexander Couzens 5283f55777 BTS_Tests: verify NSVC IPv4/IPv6 in the INFO.ind message
Change-Id: Iae854875a45dbc29cd46a267ccaf60f1f2ac2973
Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Related: SYS#4915
2020-09-11 12:58:00 +00:00
Vadim Yanitskiy 6f9f7d2662 library/Osmocom_Types: share RA generation helpers from BTS_Tests
Change-Id: I7c9c3d243b39bbd3d521009d23c1043df729ee10
2020-08-28 05:56:39 +07:00
Vadim Yanitskiy 3b464a9812 library/GSM_RR_Types: s/MobileAllocation/MobileAllocationLV/g
Change-Id: Ica803221e885b4746fd42c17cd2828c0ef35a6aa
2020-08-28 05:55:58 +07:00
Vadim Yanitskiy 7faef076ab BTS_Tests: verify hopping parameters in the INFO.ind message
Change-Id: I9bb164fd2c7c48b91e0d7bd1abaf3cfec155342c
Related: I04782222b499d0488269544910fbd4ed9929c05d
Related: SYS#4868, OS#4546, OS#4547
2020-08-09 20:03:38 +07:00
Vadim Yanitskiy 4fa7425b14 BTS_Tests: compose the MA bitmask in f_resolve_fh_params()
Change-Id: Ic0a07d9deb60712347a42d9aa7813c684eaccd01
Related: SYS#4868, OS#4546
2020-08-09 20:03:38 +07:00
Vadim Yanitskiy 9e1206c791 library/PCUIF_Types: version 10: add frequency hopping parameters
This change introduces new version 10 specific extensions, in
particular: the frequency hopping parameters of each timeslot.
These parameters are used to compose Channel Description IE
in the packet resource assignment messages.

In order to maintain backwards compatibility with version 9 of
the PCUIF, and thus to still be able to run test cases against
the latest release of osmo-pcu, I kept the old parts of the
INFO.ind and gruoped them together with the new records
into union 'PCUIF_InfoTrxs'.

During decoding, the content of this union is resolved by the
TITAN's RAW codec itself, depending on value of the 'version'
field.  During the encoding, it's the responsibility of the
API user to set a proper field of the union.  I implemented
both f_PCUIF_ver_INFO_{Trxs,PDCHMask} helpers for that.

Version 9 is kept as default, so this change can be merged
independently of the actual implementation.  We can bump
it and remove the compatibility glue once the new versions
of both osmo-bts and osmo-pcu are released.

Change-Id: Idf11bc4ba3ff0b00b32f2beab8fd020c67119d05
Related: SYS#4868, OS#4547
2020-08-09 19:58:25 +07:00
Vadim Yanitskiy 0d1511d96e BTS_Tests/SMSCB: enable test cases for CBCH on SDCCH/8
Change-Id: I15286bb784ce828bd9fa709945382af9b2b62b44
2020-07-31 06:45:31 +07:00
Vadim Yanitskiy f1c95c8b1c BTS_Tests/SMSCB: establish a dedicated channel in f_smscb_setup()
Change-Id: I3f061a4d48209b1aa5eaea2fd05fc4752de0c70f
2020-07-31 06:44:02 +07:00
Vadim Yanitskiy ffcd128f10 BTS_Tests/SMSCB: improve SDCCH8+CBCH handling and configuration
Change-Id: I130a028df7dc476ab765733261a1f007f19f39a8
2020-07-31 06:41:52 +07:00
Vadim Yanitskiy b1ebcc0163 BTS_Tests: introduce and use as_pcuif_check_pdch_mask()
This altstep would reduce code duplication.

Change-Id: Ic66598e3d2706da7caca7b27b9880562b0fcb9bd
2020-07-19 17:43:11 +07:00
Vadim Yanitskiy 13a29d5f65 BTS_Tests: fixup PDCH tests: consider frequency hopping
Do not resolve frequency hopping parameters unconditionally.

Change-Id: I1735a7f155f737c384e5d1e3e6f4ac97511a1c7c
Related: SYS#4868, OS#4546
2020-07-15 14:42:02 +07:00
Vadim Yanitskiy 1d55dee29b BTS_Tests: fix PDCH tests: consider frequency hopping
Change-Id: I1d805bf5392e59c4b4834757ce6124e63b174a42
Related: SYS#4868, OS#4546
2020-07-14 21:19:34 +07:00
Vadim Yanitskiy eec14f0951 BTS_Tests_LAPDm: consider frequency hopping parameters
Change-Id: Idd1ffe0ee97805b40bb5e37645aa53a9b1dc4b0a
Related: SYS#4868, OS#4546
2020-07-14 21:07:50 +07:00
Vadim Yanitskiy a9894281ef BTS_Tests: implement optional frequency hopping support
Change-Id: If0318fd320d4f112341465844555bf8d65b5f88f
Depends: I7822c3581fccba3277a63577e740e7486307635d
Related: SYS#4868, OS#4546
2020-07-14 21:07:50 +07:00
Vadim Yanitskiy 6c71c17fc5 BTS_Tests: introduce and use helper f_l1ctl_est_dchan()
This is required for the upcoming test cases running on hopping
channels.  Dealing with module / hopping parameters in every
test case is definitely not a good idea, so let's add a function.

Change-Id: Ia4f078ebbb278246ee117f580ff93f301dc60f7c
Related: SYS#4868, OS#4546
2020-07-14 21:07:38 +07:00
Vadim Yanitskiy f7181ed9c9 library/GSM_RR_Types: share send templates for ChannelDescription
They're going to be used in other modules too, not only in BTS_Tests.
Also, take a chance to rearrange the list of arguments, so the ones
with default values are placed after mandatory ones.

Change-Id: Ia33ebf2e680f16f774a981fc33422dfe5036637f
2020-07-14 20:31:07 +07:00
Vadim Yanitskiy cb478ec0ab library/GSM_SystemInformation: add dec_SystemInformationSafe()
Some types of System Information (mostly the Rest Octets) are not
fully implemented, so calling the generic dec_SystemInformation()
may result in a DTE.  Let's add dec_SystemInformationSafeBT() with
"prototype(backtrack)", so it would return a non-zero integer if
decoding fails.  Let's add a wrapper dec_SystemInformationSafe()
that would additionally check the RR Protocol Discriminator.

Change-Id: Id4d73e0f3347e1d4c4c77aec75b767311d662292
Related: OS#4662
2020-07-12 12:34:49 +00:00
Philipp Maier 16ade7860e BTS_Tests: extend rach content tests with emergency call
The testcase tests if a CHANNEL REQUEST on the RACH leads to the correct
CHANNEL REQUIRED message on RSL level. When a MS is sending a CHANNEL
REQUEST to establish an emergency call, it uses a slightly different
layout for the request reference (RA). Lets add another similar testcase
(TC_rach_content_emerg) to cover the emergency call situation as well.

Change-Id: Ie5b7af3e93efaa6d0b412d3b1c77bc9514424f52
Related: OS#4549
2020-07-09 12:40:26 +00:00
Neels Hofmeyr a5f0ed2ba4 GSM_SystemInformation: use GSM_RestOctets for SI3 and SI4 rest_octets
Change-Id: I3f00dd0b4863582fc5edf08149103150b8b5e97b
2020-07-06 16:49:52 +00:00
Vadim Yanitskiy 89be060458 BTS_Tests: mark both TC_rll_data_{req,ind} as TODO
Change-Id: I55d8dbc3a5cb3b0422cb6329b2bd60dd7b7fad6a
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy 13c26f9279 BTS_Tests: move ts_RRM_GprsSuspReq to L3_Templates.ttcn
Change-Id: Ib1aa0053cfca8ccd6ff613ab3b1c4f5afbd27534
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy b2a90db875 BTS_Tests: cosmetic: mark friend types / functions as such
Change-Id: I53296b0d66594c198251526c8433a07348d821b1
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy 8239dd9627 BTS_Tests: cosmetic: mark private types / functions as such
Change-Id: I99ccf398130c7e5c2aac1932ebb83f158fed281d
2020-07-04 21:39:47 +07:00
Vadim Yanitskiy 71c39ea8f2 BTS_Tests: cosmetic: mark private test case functions as such
Change-Id: I173e42dbe1694a10b54f95a730df2e64f2c65d17
2020-07-04 21:39:39 +07:00
Pau Espin 45fe5e0e1f bts: Introduce TC_tx_power_ramp_adm_state_change
Change-Id: I03efdfe19e9cecadb0d03811a7029b54bf6281da
2020-06-25 12:52:48 +02:00
Pau Espin b6985f906f bts: Introduce test TC_tx_power_start_ramp_down_bcch
Change-Id: I895d69394a0123ae32b336c9ffaff615ba657f12
2020-06-25 12:52:42 +02:00
Vadim Yanitskiy 89db3e0f33 BTS: refactor f_init_rsl(): make number of transceivers configurable
Not all osmo-bts backends do support multiple transceivers, while
we still want to run test cases against them. Let's make the
number of transceivers configurable (mp_transceiver_num), so it
can be adjusted depending on osmo-bts backend to be used.

Change-Id: Ic9dd49a2fc856de593b52b3ec0c559e0e15ca173
Related: OS#3155
2020-06-22 18:11:46 +07:00
Harald Welte 7262968a29 osmo-bsc.cfg: Remove access-list directive
This was removed when libfilter was removed from osmo-bsc.

For some strange reason apparently the config files were not used/tested
while testing the removal of libfilter.

Also, irrespective of breaking TTCN3 test execution, we must introduce
a dummy 'access-list' VTY command to osmo-bsc to ensure we don't break
virtually every config file out there.

Change-Id: I5d703b9f2f1066654daa43519999585cf9ec7e78
2020-06-21 20:27:26 +02:00
Vadim Yanitskiy a16749582e bts/expected-results: TC_rsl_bs_pwr_static_{ass,power_control} pass now
Change I16cc50dfca102030380a06e16c234d5f6698f38f fixes them both.

Change-Id: I2e8db76be78fffcc8418096670ad3cf5174856f8
2020-06-16 01:44:21 +07:00
Vadim Yanitskiy 117c176de7 library/RSL_Types: fix RSL_IE_BS_Power: Power Level is 4 bit long
Unlike the RSL_IE_MS_Power, where power_level is 5 bit long, in
the RSL_IE_BS_Power it's 4 bit long. Fix this.

Change-Id: Ic0cb2275ef585754b9ae5e3d8077ca652afd9365
2020-06-16 01:40:24 +07:00
Vadim Yanitskiy 96e8c80b48 BTS: fix latest: ignore mismatching messages in as_rsl_init_guard()
Another surprise from the latest osmo-bts release: it may send us
CCCH LOAD INDication message during the RSL bring up. Ignore it.

Change-Id: Iab22b620a5f7b07fe03c1b13bebef2931d14879d
2020-06-10 14:21:39 +07:00
Pau Espin a2e079cb5d bts: Introduce test TC_tx_power_start_ramp_up_bcch
This test verifies power ramping (up) is working fine during BTS
startup.

config files are updated to make sense:
* "nominal power" in osmo-bsc.cfg reflects correct default nominal tx
  power of fake_trx.
* "osmotrx tx-attenuation" in osmo-bts.cfg is removed to let osmo-bts
  use the value received through OML (max_power_red 20).
* "power-ramp step-size" in osmo-bts.cfg is increased to speed up the
  test. There's no good reason to keep it lower.

Change-Id: Ieb7444c6312bbeab64da2732393b3facf3e1f003
2020-06-09 10:54:05 +00:00
Pau Espin 188bfd2ebd bts: Fix trailing whitespace
Change-Id: I5164212fee7e94bc98f65e60d00ccd77b4d9e01d
2020-06-07 19:41:22 +00:00