Commit Graph

895 Commits

Author SHA1 Message Date
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
Pau Espin 2e5a89e307 ttcn3: Increase TTCN3 IPA UP to have sysmobts tests working
It was spotted that most TTCN3 tests run against sysmobts fail because
of following error:
BTS_Tests.ttcn:643 Test case TC_chan_act_react finished. Verdict: fail reason: "BTS_Tests.ttcn:399 : Timeout waiting for ASP_IPA_EVENT_UP"

Looking carefully at the logs and pcap files, it was seen that usually
sysmobts tries to connect around 1 second after the TTCN3 tests decides
it's enough. Current timeout was default of 15 seconds. Let's set it to
30 seconds.

While at it, also set mp_ipa_up_delay, as initially set to 3 seconds in
osmo-ttcn3-hacks.git d95f340a01fe7e9fe59f02b6ec4f9d018feb8c75 having
physical tests in mind.

Change-Id: I25c0a49851865291c6251556aff139961c3d4166
2019-07-25 15:05:16 +02: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
Holger Hans Peter Freyther e524f2ca59 virtual: Unify the lua script into a single one
In the quest to support multiple testcases we will use a single
script. Parts can be enabled/disabled depending on which tests
we want/need to run.

Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
2019-04-28 15:51:58 +01:00
Holger Hans Peter Freyther 839d6fa405 virtual: The completion ratio is success / success+failure
Fix the stats code to calculate the real completion ratio.

Change-Id: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
2019-04-28 11:44:41 +01:00
Philipp Maier 9443a3b45d BTS_Tests.cfg.tmpl rename BTS_Tests.mp_bb_trxc_ip
The module parameter BTS_Tests.mp_bb_trxc_ip got renamed to
+BTS_Tests.mp_bts_trxc_ip. Lets change the config template accordingly.

Change-Id: I49da16361a4f770852e7046edd457ad0101306bb
Related: OS#3863
2019-04-24 17:25:24 +02:00
Philipp Maier 1b7eeacf6f BTS_Tests.cfg.tmpl: rename BTS_Tests.mp_bb_trxc_port
The module parameter BTS_Tests.mp_bb_trxc_port got renamed to
BTS_Tests.mp_bts_trxc_port. Lets change the config template accordingly.

Change-Id: I776a27642a5024919fe9f882a3d695246a8ce0f7
Related: OS#3863
2019-04-24 15:31:43 +02:00
Pau Espin 3f2712eaf9 resources.conf.prod: Update config to use new smart socket HW setup
Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56
2019-04-18 23:59:12 +02:00
Pau Espin fcc04f88dd powersupply: Add support for Intellinet PDU
Based on original pdutool code from Joachim Steiger.

Change-Id: Iab4f7aec1c50f47da4cd734441bb36fa09d171a3
2019-04-12 17:02:10 +02:00
Pau Espin f0cbe0599b Revert "modem: workaround ofono crash"
We already updated our ofono branch to current master (after 1.28),
and this fix is not longer required, as stated in ticket OS#3064.

Related: OS#3064
This reverts commit f8d12196f0.

Change-Id: I884f6d4f3df4f3b4e2ac05e4dba2ad8704697521
2019-04-08 21:09:44 +02:00
Pau Espin 3a479c212d processes: Fix kill of processes run under sudo
sudo drops forwarding of signals sent by processes of the same
process group, which means by default will drop signals from
parent and children processes. By moving it to another group, we
will later be able to kill it.
Note: sudo documentation is wrong, since it states it only drops
signals from children.

See following link for more information:
https://stackoverflow.com/questions/34337840/cant-terminate-a-sudo-process-created-with-python-in-ubuntu-15-10

Change-Id: I25990234aaa496c501ff45ad7f7fd549d6f188da
2019-04-05 20:12:12 +02:00
Pau Espin a353457fd2 suites: gprs: Keep terminating all iperf3 processes if one fails to terminate
Change-Id: I0cc183529988463800e0d40c8cf3a4cea041031c
2019-04-05 12:45:31 +02:00
Pau Espin 0409655e64 process: Early return during process termination if no proc running
This avoids extra unneeded logging about killing with signal when
actually no signal is being sent.

Change-Id: I5b5dd78fe3301d8eef2ab93da3b37029268ae198
2019-04-04 17:48:30 +02:00
Pau Espin 806aae8830 suite: Make _processes an empty list during init time
It simplifies the code because we don't need to check if it is a list or
not.

Change-Id: I634901a1f4ba3a6b7294666012ea679ae148ff08
2019-04-04 17:44:37 +02:00
Pau Espin 4c8cd7b9a5 modem: Move modem iface to its netns before using it
We used to do that once after ofono startup for all iface
(modem-netns-setup.py), but then if a modem crashes the interface is
re-created on the default netns, and tests fail until manual re-run of
modem-netns-setup.py.

This way now we always make sure the iface is moved to the expected
netns before it is used.

Related: OS#3881
Change-Id: I506309c424aa46684c4516a1a0217343ecbf32c6
2019-04-04 16:10:14 +02:00