Commit Graph

1198 Commits

Author SHA1 Message Date
Neels Hofmeyr 081e89f477 fix: line nr in test name in wrong places
test.Test() overrides name() in order to provide source line number
information. However, overriding name() is the wrong place for that, as
name() is also often used for identifying an object - when listing the
tests of a suite, the line number should not appear in the test name.
For example, the line number sometimes ends up in the test results in
jenkins, making 'foo.py' and 'foo.py:23' two distinct report items.

Instead, add a separate function Origin.src() that defaults to name(),
but specific classes can override src() if they wish to provide more
detailed information with the object name.

Override src() in Test, not name().

Use src() in backtraces.

The suite_test.ok shows that the backtracing in the log remains
unchanged, but the place where the test name is printed is corrected:
   I am 'test_suite' / 'hello_world.py:23'
becomes
   I am 'test_suite' / 'hello_world.py'
(Notice that "[LINENR]" in suite_test.ok is a masking of an actual
number, done within the selftest suite)

Change-Id: I0c4698fa2b3db3de777d8b6dcdcee84e433c62b7
2020-12-11 00:19:13 +01:00
Neels Hofmeyr fc38393f82 process: add get_output_mark() and grep_output()
Allow showing log lines matching specific regexes, from a specific start
point of a log.

My use case is to echo the handover related logging after an expected
handover failed, so that the reason is visible already in the console
output of a jenkins run. So far I would need to open the endless bsc log
and look up the matching place in it to get a conclusion about why a
handover failed.

Change-Id: Ib6569f7486e9d961bd79a5f24232e58d053667a1
2020-12-11 00:19:13 +01:00
Neels Hofmeyr ecce402f43 configure fixed ARFCN per bts
Remove ARFCNs as a concept from resource pool, assign a fixed ARFCN to
each BTS and TRX in the resource pools.

Using ARFCNs on specific bands as resources was an idea that is hard to
implement, because specific BTS dictate selection of bands which
influences which ARFCNs can be picked. That means reserving ARFCN
resources is only possible after reserving specific BTS resources, but
the tester is currently not capable of such two-stage resolution.

Writing handover tests, I got the problem that both BTS in a scenario
attempt to use the same ARFCN.

The by far easiest solution is to assign one fixed ARFCN to each BTS and
TRX. If ever needed, a scenario modifier can still configure different
ARFCNs.

(Due to uncertainty about OC2G operation stability, I prefer to leave
OC2G on ARFCN 50, as it happened to end up being configured before this
patch.)

Change-Id: I0a6c60544226f4261f9106013478d6a27fc39f38
2020-12-11 00:19:13 +01:00
Neels Hofmeyr f07114f9e2 log reserved resources
On non-debug log level, show something like this at the beginning of
each suite:

 03:45:49.439720 tst handover:sysmo+secondbts-trx-b200: RESERVED RESOURCES for handover:
 bts
   sysmoBTS 1002
   Ettus B200
 ip_address
   10.42.42.2
   10.42.42.3
   10.42.42.4
   10.42.42.5
   10.42.42.6
   10.42.42.7
 modem
   sierra_1st
   sierra_2nd

Change-Id: Ic23556eafee654c93d13c5ef405028da09bd51d7
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 7d79ea4d2a log passed tests
In the end of a test suite, do not omit the passed tests. For example,
running handover against N BTS combinations, it was hard to summarize
which BTS models actually succeeded, with only the failures listed.

Besides the "FAIL" listings, now print something like this in the end:

 PASS: handover:sysmo+secondbts-trx-b200 (pass: 1)
     pass: handover.py (198.8 sec)
 PASS: handover:sysmo+secondbts-trx-umtrx (pass: 1)
     pass: handover.py (192.7 sec)
 PASS: handover:trx-b200+secondbts-trx-umtrx (pass: 1)
     pass: handover.py (193.1 sec)

Change-Id: Ib85a5b90e267c2ed2f844691187ecadc8939b1bb
2020-12-11 00:19:13 +01:00
Neels Hofmeyr aa67f95027 bts: allow configuring ARFCN and BSIC: add to schema
resources.conf is already allowed to set these, but in order to let
scenarios and suites modify these values, they need to be in the schema.

Change-Id: I8e0583e9208d563c66b0bdc9f25b1b74f92403c2
2020-12-11 00:19:13 +01:00
Neels Hofmeyr ca155b6c37 bsc: add active lchan matching via vty
Will be used in upcoming handover_2G test suite in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8, which needs to verify that a
handover actually ended up on the expected lchan.

Change-Id: I03df8f3ae2ee47930eee311c7ce104c36dbb3154
2020-12-11 00:19:13 +01:00
Neels Hofmeyr af4e2317dc add bsc.vty: always keep a BSC VTY connection ready
The BSC's VTY port will be used to trigger manual handover, and to
retrieve a list of active lchans from the BSC, in the upcoming
handover_2G test suite, I0b2671304165a1aaae2b386af46fbd8b098e3bd8.

Change-Id: I06652db04fc9e48748f3c2196334f5352e9cc48a
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 106865a75f add osmo_vty.py
To trigger manual handovers, I need a VTY interface. The non-trivial
parts of this are copied from osmo-python-tests osmo_interact_vty.py.

Will be used in the upcoming handover_2G test suite in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8.

Change-Id: I7c17b143b7c690b8c4105ee7c6272670046fa91d
2020-12-11 00:19:13 +01:00
Neels Hofmeyr b5a3d6732a cfg templates: log level and source basename last, log no category-hex
Makes for saner log output in stderr files.

Change-Id: I2755beffd18d6779367c04e4aaaed119d66eb3be
2020-12-10 23:03:27 +00:00
Pau Espin Pedrol 8d27b18480 contrib: Disable libmnl dependency cross-compiling osmo-bts
Only newest OE SDKs have libmnl added, but we don't need this feature
anyway, so let's disable it in order to get builds running fine again.

Change-Id: Ief9cbca6e10b1ed6acf6e079f660fc3f7c863c7b
2020-12-08 12:02:07 +01:00
Pau Espin Pedrol 92ebea1dc1 contrib: Disable libmnl dependency cross-compiling osmo-pcu
Only newest OE SDKs have libmnl added, but we don't need this feature
anyway, so let's disable it in order to get builds running fine again.

Change-Id: Id3b30d0b183cd21fd6df89fdda5581ab58c7a9a5
2020-12-07 13:43:17 +01:00
Neels Hofmeyr 2bd357cf02 prod: after hardware move, adjust modem pci for sierra_1st and sierra_2nd (ONLY TWO)
Doing only the first two modems so far because I need them for handover
runs. The other modems are still todo!

Change-Id: Ibd71acfc76c01ffd105abe5effc1d246b1e65f85
2020-12-03 01:02:11 +01:00
Nils Fürste 2af2b15e2e Process: Add remote_port as new parameter
remote_port defines a custom/additional port for
connections over ssh. It may be used in case several
ssh instances share one IP address.

Change-Id: I2c93fd2ea1c10c333d00eafd3c1066c35796e398
2020-11-30 16:32:51 +00:00
Andre Puschmann b33f36b9fb gnuradio_zmq_broker_remote: fix eNB port mapping for carrier aggregation
the mapping of ports didn't consider when a eNB had two ports for
different EARFCNs

Change-Id: I5548f67a3b37b03482e4b6172828fcd891e704a5
2020-11-30 14:27:10 +01:00
Andre Puschmann a07af115fe jenkins-build-amarisoft.sh: set symlink to srslte_rf lib
Change-Id: Ifc8e5ba0dd59fb92cdf22f2a18acea904e2153f7
2020-11-30 14:27:10 +01:00
Andre Puschmann 65a9e741ad ms_amarisoft: fix various regressions
this patch fixes some regressions in the Amarisoft UE class,
the config template, etc. that have been undetected bc we never
executed tests with it.

Change-Id: I397e675a4018acf3372a3b7e29fd864703b2b919
2020-11-23 12:33:52 +01:00
Andre Puschmann 25bc1e07e4 add scenario to modify bandwith of 2 eNB objects
required for Inter-eNB HO configs, for example.

Change-Id: Iaf053941ff31c4ba94edf67fc54c0f1c1441577d
2020-11-20 13:03:07 +01:00
Andre Puschmann 3166b6353e enb: add QAM64 support for UL
* add new UE feature
* enable in srsue.conf.templ
* add new table for maximum rates
* add config scenario to enable SIB option for QAM64

Change-Id: I6ac2c9989a761e91b93d76c2507f55f0140b202d
2020-11-20 11:50:43 +01:00
Andre Puschmann 76021babc7 cell_modifiers: refactor HO cell configs
* rename intrafreq vs intraenb
* add missing mandatory params

Change-Id: Icc1fe5c1711ecbed2f1b8b1e6a0b51c2d28ec651
2020-11-20 11:50:43 +01:00
Andre Puschmann e8ab10cb22 enb: add scenario file for inter-eNB HO with two cells
Change-Id: I356a81814a2d7714a1a5252aa357257901fa6227
2020-11-12 09:23:36 +01:00
Andre Puschmann 635edb33c3 schema: allow empty lists in resource schema
Change-Id: I9249e29deef00d4dd68f89c704ef1d3093c799fd
2020-11-11 17:16:21 +01:00
Andre Puschmann 5e6d5ffd01 enb-cells_2ca: add missing cell params
the default params are set for a single cell in defaults.conf
but this 2 cell config requires them to be set explicitly.

Change-Id: I8b3c486eb3e42aeb04b6a7548d3f0de2aa40ee0c
2020-11-11 17:16:21 +01:00
Nils Fürste ca6efa9359 epc_srs.py: Fixed reference in local execution
fixes local execution of srsEPC

Change-Id: I36db8f2f65be6c92ccea050f550e21b67bb9e50e
2020-11-11 12:47:47 +01:00
Nils Fürste 1e736ea46e {enb,ms}_srs: Add DL QAM-256 support
Due to the integration of DL-QAM256 another table for DL max rates is needed.
Therefore, I added the parameter 'qam256' to the feature list in the resource.cfg.

The patch also enables the correct UE settings in the config file.

Change-Id: I2d34395449cdcfb31db66ea887d9adbee551e757
2020-11-11 12:47:47 +01:00
Andre Puschmann d253a101a1 iperf3_{dl,ul}: adapt pass/fail threshold
change pass threshold to 80% of the max rate for
half of the testduration (rolling average).

the overall average might be lowered because of a slower
TCP start or a late UE attach.

Change-Id: I8a545b8175784e9d6b49d6bf80f637ef7aa731f7
2020-11-11 12:47:47 +01:00
Pau Espin 600c799ee0 resource: Support waiting for reserved resources until available
Before this patch, almost everything was in place to support concurrent
osmo-gsm-tester instances sharing a common state dir. However, during
resource reservation, if the reservation couldn't be done due to too
many resources being in use, osmo-gsm-tester would fail and skip the
test suite.
With this patch, OGT will wait until some reserved resources are
released and then try requesting the reservation again.

Change-Id: I938602ee890712fda82fd3f812d8edb1bcd05e08
2020-11-11 11:38:35 +00:00
Pau Espin 998be6574b sysmocom: Introduce suite 4g2enb
Change-Id: I73b1a5e07f81fa1e3d3db1db243a3d0b137bda8e
2020-11-09 19:12:22 +01:00
Pau Espin ef7256a138 enb: Support cells from different ENBs in ncell_list
Change-Id: I1242c56ff42caea06e7f96317def82064fd11325
2020-11-09 18:54:26 +01:00
Andre Puschmann a7fd39448c srsenb_rr.conf: add PCI, TAC and root_seq_idx as cell param
make sure to insert cell specific TAC, PCI and root seq ind
into cell config and do not depend on cell index for a particular
enb. This causes issues in multi-eNB setups.

Change-Id: I6642128a449a0562dd23f7fa393ff48ae2503006
2020-11-09 13:10:21 +01:00
Pau Espin 4acb45a381 enb: Fix non-1st ENB gnubreaker remote address
ENB was using its own address as a remote address when the broker is
used, which actually only holds true for the first ENB (since the broker
is currently run on the same host/address of the first ENB).

Change-Id: I5c83075d140632846c6d357152963754d16b4633
2020-10-23 14:29:03 +02:00
Pau Espin a2d4e2f54e enb: Name preferrably by label, use it in remote run dir
This way several ENB will place its config and logs into different dirs.

Change-Id: I9b0c74cd63bc3888f380c66d94271beafc0db915
2020-10-22 16:04:12 +02:00
Pau Espin d6deb2824f Copy gnuradio zmq broker at runtime
The remotely run script is moved into a new subdir called "external",
where external utils to be used by osmo-gsm-tester (exernal to its own
process) are placed.
It needs to be in another directory because python files in obj/ are
loaded at startup of osmo-gsm-tester to dynamically load schemas.

Change-Id: I633a85294694f2c6efd58535729e9b8af166b3ff
2020-10-22 11:28:26 +02:00
Pau Espin 17f7c38755 sysmocom: emergency_preemptive_call.py: Avoid test failure if 2nd call not fully established
It may happen that the non-emergency call MT leg is still not properly
released when the emergency call MT leg is to be assigned a TCH, meaning
BSC will fail with an Assignment Failure upon Assignment request from
MSC.
The test sometimes passed and sometimes didn't, due to above mentioned
race condition. Let's relax a bit the test expectancies to have it
always passing, while still verifying preemption happens, and MT phone
is reached.

Related: OS#4549
Change-Id: I3697227cac56a1327f9ea08c5c2f52568e8d2a8a
2020-10-21 18:02:07 +02:00
Pau Espin fbb8611381 gnuradio zmq broker refactoring
First step towards support everal ENBs and installing the remote script
at runtime:

* The gnuradio broker class is moved to its own file, to decouple it
  from RFemu.
* The ENBs are registered earlier in the test so that the GrBroker knows
  when to start (delay start + setup until all ENBs have been configured).
* Handle ENBs internally as a list.

Change-Id: I4f1095bbc7ed0a816fe47caef44f7becadd9d737
2020-10-16 18:23:58 +02:00
Andre Puschmann c230efcb19 intra-freq-ho{-sameport}.conf: add scenarios for intra-freq HO cells
we need to use two different configs for Amarisoft and srsENB.
Amarisoft combines the two cells and transmits them on the same
RF port, whereas srsENB sends them on a single port each.

Change-Id: I3a2a8ae7bf4ed2dab6efba8550f442a741ad92e0
2020-10-16 14:17:36 +00:00
Andre Puschmann caa680ceeb mod-gr-broker: add scenario to easily enable the GR broker
Change-Id: I4397e26713778721b7138b03b7a5f8f63f780d44
2020-10-16 14:17:36 +00:00
Andre Puschmann d5579fa38e rfemu_gnuradio_zmq: fix amplitude conversion
fix dB to amplitude conversion and adjust max attenuation value

Change-Id: I5a94d5d31e7dc85ab37bd281f95374ad825a41ff
2020-10-16 14:17:36 +00:00
Andre Puschmann 27b603f7e2 mod-enb-cell-2ca: fix EARFCN
this scenario for 2xCA needs to have both cells on different EARFCN

Change-Id: I3cd12da5453aa659839862775e23d4a308b92c8e
2020-10-16 14:17:36 +00:00
Andre Puschmann d0682bad0f enb: add basic TDD config option
this patch adds the basic notion of FDD and TDD duplexing modes
to the eNB object. So far we've always assume FDD.

Since only Amarisoft eNB supports TDD, the required config
template changes, etc. are only applied there.

The patch also adds a scenario to enable the default TDD config.

Change-Id: I37216b5bfdf527d221913283b6c41d3c8fd6b500
2020-10-16 14:17:36 +00:00
Pau Espin 66c054288b sysmocom: Introduce test to verify emergency call preemption
Change-Id: I59993e65b3fd34fb2c3e5b002ab9666db9b7bad5
2020-10-15 19:02:27 +02:00
Pau Espin 3329d9db0a sysmocom: Enable emergency call testing in default-suites.conf
Change-Id: I9524ed9bc4f2d5f8e29313565400e90c64820988
2020-10-15 15:50:48 +00:00
Pau Espin 680ba03038 sysmocom: Introduce suite to test emergency calls
Change-Id: I2e851c94311ded0abd4ff072b8cc72316d972750
2020-10-15 15:50:48 +00:00
Pau Espin 83a2fdca9b ms: Allocate default msisdn internally
Don't wait until adding it to the subscriber data base, since the msisdn
may be needed beforehand (for instance in follow up patch to be passed
to osmo-msc configuration to route emergency calls).

Change-Id: I0d6902687e4beb3d6cdcefd4e343f21496100504
2020-10-15 15:50:48 +00:00
Pau Espin 410912333e 4g: Introduce ZMQ GnuRadio stream broker
srsENB currently creates 1 zmq stream (1 tx, 1 rx) for each cell (2 if
MIMO is enabled). Each cell transceives on a given EARFCN (and several
cells can transmit on same EARFCN).

However, for handover test purposes, we want to join all cells operating
on the same EARFCN to transceive on the same ZMQ conn, so that an srsUE
can interact with them at the same time (same as if the medium was shared).
Furthermore, we want to set different gains on each of those paths
before merging them in order to emulate RF conditions like handover.

In order to do so, a new element called the Broker is introduced, which
is placed in between ENBs and UEs ZMQ conenctions, multiplexing the
connections on the ENB side towards the UE side.

A separate process for the broker is run remotely (ENB run host) which
listens on a ctrl socket for commands. An internal Broker class is used
in osmo-gsm-tester to interact with the remote script, for instance to
configure the ports, start and stop the remote process, send commands to
it, etc.
On each ENB, when the rfemu "gnuradio_zmq" rfemu implementation is selected
in configuration, it will configure its zmq connections and the UE ones to
go over the Broker.

As a result, that means the UE zmq port configuration is expected to be
different than when no broker is in used, since there's the multiplexing
per EARFCN in between.

In this commit, only 1 ENB is supported, but multi-enb support is
planned in the future.

The handover test passes in the docker setup with this config:
"""
OSMO_GSM_TESTER_OPTS="-T -l dbg -s 4g:srsue-rftype@zmq+srsenb-rftype@zmq+" \
	"mod-enb-nprb@6+mod-enb-ncells@2+mod-enb-cells-2ca+suite-4g@10,2+" \
	"mod-enb-meas-enable -t =handover.py"
"""

and in resources.conf (or scenario), added:
"""
enb:
  ...
  cell_list:
    - dl_rfemu:
       type: gnuradio_zmq
    - dl_rfemu:
        type: gnuradio_zmq
"""

Note that since the broker is used, there's not need for mod-srsue-ncarriers@2
since the broker is joining the 2 enb cells into 1 stream on the UE side.

Change-Id: I6282cda400558dcb356276786d91e6388524c5b1
2020-10-15 12:34:36 +00:00
Pau Espin 4b7c585561 ms: Fix and use ms msisdn() getter
The getter method was named the same as the itnernal field, and hence
when used it would fail since the intenral field would be sleect and
fail to be called.

Change-Id: I2f631eb6256eb0e065f41d5b7531395c4a054cd8
2020-10-15 14:01:27 +02:00
Pau Espin 92a29d6b7e enb/ue: Assign zmq binding ports dynamically at runtime
ports are assigned increasingly in blocks in the range 2000-2200.

Change-Id: If2abddeb2ad6819de4f3ce64daaf00d2f527f9d2
2020-10-15 11:57:01 +00:00
Andre Puschmann 6628a50e4e enb-cells-2ca: fix config to match cell-id and cc idx
add comment explaining how the sceneario can be used.
also adopt cell IDs to match the CC index of the eNB.
This makes sure the cell_gain command of srsENB works with the config.

Change-Id: I1d14485df700ef3ba9220507f72c50b819d5e334
2020-10-14 14:31:20 +02:00
Pau Espin 71336c2f3a scenarios: Introduce mod-enb-cells-2ca.conf
This configuration is needed to have UEs attaching to srsenb-zmq in
handover.py

Change-Id: I0182af4db98852f00622dcebe5274dc7f6e99e6d
2020-10-14 13:07:47 +02:00
Pau Espin d0e8601ace templates/osmo-bts-trx: Increase osmo-trx rx-gain
Otherwise osmo-trx with a B200 seems to be having issues receiving some
data from the MS otherwise, making "sms" test fail. In general LU works
fine, and when MS sends the SMS, CM Service Request+Accept also works
fine, but then the BTS never sees the CP-DATA afterwards probably due to
MS power loop.

Change-Id: I5f7e3d22a142521ab83db81635ded252dabcf111
2020-10-14 10:59:55 +00:00