Commit Graph

496 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther fd760f6702 Package mobile and virtphy as part of osmocom-bb as well
Change-Id: Ie44dca72327e928073b00cde434d1cf2de574d9c
2018-09-26 07:27:39 +00:00
Holger Hans Peter Freyther 9eafb1372e Optimize and re-use an existing repository
Instead of cloning osmocom-bb three times this will allow us to
re-use the repository. Simply change the directory, set the new
origin and fetch.

Change-Id: I63f103b2f70559e969e8c66477ab9ee7f2886832
2018-09-26 07:27:39 +00:00
Pau Espin 32512ae54b default-suites.conf: Add empty lines to easily spot different sections
Change-Id: If33fa9be091113d57b25dc3d73e277bbb3b0ce5a
2018-09-25 10:21:25 +00:00
Pau Espin 7fa19ac077 Add dynts suite to test switch between PDCH and TCH
It seems for not yet clear reasons the MS require some time after the
PDCH channels have been activated again to use them reliably. If no
sleep is used between call hangup and gprs activate pdp ctx, the MS
fails to activate the pdp ctx due to QMI error respone to the "Start
network" requested.

Related: OS#2582
Change-Id: I73b51c31309ac4c28c64ed7eb7c8c649e535aa22
2018-09-25 10:21:25 +00:00
Pau Espin cbbe5d8c1a contrib: Use correct var to write repo name in git_hashes.txt
We want to write repo name in there, not $dep which actually doesn't
exist in local context of have_repo function. In most cases it's
actually the same because in almost all cases $dep is passed as $1 to
have_repo and thus is the same as local $repo. But in a few recipes
which don't use build_repo directly but instead use have_repo and build
manually, $dep may not point to $repo. That's the case for osmocom-bb
for instance. As a result, "libosmocore" is printed twice, were second
word should be "osmocom-bb".

Change-Id: I7a7db7cf4cc020295d216c60d6dc688f110916dc
2018-09-25 10:20:59 +00:00
Pau Espin d301bf9f84 suites: encryption: Add test register_a5_3_authreq
Change-Id: I279e78e741b3ca841cb8508db40874f3c17b0785
2018-09-25 10:20:59 +00:00
Pau Espin 8cc84d8404 contrib: Build osmo-sgsn with IU support
Change-Id: I810ae848c350550430c1918b3abb4376d21d7317
2018-09-19 14:05:41 +02:00
Pau Espin 26d7f8d462 contrib: Build osmo-msc with IU support
Change-Id: I68503ae2f27948aff60a9424e6b114db548d79e9
2018-09-19 13:14:19 +02:00
Pau Espin 1e2a041773 contrib: Add jenkins-build-osmo-iuh.sh
Change-Id: I75cb9551db6b1b4aa5bfb76177694c14fad82f04
2018-09-19 13:02:56 +02:00
Pau Espin 7a333b0676 encryption: Reuse code using test lib features
Change-Id: I9b6944516c524a0c11a47aec6839f8ee9d571661
2018-09-19 10:39:57 +00:00
Pau Espin 5876f4dfb8 default-suites: Remove nanobts HR1 voice test
nanobts doesn't support this codec, so it will always fail.

Change-Id: Iea4e6395809e5ef5485892f8f17e0dcfa36640dc
2018-09-18 20:29:07 +00:00
Pau Espin 94eab26bf3 osmo-trx: Add multi_arfcn support
2nd TRX arfcn is changed in defaults.conf because multi_arfcn requires
them to be alocated in steps of 4 starting from TRX0.

It is not enabled by default yet on B200 (it must use it to support
several TRX) because current host running osmo-gsm-tester is not
performant enough and cannot keep up with timers due to multi-arfcn CPU
overhead.

Change-Id: I096df82ad1f4cbb41dfbd6a78466a845f34be385
2018-09-18 11:29:12 +00:00
Pau Espin 44b7ea18ca osmo-bts-trx: Add multiTRX support
Support is limited to 1 osmo-trx with 1 phy and multiple instances.

Change-Id: If2bda5ec7ac9fa3fe6bc5d71f323c3ccc2a70158
2018-09-18 11:29:12 +00:00
Holger Hans Peter Freyther cb132bd79f build: Add overload to clone repo and build in subdirectory
To build osmo-nitb we need to clone "openbsc" and then enter the
"openbsc" sub-directory. For building "mobile" and "virt_phy" of
OsmocomBB we will need to do something similar. Instead of added
more hardcoded paths, add a variant that allows to specify the
source directory.

Change-Id: I67fbd54296f2c68316bf8e89cfeb37d147193d53
2018-09-18 06:29:17 +00:00
Pau Espin 43857809c1 Sanitize existing suite names
When first suites were added, osmo-nitb was used. Then new tests using
regular split components were added with "aoip_" prefix. At some point
it was clear that osmo-nitb was being deprecated so new tests for split
components were added without any prefix, as they are expected to be the
default one. Since most current and future development is going to be done
for split components, as well as new tests added, it makes sense to move
the few old testsuites using osmo-nitb to have all "nitb_" prefix, while
keeping the split component tests without prefix as it's the regular
network topology.

Change-Id: Idea2e053d337548e0e9b1b47441dbb262124f909
2018-09-17 10:57:50 +00:00
Holger Hans Peter Freyther 99a6a419a2 Keep track of all mobiles and copy them to unstarted later
At all times have a list of mobiles that were created. Make a shallow
copy and use it as the unstarted list.

This will be used by the upcoming gsm tester integration to build a list
of subscribers to be added into the HLR/AuC database.

Change-Id: Id72b7ce8821cf53ac0d5e4a141b9a2b66242e2a3
2018-09-15 09:27:22 +00:00
Pau Espin 4aeb4300b1 Build and use osmo-bsc_mgcp from openbsc.git instead of osmo-mgw.git
In osmo-mgw.git 31b4729f2731c747b8b33c4646dd5ade2ace29bc, osmo-bsc_mgcp
was dropped and the one from openbsc.git must be used.

Change-Id: Ib1c46baf4d36ab18f8064a2234a0ba28a1e7d2c2
2018-09-13 12:20:43 +02:00
Pau Espin 7a216e54b0 contrib: Disable installing unneeded systemd service files
Otherwise since we install without root perissins to a local directory,
systemd files will fail to be installed to regular systemd location
/lib/systemd/system/).

Change-Id: I20a285e4e92fec7990770568e8d5dc117d6bf477
2018-09-12 14:46:30 +02:00
Pau Espin 287bfcd788 Remove tests for unspecified speech HR2
HR2 was never specified, so there's no sense in attempting to test it.

Change-Id: Ifd7cab43bae0729106a9402e3e610eeecde645e4
2018-09-04 11:54:37 +02:00
Holger Hans Peter Freyther 8ae38a6b85 Allow to access imsi/ki from the OsmoMobile instances
Change-Id: Ib1b5f51e93d67e1dbde6f1ab4701e539d3cabec0
2018-08-31 15:19:33 +01:00
Holger Hans Peter Freyther a7b61f39fb Generate imsi/ki on OsmoMobile construction
Take an IMSI/KI when creating the OsmoMobile and not when starting
it. This will allow other code to know which IMSIs will be used
before the system starts (e.g. to add it to the HLR/nitb db).

Change-Id: I79e259e948aa797c13118143ecd64bb7e29d274b
2018-08-31 08:03:20 +00:00
Holger Hans Peter Freyther 9999d8cc9d Check for smpplib being installed as well
from the docs:
pip3 install git+git://github.com/podshumok/python-smpplib.git

Change-Id: I6be1c961e512e68d5bed8b317d1dda363a58fbe7
2018-08-30 15:22:09 +00:00
Pau Espin 0d45504267 osmo-bts-trx: Big refactor and cleanup of osmo-trx related code
* This commit is a preparation for future commits to add support for
different osmo-trx devices and backends like osmo-trx-lms.

* Drop deprecated osmo-trx-* cmd line params and use VTY cfg to set them.

* As number of osmo-trx related osmo-gsm-tester attributes grow, group
them togther in an "osmo_trx" dictionary.

Change-Id: I77d29413c9e3b600b796627ba366f80c3281b7e1
2018-08-29 12:30:48 +02:00
Pau Espin a9fdda85af default-suites: Remove octobts tests
Since latest release firmware, we have been unable to start up octobts
correctly. As it's annoying having all those tests failing all the time,
let's disable them in nightly builds until we have a working OctoBTS
setup working again.

Change-Id: I828723193564b3a91aeac0c163c7c8c6b7e4058c
2018-08-29 10:18:05 +00:00
Pau Espin 7e58c61439 default-suites: Add suites testing different codecs
Change-Id: I591c71c66c5bbcd07466fe1d433aa87aed964fbe
2018-08-29 10:18:05 +00:00
Pau Espin 5dc245938b osmo-bsc: Parametrize codec-list VTY cfg
Change-Id: I1678aba43e8d399ecad192cbc416698373e3c0a0
2018-08-29 10:18:05 +00:00
Pau Espin c264d3df9d suite: Fix generation of config() dictionary
suite.config() hasn't been activetly used anywere. New upcoming patches
will start using it to set and overlay config parameters for objects
which are not necessarily allocated as resources.

Since these options don't apply to specific resources, there's no sense
in running replicate_times() on them.

Change-Id: I5fcdc9151d1663e738f5c8abe588a42ab51c8f6e
2018-08-29 10:18:05 +00:00
Holger Hans Peter Freyther 3f7d8f89f2 Check for the sispm dependency
From the commit that added it:

    Using it requires the following extra dependencies:
    $ apt-get install python3-usb
    $ pip3 install pysispm

Change-Id: Id347604f47ac5243b7eae12b9bdf675f2379f4c6
2018-08-28 10:48:52 +00:00
Pau Espin a40bce5981 Add testsuite + scenarios to test nanoBTS multiTRX
Currently only 2 nanoBTS in the 900 band are attached together as a
multiTRX setup. We thus set num_trx to 2 and set channel allocator
descending to force the BTS to use the 2nd TRX when allocating channels.

Change-Id: I12e1bcb047c4efac5693cf725739e0ce2e0532ee
2018-08-23 16:56:29 +02:00
Pau Espin 722e94e833 Add channel_allocator cfg attr to bts resources
Change-Id: I682809d4aeb91a36e3a35fc481e8d40d0b084fa0
2018-08-22 11:59:09 +02:00
Pau Espin 568228701c osmo-bsc,msc: Set mgw local-ip in cfg.tmpl
Change-Id: Id46aa337f12756f80d492bf3102db5b1449e2027
2018-08-21 18:30:24 +02:00
Pau Espin 2482416dd9 Replace suites dyn_ts_ipa* and voice using scenario modifiers
Now that we support modifiers in scenario files, we don't need to
duplicate tests and testsuites to dynamically set trx configuration at
run time. It can be done more easily with scenario modifiers.

Change-Id: I80c441bb5b98d5d2e95d4c6ae1efab3e5f3c40d9
2018-08-21 16:48:02 +02:00
Pau Espin aab56921f1 Introduce scenario modifiers
Before this patch, scenarios were only used to select resources with
specific attributes. This commit introduces "modifiers" in scenarios,
which allows setting or modifing config attributes of resources once
they have been reserved. This way same test can be run selecting same
resources but modifying its configuration, allowing for instance running
different number of TRX, different timeslot configuration, etc.

Modifiers are described by placing a "modifiers" dictionary in any
scenario file, similar to the current "resources" one used to select
requird resources. The "modifiers" dictionary is overlaid on top of the
"resources" one resulting from combining all the "resources" dictionary
of all scenario files.

Change-Id: If8c422c67d9a971d9ce2c72594f55cde2db7550d
2018-08-21 16:48:02 +02:00
Pau Espin 635f4c8d8f osmo-hlr.cfg.tmpl: Add ussd routing prefix for *#100# and fix expected answer format
Since osmo-hlr.git I1d09fab810a6bb9ab02904de72dbc9e8a414f9f9, USSD
processing has been moved to osmo-hlr and prefix routing needs to be
configured, otherwise USSD requested are answered back to the MS with an
error "ss-NotAvailable (18)".

mesage received for extension resolution (*#100#) had its format change,
so update to new format (carriage return at the end was dropped).

Change-Id: I5f75eff0df2d20d7f9b39e69184cffb0e635713d
2018-08-13 14:36:14 +02:00
Pau Espin 58603671c2 Cleanup of class scoped variables
After bug described in OS#3456 and fixed in last commit, let's
categorize and place variables in its correct plac to avoid similar
issus. We leave under the class keyword (class scoped variables) the
attributes which are to be used as static class attributes. All other
ones are initialized during __init__(). This way w avoid scenarios in
which while using an object from an instance attribute we end up reading
a class scoped variable which is shared among all instances.

Change-Id: I5ad4cac34a9f49eaf42966c01c9c5a4d3f3e9dc8
2018-08-13 07:51:58 +00:00
Pau Espin 6caa5c1167 resources.conf.prod: Update modem paths after HW setup changes
Change-Id: I8673af3e9447b8093bc61503f9354a8f0431620e
2018-08-10 21:46:39 +02:00
Pau Espin 926a4b81be bts_nanobts: Fix pwsup_list increasing its size every new test
variables under class section are shared among all instances, and are
used unless the specific class instance attribute is set. As a result,
the same pwsup_list object was being re-used.

Take the chance to do the same with the _pcu var, since we want same
behavior for it.

See for reference: https://stackoverflow.com/a/1716730

Fixes: OS#3456
Change-Id: I3f6a9d64b35aec33430e90872f41c3d046653ce6
2018-08-09 13:01:17 +02:00
Harald Welte 9d8fec54e6 jenkins-build-osmo-msc.sh: Build osmo-hlr before osmo-msc
osmo-msc now needs libosmo-gsup-client, which is built during omso-hlr
compilation.

Change-Id: I67c5d168011a385fd4f68df351e0a93e9bef37a7
2018-08-08 08:01:47 +02:00
Pau Espin f6a0712282 nanobts: Support multiTRX
num_trx is left for now by default to 1, but it has been tested to work
properly (current tests pass and both trx are configured) with
num_trx=2.

Change-Id: Ib3962f824a804e2aa582601475a8514c6cb0d8e7
2018-07-27 16:24:31 +02:00
Pau Espin 698ad4ce50 bts: Recreate resources.conf trx_list with len based on num_trx
We are already doing this for defaults.cfg, but not for resources.conf.
As a result, if we have a trx_list with 2 trx but we have set num_trx=1
(default), parsing will fail later in bsc.cfg.tmpl because
conf_for_bsc_prepare() will pass a trx_list with 2 trx.

Change-Id: I28ed34abeedaa0ee2e7862ced45a46042192d831
2018-07-27 16:21:11 +02:00
Pau Espin bc1ed88304 Add ttcn3-bts-test env
Change-Id: I3251a49503dc823f0ef1fe8ef5d68236a584dad4
2018-07-25 16:38:30 +02:00
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