Commit Graph

522 Commits

Author SHA1 Message Date
Pau Espin e972828a01 utils: Introduce modem-netns-setup.py
Used to quickly set modem net interfaces into their own net namespace
(named after modem USB ID path).

The idea is that since osmo-gsm-tester ofono modem.py knowns the USB
path from a modem (path yml attr), it can infer the netns from it and
run a ping process inside it.

Related: OS#2308
Change-Id: Iadb2df2974e132044fba1f1bc2db8b559912e4e1
2018-10-31 08:57:27 +00:00
Alexander Couzens 2decdba7e5 utils: Introduce show_usb_device.py
This is a small script written by Alexander Couzens that is useful to
list modems and its properties in a quick and easy way in
osmo-gsm-tester setup.

Change-Id: Iec049e2d56d61ecd50b65b64d95d69641fa0f8be
2018-10-31 08:57:27 +00:00
Pau Espin 24dc93754b contrib: build-osmo-sgsn: Depend on osmo-hlr build
Since osmo-sgsn f4b2c4ca42cc530c38c9ac6f275e4d7da9315fa2, it depends on
libosmo-gsup-client available in osmo-hlr.

Change-Id: I6aa997ff2092f9ddf2ac475fd094803be9063980
2018-10-31 08:14:51 +00:00
Holger Hans Peter Freyther b484aab683 Create a "ms_driver" stub for the testsuite
All config parameters are hardcoded for now and it should push
subscribers into the test (which should be a base class but not
a specific test).

Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d
2018-10-30 21:28:43 +00:00
Holger Hans Peter Freyther b697b3bb86 Always initialize the _started in the test
We don't know at which state the termiation routine will be
called and it is best to have a fully initialized object. In
prepare we start with a fresh list just to be sure.

Change-Id: I675772c89e32620da5695aa4793b735cc266684c
2018-10-30 21:26:20 +00:00
Pau Espin 317cdf64e2 default-suites.conf: Make sure we use fr codec with IPA dyn TS
IPA style dynamic timeslots (TCH/F_PDCH) support only TCH/F and thus
only full rate codecs are to be used.

On the other hand, OSMO style dynamic timeslots (TCH/F_TCH/H_PDCH) can
use both full rate and half rate, so no need to be restrictive there.

Change-Id: I0039ef60b323ed72cfe00d8fd9e9287e9c82d49f
2018-10-30 16:24:25 +01:00
Pau Espin c046dba575 default-suites: Remove .conf suffic from scenarios
Change-Id: I090a3ba8c5eb8fc256f09c798bfb5a17cdca274e
2018-10-30 16:17:14 +01:00
Pau Espin d11da2e6bc defaults.conf: Set valid default codec_list matching avail TS types
By default, all channels are TCH/F, and as a result we cannot run half
rate codecs on it.

Since recent versions of osmo-bsc, it checks this kind of
misconfigurations and answers with an Assignment Failure:
....
20181029162133430 DMSC <0007> codec_pref.c:445 codec-support/trx config of BTS 0 does not intersect with codec-list of MSC 0
20181029162133430 DMSC <0007> osmo_bsc_main.c:887 Configuration contains mutually exclusive codec settings -- check configuration!
....
20181029162255253 DMSC <0007> osmo_bsc_bssap.c:859 Rx MSC DT1 BSSMAP ASSIGNMENT REQ
20181029162255254 DMSC <0007> osmo_bsc_bssap.c:718 No supported audio type found for channel_type = { ch_indctr=0x1, ch_rate_type=0xa, perm_spch=[ 42 21 11 01 25 05 ]

Change-Id: Ie6b37839fe363b5d1ba64c267d751221434cdedb
2018-10-29 17:47:01 +01:00
Pau Espin 8aca1f37d6 process: Make sure sync process is terminated if ogt is stopped
Change-Id: Iecdac96ea576a312be2a6c6b6799e249074687ef
2018-10-26 10:24:59 +00:00
Holger Hans Peter Freyther d03acdf38a First round of clean-ups of imports and unused variables
Run pyflakes src/osmo_gsm_tester and then address the first
round of problems.

Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
2018-10-25 16:26:49 +00:00
Pau Espin a52855614a ttcn3: Allow remote hosts (sysmobts) to access RSL srv inside TTCN3 docker
And extra IP address is required/requested on the docker host because
the BSC handling the OML instance is binding to it's address, so we
cannot ask docker to use that one because it fails binding to it.

Change-Id: I734fba91db535d7b183ddc7f51d324a6cd2eaf6f
2018-10-15 17:59:31 +02:00
Pau Espin f6166144b5 ttcn3: Support running tests without PCU socket avail
Change-Id: I902af460b798ffdba09d77d457bac672db606368
2018-10-15 17:55:12 +02:00
Pau Espin e789f0c088 osmo-bts-trx: Add support for osmo-trx-lms
Change-Id: I44db0fe4592109ecb665e1880806d90379da64f7
2018-10-10 09:39:58 +00:00
Pau Espin 16abefb35c bsc: Record RSL traffic in case rsl_ip and oml_ip differs
This change allows recording all interesting traffic for TTCN3 tests,
having GSMTAP and RSL together, because osmo-bsc is configured to pass
the RSL IP of the TTCN3 testsuite emulating a BSC.

Change-Id: I6bd1d1bec8e7b698d12aa886acc21d92532d9e6c
2018-10-09 18:55:30 +02:00
Pau Espin 1a39ec14c3 resources.conf.prod: Update TRX host ip addr
The host was updated to have several IP address to be able to run
several instances of osmo-trx in parallel.

Change-Id: I3595b82a5d202caec7bc48a63e28ce0331e5abb7
2018-10-09 12:21:33 +02:00
Pau Espin 3fa41541e2 defaults.conf: Add SDCCH8 ts in TRX1 cfg
This way we can test too if SDCH8 channels are allocated and used
correctly in TRX1 in multiTRX setups.

Change-Id: I9d08f3d019a28cf775d70d941c5a60a7e7ca20a9
2018-10-04 12:53:01 +02:00
Pau Espin cef9c0dee8 Drop unused sysmobts-mgr.cfg.tmpl
Change-Id: I09632a6b4d3a431f1699d00843b9d7ee257a8b4c
2018-10-03 14:56:32 +02:00
Pau Espin 1b11c5916c templates: Update .cfg files to use logging level set-all
VTY cmd "logging level all" is deprecated in favour of "logging level
set-all", but the required behaviour in this case is "logging level
set-all".

Change-Id: Ice54fca6be86f05a02ce4ae783e6e42e6958b95d
2018-10-03 14:56:32 +02:00
Pau Espin 01a40a14ce default-suites.conf: Add test to check multiTRX with Ettus B200
Change-Id: Ied768938851488c3f502b2d41334afa17f7f5401
2018-10-03 12:37:33 +02:00
Pau Espin 1ff03766be osmo-trx: Enable multi_arfcn for B200 and only in multiTRX setup
Change-Id: I6a29e1813f0603b00b49b7b7c805be23a72cf0e3
2018-10-02 15:58:32 +02:00
Pau Espin b54d7c9261 resources.conf.prod: Use specific remote machine to run osmo-trx
Run osmo-trx in a separate more powerful machine (i5) rather than
running in low end APU where osmo-gsm-tester runs.

Change-Id: I0479643789783d5e8a142042a65c4d53020d1e79
2018-10-02 15:29:04 +02:00
Pau Espin f2e5972ffc bts_osmo: Only check for socket path in ready_for_pcu()
Previous implementation was done due to osmo-pcu dying if failed to
connect to not-yet prepared BTS. This is no longer the case, so we can
start osmo-pcu as soon as the socket exists.

Change-Id: I3aa6bef0c4893bdcac668002ca018af019f666a3
2018-10-02 14:55:50 +02:00
Pau Espin 302c7563ef osmotrx: Make sure remote process stops after ssh session is closed
First of all, it was found that vty allocation must be forced (-t -t)
during ssh session creation to make sure SIGHUP is forwarded when
session is closed.

Second, since osmo-trx ignores SIGHUP (osmo_init_ignore_signals()), we
must add a wrapper script which converts received SIGHUP into a SIGINT
to stop osmo-trx.

Change-Id: Ic334a54b1a1827d74fe0b453ac32bb77b8616147
2018-10-02 14:52:53 +02:00
Pau Espin a9006dffd9 osmotrx: Allow running osmo-trx from remote host
Change-Id: Ia31ac8eb41e02eda28d9f6f56774679300244ee8
2018-10-02 13:10:36 +02:00
Pau Espin e4358a9a36 Make code copying inst through ssh generic
It can later on be used by other classes that need to run binaries in
inst remotely.

Change-Id: I838b999528695207e1147cfe76e6f7aaf3b1dd53
2018-10-02 13:10:36 +02:00
Holger Hans Peter Freyther 90b050764a Be able to switch-off ASAN builds of our binaries.
Inroduce a way to not take a 2x performance hit when testing. It
is of importance if we run with hundreds of BTSes and 10k+ subscribers.
In the absence of using getops or shflags use an environment for it.

Change-Id: I540ba1c35e8fb72abcee0d86e0bdc1136b47345c
2018-09-26 07:27:39 +00:00
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