Commit Graph

469 Commits

Author SHA1 Message Date
Pau Espin 085a17e8e0 iperf3: Support setting run time
Change-Id: I93e857bd682c733c3ba36234b9bf1e1cc85eddef
2020-03-02 18:14:31 +01:00
Pau Espin 905e503cb9 iperf3: Support configuring data direction (dl vs ul)
Change-Id: I6b5b740beac22015c952ce826c034031ad4c4465
2020-03-02 15:45:08 +01:00
Pau Espin 2aeadeb58d srsue,srsenb: Fix zmq base_rate calculation and share value
Change-Id: I3e7817e822fb4d1f8bc9ef798162edf95a74d442
2020-03-02 11:56:51 +01:00
Pau Espin dcf99edf53 srsue: Enable pcap through config file
Change-Id: I15219d707aea778fefa8911362278442fa09550c
2020-03-02 11:10:50 +01:00
Pau Espin a031995762 srsue: Enable metrics csv file generation
Change-Id: I393afc49f553d9ebda29717c27d5eb907b3c5b60
2020-03-02 11:06:51 +01:00
Pau Espin a337695cd0 srsue: Remove old comment not longer applying
Change-Id: I1718dbb701c5dcd5a4081d3d91ae9f192418e7df
2020-03-02 11:04:03 +01:00
Pau Espin 3f088da9b2 junit: Replace invalid xml characters
Otherwise junit parser in jenkins fails:
org.dom4j.DocumentException: Error on line 20231 of document  : An invalid XML character (Unicode: 0x1b) was found in the element content of the document.

Fixes: 5bbdab8d95
Change-Id: Ia629e43bba01e50fd718c16404a7796d4f4e3713
2020-03-02 10:51:40 +01:00
Pau Espin b69377112c Introduce LTE Transmission Mode and RLC DRB mode params
Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67
2020-02-27 18:14:24 +01:00
Pau Espin 6ed301259a Introduce parametrized scenario files support
The idea is to have something similar to systemd template unit files:
https://fedoramagazine.org/systemd-template-unit-files/

Specially for modifiers, one finds the situation where same scenario structure
has to be created with lots of different values.
For instance, let's say we want to test with different eNodeB num_prb values:
[6, 15, 25, 50, 75,100]
Right now we'd need to create one scenario file for each of them, for instance:
mod-enb-nprb6.conf
mod-enb-nprb15.conf
mod-enb-nprb25.conf
mod-enb-nprb50.conf
mod-enb-nprb75.conf
mod-enb-nprb100.conf

And each of them containing something like (changing the num_prb value):
"""
modifiers:
  enb:
  - num_prb: 75
"""

Instead, we can now have one unique file mod-enb-nprb@.conf:
"""
modifiers:
  enb:
  - num_prb: ${param1}
"""
The general syntax is: "scenario-name@param1,param2,param3".
So "@" splits between scenario name and parameter list, and "," splits
between parameters.

For instance, one can now run following suite with scenario:
"4g:srsenb-rftype-uhd+srsue-rftype-uhd+mod-enb-nprb@75"

Related: OS#4424
Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca
2020-02-27 17:16:47 +01:00
Pau Espin 1deb1ae0bc enb: Add modifiers for num_prb
Change-Id: I0b8c834f1c67cc4bf4d07d03358ba2012331cbde
2020-02-27 15:37:08 +01:00
Pau Espin 6c42bb584b srs_enb: Make num_prb a config parameter
Change-Id: I336e71f53556596050cf3eb55a7810a009dbf7a8
2020-02-27 15:05:11 +01:00
Pau Espin 5bbdab8d95 Add test log to junit output
Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057
2020-02-24 18:30:58 +01:00
Pau Espin 69b2cf3ce2 srsue: Create netns on demand
Already existing script osmo-gsm-tester_netns_setup.sh is modified to
support only creating the entns without moving an iface to it.

Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74
2020-02-24 10:59:05 +01:00
Pau Espin 666d6c8236 remote: Fix comment typo
Change-Id: Ie466a95d354dc8c9d6960f713948426dadc58241
2020-02-24 10:41:58 +01:00
Pau Espin a9a2fe2ad3 srsLTE: Support configuring different RF backends
Before this patch, only virtual RF through ZeroMQ was supported.
This patch allows configuring srsUE and srsENB to use a real SDR with
UHD/SoapySDR backend connected through a physical RF network, while
still keeping compatibility to run on virtual RF ZeroMQ network, based
on the resources used (controlled by scenarios). For instance, one can
first run a suite through the phyisical RF (using 2 UHD-controlled SDRs)
and afterwards with ZeroMQ using the following default-suites.conf:

- 4g:srsenb-rftype-uhd+srsue-rftype-uhd
- 4g:srsenb-rftype-zmq+srsue-rftype-zmq

Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049
2020-02-20 15:54:33 +01:00
Pau Espin 9c383287e6 iperf3: Fix netns param not used
Change-Id: I2768ec0c6d2cbfc8411382a983e1ba17cb5f097e
2020-02-20 14:33:05 +01:00
Pau Espin 7691f2d027 config: Fix reading empty yaml default-suites.conf
during config.read(), on empty file yaml.safe_load() returns None, which
was then later converted to string "None" by _standardize(), and
osmo-gsm-tester.py was not catching "not combination_strs" condition.

Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0
2020-02-18 12:12:03 +01:00
Pau Espin c8b0f9359e Initial srsLTE support
2 tests (iperf3, ping) working against a full srs{UE,ENB,EPC} network
using ZeroMQ backend for RF (so no real RF support yet, that will come
next).

Related: OS##4295, OS#4296

Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4
2020-02-13 18:07:18 +01:00
Pau Espin 873dee391d powersupply_intellinet: Log target ip+dev_port
Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3
2020-02-12 17:56:30 +01:00
Pau Espin 4983eb5367 Fix remote and process RemoteNetNSProcess
Change-Id: Icdc917968a1310e287dd98994420519a605be9c0
2020-02-11 19:16:26 +01:00
Pau Espin c852ad8813 iperf3: Support running iperf3 remotely
The new RunNode class is used and ip_address support will be dropped
eventually, replaced by the former.

Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8
2020-02-11 17:46:52 +01:00
Pau Espin 7346472e5a util: Add helper setcap_netsys_admin()
This API was already added for RemoteHost but forgot to add it too for
local systems. It will be used by srsue once support for it is added.

Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e
2020-02-11 17:46:52 +01:00
Pau Espin 116a2c45fe Inroduce RunNode class
This class will be used to hold information for a run node, that is, a
target system or environment were a process or task is run.
It superseeds in functionality the old ip_address resource, which will
eventually be droped in favor of RunNode.

Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343
2020-02-11 17:45:50 +01:00
Pau Espin 7381e820a1 remote: Add more helpers to operate on remote hosts
Change-Id: I034314839675038762e00750b069eee8fcb70a5c
2020-02-11 14:41:09 +01:00
Pau Espin 180adfc3a6 remote: Improve wrapper script handling proper exit of ssh-remote processes
Improvements include:
* Avoid race condition between receiving signal and process not yet
  started
* Make sure process is killed with -9 if process is still alive a while after
  we killed it (SIGINT, SIGTERM). This is useful for processes which
  sometimes hang during shutdown like srsue in some conditions.

Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b
2020-02-11 14:39:36 +01:00
Pau Espin 14022d31b0 Add handlers to run process under a specific netns on a remote host
It will be used later to run iiperf3-cli connected to srsue on another host.

Change-Id: I8d223fc302df42446f5876ba020cfbea94be09b9
2020-02-11 14:39:28 +01:00
Pau Espin f6d45adb05 Allow passing remote env to process running in remote host
Change-Id: Icc0ae8d79ca30ed0a289b67546735251fc46cb10
2020-02-11 14:39:15 +01:00
Pau Espin 2eafb03195 Introduce RemoteHost and refactor code to use it
Let's move code related to coping stuff to remote hosts and managing
remote processes under a class where relevant information is stored.
This simplifies parameters being passed all over and allows to reuse
more code.

Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a
2020-02-06 13:58:51 +00:00
Pau Espin dd71022af7 bts_osmotrx: Add support to run osmo-trx on LimeNet-micro
bts_osmotrx will check if target host can run the inst, and otherwise
run osmo-trx-lms already present in the system (installed by other
means). This way same class can be used both ways, since the only real
difference between the 2 scenarios is:
* copying inst vs not copying it.
* Running binary from inst vs running it from PATH.

This commit does not provide a mechanism to make sure the osmo-trx or its
dependencies are up-to-date in the target system. A solution for that
will be provided separately.

Related: SYS#4663
Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341
2019-11-26 14:33:11 +01:00
Pau Espin abf837d326 process: Allow passing no local inst to copy_inst_ssh
This will be useful in the event a user wants to run a binary already
available in the target which needs no copying, but still requires the
non-binary related items to be copied and set up, such as config files,
directory structure, etc.
This option will be used to run osmo-trx-lms in LimeNetMicro already
installed from an OBS repo, since cross-compiling all related
dependencies would require a lot of work to do now.

Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74
2019-11-26 14:28:33 +01:00
Pau Espin 12c5ea4a24 process: Return proc in function helpers
Caller may want to access the proc object after running the process, for
instance to check return code or inspect its stdout/stderr logs.

Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282
2019-11-26 14:25:35 +01:00
Pau Espin c18c5b82ca bts_osmotrx: Allow Setting Rx/TX paths through resources.conf
Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7
2019-11-26 14:24:24 +01:00
Pau Espin 5eae2c50b0 Add a per-test log file
This way there's no need to go over hours of logging in the main log to
find information of a failing test.

Change-Id: I8cb79c7855e0bc14282d6728841e92ba22699eed
2019-09-18 18:57:11 +02:00
Pau Espin 7e1ee5044b Revert "resources.conf.prod: Use different ARFCN for sysmocell-5k"
This reverts commit 91199a3137.

Since we now support powercycling the SC5, we don't longer need to use a
different ARFCN for it.

Change-Id: Ie8b49c556c90b4a97a73695a93ac4108660a217f
2019-09-10 16:45:35 +02:00
Pau Espin 55cee160b0 Support SC5 power cycling through powersupply
* Add powersupply related code to bts_osmotrx.py to power cycle the
board.
* Each time the board is started, we need to unlock the RF (start TRX
implementation).

Change-Id: I8a1428c1ff90c9f5b42d7ffe86a6fc763819cba2
2019-09-10 16:45:35 +02:00
Pau Espin dd7bb2ca2d process: Introduce respawn_sync() method
Change-Id: Ifd1f553d9bead78bf1659f6c778c1b70888ba433
2019-09-10 13:44:39 +02:00
Pau Espin 922ce5ad31 process: respawn(): return process result
Change-Id: Ic6b57b8d0c2993a40ba39b87f45c7a524a8ca440
2019-09-10 13:44:20 +02:00
Pau Espin f11c4eea6d bts-trx: Improve logging and trap SIGTERM in ssh_sigkiller.sh
Trapping SIGTERM is done in order to get extra logging about that event.

Related: OS#4151
Change-Id: I2c7649dee8f5ecdaa08274806ccd8948d197ffdb
2019-08-14 12:32:25 +02:00
Pau Espin c93707ff6c bts-trx: Drop deprecated -t parameter
Parameter was dropped a while ago in osmo-bts, since it's calculated
dynamically from VTY config. So let's drop it to avoid a deprecation
warning message in osmo-bts log file.

Change-Id: Ia17a2528e091d4691c511732ed251e472d1270eb
2019-08-05 21:00:30 +02:00
Pau Espin 91199a3137 resources.conf.prod: Use different ARFCN for sysmocell-5k
Due to a bug in sysmocell-5K's TRX implementation, it may keep polluting
the air transmitting after the BTS is disconnected. This could cause
interferences with other tests. Correct fix would be to RF lock it after
test finishes (through ccli), but let's simply use a different ARFCN for
now.

Related: OS#4129
Change-Id: I6d5555aa8740b262ee92110987189c076db44f76
2019-07-26 11:47:43 +00:00
Pau Espin 0cde25f1d9 Introduce and use osmo-bts-trx VTY cmd max_trxd_version on sysmocell-5K
Force TRXDv0 when using sysmocell-5k as a TRX, since its implementation
(different than osmo-trx) doesn't support higher versions. Furthermore,
it will crash upon receival of SETFORMAT string. By forcing maximum TRXD
version to 0, osmo-bts-trx won't sent any SETFORMAT message since 0 is
the initial version to use.

Depends: osmo-bts.git I5eb1fdc002f9d7f4acf475356d8fc998dc8f6326
Related: OS#4006
Change-Id: Ic95c38d91dba354ae64c5edbfcea3fbbf34a7de3
2019-07-24 20:53:03 +02:00
Pau Espin b5f37ff935 tests: voice: Add voice call test with Osmux enabled
Change-Id: Ie4f360a77f6fcbc74f140a7fcb5feef2d94ac734
2019-06-19 18:57:13 +02:00
Pau Espin fed578e873 Introduce osmux support for msc,bsc,mgw
Change-Id: Ief3518e77650f2cddb48357b07fe95346e46ee1b
2019-06-19 17:37:07 +02:00
Holger Hans Peter Freyther dbb16e869e virtual: Make mass tests be able to activate themselves
We will need to enable/disable generation of lua script code
depending on the subscriber and mass test.

Change-Id: Ide4d788543d910356efe9f61e789b3975f7bc558
2019-05-08 05:16:27 +01:00
Holger Hans Peter Freyther 2e7e84358e virtual: Make it possible to add tests to the ms driver
Introduce an Executor that forwards all testcase related methods to
a list of testcases. Allow to instantiate them by name and use the
result to access the statistics.

Change-Id: Ia65ee53987e92b24e6b8c40e1376bc74dc260180
2019-05-08 05:16:18 +01:00
Holger Hans Peter Freyther 75c9cc75ea virtual: Introduce a base class for test cases
Introduce a base class with the intended life cycle and use it.

Change-Id: I97968fb02436d5ac8248fc8020539e1af547b030
2019-05-04 13:50:49 +01:00
Holger Hans Peter Freyther f16a8f7aaf virtual: Move the starter code into the starter module
There is nothing location update specific in the file. Let's move
it into the starter file.

Change-Id: I0cd5705eaf53a14523feacece9446331a53b3e59
2019-05-04 13:49:45 +01:00
Holger Hans Peter Freyther 92cc0c9b69 virtual: Separate starting virtphy/mobile from the test
Move the starting code out of the Update Location "test". In the mid
term we can have a SMS test run in addition to waiting the Update
Location tests.

A mass-test testcase will have a life-cycle of:

 * Creation
 * Configure (number of subscribers, probably all subs)
 * Pre-Start trigger (same as configure so it can be omitted)
 * Post-Start (all processes run)
 * Query if the test has completed

The next step is an actual implementation to send SMS.

Change-Id: Ie15f5123775d11dd44243b2741d047ed93f318f9
2019-04-30 22:11:31 +01:00
Holger Hans Peter Freyther 41cd68146d ms_driver: Catch up with the new MS baseclass
Change-Id: Id8de8b3ee76b515c49e5ea52acaa326a2283b0e1
2019-04-30 10:54:48 +01:00
Holger Hans Peter Freyther 61f28773bf virtual: Have a single result class that can store data
We want to have LU, SMS and other tests run at the same time. Begin
by creating a single result where testcases can store additional data.

Move the stats code into the UL test case handling and out of the
suite.

Change-Id: Ie99351bee1515de8cf6870467f08256a53701907
2019-04-28 15:53:24 +01:00