Commit Graph

455 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 1dc9a04bc1 ms: Make the total test duration configurable
Change-Id: I5598d5dfd51e224e13835307ad20d108a5aa3935
2018-07-21 23:21:46 +01:00
Holger Hans Peter Freyther 874b4b4269 ms: Remove unused imports
Change-Id: Idd428d1bbd937a26a320eb69b1031856e49d3e4b
2018-07-21 23:21:46 +01:00
Holger Hans Peter Freyther af522fd601 ms: Only use completed tests for min/max handling
Remove non completed results before calculating the min/max. We will
need to check success/failure based on completion ratio.

Change-Id: Icaf9e90dd729b2339e409b3ec1593f456969fd19
2018-07-21 23:21:46 +01:00
Holger Hans Peter Freyther 6926c5763f ms: Simplify starting of the test and combine loop and wait
This will make it easier to strt different kind of tests. The cost
of calling step_once is hopefully neglectable as it simplifies the
test.

Change-Id: I3708ac382c0a34e17cf147d18f03603946437a53
2018-07-21 23:21:46 +01:00
Holger Hans Peter Freyther 0f6e41089b ms: Quit early when all tests concluded..
And fix the the detection if everything has completed.

Change-Id: I3575ee7618c35e3b66d25fa31844d267489d9179
2018-07-21 23:21:41 +01:00
Holger Hans Peter Freyther 574e62f0f9 ms: Begin to refactor and be able to share functionality
Change-Id: I840af0396f08744ce8ee6a2967f880d5cb7f815f
2018-07-05 20:30:42 +00:00
Holger Hans Peter Freyther 94da045c20 ms: Attempt to stop all mobile/virtphy instances on exit
We leave mobile/virtphy running after the test. Attempt to gracefully
exit and kill all of them. I experimented with both os.setpgrp and the
prctl(PR_SET_DEATH_SIG) but that didn't improve the situation.

Change-Id: I6cec050db7d4c355fb6678b2d84309fbbe5587b3
2018-07-04 20:26:13 +00:00
Holger Hans Peter Freyther 0f0ebd85db ms: Make the outer variables configurable
Do the easy part for making these variables configurable.

Change-Id: If8bbedcf672f6481a12c30d3669564704063626c
2018-07-04 20:24:41 +00:00
Holger Hans Peter Freyther 89dbf6db21 ms: Remove debug left over for the test
Change-Id: I17aa97a99cb1b1f9205b3a951370fe5ad49ae3dc
2018-07-04 20:24:30 +00:00
Pau Espin c81e26504d hlr: Get hlr.sql from new path
As of osmo-hlr edca4f88a653cc688bc1c46611a9f0bc880637e2, hlr.sql file
has been moved to an sql subdir.

Change-Id: I1cbbe46edc6121476cd2422074a9f3cfc2d8e5ef
2018-07-03 11:56:07 +02:00
Pau Espin 80ce34bb88 resources.conf: Move nanobts address to differentiate them from local IPs
nanobts IP addresses are assigned through DHCP, and are not local to the
main unit. Let's use another subset for this DHCP pool as we usually use
.50ish for static local IP addresses.

Change-Id: Ibdb0dd97a490aaa555a7bf53cf43cc5a5533a012
2018-06-26 13:07:49 +02:00
Holger Hans Peter Freyther 05895a912d ms: Use the new API to pass credentials to the event server
We are using the "autobind" feature of Linux to get a special
socket address. This allows us to have roughly 2^20 clients on
the system.

Change-Id: Ie9b9ac6267f40345baf7dbb3becaecf264a5df5f
2018-06-25 20:27:41 +00:00
Pau Espin 99efe820e4 ggsn: Bind VTY and CTRL ifaces to assigned ip addr
Change-Id: I26735a21cd53183dfe0a75e5bd24954d583c354f
2018-06-22 12:13:52 +02:00
Holger Hans Peter Freyther 5eb4f0e6a2 osmo_ms_driver: Use the two new config options for the mobile
Avoid being stuck in c7 state and use the c7-any-timeout with a low
value. Do not attempt to store SMS in the home directory (if they
are received).

Change-Id: I4bb59130a04852bc43af9ef3602b129f40e9e170
2018-06-06 19:19:54 +01:00
Pau Espin e523665e9c event_loop: Log parameters during wait timeout exception
Change-Id: I1cf104392bfd11ad263264738eb4d8fa60550a5d
2018-05-28 14:01:12 +02:00
Pau Espin 7f4807a4bc powersupply_sispm: Add port number to log name
This way it can easily be spotted which port is being triggered in case
someone wants to manually test it.

Change-Id: Ibd2c70170d97a786e37b6838b1ed6d4eb637ad8b
2018-05-28 13:04:42 +02:00
Pau Espin e974944496 osmo-bsc.cfg.tmpl: Remove unused nd recently removed option dest
This VTY cmd has been removed in osmo-bsc.git
68e4be9c845e25f53aea511b1c57340a9da5825c.

Change-Id: I48c0b8a7b2a0088887f1309efc40bcf1da0f1626
2018-05-28 13:04:42 +02:00
Pau Espin b1526b9979 Add option to expect bts/pcu failures and respawn its processes
Some tests may want to reproduce some scenarios in which it is expected
that a BTS process is stopped, for instance if the BSC link is dropped.
Provide a keepalive parameter to start() for bts and pcu objects to
inform suite that failures are expected and that it should keep them
alive in case that ocurrs by respawning the BTS process.

Change-Id: Ia2a7539f9fad457125ac9b60a52a52999e885ba8
2018-05-25 12:31:20 +02:00
Pau Espin 06ada458cf process: Move cleanup log inside cleanup method
Change-Id: I72ad453e9dc8340946d7e7d041643fe8ef97439f
2018-05-25 12:31:20 +02:00
Pau Espin 63f2d47b3e bsc: Add API to mock BSC RSL IP addr
Change-Id: I9ca67964e656943b50967a27a88054fd3e484672
2018-05-25 12:31:20 +02:00
Pau Espin 58cd83c3ec templates: osmo-bts: Use BTS assigned IP addr to bind CTRL and VTY iface
Change-Id: Ib1c3022a6c531ef8c6a5ba31927762806abc37ac
2018-05-25 12:31:20 +02:00
Pau Espin 618bb3a6bf contrib: build-osmocom-bb: Download and install osmocom-bb fw from OBS
As it's quite complex to build osmocom firmware nowadays (a specific old
release of gcc and binutils are required to build it), instead download
the already built binaries from OBS.

Change-Id: I2571268d91e2430a270e51438608e7dbd121e76d
2018-05-22 15:52:56 +02:00
Pau Espin 878b2c6619 testenv: Provide tests with access to process module
Some tests may want to start/stop/manages processes themselves. By using
the process module from osmo-gsm-tester, we make that possible easily,
providing with useful features such as requesting a suite to stop it on
cleanup.

Change-Id: I8e018107cbec81299ec2228bfff933fb3b0bb6cd
2018-05-18 15:59:06 +02:00
Pau Espin f4406b2b22 contrib: Add jenkins-build-osmocom-bb.sh to build osmocon
Change-Id: Ic5b29951d3fd143dce5826138c84301a9797b1ef
2018-05-18 12:14:58 +02:00
Pau Espin 1828d352c1 contrib: common: create_bin_tgz supports sbin dir now
This is a preparation for inclusion of osmocom-bb build job, which
installs binaries such as osmocon in sbin.

Change-Id: I562721af82e481e926ee65dbcd9dcc5b55057ae8
2018-05-18 12:14:09 +02:00
Pau Espin 7043996847 contrib: common: Record repo curr rev in have_repo instead of build_repo
This way scripts making use only of have_repo (to have build specific
insturctions) can still benefit from that code.

Change-Id: I03149942ac1d279a15c71df3eb880c331c8fc155
2018-05-17 18:18:50 +02:00
Pau Espin 78f7c753a3 tests: dyn_ts_*: Add tests to verify dyn ts with gprs disabled
Change-Id: If943ae0fb4e56787df02b09dea7387cb13eb9db3
2018-05-15 13:52:16 +02:00
Pau Espin f32c41519e util: Fix unloading of suite lib import path
Change-Id: Iac81151f5baec092a3d15bbe6541b5bc007e6a03
2018-05-14 15:34:40 +02:00
Pau Espin 155a355e01 Unload suite local modules after suite exit to avoid collisions
Since sys.path is modified idynamically to load modules from "lib" subdir of each suite, from python env point of view all those modules share a namespace. As a result, there can be name collisions.

If a name collision appears (eg test1 loads "testlib.py" and test2
afterwards also loads its own "testlib.py"), then python interpreter
thinks the testlib.py module is already loaded, so test2 ends up using
"testlib.py" from test1.

The way to solve this is to make suite local
modules to live only through the scope of the suite, and unload the
modules once the suite is finished.

Change-Id: I4efe815f85bc4ec2ca91aa9c2d3a369048f21571
2018-05-09 11:24:25 +02:00
Pau Espin 415f34d3e9 suites: Remove rebase artifacts from latest commits
Change-Id: I8afc446d4291810c63bfaeabb7167113667dd8d1
2018-05-08 23:59:43 +02:00
Pau Espin a80e89c3d7 default-suites.conf: Fix typo in previous commit
Change-Id: Ib1903324df8eb9f506b62dc0b9d2aa4a4a5179d7
2018-05-08 20:53:49 +02:00
Pau Espin 1ffe768ca8 default-suites.conf: Add dyn ts suites
Change-Id: Iec7c8d8c3617f11a5ee12c02bd75ed6822d76aa9
2018-05-08 17:13:37 +02:00
Pau Espin e07e1b69e9 tests: dyn_ts_*: Add tests to verify dynamic timeslots during phone calls
Two different test suites are created since we want to run them with
different HW, because some HW support one type of PDCH channels, and
other HW supports the other one.

Change-Id: Id5e61eaff39ac7a6585dc7de2aeb2469dd2ce726
2018-05-08 17:02:17 +02:00
Pau Espin 3bf1e13b13 tests: voice: Move mo_mt_call.py to mo_mt_call_tchf.py
Change-Id: I7306e62ad4c4294370690cf9006871f798a7b9ec
2018-05-08 17:02:17 +02:00
Pau Espin b2ce2f2221 tests: voice: test voice calls on TCH/H timeslots
Change-Id: I897757a21fee516ce96808a180121b09f06a0fea
2018-05-08 17:02:17 +02:00
Pau Espin 510ed801ed tests: voice: Move logic to lib/testlib.py
This way we can have several tests sharing similar logic.

Change-Id: I5cfcc56970380a7c5400186fac5f504263d63c5f
2018-05-08 17:02:17 +02:00
Pau Espin 7e02d20b46 suite: Set suite subdir lib part of syspath so tests can import their own modules
Change-Id: I3307c3ab314bb7a88d3c22c7c270c9f05fe6e03e
2018-05-08 15:28:48 +02:00
Pau Espin 39df7f4668 bts: Allow setting amount of TRX and timeslot in cfg and from test at runtime
The num_trx attribute for a given BTS states the number of TRX to be
used by that BTS. If more than num_trx are configured in trx_list in the
cfg file, then only up to num_trx are taken into account. If a num_trx
value higher than max_trx is specified throuygh config file or at
runtime by the test, an exception is raised explaining the issue.

The num/max_trx attributes are overlayed along the config levels
(generic -> bsc_bts -> specific bts-type -> specific resource object).
This way we can specify a long list of trx+timeslot config in the
generic config (bsc_bts), and tune for each model and specific BTS which
is the desired default number of TRX, as well as the maximum supported
per type.

Change-Id: I7f46eaf7a16f03268653299c93600c0443f691ac
2018-05-08 14:55:12 +02:00
Pau Espin e699912a23 bts: Move conf_for_bsc_prepare from bts_osmo to bts
nanobts inherits directly from bts.Bts, so we need to move
conf_for_bsc_prepare there to make nanobts work again.

Fixes: 530681fd86
Change-Id: I4305eefb4056ed7614118532e271efe780f4a87f
2018-05-08 14:50:32 +02:00
Pau Espin e519462d60 bts: Pass defaults config name at construct time
It will be needed later at construction time when resolving the num of
trx.

Change-Id: I2c6a46ead14010f714897ea178917327215823e7
2018-05-07 13:37:02 +02:00
Pau Espin 530681fd86 bts: Refactor conf_for_bsc_osmo
Move duplicated code into a method in the superclass.

Change-Id: Ie27932f94142f667c3fb8c054b77e04afa0d5cbb
2018-05-07 11:20:23 +02:00
Pau Espin c9b6376796 Check physical channel configs
Change-Id: I5894678e0d6f306173cc550dd6806a7d6f8a4c11
2018-05-07 11:20:22 +02:00
Pau Espin 7d4bdf2daf bts_osmotrx: Don't use binary name as inst name
Change-Id: Iee20738f2aa750aa9035a9e54ad667d8753ea12e
2018-05-07 11:00:30 +02:00
Pau Espin 553eda638c osmo-trx binary is now called osmo-trx-uhd
Change-Id: Ibf111ba89b24964127b9c1db7102953e1dba3181
2018-05-07 00:47:40 +02:00
Pau Espin ccb1bc686d modem: Catch exception: call removed while waiting to become active
This can happen while in a test we use:
wait(ms_mo.call_is_active, mo_cid)

And then answer fails for whatever reason, after a timeout ofono will
remove the call object:
/sierra_2: DBG: 'org.ofono.VoiceCallManager'.CallRemoved() -> /sierra_2/voicecall01

As a result, during next call o call_is_active() will try to get the
call object, but it doesn't exist anymore and an exception will be
created in method call_state during call to systembus_get().

Change-Id: I02b7e76425754372756493761819f18f1e3106c1
2018-04-22 14:35:33 +02:00
Pau Espin 1cd017d0c7 build-osmo-trx: Disable asan in osmo-trx builds
Change-Id: Ic4ebbc3f66fd9de2343d486ed20a0f08fc11e326
2018-04-19 12:10:10 +02:00
Pau Espin ec3852f1bd contrib: build-osmo-trx: Enable addr sanitize for osmo-trx
Change-Id: Iad90c7c8c2098680276de000c36bec0224f9746d
2018-04-16 16:24:30 +02:00
Pau Espin 4a338c7dba contrib: build-osm-bts-sysmo: openbsc dep no longer needed
Change-Id: Iafd5ee1df001719ff6165ada996359b92116671e
2018-04-16 16:24:30 +02:00
Pau Espin 008f6165ed contrib: Enable address-sanitize in builds
Don't enable it for binaries built with sysmocom's cross-toolchain since
it doesn't contain required libasan.

Also, don't enable it on openbsc since we don't have an enable-sanitize
flag there.

Change-Id: Ibef6c2fc497bce0d799116a854a48872f9ca16d7
2018-04-16 16:23:30 +02:00
Pau Espin b6ab1da0af event_loop: Avoid leaking active timeouts on poll exception
It was spotted that when an error ocurred during poll generating an
exception to finish the test (osmo-msc ended prematurely), then the
active wait() condition was kept being checked for later tests, making
all followup tests fail.

That's because in case of exception we were not making sure the timeout
is removed and it kept firing forever.

Change-Id: I5c93cd67b2b83c0ecee96fbc6c4200b419bdf73f
2018-04-07 17:27:54 +02:00