Commit Graph

847 Commits

Author SHA1 Message Date
Andre Puschmann 4db88de2fa enb_srs: expose DL AWGN channel modifier for srsENB
we've added the modifier to configure Amarisoft eNB channel
model. This patch enables it for srsENB.

Change-Id: I30e65d0431b2d2792986128287caf8b23a22b2c1
2020-09-20 10:01:17 +00:00
Andre Puschmann 7d3b83ee93 enb: incorporate number of carriers into ue_max_rate() API
this allows the enb to calculate the max rate in a single
spot rather than each test individually

Change-Id: Id225a986e0b271cf9c057c74c9aefd6c7f3d39d6
2020-09-20 10:01:17 +00:00
Pau Espin 7cb6badec1 testenv: Fix missing import module util
util module is used in prompt() method (debug suite, interactive test).

Change-Id: I9bb759d053a99108f121f1c4f7994726b6075fee
2020-09-18 15:17:10 +02:00
Pau Espin 1b99ad67d2 osmo-trx: Set more restrictive logging levels to avoid sporadic high load on stderr
Change-Id: I9dca89027d9015b946440363eae5f7bd3e082268
2020-09-18 13:28:20 +02:00
Pau Espin a7a89bdd32 bts-trx: Disable power-ramp
Power ramping features were implemented recently for osmo-bts-trx. We
don't want to enable them because it makes phones take longer (if even
at all) to find the network.

Change-Id: I35e2f560b28eddef886ad3b2f8ffb4ff79be77da
2020-09-18 12:43:25 +02:00
Andre Puschmann 9bcbb9aea7 ms_srs: trim leading zeros in UE metrics when calculating min_rolling_avg
this avoids a false negative detection when the UE attach takes a bit
longer and the first seconds all zeros are reported in the CSV

the HO test, for example, would fail in such a case as it expects
no zero TP over the course of the experiment.

Change-Id: I96dab17bb19249504dedda6659aed5eac0a65a26
2020-08-27 15:37:54 +02:00
Andre Puschmann 0cfc08436d enb: expose RRC inactivity timer
allow the user to specifiy the RRC inactiviy timer used in the eNB.
set the default value to 20s

Change-Id: I6a264b8dee893b883d40a48831cbb47eb15e1e7b
2020-08-27 15:37:54 +02:00
Andre Puschmann 736c30b4dc srsenb_rr.conf.tmpl: reduce PUCCH PRBs for SR and CQI to 1
this gives higher UL throughput because less resources are reserved for
SR/CQI. For more users we may have to make the value configurable again.

Change-Id: If6c313a1deafffda26e9effeb807ca71064c46bc
2020-08-27 15:37:54 +02:00
Andre Puschmann d899cf4b4e rfemu_amarisoft: handle exception and log event if WS is closed
the WS is closed if the eNB process dies. this patch will log an
event but not stop the experiment.

Change-Id: I0fafc7e38954400540375d51813e96500700f50c
2020-08-27 15:37:54 +02:00
Andre Puschmann 58422c5e87 enb_srs: add sleep after stopping srsENB to allow log flush
add similar concept used in the UE to allow the process to flush
the logs

Change-Id: I9f8341869f89cd7ae845072b9da4f6070fa2d242
2020-08-27 15:37:54 +02:00
Andre Puschmann a7b21a888b srs{ue,enb}.conf.tmpl: remove restriction of PHY threads for ZMQ
we now support any number of PHY threads also with ZMQ operation

Change-Id: I31abfce742f757179fbfe4099cd0a934db4e63d7
2020-08-27 15:37:54 +02:00
Andre Puschmann d81b1e4499 suite: fix runtime error when suite.duration is None
report generation failed when duration was not set correctly
and None was returned. Use 0 as duration by default.

Change-Id: Ia654c67bf2dcce432f84e869550c516d8d5a07a0
2020-07-21 11:43:00 +02:00
Andre Puschmann 6039c1ce4f srsenb_drb.conf.tmpl: add QCI8 config
add QCI config with RLC UM and PDCP SDU discard set to infinity

Change-Id: If946f569f7bbb98fc754f30ff5627fa5ca4afe68
2020-07-16 09:30:44 +02:00
Andre Puschmann dbe4bb3cb1 amarisoft_enb.cfg.tmpl: enable eNB PCAP if configured
enable PCAP output in eNB config

Change-Id: I8482315ce854c5b21a90b77de55dbb82f3049bcd
2020-07-15 14:43:51 +02:00
Andre Puschmann bafedff963 amarisoft_drb: adapt QCI 8 config for ZMQ operation
we use the otherwise unused QCI 8 as a slightly modified
version of QCI 7 (default RLC UM) with a PDCP discard
timer set to infinity to avoid dropping PDCP SDUs if
packets arive faster than can be processed in the DL

Change-Id: I06b7b583701f90827fba36564f969b5d58c9b9ad
2020-07-15 14:29:23 +02:00
Andre Puschmann 053ee5fbb7 iperf3: increase additional wait time for iperf client
we've noticed that the Iperf client times out too soon in
some experiment. It seems that this happens with ZMQ if
the RAT is too slow (slower than realtime) and the eNB buffers
too much data. This causes iperf to still receive DL data
for example long after the configured runtime.

Change-Id: I9b823ab22812c96920d54fb7342c8d4c578d5270
2020-07-15 11:48:23 +02:00
Andre Puschmann 5c4c052d81 amarisoft_{mme,enb}: make sure mcc/mnc are zero padded
same as for srsEPC this is also required for Amarisoft MME and eNB to support, i.e. 001/01

Note that the 3 digit MNC isn't covered by this.

Change-Id: I80a84e01ec9530c285634452d7c18c17bdd595ce
2020-07-15 10:48:18 +02:00
Pau Espin 03fab0922e iperf3: server: Avoid copying logfile during cleanup if already copied previously
Change-Id: I44e28f326fd476d27eb021922d38e9ca913aec69
2020-07-13 19:13:55 +02:00
Pau Espin 6b9a50e2e1 iperf3: Avoid creating empty log file
Since a while ago, we avoid by default using the --logfile param to log
the json output to a different file, in order to stay compatible with
older versions of iperf3.
However, the local logfile was still being created, and was not
overwritten with the remote file with content because there's none
created remotely (due to reasons explained above).

Change-Id: I218ec28dc65febc7bd083d6d15854319bf4f3daf
2020-07-13 19:07:29 +02:00
Pau Espin 0f7f265114 4G: Add milenage support
Change-Id: I4c1fb9bfec9927f2bfa29e6b27959323838f59e5
2020-07-13 18:33:53 +02:00
Andre Puschmann 1dddb7b264 srsepc.conf.tmpl: zero-pad mnc and mcc in config
srsEPC expect zero-padding MNC/MCC in config file. However,
001 and mcc will end up as 1 in the rendered template.
Therefore, they need to be formatted correctly.

Change-Id: Ie63cd1b15b961e493a6dcbd7e5a4fbabe0bb6f33
2020-07-09 13:43:00 +00:00
Andre Puschmann 008fd3194b enb_amarisoft: add support for PHY signal log file
when phy.signal=1 is set in the log_options, the eNB will dump
a binary file that needs to be copied back as well

Change-Id: I63d13cb74572ac065d5a3fcfb1632552d0a6dbc6
2020-07-09 13:43:00 +00:00
Andre Puschmann 59c83a2159 srsue.conf.tmpl: use UE cat 8 whenever more than one carrier is configured
Change-Id: Id96827960cac436b8ac363e28c2b0ab7b6acf57f
2020-07-09 13:43:00 +00:00
Andre Puschmann 69dd689644 rfemu_minicircuits: reset attenuation to zero in dtor
this avoids issues when the channel emulation stops in the middle
of a high attenuation values and the device is left in this state.

Change-Id: I9aeafc68bf81b8932aac4cb28040b9aea6bfcbdb
2020-07-09 13:43:00 +00:00
Andre Puschmann 955249d39d enb_amarisoft: add option to enable and configure DL AWGN channel
expose option to enable DL AWGN noise and make SNR configurable

Change-Id: Ib248e87e5abd855d4c974eab42ec40828c6e1d40
2020-07-09 13:43:00 +00:00
Pau Espin 969a4eebae Introduce stress tool object
This object allows to run the "stress" cmdline program in the background
on the specifies run_node, to simulate system load.

To run stress, a test can simply do:
stress = tenv.stress(epc.run_node())
stress.start(cpu_workers=2, mem_workers=1, io_workers=1)

And the test environment will remember to stop it when the test finishes.

Change-Id: I21023e6c64c48109f294291bfe3d8d8f4e1de038
2020-07-02 13:22:48 +02:00
Andre Puschmann 2ebcff934d enb_amarisoft: register log options as config scheme
allows setting those in scenario files

Change-Id: Idefd3c628441ededbee9411117ec426dd585eae0
2020-07-01 12:28:31 +02:00
Andre Puschmann f8c99a863d ms_srs: add min_rolling_average calculation
useful metric to detect low/zero downlink throughput for longer
time periods

Change-Id: I77a82a68689bc6c21cb9227dc9e7616d03e2b547
2020-07-01 10:52:09 +02:00
Andre Puschmann ba40facbaf enb_srs: remove comment introduced through copy+paste
Change-Id: I7d14ae5c17bd1cd1c1b23657dc60dc331519e32c
2020-07-01 10:52:09 +02:00
Andre Puschmann 9df7cd0a12 srsue.conf.tmpl: add default EARFCNs for 4xCA config
Change-Id: I553241735b5e204cb4be03936b90628d156c418c
2020-07-01 10:52:09 +02:00
Andre Puschmann 8b27ded781 test: append KPI rather than overwrite in set_kpi() method
this allows to call set_kpi() multiple times in one TC

Change-Id: I5f68d9e6e1135ee2afa79c9af2ed240d371214c4
2020-07-01 10:52:09 +02:00
Andre Puschmann 0694c30c8e amarisoft_enb: update lteenb default parameter for PDCCH, SRS and CQI
those configs should provide better HO performance, PDDCH format is selected automatically

Change-Id: I62a4240ac062d793ae5e197f852ea09eb4fe4ae9
2020-07-01 10:52:09 +02:00
Andre Puschmann f14ff812ce {ms,enb}_srs: add method to read kpi from a test run
this method uses the kpi_analyzer module for analyzing
stdout, CSV metrics and the logfile (if present).

if the module can't be loaded, no KPI will be added.

Change-Id: I28226a375f9ac4e08424c488062ae6a74a19af92
2020-07-01 10:52:09 +02:00
Andre Puschmann 20087ad8c4 process: provide API to return filename for process output
this is useful if the caller handles the opening/reading from
the file itself

Change-Id: I5e70fd1593a5bc7902fa218aae6452103545e4e0
2020-06-30 14:22:47 +02:00
Pau Espin 315b078fe8 Drop using patchelf out of PATH
New patchelf 0.11 release is out and it has fixes hitting us in both 0.9
and 0.10 on different binaries. So let's simply requiring having
patchelf 0.11 in all cases and be done with it (actually, if not running
4G binaries, using 0.9 is enough).

Related: OS#4389
Change-Id: I2701e46e7710db4c923a68e6b3a2f3c7b126f356
2020-06-25 20:04:29 +02:00
Andre Puschmann 82ced3fb1d {enb,epc,ms}_srs: expose log.all_level parameter
expose paramter to set log level, use warning as default

Change-Id: I4e77e5351399aefef47a309c82b8805e2c6022c5
2020-06-23 16:41:00 +02:00
Andre Puschmann 7c1c8d62e8 ms_srs: fix scp-back-metrics routine
every call to verify_metrics would copy back metrics again. see log here:

23:29:22.149299 run                 srsue(pid=31521): Terminating (SIGINT)
23:29:22.368263 run                 srsue(pid=31521): Terminated: ok {rc=0}
23:29:28.401035 run      scp-back-metrics(pid=32265): Launched
23:29:29.423083 run      scp-back-metrics(pid=32265): Terminated: ok {rc=0}
23:29:29.490275 run      scp-back-metrics(pid=32271): Launched
23:29:30.513852 run      scp-back-metrics(pid=32271): Terminated: ok {rc=0}
23:29:30.550862 run      scp-back-metrics(pid=32277): Launched
23:29:31.573962 run      scp-back-metrics(pid=32277): Terminated: ok {rc=0}

this patch only copies back metrics only once. also make sure that, similar
to logs, metrics are always copied back at the end of the run even if they
are not used for metrics checking. this is needed to run the plotting
script.

Change-Id: Ie7c156a5b2c8768bf90ff8e86515976e0d454c25
2020-06-23 16:41:00 +02:00
Andre Puschmann d5a58d0d61 ltemme: add two on-demand dedicated bearer for TOS 0xb8 and 0x60
two bearer of QCI 1 and 2

Change-Id: I857bed943b0184540b0a8ac696e7ebddd693be87
2020-06-23 16:41:00 +02:00
Andre Puschmann 55b455cbf6 iperf3: add getter to retrieve received bitrate
Change-Id: Id5676ce002cab6d52480b9b0f996f3065fd5dda6
2020-06-23 16:41:00 +02:00
Andre Puschmann 0957e9e095 enb: add getter for number of cells of an eNB
In order to set up the channel emulator we need to calculate the total
number of RF channels that a eNB has from within a test.

Change-Id: If641993033eb5dcdc6e2d6afdc8426ed322241ca
2020-06-23 16:41:00 +02:00
Andre Puschmann 219ec75aa9 iperf3: add getter to read the actual run time of an iperf client run
this is helpful to run some action for the exact run time of an iperf3
session. note that if no time spec is given when calling
"prepare_test_proc()", a modifier could set the runtime of an DL experiment
to an arbitrary value so we need to have a mechanism to read
the actual time from within a test

Change-Id: I484a0add322ffd269a1e9df72a00cf348950b268
2020-06-23 16:41:00 +02:00
Pau Espin 14bb5ff9de ms_osmo_mobile.py: Fix missing sublcass implementation of abstract MS methods
Change-Id: Icddab08c84ef97924d10801d7128158f515bcd01
2020-06-17 12:29:03 +02:00
Andre Puschmann 62e887d9b4 amarisoft_enb.cfg.tmpl: expose log options
this allows to alter the log options through a modifier

Change-Id: Iecd24afe6b242fbebc8463c9e1fa1c3b60b27d01
2020-06-17 08:54:07 +00:00
Pau Espin 5680255fb5 iperf3: Add support for setting TOS
Change-Id: I3ccc249ad1c9598c606303c52eff6823f45afa7b
2020-06-16 10:04:04 +00:00
Pau Espin 229f11647e iperf3: Refactor iperf3cli popen arg list generation
Change-Id: I10ab737e1317a52b6ccbd0de2470a9cf0c90c934
2020-06-16 10:04:04 +00:00
Andre Puschmann be50eae49b ms_srs: fix additional_args init
regressions after porting to list. init to new empty list

Change-Id: I06f370462934ca35f3aa13bbfcd9e5fc3df91895
2020-06-15 22:12:46 +02:00
Pau Espin e3d1b61175 Add per-test KPI support
tests can now use 'tenv.test().set_kpis(some_dict)' to set any kind of
data as KPIs, which will be presented in the junit report.

The representation of KPIs in the xml file doesn't follow the junit
format, mainly because it has no support for per-test properties.

Change-Id: I00e976f65a202e82d440bf33708f06c8ce2643e2
2020-06-15 15:42:58 +00:00
Pau Espin d4dc2ad3a2 selftest: Add test to verify junit xml report
Change-Id: I8cad02abe776cc00b513113dbaf3c948ea7956cd
2020-06-15 15:42:58 +00:00
Pau Espin e592de8056 srs: Convert additional_args attr to list to allow combining different params
Change-Id: I4b371332cd6fbe11b98c85c79a6f8fdcc776a57b
2020-06-15 17:31:23 +02:00
Andre Puschmann 393cd61382 amarisoft_drb.cfg.tmpl: adjust default values for QCI 1 and 2
use more realistic values for QCI 1 and 2 bearers to prepare
QoS operation

Change-Id: Ibfffde9ecccd473f22e816bd47e197fbe24b0ded
2020-06-15 15:09:55 +00:00
Andre Puschmann f678c4dfec iperf3: increase extra timeout to 30s
10s was too short and has still caused tests to fail because they were
stopped just before the iperf finished.

30s seems to be enought and has passed multiple times so far

Change-Id: I80b732a060356aa98882ff0e8b5debaf623ba0fb
2020-06-15 15:09:37 +00:00
Andre Puschmann 8b1547b562 rfemu: add max attenuation getter
this allows to query the maximum channel attenuation from within a test case

Change-Id: I35f7cb188790c59bbf2450f78c663fbc9440e406
2020-06-15 15:09:37 +00:00
Andre Puschmann ccb632037d enb_amarisoft: fix typo
Change-Id: Ie898da5eae10af96c2bca6c2413bdff4a5160e9f
2020-06-15 15:09:37 +00:00
Andre Puschmann b0ebcbcf10 epc: refactor run_wait() method and rename to prepare_proc()
this refactor no longer enforces blocking operation of the process.
Instead it returns the process object to the caller who
can now run either proc.launch() for non-blocking operation
or proc.launch_sync() for blocking mode.

The non-block mode allos doing other stuff in the background,
for example controlling the rfemu while running a ping.

Change-Id: Ia6372e55a8829f722e40db537d9dfd63a94d1be9
2020-06-15 15:09:37 +00:00
Pau Espin e66e3aebb4 config: Allow empty config files
Change-Id: Ic010e06220421df00405c5b6f5ad2e83514b6dcd
2020-06-15 14:28:00 +02:00
Pau Espin 683d196532 testenv: Prepend underscor to internal method
Change-Id: I2297f4b44d6f0c88409ab6982de4e3640a6a48b2
2020-06-15 11:39:41 +02:00
Pau Espin c3cf682afd Implement per-test timeout guard
Timeout value can be specified by test in suite.conf:

config:
  suite:
    <suite_name>:
      <test_name>:
        timeout: 2 # 2 seconds timeout

Change-Id: I522f51f77f8be64ebfdb5d5e07ba92baf82d7706
2020-06-15 10:53:46 +02:00
Pau Espin a75f85a058 Refactor test specific config parsing & generation
The dictionary is generated once during test creation at suite startup.

Change-Id: I4de511d64ccf65d2ec6eec45dcf28529b74c5d26
2020-06-12 17:26:00 +02:00
Pau Espin 444129ee1f test: Move duration time calculation to helper function
Change-Id: Ica2e7d92f37d18a4f8832f38d9f9f3baba8be09f
2020-06-12 16:38:37 +02:00
Pau Espin 8cfb5d020f Remove all references to defaults: timeout: from suite.conf
This feature is not really implemented and maybe never was. In any case,
it makes sense to have that working per-test so we can specify different
values per test in case it's needed.

Change-Id: I3c1b95c10e974da87ec9abd25578d8bcc0bc55a3
2020-06-12 16:12:43 +02:00
Pau Espin a9bc93da99 iperf3: Fix iperf3cli.launch_sync() when configured to run more than 300 sec
process object always used timeout=300 while runnig wth launch_sync().
Let's allow replacing that value beforehand so that iperf3 can
pre-configure the process object and caller doesn't need to care about
calculating expected time.

Change-Id: I7f6c5078f648013515919aa35ebcdb3ef157b5e4
2020-06-12 15:34:32 +02:00
Andre Puschmann 7c759d9a89 srsenb_sib.conf.tmpl: add default SIB3
if SIB3 isn't transmitted, the UE won't do HO and cell reselection

Change-Id: I329a59d9d0fa3b25bc00b760a455eadbe0b7220f
2020-06-11 20:37:17 +02:00
Pau Espin ec28572e42 test: Store brief log per test and use as default report_stdout
Change-Id: I0972ba56a42c24f3d3b1bc94bcbdaca86026046a
2020-06-11 18:07:08 +02:00
Pau Espin a4bb6d315b testenv: Add debug log when overlaying templates dir
Change-Id: I10fdfc5b2e3bf4c96941a3fae53230131f384de9
2020-06-11 16:23:54 +02:00
Pau Espin 3b49d46464 amarisoft_enb: Properly set S1AP SCTP bind ip addr
Change-Id: I8e2b8609cb198c6d5e293cffaa0a9de99600f06d
2020-06-11 13:18:20 +02:00
Pau Espin 9e2e8d218d log: Fix OriginLoopError generated in log.Error from testenv.poll()
Change-Id: Iea80d06a30346533e4ecec338b03c72d1f1067ae
2020-06-11 12:41:35 +02:00
Pau Espin 664e383021 EventLoop: Fix log error "Origin parent loop" during wait()
Setting the log.ctx manually is not needed anymore and it's actually
harmful since all palces where it was used, a log.Origin already in path
was being passed, causing a origin loop.

Change-Id: I0511b9f7bc59e3c7f2269ff3155d0c95db58d063
2020-06-10 19:50:12 +02:00
Pau Espin 3a81a7e4dc tests: Replace is_connected() with is_registered()
API was renamed and old name deprecated, let's use it everywhere.

Change-Id: Ic91dddcfd1a5a17c35d15a8a14628b3923229523
2020-06-10 17:57:37 +02:00
Andre Puschmann 0a5011047a enb,ms: refactor base_rate selection for ZMQ
Use tailored sample rate only use for 6, 50 and 75 PRB. For all other bandwidths,
we use the full LTE rate and downsample.
With 5.76e6 as base sample rate, for example, we had some issue during the tests like:

[zmq] Error: tx time is 0.178 ms in the past (7833600 < 7835648)
[zmq] Error: tx time is 0.011 ms in the past (7835520 < 7835648)

Using a higher sample rate seems to work better.

Change-Id: I53678587b2c5e0e5dccb1b55a328ad2f1a97fc4c
2020-06-10 15:41:46 +02:00
Andre Puschmann acdf416796 enb_amarisoft: decrease max rate for TM2+
perhaps additional CRS for MIMO up to 25 PRB result in slighlt lower max rate

Change-Id: I128085e308f400622683905245d42f92a631e81d
2020-06-10 15:41:46 +02:00
Andre Puschmann 10ed8dc3a7 enb_srs: add extra head room for max rate with 6 PRB in MIMO mode
the overhead with 6 PRB and MIMO is a bit higher when compared
to other PRBs resulting in lower achievable throughput

Change-Id: I63888435553bba4f7be88cc745e24472921a7fb4
2020-06-10 15:41:46 +02:00
Andre Puschmann 419a662f76 ms_srs: refactor UE state getter functions
rename UE helper functions to query RRC connected/idle state
and adapt tests accordingly

also add helper to retrieve assinged IP address

Change-Id: I6cd057e34b4df6a1a73695355dd6406d7e039546
2020-06-10 15:40:00 +02:00
Andre Puschmann 8eeea7f991 srsenb.conf.tmpl: reduce RRC inactivity timer to 5s
the default value of 60s is too long to trigger errors in the handling
of this timer. So a 5s timer is more likely to reveal potential issues
during the test execution

Change-Id: Id7a6739487c7875c4f26a47d05978c9ea9f33873
2020-06-10 10:12:49 +02:00
Andre Puschmann f7915a8509 srsenb_sib.conf.tmpl: increase default T311 value to 10s
this matches the default of Amarisoft eNB so tests can use the same values

Change-Id: Ic81fb6428751305d8b37a25bddb0d018ca6f51f6
2020-06-10 10:12:49 +02:00
Andre Puschmann 98ad77e4a0 srsenb_sib.conf_tmpl: fix whitespaces
Change-Id: Ifbd3c8bd97d7e2d3f165e88f3358dce9e7e33067
2020-06-10 10:12:49 +02:00
Andre Puschmann 3c978fe0f2 ms_srs: add PRACH, reestablishment and paging counter
this allows to query the number of PRACH attempts and paging
messages received during a test

Change-Id: I592ace7c38d98bfbbec5001a3cdfffe21733ef9f
2020-06-10 10:12:49 +02:00
Andre Puschmann aa7b5b7751 epc: add run function to EPC
this allows, for example, to run a ping originating from the core to the UE

Change-Id: Id86c61cbccd41b77f94f125d8d127e2ab5e46cd9
2020-06-10 10:12:49 +02:00
Andre Puschmann 61d150b115 enb: refactor ue_max_rate() and move helper function back to sub classes
It turned out that the Amarisoft and SRS eNB scheduler produces
slightly different maximum data rates for both UL and DL.

Change-Id: I30fa7006906d101c53ba586fb06bced3945aa960
2020-06-10 10:12:49 +02:00
Andre Puschmann 487d1ef142 amarisoft_enb: fix RI config
this cause all MIMO modes to fail because RI reporting was disabled

Change-Id: Ic25233cf7feb4ded8b3d0f440191cc958d8bc0ec
2020-06-10 08:12:10 +00:00
Pau Espin ef919c0f1c report: Add trial commit info to junit file
Change-Id: I997bbbeb3807af5cd927594a4155b824f0c6d03d
2020-06-05 14:08:28 +02:00
Pau Espin f3df1e4519 report: Add trial name to junit 'testsuites' node
Change-Id: I8cd62484bb67756e3d98d43a75731f4702acd2b7
2020-06-05 11:53:24 +02:00
Pau Espin 166dc10769 testenv: Support test overlaying a directory to look for templates
This way tests which require a very specific config file can override
specific template files used by object classes.

Change-Id: I65d1b1e826d2d430ee83810d998b98d0ccaa07cd
2020-06-04 20:03:07 +02:00
Pau Espin 4ddcdaf62c selftest: template: Test existing overlay dir features
Change-Id: Iff1a4dafcbf2193e95b1fb6e5a6712f1bcdd6309
2020-06-04 17:39:17 +02:00
Pau Espin 315ba57651 testenv: Get rid of 'resources' global variable
Change-Id: Id7576d21d0f9de29dd9bc4211eaf9b9ec634c990
2020-06-04 17:09:16 +02:00
Pau Espin 7e30d84034 process: Improve launch_sync() exception due to process failing
After this commit, in some situations ssh related errors are printed
directly in the exception to quickly find cause of the issue.

Example:
    FAIL: ping.py (5.0 sec) Error: rm-remote-dir(pid=25913): launch_sync(): local ssh process exited with status 255 (ssh: connect to host 10.42.42.110 port 22: No route to host) [trial↪4g:srsue-rftype@zmq+srsenb-rftype@zmq+mod-enb-nprb@6↪ping.py:9↪ping.py↪srsepc_10.42.42.118↪host-jenkins@10.42.42.110↪rm-remote-dir(pid=25913)]

Change-Id: Ia16c7dec96f70d761600ad6a50d9df8382d9c2c8
2020-06-04 16:46:43 +02:00
Pau Espin cf6bec7542 log: Improve log ctx information in log.Error exception
Before, it would show somethig like:
"""
osmo_gsm_tester.core.log.Error: Exited in error 255
"""

Now:
"""
osmo_gsm_tester.core.log.Error: rm-remote-dir(pid=24820): Exited in error 255 [trial↪4g:srsue-rftype@zmq+srsenb-rftype@zmq+mod-enb-nprb@6↪ping.py:9↪ping.py↪srsepc_10.42.42.118↪host-jenkins@10.42.42.110↪rm-remote-dir(pid=24820)]
"""

Change-Id: I8873f67a2f3df21c4dd552c92510535bf95e2c9d
2020-06-04 16:24:33 +02:00
Pau Espin 19fe3a1caf process: Fix wrong use of log.ctx(self)
That's not needed and will produce some parent loop detection in
log.find_on_stack() if logging is called under that stack frame.

Change-Id: I4ab7e8977fa9bad5c8956b7c1df1513b27bb5aa2
2020-06-04 16:11:39 +02:00
Andre Puschmann eb7ced1367 ms_srs: sum bitrates for all component carrier
when calculating the dl and ul bitrate, it is required to take the
sum of all active component carriers since they are reported seperately
inside the CSV file

Change-Id: If30ec3f22ce5871f911433e6a6997e9c6e7ca210
2020-05-29 09:55:59 +00:00
Andre Puschmann 346ffd9192 enb: remove freq config for zmq operation
specifiying the rx/tx_freq for the eNB is optional. But when
it's done it needs to be correct. There seems to be an issue
when mapping the freq[0-3] between srsENB and Amarisoft eNB.

So it's safe to just drop the config here altogether.

Change-Id: I70f5776173c2df5894031f68df2f6c3a900b79f8
2020-05-29 09:55:40 +00:00
Pau Espin eddff7c03c ms_{srs,amarisoft}: Support selecting tgz based on run_node's run label
Change-Id: I2c4cab02fa34c7acc7e57c3fec5a42c26d2a9208
2020-05-28 13:13:05 +00:00
Pau Espin b452ed6db1 enb_{srs,amarisoft}: Support selecting tgz based on run_node's run label
Change-Id: Ie1c8ccd2ffc9680bd72159872f3de0d59f1b9b0b
2020-05-28 13:13:05 +00:00
Pau Espin 5f826be20a ms_{srs,amarisoft}: Reuse run_node to hold run info
Change-Id: Ifdea48fed0bfc152131c53b87c34b4514c632917
2020-05-28 13:13:05 +00:00
Pau Espin 1abff4e260 enb: Reuse run_node to hold run info
Change-Id: If396940f154813d42ff3d3364c44b8979179127f
2020-05-28 13:13:05 +00:00
Pau Espin e921995ce7 epc_{amarisoft,srs}: Support selecting tgz based on run_node's run label
Change-Id: I90b8dab8bdc9980a7d2486d890cff183c07f1809
2020-05-28 13:13:05 +00:00
Pau Espin 6e0b6fb074 Support identifying different tgz files based on run_label attribute
tgz files in trials can be categorized in subdirectories, allowing to
select different bianry files at runtime based on the target run node
which is going to run them. This way for instance one can have a binary
linked against libs for eg. CentOS under run_label "centos/" or an ARM
target under "arm", and then use "run_label: arm" on the resource using
it.

Change-Id: Iaf2e97da3aff693395f44f0e93b184d4846cf6da
2020-05-28 13:13:05 +00:00
Pau Espin 2e495749d5 Fix processes run with RemoteProcessSafeExit not receiving stdin
Since the process is run in the background through the wrapper bash
script, stdin was disabled there. By explicitly redirecting the bash
process stdin we make sure it is always able to read from it.

Change-Id: I6cb7979aae0a7457919f353cbeb4c3b78cdd4919
2020-05-27 12:15:08 +02:00
Andre Puschmann 26890f3c31 ms_srs: wait 6s after stopping srsUE
we've only waited when running with ZMQ but in fact we need
to always wait because the UE may need some time to
gracefully exit, i.e. send the detach request and shut down correctly.

this is checked in cleanup() and verity_metrics(), so also before copying back
the CSV metrics. But we only wait once.

Change-Id: I47e46b8ccce41c9a62d2d6866260d22c927e710d
2020-05-26 13:55:39 +00:00
Andre Puschmann 71b430c22f enb: fix UL max rate calculation
don't double the maximum rate for UL traffic in MIMO since
we are only using MIMO in the downlink

Change-Id: I018e8ba8cb822a4bd57b8d0e420dd496172ac229
2020-05-26 13:55:39 +00:00
Andre Puschmann 1a96ecdeb6 ms_srs: allow + operator when specifying CSV columns
this allows to sum dl_brate and ul_brate and perform
the known operations, like max, average, etc. on both
UL and DL bitrate combined

For examples, with this CSV ..

time;cc;pci;earfcn;rsrp;pl;cfo;dl_mcs;dl_snr;dl_turbo;dl_brate;dl_bler;ul_ta;ul_mcs;ul_buff;ul_brate;ul_bler;rf_o;rf_u;rf_l;is_attached
1999;0;1;3400;-67;59;913;27;29;0.50;10432.000000;0;2.6;20;0.0;10848.000000;0;0.0;0.0;0.0;1.0
2998;0;1;3400;-67;59;912;28;29;0.50;2136.000000;0;2.6;20;0.0;1680.000000;0;0.0;0.0;0.0;1.0
3997;0;1;3400;-69;61;909;28;29;0.50;2136.000000;0;2.6;20;0.0;1680.000000;0;0.0;0.0;0.0;1.0

.. one could calculate the average of DL and UL bit rate with:

ue.verify_metric(1e6, operation='avg', metric='dl_brate+ul_brate', criterion='gt', window=test_duration)

and veriy that it's average is greater than 1 Mbit/s

Change-Id: I5c7c80bb107fa6b93b215176e6ebbb5dc8594860
2020-05-26 13:55:39 +00:00
Andre Puschmann 2cfa4a3d3c ms_srs: add max rolling average as metric operation
this allows to calculate the rolling average over a specific
window in time and take the maximum of that

this is useful to get average value for 30s UDP traffic for
example from the UE metrics

Change-Id: I34bbfe08dbc1f27b86c9805f54649d44d697fa18
2020-05-26 13:55:39 +00:00
Pau Espin 9dbdb623a0 process: Log stdout tail when process exits with error
This is useful since remote processes we run under ssh end up merging
both remote stdout and sterr into local stdout.

Change-Id: Ibbfb099a667f21641075faa1858e0b9acd706fd2
2020-05-25 16:45:36 +02:00
Pau Espin 6f31de823e enb_srs: Use RemoteProcessSafeExit instead of RemoteProcess
It is known that sometimes srsENB hangs until it is killed -9, specially
when using ZMQ backend. Let's use RemoteProcessSafeExit in order to make
sure it is killed in an acceptable time (srs binaries use some
preventive sigalarm 6 seconds auto-kill procedure, hence we use 7
seconds) before next test is started and potentially try to re-use the
same ENB and fails due to previous one still running.

Change-Id: I905bd753c7822feccf1c1bb59752698f1d1b85f0
2020-05-25 16:12:09 +02:00
Pau Espin 0d64f16544 Replace RemoteProcessFixIgnoreSIGHUP with RemoteProcessSafeExit
The API was doing far more stuff than its name indicated. Even more
important stuff, like making sure the process is killed at the end with
-9 after ssh connection is dropped.

Change-Id: If043ecab509b34b0922824d73db916196274ec64
2020-05-25 15:52:59 +02:00
Pau Espin d84a8387be 4g: Pass max bitrate to iperf3
Otherwise bitrate 0 (unlimited) does weird stuff, like iperf3 hanging
forever in DL.

Change-Id: I631243cce132923d9024f8161cf96161c51cdae5
2020-05-25 14:23:39 +02:00
Pau Espin f4ab97fb4a iperf3: Support runing test with bidirectional data
Change-Id: Ia6f12c65fd3ea26d412997741cb8685a9646af43
2020-05-25 14:11:07 +02:00
Pau Espin 66ef9457cb config: suites_dir and scenarios_dir are now a list of paths
This allows inheriting suites or scenarios from eg. sysmocom/ dir, while
still allowing to apply new suites and scenarios on top.

Change-Id: Icecdae32d400a6b6da2ebf167c1c795f7a74ae96
2020-05-25 13:33:50 +02:00
Pau Espin 3a0dea682e iperf3: Support using configuring UDP protocol
Change-Id: I0b3545847b01ae3d029881f243fea276f0fa39de
2020-05-22 15:20:27 +02:00
Pau Espin d79e719804 schema: Allow objects registering their own schema types
Change-Id: I998c8674a55531909bfeac420064c3f238cea126
2020-05-21 15:41:14 +02:00
Pau Espin 27b609f4d3 ms_srs.py: Fix typos in comments
Change-Id: Iaa09ed696eb58e63c366f26e94c66f27b5f733bf
2020-05-21 13:21:56 +02:00
Pau Espin e972c9c524 config: Allow setting trial directory in main.conf
Change-Id: Ia4141001d084f690897dbdff5eae6c69ff2e521c
2020-05-12 16:27:33 +02:00
Pau Espin 6c6c0e8599 Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it
It has been notified that current configuration system is difficult to
understand and to use, so it has been envisioned to refactor it a bit.
The idea is that the user passes a -c path/to/main.conf file, which in
turn contains whatever osmo-gsm-tester main settings supports (basically
what old paths.conf used to be, plus some files harcoded to the same -c
directory are now configurable through the main configuration file).

Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55
2020-05-12 14:07:29 +02:00
Pau Espin 4e6b5077d0 Split Scenario class to its own file
Change-Id: Ia029de7ecda4c8dc3d0b4c412e4c9c0a65cf0185
2020-05-11 15:12:07 +02:00
Pau Espin b1d8d30526 esme: fix smpplib imports
smpplib modules are used in several places, so it's not enough to import
them in the constructor since they are only imported for the function
scope.

Change-Id: I6511e28c7ef6aa86e85a7e03aa10a67d87896588
2020-05-11 11:55:48 +02:00
Pau Espin 620d2ee5ba ms_srs: fix numpy import
numpy is used in a few places in the class code so we need to jhave it
available in a bigger scope, while still only loading when needed.

Change-Id: Iea66e623e1c980a62d691e20dacb00df99fdd78f
2020-05-11 11:52:14 +02:00
Pau Espin 2a2d846430 obj: Fix objects placing their content in suite rundir instead of test rundir
Change-Id: I421d35473575086b93d5c8db98b909cc6c83d896
2020-05-11 10:56:52 +02:00
Pau Espin 0bd048c620 osmo-gsm-tester.py: Update help description and remove old nope cmdline arg
Change-Id: I879a5c30c185905614c2c5a7d54eb33817c94c31
2020-05-07 19:38:37 +02:00
Pau Espin 06c82aee5c Deprecate envvar OSMO_GSM_TESTER_CONF and remove other ones
Environment variable OSMO_GSM_TESTER_CONF is marked as deprecated and an
error is logged each time it's used. Same feature is available through
"-c" command line parameters, so having the envvar only makes things
more complex for no good reason. It cannot yet be completely dropped
since some environemnt still make use of it. Give some time to users to
adapt their setups.
Other environment variables setting some config apths can be dropped
since they are not being really used in any setup.

Change-Id: I7eb69f870d0dcb5906d45ae067d6bed1aabf5862
2020-05-07 19:09:23 +02:00
Pau Espin 18ff1e6e25 ms_driver: Fix typos after recent refactorings
Change-Id: Id9709743648d60792ec64c97ab1bc6811c4e3e1e
2020-05-07 17:10:51 +02:00
Pau Espin 306373027a Allow suites to dynamically register schemas so tests can receive parameters
Change-Id: Idbe99a35993d193cd97059feb980e61ff14c67ad
2020-05-07 15:06:01 +00:00
Andre Puschmann d27b3ba2e2 srs_{enb,ue}: don't set sc12 as OTW format
Change-Id: I7fc20d998b082f5c37b2451f1900161f997954b1
2020-05-06 20:21:18 +00:00
Andre Puschmann 549826d424 enb: add rf_port to cell list param
we need to make the rf_port a param in the cell list because for CA with
two cells on different EARFNCs, the RF port is different

for two cells without CA on the same EARFCN the RF port is the same

so we need to be able to configure it

Change-Id: I32e83cc34811588757104c5ce1cae7277402addd
2020-05-06 20:21:18 +00:00
Pau Espin e0b899079c schema: Allow keys to start with a number
YAML allows it, and it will allow suites tarting with a number on its
name (like the '4g' one) to register its own schema on next commits.

Change-Id: I64e5a9d6604085d3b17eba30498a5e7a66242cc8
2020-05-06 17:14:46 +00:00
Pau Espin eaefe6b533 suites/4g: Introduce sample handover test
This test currently only works with AmarisoftENB and srsUE, because:
* srsENB has no handover support yet
* AmarisoftUE doesn't provide any known way to verify handovers.

As a result, it usually runs with following filters and modifiers:
amarisoftenb-rftype@uhd+srsue-rftype@uhd+mod-enb-ncells@2+mod-enb-meas-enable

The get_counter() API may change in the future based on information
available from other implementations.

Change-Id: I0dff4af7e3a89804a03842ad4a4d697bca3a9773
2020-05-06 16:24:53 +02:00
Pau Espin 0dd4c0be10 osmo-gsm-tester.py: Fix import error when using default-suites.conf
Recent commit refactoring stuff introduced an import error only
triggered when default-suites.conf is used (no -s param).
This commit fixes the issue.

Fixes: ea8c3d4b12
Change-Id: I1534cfba55c69ed5c1354175f8b5df9b656b7d82
2020-05-06 14:04:24 +02:00
Pau Espin a8b8990bb8 rfemu_amarisoftctrl: import websocket module on first use
Change-Id: I568af52ffb7ac57222697f5d861a532c0e2a70de
2020-05-05 18:26:31 +02:00
Pau Espin 326091555b powersupply_sispm: import sispm and usb modules on first use
Change-Id: I6045bb739e5c69972014a9d27be3a24b7ad61c9a
2020-05-05 18:26:31 +02:00
Pau Espin a1daa51665 ms_ofono: import pydbus and GLib modules on first use
Change-Id: I754e1290eb5593c0ef168f74747f42db1b50f16c
2020-05-05 18:26:31 +02:00
Pau Espin 45149393e7 esme: import smpplib module on first use
Change-Id: Icc92937fdada9210f788805dbc42b80014e345e8
2020-05-05 18:21:58 +02:00
Pau Espin cc89cd0c5f ms_srs: import numpy module on first use
Change-Id: I2ce974954028bdbc7bc1561c4538b909edee2cb1
2020-05-05 17:49:27 +02:00
Pau Espin 5b9c7b922a testenv: deferr importing obj module class until use is required
Change-Id: Ie073256a03bb2d038ef7f715d534afb1c53bb241
2020-05-05 14:40:58 +02:00
Pau Espin 40c7bc7765 tests: Replace 'suite' with 'tenv'
Change-Id: I777ec59ffd83b861ddc09e85e52d7a8896264b8c
2020-05-05 13:56:01 +02:00
Pau Espin a442cb8e5f Update obj classes in obj/ to use testenv instead of suite_run
Change-Id: Idf41243a497de7bc507b9f1cd1b38640f456f815
2020-05-05 13:56:01 +02:00
Pau Espin f574a46b37 Move trial.py and suite.py to core/
Change-Id: Ic9a4c90c190e9d8e1829fbef83a9243f3c6f655b
2020-05-05 12:23:37 +02:00
Pau Espin aa1cbdc75a Move all obj/ references in suite.py to testenv.py
Change-Id: If4ab39be7a97d33e82c5a34e2a10dfec38613a4e
2020-05-05 12:19:10 +02:00
Pau Espin ee217b0a18 Move test.py and report.py to core/
Change-Id: Ibb7fa5ab40bcf1e59705bdd2c2c5a76025b2b544
2020-05-04 19:23:16 +02:00
Pau Espin 06cb536826 Move resource.py to core/
Change-Id: I0f36a5e61ff0ef14d08165c9c184acdf2d6e6901
2020-05-04 19:12:07 +02:00
Pau Espin 1ee5ec5db2 Move object subclass instance allocation logic out of suite.py/resource.py
This way we get rid of object related content in resource.py and we can
finally move it to core/ in next commit.

Change-Id: Ia5b861115ae3ae1b90149863c4265dcc730b8cd4
2020-05-04 17:22:53 +02:00
Pau Espin ea8c3d4b12 Generate schemas dynamically from pieces provided by each object class
This way we benefit from:
* knowing which attributes are used/required by each object class and
  subclass
* Having validation function definitions near the class going to use them

Change-Id: I8fd6773c51d19405a585977af4ed72cad2b21db1
2020-05-04 16:36:33 +02:00
Andre Puschmann 96b17df282 srsenb_rr.conf.tmpl: extend CQI and SR subframe scheduling
this fixes an issues when allocating CQI resources for multiple carriers
or multiple users

Change-Id: I8b9345502003da2f5b6841a98b77375656e84d8c
2020-04-21 15:05:51 +02:00
Andre Puschmann 333b868492 ms_srs: fix ZMQ radio arguments for CA and MIMO configs
similar to the eNB patches this fixes the CA and MIMO radio
parameters. In pricinple this could also be reused for the
AmarisoftUE but since we currently don't have a means to test
it I left it for a future commit.

Change-Id: I16b00009f97d61a9ab4715e5d727024661d3d0be
2020-04-21 15:05:51 +02:00
Andre Puschmann e2a6da6b48 enb: refactored rf_args handling for ZMQ-based radio
this patch moves the rf_dev_args creation for both eNB types
into the eNB base class, since they are identical.

the patch also fixes the arguments for all CA and MIMO configurations

Change-Id: I8ca3ed83e65dc07927385267e5970bc4f5b120d5
2020-04-21 15:05:51 +02:00
Andre Puschmann bf40f8c8bf amarisoft_enb: use two antenna ports for TM > 1
Change-Id: Ia241f96341780760d482d389097659b0f7b897e8
2020-04-21 15:05:51 +02:00
Pau Espin d6c792536f amarisoftENB: Fix running with num_cells=2
The B200 device being used in the physical setup doesn't support several
RF ports, so let's hardcode it to 0 for now.

Change-Id: Id4c31be2bd0c75f469e2293ade011c7b7ceedb1c
2020-04-20 18:21:11 +02:00
Pau Espin 96d64efdbb srsenb: Support neighbour and secondary cell lists in config file
Change-Id: I8fe0703b7d9db69658c112066404d2da1c3d1e09
2020-04-20 18:21:11 +02:00
Pau Espin 6c77874f46 enb: Introduce support for neighbour cell list
Change-Id: If604f1f2643a73f8c4da6ae3e9d24cd6c7e52d06
2020-04-20 18:21:11 +02:00
Pau Espin 154dc93219 AmarisoftENB: Support setting PCI value
Change-Id: Ibffb95f9b55e145d76ba64119a73ef9f1ed7cdef
2020-04-20 18:21:11 +02:00
Pau Espin a6d6304afc srsue, amarisoft/srsENB: Support setting rx/tx_gain attributes
Change-Id: I4228ba8746a54db4c17443718c01069d431361b9
2020-04-20 16:10:57 +02:00
Pau Espin 491f77cd0f enb: Add attribute to set 'id'
Change-Id: I8ce296c7875d557062dc13e7093ce0400050f2ce
2020-04-20 16:10:57 +02:00
Pau Espin d4404d54c0 enb: Implement initial RF emulation API
Two implementations are provided:
* Amarisoft Ctrl interface (websocket)
* Mini-Circuits Programmable Attenuator (HW, HTTP API) [1]

in Amarisoft ENBs, if no rfemu is configured explicitly, the Ctrl
interface one is used by default, while still being possible to use the
HW one.

[1] https://www.minicircuits.com/pdfs/RC4DAT-6G-60.pdf

Change-Id: Ie98a3fb9bcd2b87b96ecbb5b79e0f53981892a32
2020-04-20 13:30:27 +02:00
Pau Espin ca89bb3924 srsenb_rr.conf.tmpl: Fix whitespace
Change-Id: Ic2b4d8e2468984b096a870c878fa5d032ea4130f
2020-04-20 12:16:53 +02:00
Pau Espin a65b505adc powersupply.py: Fix import module line typo
Recent commit changed the import line so it runs only when required, but
added a typo making tests uing it fail.

Change-Id: Id3e5c16adc763a9b79cc464937c541abd15f98de
Fixes: 2b959580b9
2020-04-19 18:56:43 +02:00
Pau Espin f46ae22b3d enb: Add cell_list attribute
It allows configuring each cell_list up to a maximum of 'num_cells'.

Change-Id: I4fd30a3e37789b76bfaddc2beba1815154daab7f
2020-04-17 20:08:28 +02:00
Pau Espin 045245d5ae check_dependencies: Import modules dynamically and find related debian packages
This way we don't need to manually add new imports here or drop unusued
ones. It also makes sure local imports in all our py files is correct.
For instance, running the script already caught an issue which is added
to this patch (osmo_ms_driver/__main__.py).

This new version of the script also allows specifying subsets of
features to skip when checking for dependencies. This way, for instance
somebody not willing to use a sispm powersupply can stil check all the
needed dependencies are fine.

This new tool will make it easier to slowly make some dependencies only
used by some object test classes optional (for instance, python-smpplib
if user doesn't want to run an ESME node).

It also allows to retrieve the required debian/manually installed
packages when run with "-p" option:
"""
Debian packages:
        libpython3.5-minimal:amd64
        python3-gi
        python3-six
        libpython3.5-stdlib:amd64
        python3-pygments
        python3-yaml
        python3-mako
        python3-numpy
        python3-markupsafe

Modules without debian package (pip or setuptools?):
        usb                  [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/usb/_interop.py]
        pydbus               [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/pydbus/proxy.py]
        smpplib              [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/smpplib/command_codes.py]
        sispm                [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/sispm/__init__.py]
"""

Change-Id: I29ddf8971837754abd930d847bd1036e8e510de6
2020-04-17 19:44:24 +02:00
Pau Espin 2b959580b9 powersupply: Import sublcass module only if used
This way we avoid unconditionally importing all subclass dependencies,
and make them optional based on whether the setup has devices of that
type or not.

Change-Id: I0d2f8b26364b45f0d837cc51078784d1d0fa7ea1
2020-04-17 16:53:17 +02:00
Andre Puschmann 4b5a09a83c enb: add optional gtp_bind_addr paramter to enb class
this allows to optionally specify a the GTP bind_address for a enb object
in the resources.conf

this address is then used for binding the listening socket for gtp connections
which, in turn, allows to run the enb and epc on the same host.

when gtp_bind_addr is not specified, addr is used by default

this is especially useful if eNB and EPC run on the same host
and ZMQ is used for RF between eNB and UE. Two eNB addresses
are needed in this case, one bind address and one "remote-accessable"
address for the UEs ZMQ radio to connect to

Change-Id: I4fe38f31401428ed3e74e1d0b64960f0af122d37
2020-04-16 22:03:09 +02:00
Pau Espin 0e6ab424a4 ms_srs.py: Pass filenames to main cfg file template instead of cmdline args
Change-Id: Id2a6ba17d087d2ff67fe10b1dae6434259e74366
2020-04-16 15:41:31 +02:00
Pau Espin 3373703a72 epc_srs.py: Pass filenames to main cfg file template instead of cmdline args
Change-Id: I1ac3a3cace7ec2b0f85c5d9a5f97d5007d7c65ac
2020-04-16 13:59:57 +02:00
Pau Espin 135c609d29 enb_srs.py: Pass filenames to main cfg file template instead of cmdline args
Change-Id: Ifec6a8a9c29b94634f6ac7ea50aae9b8e18ae3cb
2020-04-16 13:44:37 +02:00
Andre Puschmann e4d5a139e3 enb_amarisoft: fix enb conf template name
issue has been introduced during refactor of enb class names

Change-Id: Ib3ad6451c3979440be28d8811f51ce5d1c103518
2020-04-14 22:23:06 +02:00
Pau Espin fdd8e3aad2 iperf3: Avoid using --logfile arg
Some older iperf3 versions don't support the --logfile arg. Let's
instead parse the json from stdout. Old --logfile behavior is left in
code but disabled since it's a nicer (less hacky) way to get results,
because parsing from stdout means we need to avoid reading some content.

Change-Id: Ia1b7fa4dae074089878963aeddf0006aea68e31f
2020-04-14 12:50:23 +02:00
Pau Espin 0dbd694501 Rename modem.py to ms_ofono.py
Change-Id: I050970986b0b3fbc23b756c5b7c524cb8b7c1327
2020-04-11 19:15:56 +02:00
Pau Espin e1a58bd8dd Move object classes used by tests into obj/ subdir
Change-Id: I0b2963cf00acd1f9036dca2e87aa3b87a0f8066d
2020-04-11 19:15:56 +02:00
Pau Espin e8bbcbf5b8 Create core directory to contain most of code not in object classes used by tests
Change-Id: I9aec6c55ccd71894182057d36e0025b69925d314
2020-04-11 19:15:53 +02:00
Pau Espin 9b486eedb6 Rename object classes to be {obj_class}_{implementation}
Change-Id: Ieafd96d7ee5b4baef08ca767629b93834f6a8c7c
2020-04-10 19:41:06 +02:00
Pau Espin bd552f9786 bts_oc2g: Fix ready_for_pcu() waiting forever
Change-Id: Id33e527591164b87d1e14b7922247b726267ad6e
2020-04-10 02:20:57 +02:00
Pau Espin 19155245a4 bts_oc2g: Fix missing import remote
Change-Id: I318683b8dc6215f5bf863cfb1581e2c3bfa05621
2020-04-10 02:09:22 +02:00
Pau Espin ce82b038c7 pcu_{sysmo,oc2g}: Inherit from pcu abstract class
For some reason these classes were still not inheriting from the base
class (probably because it was added after they existed) and they
started failing after recent changes which presumed they where already
inheriting.

Change-Id: I88217baf490ec45373d0743585377ed2639a8cfd
2020-04-10 01:59:48 +02:00
Pau Espin 23e60e5b37 amarisoft_ue: Implement data plane
Use the ifup script to set up the netns + configure the tun device
created by lteue. Use it also as a hook to know when the UE is attached.
Since tun setup is done by arch-optimized lte-avx(2) binaries, we also
need to give capabilitites to them (instead of allowing inheritance of
caps in general in the setcap script).

Change-Id: I1e228b1296eac8e4cb183c2faa735b0468abe124
2020-04-08 15:16:52 +02:00
Pau Espin 6b8f5ae3d2 srs/amarisoft{ue,enb}: Fix b200 specific rf_dev_args
Commit 12ae6d79a5 switched the rf_dev_type
to be in lowercase but forgot to change these conditions.

Change-Id: I91d3877381b4e6343dc4aa0465e699341ed6648d
2020-04-07 18:51:59 +02:00
Andre Puschmann d97ab42462 amarisoft_ue: fix UHD support
the Amarisoft UE seems to be only working with UHD when the bandwidth
param is provided. It seems the set_bandwidth() API is used.

Change-Id: I3f20a5a8ca80c63374f0ad500fd2794e2dc45479
2020-04-07 18:38:21 +02:00
Pau Espin 29b7132eb8 pcu: Enable 'egprs only' vty option if egprs requested
Change-Id: Idd0b5bf8769d693480268c0a0b89dbfd63779e48
2020-04-07 16:12:47 +00:00
Andre Puschmann a7f1983658 enb: add measurement modifier to scenario files
this commit adds basic support for configuring measurements in the
eNB config. It currently support A1, A2, and A3 events.
By default UE measurements are turned off and need to be enabled by
configuring an event with:

+mod-enb-meas-event@{name},{report_type},{value},{hysterisis},{time to trigger}

For example one can update the a2 and a3 event with:

+mod-enb-meas-event@a2,rsrq,-40,2,480+mod-enb-meas-event@a3,rsrp,6,1,512

Change-Id: Ia7657be2396886840570bc41645450a268b4cfff
2020-04-07 17:23:37 +02:00
Andre Puschmann 9a5be2c8fd amarisoftue.cfg.tmpl: fix UE bandwidth/rate config and power on automatically
Change-Id: I2d63055d0648a1758905fd277c20edaeec8f9b85
2020-04-07 15:09:24 +00:00
Pau Espin 65beb8f324 amarisoftUE: adding basic support for Amarisoft UE
Change-Id: Idda0d3a040663969dd71781814198b47fff7daf3
2020-04-07 15:09:24 +00:00
Pau Espin 3edc29cab1 templates: Improve cs7 config in osmo-{bsc,msc}
Change-Id: I0aa0057c85e606d45e67d01b818db7549033bdbd
2020-04-06 17:52:22 +02:00
Pau Espin ba213a3067 pcu: Improve logging and gsmtap
Change-Id: I506a39b114eed55a185d329cea5e9d6ba379a2ae
2020-04-06 17:33:33 +02:00
Andre Puschmann 65e769f034 srsue.conf.tmpl: fix the configuration of UE params for carrier aggregation
the num_carriers is parsed as a string in the conf dict and therefore
needs to converted to int before matching

also changed the num_carriers to be of type UINT

Change-Id: I1386812d32e1181ba666720bbb875bf9bbce0f51
2020-04-06 13:44:45 +00:00
Andre Puschmann a0e69aa698 amarisoft_enb: add handling of num_cells modifier
the num_cells modifier allows to create multiple cells in a single enb
both cells are by default configured for CA

Change-Id: Ie9f16ce06ee56002c01097f2d338278f09ea4337
2020-04-06 13:44:45 +00:00
Andre Puschmann a70f05cd9a amarisoft_rf_driver_temp: fix tx time offset for ZMQ driver
Change-Id: Icee282837e62e02a17b93efba4c22756efa2a5d3
2020-04-06 13:44:45 +00:00
Pau Espin d45a29e694 amarisoft_enb: Support zmq rf_driver
Change-Id: I958834d99584e33f632b839a0bd0acccc2379049
2020-04-06 13:44:45 +00:00
Pau Espin 04ad3b5fb4 epc: Replace rlc_drb_mode with qci attribute
Change-Id: I21b7d7009f9b0df8ec4f59189a65cfc26f164f04
2020-04-06 13:17:28 +00:00
Pau Espin eae9c90d17 Add modem resource features attributes: 2g, 3g, 4g
This allows selecting modem by supported network type. It will allow
using 4G modems with type different than srsue in 4g suite in the future.

Change-Id: I38bcf6abf789f52c3ed0bee7911567fa872e2491
2020-04-03 18:56:01 +02:00
Pau Espin 214f15e5ee amarisoft_enb: Add missing default values in constructor
Change-Id: I61c04df14468b38cfe4afaaeb5404367838ff0a9
2020-04-03 16:56:12 +02:00
Pau Espin 17253af1e9 Introduce contrib/jenkins-build-amarisoft.sh
Prepares inst tgz archives to be consumed by osmo-gsm-tester from
Amarisoft prebuilt binaries.

Change-Id: I372606fc5ff9f6bb3ef848f2fe229b83382ddc09
2020-04-03 15:49:00 +02:00
Pau Espin 76b2c2a108 srs_{ue,enb}: Add modifier to pass arbitrary cmd line arguments
Change-Id: Ie438c8aa9992dbc61b2133473a83d565cf5c7056
2020-04-01 20:06:33 +02:00
Pau Espin 20a49112e9 config.py: Allow escaping commas in parametrized scenario names
comma character ',' is used in the command line to split between
parameters, which means a parameter value itself couldn't contain it.
This commit allows passing a comma inside a character value by escaping
it with '\,'.

Change-Id: Ic0bd9a029137a59e8c4a32b807eba7a64fcfa51f
2020-04-01 20:06:33 +02:00
Pau Espin 12ae6d79a5 srs{enb,ue}: Use lowcase UHD as rf_type string
Older versions of srsLTe.git required passing UHD in caps to the conf
file, but that's not the case anymore. Let's use lowcase then.

Change-Id: If8a289ba110229d31b62b0d3adc1ae97324e6d27
2020-04-01 18:06:17 +00:00
Andre Puschmann 4d35ea2b33 srsenb_rr.conf.temp: patch scheduler variables for 6 PRB cells
Change-Id: Ifdab42da8184cdf8367c5be1639a0faea3e68db1
2020-04-01 15:35:36 +02:00
Andre Puschmann 2dcc4312a0 iperf3: add config to adjust the duration of the iperf run
the time is passed as a string param and is then converted
into seconds when literals "h" or "m" are found.
So it would accept 2m and would convert it to 120s, for example.

Example:

+cfg-iperf3-time@15+

Change-Id: Iff28816f83670751e9e91de31ec59b1b0ad8fc0d
2020-04-01 15:35:03 +02:00
Pau Espin c04528cb1f Make amarisoft license server optional
* Since license_server_addr logic is generic among all amarisoft
  software, let's move it to its own config category "amarisoft", which
  all amarisoft classes (amarisoft_{enb,epc}.py as of now) will import
  during configure().
* The license server is disabled by default (value 0.0.0.0) since the
  usual case is to have a license in the local system.
* the license server can be enabled using scenario
  cfg-amarisoft-license@A.B.C.D where A.B.C.D is the address to use.

Change-Id: Id5456ad9497e91370857b80ff9a389111d3611ff
2020-04-01 15:22:14 +02:00
Andre Puschmann 7225d52e39 srs_{ue,enb}: change UHD stream args and buffer size as function of cell width for B2XX
Change-Id: I2de0526ee9bd2f7bb75c7d529b3f52d75117c5cc
2020-04-01 14:38:06 +02:00
Pau Espin da2e31f929 Introduce support for AmarisoftEPC
* A new abstract generic base class EPC is created
* srsEPC and AmarisoftEPC inherit from that class
* options are loaded from defaults.conf in cascade. First generic "epc",
  afterwards the specific enb type.
* A new scenario is added to select the EPC type to use. srsEPC is the
  default unless stated by an scenario.
* AmarisoftEPC delegates setup of the tun IP address to an "ifup"
  script. As a result, since we run without root permissions (ony with
  CAP_NET_ADMIN), the ifup script itself is unablet o set the IP
  address. To solve this, we introduce a new osmo-gsm-tester helper
  script which must be installed in the slave node which can be called
  through sudo to increase privileges to do so.

With this commit, I can already get srsUE<->amarisoftENB<->amarisoftEPC
to pass ping and iperf3 4g tests.

Change-Id: Ia50ea6a74b63b2d688c8d683aea11416ad40a6d3
2020-03-31 19:18:18 +02:00
Pau Espin 55e278c758 amarisoft_enb: Drop unused lib variable
Change-Id: Iea3e77a4b9f25f2781f617cd4bfd0ba4b34c709e
2020-03-31 13:35:48 +02:00
Pau Espin e44e76a787 {srs,amarisoft}enb:Move shared code to parent generic class eNodeB
Change-Id: Ica0f1d4179a905d6dfc77d3e8eb08ac6cd5c3d2e
2020-03-31 12:35:19 +02:00
Pau Espin 9aa932fd11 srsue: start_locally(): Fix missing class name in attribute access
Change-Id: Iab4196b12ee12a06ba2129053f2291c1e4c284ff
2020-03-31 12:03:38 +02:00
Pau Espin f4cce26173 srsenb: No need to generates values dict for every template file
Let's only do all the dictionary processing once and not for each
template file.

Change-Id: I4684d26375fce1e2ae28d3eccdc4f607fa5411a9
2020-03-31 10:49:49 +02:00
Pau Espin 874130510d srsenb: start_locally(): Fix missing class name in attribute access
Change-Id: I5e11dc9c3c0dcf4808a3ad67fe96580480fe47d1
2020-03-31 10:46:18 +02:00
Pau Espin 786a6bcd20 Introduce initial Amarisoft ENB support
* object class expects the amarisoft software to be placed in directory
  provided by env var AMARISOFT_PATH_ENB. On local runs, it will run the
  software from there. On remote runs it will copy over that directory to
  the slave.
* Configuration provided works with 6 PRBs, but probably won't work for
  other values (yet).
* ZMQ support not yet available, only UHD.

One can select the Amarisoft ENB by declaring it in resources.conf:
"""
- label: AmarisoftENB-B200
  type: amarisoftenb
  rf_dev_type: uhd
  rf_dev_args: "type=b200,serial=317B9FE,recv_frame_size=9232,send_frame_size=9232"
  remote_user: jenkins
  addr: 10.12.1.206
"""

And running:
"""
$ export AMARISOFT_PATH_ENB=/path/to/binaries
$ osmo-gsm-tester.py ... -s 4g:amarisoftenb-rftype@uhd+srsue-rftype@UHD+mod-enb-nprb@6 -t ping
"""

Change-Id: I1ddf4962ea6438ad977382ab201b724028ca46b3
2020-03-31 08:22:18 +00:00
Andre Puschmann 54f25cabc5 srs_ue: remove hard-coded num phy thread param
Change-Id: Ia4fac188ecbe6aba393a68ec0291b51cd1441029
2020-03-24 17:33:55 +01:00
Andre Puschmann 4ae614dbef srs_enb: remove num_cells getter
Change-Id: Ic5c45bb17440d2ee241840591baf02930a0b3470
2020-03-24 16:40:29 +01:00