Commit Graph

868 Commits

Author SHA1 Message Date
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 d12b84c708 suites/debug: Allow jumping into python debugger
Change-Id: Ia6262299981f1d7ac2d81c22b7b9b007e096259a
2020-02-18 15:34:58 +00:00
Pau Espin 979f00d43d contrib: srslte: Allow changing repo name
Change-Id: I06e6566ac3df9369b391bc88f288f72588088ef1
2020-02-18 15:31:25 +00:00
Pau Espin 70c01ec92a contrib: Fix default variable value syntax
Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366
2020-02-18 15:31:25 +00: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 4f3cc9e7e4 contrib/*sysmo.sh: Fix default poky SDK path
ansible scripts are installing the SDK in "poky-sdk" dir, not "poky" one.

Change-Id: I002fde53684cd4a43c9f22e09264056f2a950c24
2020-02-14 16:26:31 +01:00
Pau Espin 10fe37cdce contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4
Current latest poky SDK is 2.3.4, and that's the one we have installed
in all buildhosts.

Change-Id: I8c855456c7f94a3d6ee58ca550a056a0fea61a71
2020-02-14 15:40:46 +01:00
Pau Espin f0a1af567f default-suites.conf: Run 4g test suite (srsLTE ZeroMQ)
Change-Id: I3f8c3588d7b139f044462d02069919256126bf57
2020-02-13 18:07:18 +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 ab2ffae89a resources.conf.prod: sysmocell500 new firmware now supports TRXDv1
Change-Id: Iec50662580479bf7b6dc08d08a1de8075b2da078
2020-02-12 19:04:55 +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 31a4aee92f util: Add sudoers.d/ example directory
Change-Id: Ib9ab4d88bf2fb94d04240169e0203b72616f58b0
2020-02-11 15:57:51 +01:00
Pau Espin 49ebbf5ed3 utils: Move shell script helpers to subdir
Change-Id: I86ed3b0bb779c50e57912cf6c2f1ee9fa6e5f557
2020-02-11 15:57:51 +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 1bce944fa2 jenkins-build-srslte: Temporarily Switch git repo to own-controlled one
During integration of the different srsLTE processes, some bugs or
misbehaviors appear which require fixes in srsLTE. Let's use our own
temporary fork until integration is complete and all patches are merged
in upstream.

Change-Id: I6414d9855cf9c004385cc280e5a60e82f8e4fbad
2020-02-11 14:39:46 +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 a7e7fc523a ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester
Change-Id: Iaa2a5647801b4f152f72bf4b40ac79f18608df87
2020-02-11 11:38:27 +01:00
Pau Espin c9faa9e7b7 ttcn3: Refactor ttcn3 launching bits into a testlib
This way new tests can be more easily created which run some specific
TTCN3 test.

Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424
2020-02-11 11:38:23 +01:00
Pau Espin ceb7ea6176 ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester
Change-Id: I02bf406e310f5bbab7b2e0bca47fb120418e241c
2020-02-06 15:59:48 +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 e303d66d15 Re-add accidentally removed update_version.sh
Last commit removed this file accidentally.

Change-Id: I030f927af26d4750e88662e591cde3eea6b810c7
2020-02-04 11:46:02 +01:00
Pau Espin addf78ecb6 contrib: Add scripts to build srsLTE software
Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44
2020-02-03 17:22:30 +01:00
Pau Espin 0cb2178812 contrib: Disable dahdi support in libosmo-abis
Since libosmo-abis d4be696bbc20522a0284b6d0aefa872585f6926f it is
enabled by default. Since we don't need it so far and required
dependencies are not available in sysmobts SDK, let's disable it
explicitly.

Change-Id: Id017f3d2f51d30fa53881b627460fb568f19713b
2019-12-03 11:47:19 +01:00
Pau Espin e0a3d3eeed default-suites.confg: Add suites to test LimeNet-micro
Change-Id: I7f774e7bf6539c5afd1d3e35da765ba8d702fdb7
2019-11-26 14:39:36 +01: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 1a89d44463 resources.conf: Mark osmo-bts-trx as supporting a5/3
Change-Id: I478e0719589a8055e7b16536e679d2801efc5caf
2019-11-26 14:19:37 +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 9d489c8367 suite_test: suite requires the fake trial to implement get_run_dir()
If class Test calls get_run_dir(), it will generate the run dir from
Suite.get_run_dir() + append, and Suite.get_run_dir() in turn will do
the same with Trial.get_run_dir(). In suite_test.py, however, we are
passing a plain log.Origin object (parent of Trial), which doesn't
implement this function. We need to add it since tests will start using
get_run_dir() to write their own log files.

Generated tmp files are deleted on success and left there on error, in
order to be able to debug stuff easily.

Change-Id: Ic8326659a9ced0351e1e7e57ef21ce36f777729a
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 b3572001ea Add testsuite to check osmo-trx with TRXDv0
Change-Id: I8e87aa5e24d1ed0737ec50e6a0f7fd8779a3c15b
2019-09-10 11:44:07 +02:00
Pau Espin 449c647f8b resources.conf.prod: Fix indentation
Change-Id: Ic124c51aac26769058f0e90dc5497d16b44be085
2019-09-10 11:37:59 +02:00
Pau Espin 7e12cf3a66 default-suites: Drop multi-trx osmo-trx-lms tests
The feature is not supported yet and it seems to be leaving osmo-trx-lms
in a zombie state preventing it to exit and blocking other tests.
Let's disable it until this feature is working properly under manual
use.

Related: OS#4151
Change-Id: Ic255481e6f1fbbf06c4576f924cf27ae80567801
2019-08-14 12:32:55 +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 bf3bb49785 contrib: Avoid sysmobts/oc2g toolchain ld crashes building new libosmocore
Some gcc version (< 7.3.0) on ARM generate wrong code for __thread
variables that crash at runtime. It seems, due to some unknown reason, that we
are not affected by this bug with toolchain from poky pyro (6.4.0). However,
libosmocore as of e188b8cd98f599468fbb200c7d590de955daf761 applies some
CFLAGS="-mtls-dialect=gnu2" to workaround the issue automatically. But same
toolchain contains an "ld" that crashes when those flags are applied.
Fortunately, libosmocore provides a way to disable the workaround, and since
we are not affected by the bug, we are fine with that. If the toolchain had
the TLS runtime bug, then we'd had to build with -O0. Can be probably dropped
once we move to newer toolchain.

Depends: libosmocore.git afce89dac1a3cdb975da72020acdba16940fd679
Related: OS#4062
Change-Id: I583354735a7671e5bba1c0f6e60c84b6ef55ac63
2019-08-06 16:05:03 +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