contrib: build amarisoft: Set trx_zmq.so RPATH to point to copied dependency libsrslte_rf.so
In the ENB case it's not really required since osmo-gsm-tester makes use of LD_LIBRARY_PATH. However, since the UE is potentially run with capabilitites to create tunnels and alike, LD_LIBRARY_PATH cannot be used and lteue will fail to load trx_zmq.so (because it cannot find its dependency libsrslte_rf.so).
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:
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).
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.
It contains simple usual setups to get started with osmo-gsm-tester, such as creating a 4G network using srsLTE or a 2G network using the osmocom stack (+ ofono modems).
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.
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
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.
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] """
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.
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
Drop old one in doc/ which contains lots of outadated stuff already placed in the User Manual. Write a new markdown README in the root directory with pointers to places in the repo and the issue tracket, ansible setup, etc.
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.
selftest/trial_test: Fix repr(RuntimeError) changing in new python version
If using python 3.8.2, the trailing comma at the end of parameters is not longer there (probably got fixed, since it's not needed). That change breaks expected output.
selftest/process_test: Fix output changing in new python version
On older versions apparently upon child termination due to SIGINT subprocess.poll() returned 1. On new python versions (such as 3.8.2), -2 is returned, according to documentation:
A negative value -N indicates that the child was terminated by signal N (Unix only).
Let's catch the SIGINT in the child process and exit with a known 42 value to fix different behavior.
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.
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).
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.
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.
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.
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.
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.
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.
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
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)]
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
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)
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.
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.
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.
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.
Currently osmo-gsm-tester master jenkins build fails while building manual due to errors like: "asciidoc: WARNING: test_api.adoc: line 42: no callouts refer to list item 1"
According to asciidoc documentation in [1], code examples can be annotated with callouts, but callouts need to be put inside source code comments.
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
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.
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).
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.
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).
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.
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
ttcn3/lib/testlib.py: increase test suite execution timeout
Since I8eb28584e90ad012cbf7f3175ee3a8e775c8d523, the test suite is supposed to run both BTS_Tests_{SMSCB,LAPDm}.control among with BTS_Tests.control. Apparently this requires more time than 3600 seconds, so everything is broken since build #2652 in Jenkins.
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.
Nowadays we have instruction set runtime detection, so there's no point in disabling it in the binary, specially because nowadays we run in sse capable host (despite in the past we didn't and there was no runtime detection, hence why was it explicitly disabled).
jenkins-build-amarisoft: fix build script for ZMQ module
newer versions of srsLTE create symlinks with the rf library including the version, see below. This caused the trx_zmq.so lib to load .so.0 instead of .so only. this patch adds another symlink so loading works fine again
So far we only support setting cell IDs from same ENB. Support for handover to other ENB will come later, probably by adding some API to be called during the test to add own's CellID's to other ENB's config.t
rfemu_srsenb_stdin: use negative dB value to set attenuation
the logic for the RF emulator on the command line is, like the Amarisoft equivalent, to set a negative gain value to express attenuation. Therefore, the sign needs to be inverted.
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.