Commit Graph

1219 Commits

Author SHA1 Message Date
Andre Puschmann 4cd6f14be2 jenkins-build-srslte.sh: allow custom binaries
this allows to specify the environmental var
wanted_binaries_bin that will be included in the
trial package. if the variable isn't set, all three
main srsLTE binaries are included

Change-Id: I63f5799328435ce32b5bfd6dae6fd0b37e1e5397
2021-01-07 16:30:25 +01:00
Pau Espin Pedrol d95d494fcc sysmocom: Port nitb_netreg_mass suite to osmo split network
Change-Id: I221df84d76f73e15eed98036b31adc8089c8dc99
2020-12-21 18:32:43 +01:00
Pau Espin Pedrol 929a4f963c sysmocom/resources.conf.virtual: remove no longer existing arfcn resources
ARFCN are not resources anymore since a recent commit.

Fixes: ecce402f43
Change-Id: Icc0971b285e8db085670808b7d7bb98c38db2753
2020-12-21 18:25:32 +01:00
Pau Espin Pedrol 2c92c2e9be resource: Fix next_zmq_port_range using bvci file name
Change-Id: I293b7de1066ea69ccb0e495a69602ed56810018d
2020-12-17 15:51:39 +01:00
Pau Espin Pedrol 7ecfaa6a0f sysmocom resources.conf.prod: Update modem paths + add new modems after HW upgrade
Change-Id: I346a5bb38270a32695ec73994179bd75d873b67a
2020-12-11 13:28:28 +01:00
Neels Hofmeyr f80f7cc5c4 OsmoCtrl: use one global common counter for CTRL IDs
It is easier to traverse debugging logs if the CTRL request and response
IDs are globally unique across all programs and tests. Before this, we
were using 0 almost everywhere.

(This is not strictly needed for correctness, since each CTRL client has
its own request ID scope; just we open fairly many separate CTRL clients
all the time in our tests.)

Change-Id: I44c51f4fb5beb6cedf98ea0d6684a24c6aa418c7
2020-12-11 00:41:17 +01:00
Neels Hofmeyr 1e01a68846 add option osmo-gsm-tester.py --suites-file my-suites-listing.conf
For example, run with '-S handover-suites.conf' to just do the handover
tests.

Change-Id: If896ac84d02a275deda2f20a93c29312df128ebb
2020-12-11 00:41:17 +01:00
Neels Hofmeyr fb8c02fbd5 process output: do not leak ANSI colors past logged stdout/stderr
In jenkins, I still saw incidents of the entire log becoming colored
after a colored stderr snippet was printed to the log. Make absolutely
sure that no unterminated ANSI coloring is leaked.

Change-Id: Ib9ac1eea4a12d6d43ac8614491f016bbe9ca17b1
2020-12-11 00:41:17 +01:00
Neels Hofmeyr 7187510def run handover_2G in default-suites.conf
Change-Id: Ic6bb013cc2c395211eeb86fe7a3d3f42671793c7
2020-12-11 00:41:17 +01:00
Neels Hofmeyr de6743de9a add handover_2G suite, with handover.py test
Via VTY, handover two lchans of a voice call from bts0 to bts1 and back.

New scenarios/bts1-* allow selecting various types for bts1,
complementing the already existing files for selecting bts0.

Change-Id: I0b2671304165a1aaae2b386af46fbd8b098e3bd8
2020-12-11 00:41:17 +01:00
Neels Hofmeyr 5354058c75 osmo_ctrl.py: add RateCounters
First user will be the upcoming handover_2G/handover.py test in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8.

Change-Id: Id799b3bb81eb9c04d13c26ff611e40363920300e
2020-12-11 00:30:38 +01:00
Neels Hofmeyr 012a17da6a keep Ctrl connections open for bsc, msc and nitb objects
The pattern to use 'with' to keep a CTRL connection open adds indents to
every test script that wants to avoid multiple reconnections to the
CTRL. Instead, keeping a single open connection that is cleaned up on
{bsc,msc,nitb} object cleanup ensures that a) the program started up
successfully and opened a CTRL port, b) always has a CTRL open without
having to worry about it and c) keeps test scripts less
complex/indented/crufted.

(These are all current users of the OsmoCtrl API.)

Change-Id: I53fedbe569c5ccbc4b1a17dafe1f8d1bb8200b24
2020-12-11 00:30:38 +01:00
Neels Hofmeyr 5b04ef213e OsmoCtrl cleanup: get_var(), set_var(), get_trap()
CTRL interface interaction was mostly inherited from the first legacy
implementation of osmo-gsm-tester, and it was a pain to look at from the
start. Now, while I'm close to the topic, I want this to improve:

Properly match a GET_REPLY/SET_REPLY to a sent GET/SET by the message
ID.

Completely drop the do_get() and do_set(), which were not useful for
correct handling of the CTRL request and response messaging. The API to
use by callers is set_var(), get_var()/get_int_var() and get_trap().
These call the internal _sendrecv() (or for TRAP only _recv())
functions. Make it so that tese work both on an already connected
OsmoCtrl, as well as one that needs to establish a (short) connection,
so that both are trivially possible:

    # one CTRL connection stays open
    with OsmoCtrl(...) as ctrl:
  	ctrl.get_var('var1')
  	ctrl.get_var('var2')
  	ctrl.get_var('var3')

and

  # get_var() opens a connection, does the GET and closes again
  OsmoCtrl(...).get_var('var1')

Do away with doubling the instances OsmoCtrl and e.g. OsmoBscCtrl.
Rather make OsmoBscCtrl a child class of OsmoCtrl, which means that we
no longer have bsc.ctrl().ctrl(), just bsc.ctrl().

Have VERB_* constants instead of dup'd strings.

Apply to / simplify all callers of OsmoCtrl.

Some of these changes are similar to recently added OsmoVty.

Change-Id: Id561e5a55d8057a997a8ec9e7fa6f94840194df1
2020-12-11 00:30:38 +01:00
Neels Hofmeyr f79a86fc25 ctrl: increment message IDs for CTRL commands
Implicitly use distinct IDs for CTRL commands. This is a prerequisite
for matching GET_REPLY IDs to GET IDs, to correctly handle CTRL
responses without counting on being lucky.

Rather use 'use_id' as var name instead of overloading the 'id' keyword.

Change-Id: I698faa013eb14f88759685d50d925f5d82d80aa0
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 05439d7029 ctrl: set socket timeout
The blocking CTRL socket must have a timeout.

So far we have always been reading from the CTRL socket in a blocking
way. So far we are always lucky that we are indeed getting a response to
receive. Should the CTRL interface ever fail to answer, the tester would
be stuck infinitely.

Change-Id: I20091daf13981dc3d0d894af5a65c23f4db0471d
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 16c8be41c9 report fragment: strip ansi colors from junit XML
Jenkins does support showing ANSI colors on the web, but apparently not
in the junit results output. Strip ansi colors from report fragment
<system-out> text, to make it less annoying to read those on jenkins.

Change-Id: I656ecc23bbfd3f25bdf012c890e0c998168844d3
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 9596b210c5 add test.report_fragment()
Allow enriching the junit output with arbitrary subtasks within a test.

The current aim is, for handover tests, to not just show that a test
failed, but to show exactly which steps worked and which didn't, e.g.:

 handover.py/01_bts0_started PASSED
 handover.py/02.1_ms0_attach PASSED
 handover.py/02.2_ms1_attach PASSED
 handover.py/02.3_subscribed_in_msc PASSED
 handover.py/03_call_established PASSED
 handover.py/04.1_bts1_started FAILED

In this case it is immediately obvious from looking at the jenkins
results analyzer that bts1 is the cause of the test failure, and it is
visible which parts of the test are flaky, over time.

First user Will be the upcoming handover_2G suite, in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8.

Change-Id: I4ca9100b6f8db24d1f7e0a09b3b7ba88b8ae3b59
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 12ed99628c implement test.get_log_output()
Retrieve a test's own logging. The aim is to provide logging belonging
to a given report fragment in the junit XML output, will be used by
upcoming test.report_fragment() feature.

Change-Id: Idfa0a45f3e6a18dd4fe692e81d732c70b5cffb76
2020-12-11 00:19:13 +01:00
Neels Hofmeyr e5e5df8d24 log: process.py: fix weird space in stdout/stderr log output
Log output before:

  stdout:
   | line1
  | line2
  | line3

After:

  stdout:
  | line1
  | line2
  | line3

Change-Id: I4202e7dfbb550acaf55a6c6487fc07819ab18b94
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 3b493f3567 do not redirect_stdout in test scripts
In a test, I called print() on a multi-line string and saw the log
showing each line 0.2 seconds apart. redirect.stdout seems to be pretty
inefficient.

Instead, put a print() function into the testenv, to directly call log()
on the strings passed to print().

The initial idea for redirect_stdout was that we could print() in any
deeper functions called from a test script. But we have no such nested
print() anywhere, only in test scripts themselves.

As a result of this, a multi-line print() in test scripts now no longer
puts the log prefix (timestamp, test name...) and suffix (backtrace /
source position) to each single line, but prints the multiline block
between a single log prefix and suffix -- exactly like the log()
function does everywhere else.

I actually briefly implemented adding the log prefix to each separate
line everywhere, but decided that it is not a good idea: in some places
we log config file snippets and other lists, and prepending the log
prefix to each line makes pasting such a snippet from (say) a jenkins
log super cumbersome. And the log prefix (backtrace) attached on each
separate line makes multiline blocks very noisy, unreadable.

Change-Id: I0972c66b9165bd7f2b0b387e0335172849199193
2020-12-11 00:19:13 +01:00
Neels Hofmeyr 112da03e98 typo / newline in selftest log output
...because it otherwise causes confusing selftest log changes in
upcoming I0972c66b9165bd7f2b0b387e0335172849199193

Change-Id: I1eec31c5baba5ef33d0c8441b1e94a00d79af9bf
2020-12-11 00:19:13 +01:00
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