Commit Graph

868 Commits

Author SHA1 Message Date
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
Pau Espin b27827b7bc util: use launch_sync API instead of manual wait
The API is available so no need to manually craft all steps in there.

Change-Id: I4afedb185f6e864929155981e8a2ec2df90110c3
2019-04-04 15:59:10 +02:00
Pau Espin e159cd206d process: Prevent NetNSProcess alive forever after SIGKILL
NetNSProcess are run in the following process tree:
osmo-gsm-tester -> sudo -> bash (osmo-gsm-tester_netns_exec.sh) ->
tcpdump.

Lots of osmo-gsm-tester_netns_exec.sh scripts with tcpdump child process
were spotted in prod setup of osmo-gsm-tester. Apparently that happens
because sometimes tcpdump doesn't get killed in time with SIGTERM and
SIGINT, and as a result SIGKILL is sent by osmo-gsm-tester as usual
termination procedure. When SIGKILL is sent, the parent sudo process is
instantly killed without possibility to forward the signal to its
children, leaving the bash script and tcpdump alive.

In order to fix it, catch SIGKILL for this process class and send
instead SIGUSR1. Then, modify the script under sudo to handle SIGUSR1 as
if it was a SIGKILL towards its children to make sure child process in
the netns terminates.

Change-Id: I2bf389c47bbbd75f46af413e7ba897be5be386e1
2019-04-03 17:53:57 +02:00
Pau Espin 17a4ed9029 process: add signal to NetNSProcess kill path
This allows to easily differentiate different calls to kill in order to
terminate the process when looking at the logs.

Change-Id: Ida88f2674b0ed1802f20c519aa4e3cbe81e0def8
2019-04-03 17:10:33 +02:00
Pau Espin 9e2ef07e04 default-suites.conf: Add tests for OC2G
Change-Id: I5599c86565ebb6d7d6931d36fd49e57fe2020d1f
2019-03-27 14:00:55 +01:00
Pau Espin 30fd9fa728 ttcn3: Enable tests against O2CG
Change-Id: Ie42f9144c6fa5cbee71e3f0b97d60c295f5f531e
2019-03-27 13:50:41 +01:00
Pau Espin feb66e714a Integrate osmo-{bts,pcu}-oc2g
Change-Id: I446e27039f75e63c2870d751c190a4fd76947000
2019-03-27 13:50:41 +01:00
Pau Espin d581010568 contrib: jenkins-build-osmo-pcu-oc2g: Enable oc2gbts-phy
Depends on osmo-pcu Change-Id I7cd89a549c9463e81893ca7dd925299f728e4453.

Change-Id: I1384f4adeca7583e48dd94fcb09a1b58d108f1de
2019-03-25 16:27:40 +01:00
Pau Espin 8369cc321b contrib: Use proper SDK for OC2G builds
Binaries produced by sysmobts SDK are not compatible with OC2G.

Change-Id: I5adde9cf8a5f84cfc4b6fc4d4def3836444929ec
2019-03-15 20:16:14 +00:00
Holger Hans Peter Freyther c02b96e77b nitb_netreg_mass: Provide 100 subscribers
Change-Id: I386885f4179d4fc2df23cc48cd1eda850b5a990b
2019-03-07 10:05:48 +00:00
Holger Hans Peter Freyther 337141fc1b nitb_netreg_mass: Add code to declare a run successful/failure
Change-Id: If26047f0635db8c7209af143fbd1da4c9b2312d1
2019-03-07 10:05:48 +00:00
Holger Hans Peter Freyther 5e67ed467c nitb_netreg_mass: Allow a suite to configure num subscriber
Remove hardcoded configuration and replace it with a reservation in
the suite.

Change-Id: Ic9fd560c2924731e4fd6eea5aaf3ad565cb4ef52
2019-03-07 09:40:42 +00:00
Holger Hans Peter Freyther 10501ccc8e resource: Add a mobile resource for the virtual test
Add a new resource and make a reservation in the suite.

Change-Id: Ic26aa63cad62323bb85f952640672eb28af0eadc
2019-03-07 09:39:39 +00:00
Pau Espin 8910fbb9a8 resources.conf.prod: Add dev_args to select specific Lime device
Change-Id: I6ef234edb06031644758174e93a9d3817d0acc1f
2019-03-06 18:31:47 +01:00
Pau Espin e02158fd16 Log signals from VoiceCall dbus objects
Change-Id: I0def02b9063f75ec32c8b9382bdb12d65e1fb9eb
2019-03-05 20:29:19 +01:00
Holger Hans Peter Freyther 48c83a8939 resource: Introduce a base class for the modem
Extract IMSI, KI and authentication algorithm into a base class.

Change-Id: Id547cdcc241a307a2ea59b5fbac6b8d7a9d95639
2019-03-05 13:19:41 +00:00
Holger Hans Peter Freyther 7424301034 resource: Use a factory to initiate a modem
Change-Id: I4baa791c92196cda477b2d969d4f67dfbe1152af
2019-03-05 09:46:57 +00:00
Holger Freyther 44128f91d2 Revert "nitb_netreg_mass: Add code to declare a run successful/failure"
This reverts commit b4ad8d7243.

Reason for revert: There was a true dependency on earlier changes (len(mobiles)). Rollback until the resource configuration is merged.

Change-Id: If0f5e24cec2f0d1d144b464180b341cacbdf0ebb
2019-03-05 09:44:37 +00:00
Holger Hans Peter Freyther 54b4fa928e process: Make killing processes non-sequential
Change-Id: Icf1ac6774ea11880542012fd6c6ac73302bb74f5
2019-03-05 03:53:10 +00:00
Holger Hans Peter Freyther b4ad8d7243 nitb_netreg_mass: Add code to declare a run successful/failure
Change-Id: I49a821e8e4656466259e519ef901726cbb76ef86
2019-03-05 03:07:41 +00:00
Holger Hans Peter Freyther 93a89424d0 resource: Introduce a type attribute to the resource definition
Change-Id: Ie1fd10ec878311b7347118badb1b9dce5b49e976
2019-03-05 02:52:44 +00:00
Holger Hans Peter Freyther 0d714c976d process: Make sending signals (kill) externally visible
Change-Id: I87bba8a8c467ba5936e0b6604d8abb9432e5e7a8
2019-03-04 06:53:51 +00:00
Holger Hans Peter Freyther 20b52c1ee3 process: Speed-up terminating lots of processes by batching it
Introduce a strategy to terminate processes and begin with an
implementation for parallel (that has no degree of parallelism
right now).

Change-Id: I7dd4a7e26aca758198aa08a434eaf5f3f5af632d
2019-03-04 06:53:51 +00:00
Holger Hans Peter Freyther f922a998cb pyflakes: Rename local variable to not shadow import
Change-Id: Ib70130dbbeeeb9813eaea707bf66f1db91088b92
2019-02-27 08:09:21 +00:00
Holger Hans Peter Freyther 1ea4e52f9f pyflakes: Remove occurrences of using undefined variables
Mention the attribute right away and remove a method that looks
to have been broken (more vs. more_rules).

Change-Id: Iba18a96ff804780e66c69b459e112f9d42b7b2ff
2019-02-27 08:09:21 +00:00
Holger Hans Peter Freyther 34dce0edb1 pyflakes: Remove assigned but unread variables
Change-Id: Ie257ac051739ea6f846d1aac2c8f778638b5f8a6
2019-02-27 08:09:21 +00:00
Holger Hans Peter Freyther 91067239c1 pyflakes: Remove imports of unused modules
Change-Id: I7496030e5857078cd66a36a5e46c9a50217ce6e3
2019-02-27 08:09:17 +00:00
Holger Hans Peter Freyther 77d6d55e90 ms_driver: Rename method to hopefully be more clear
This is finding min/max in a dataset. Call it like this and update
the caller.

Change-Id: Ic7f5cd34639f897e460ca1edcb4f9b6df44683e9
2019-02-23 15:44:37 +00:00