Commit Graph

1234 Commits

Author SHA1 Message Date
Pau Espin a5ed18ac7e suites: aoip_debug: Start GPRS services
Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121
2017-12-05 15:06:53 +01:00
Pau Espin de899619cf modem: Add minimal GPRS support
Up to this point we can test signalling plane: attaching to GPRS network and activating a
context.

Data plane (sending IP packets through the network) is still not
implemented as it requires setting up the network interface provided by
ofono as well as routing, and most probably move osmo-ggsn to its own
network namespace.

Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f
2017-12-05 15:06:52 +01:00
Pau Espin 8a3a7b5146 bts_*: Add incrementing bvci and rac values
Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b
2017-12-05 15:06:52 +01:00
Pau Espin 05314b4633 OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn
Change-Id: I54780971d711d47b23976dd044a4a53134dd4299
2017-12-05 15:06:52 +01:00
Pau Espin 5936d8f4b1 OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn
Change-Id: I777835345355538a945599fb088630af63dc9140
2017-12-05 15:06:51 +01:00
Pau Espin ce35d91592 OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn
Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef
2017-12-05 13:36:46 +00:00
Pau Espin e85f5c9009 Add OsmoPcu class
Change-Id: I04d8ed5e02b090d07e91669df44ce354bc6ee749
2017-12-05 12:16:31 +01:00
Pau Espin 99f79294d3 Add class OsmoPcuSysmo
Change-Id: I6fbb71df1ad36e5d7eb02f3fdd7987a178d523d3
2017-12-05 12:12:59 +01:00
Pau Espin d0a01117df bts_*: Add ready_for_pcu API
This is required to start osmo-pcu after osmo-bts is already setup and
activated. Otherwise osmo-pcu ends after connecting to socket with:
"pcu_l1_if.cpp:416 BTS not available"

Change-Id: I7209589f60bda63094336e417638906be5e273c4
2017-12-05 11:09:10 +00:00
Pau Espin 4796b359bd Add OsmoSgsn class
Change-Id: Iec370a444998c632b3615ad1a6d6f67e64e2bfeb
2017-12-05 11:09:10 +00:00
Pau Espin 30ceb5c9a2 Add OsmoGgsn class
Change-Id: I0eed70838e4e8656c4bc1337df70e631a10d69c7
2017-12-05 11:09:10 +00:00
Pau Espin f7f0636f4d resource: next_lac: Avoid using LAC 0
Change-Id: I6c1bef81040e2c6210177f04743e7acf3eb9ad8f
2017-12-05 11:09:10 +00:00
Pau Espin 0b9d0918cf osmo-bsc: Remove token cmd from config
In 3b18044859df15ffd2ad4c3e5c3d2c94a2923eb9 this command
has been dropped and is no longer recognized.

Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f
2017-11-30 11:58:25 +01:00
Pau Espin b87c6bd0e7 osmo-bsc: Remove authentication cmd from config
authentication is firmly VLR land and must go away from bsc. That option
is a leftover from nitb. It will be removed at some point.

Change-Id: I3bb4189b33173245116018e437e113c6c1226639
2017-11-29 14:31:32 +01:00
Pau Espin e7ec9089ab osmo-bsc: Remove 'auth policy' cmd from config
As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command
has been dropped and is no longer recognized.

Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
2017-11-29 14:28:38 +01:00
Pau Espin f2850f50a9 defaults.conf: Add PDCH channels to test GPRS
Change-Id: I8c90e2ef14a3556b62240e335ea3147df1467657
2017-11-23 14:07:51 +01:00
Pau Espin ff1580c573 resources.conf: Add gprs feature for EC20 modem
Change-Id: I99a1e8c2fbd3856f5c1978449292871498c6bf18
2017-11-23 14:07:51 +01:00
Pau Espin 7aef3861f4 modem: Move power off sequence to separate method
Also make sure we power off the modem during cleanup, to make sure we
set it offline (and in the future, we also detach GPRS).

Change-Id: I47845f36864d494be474fdd447a4e9e0cbed1abd
2017-11-23 14:07:50 +01:00
Pau Espin e0f498627c modem: Abstract the list of required ofono interfaces
* We want to add more interfaces to this list when we add more features
(such as waiting for ConnectionManager if we want to use GPRS).

* We want to require some ifaces only if we are planning to use those
features in osmo-gsm-tester (driven by config features attribute set to
the modem in resources.conf).

* Previous usage during shutdown was wrong, as it was waiting for any of
them to be down to continue instead of waiting for all of them to be
down.

Change-Id: I56a289360018aa56fe25b3dd328ffe9194b65f6b
2017-11-23 12:45:05 +01:00
Pau Espin 5bbb3003cb hlr: Rename conf_for API
The HLR has more clients than the MSC, for instance the SGSN.

Change-Id: Idd5de7a828f0a627f69876a990f2ac1af0b578aa
2017-11-23 11:09:38 +01:00
Pau Espin 9cc1d082ea Configure PcapRecorder to record on any iface
Before this commit, tcpdump was instructed to listen only on the
interface which had the IP assigned. However, local processes connecting
to that IP are actually sending packets through the loopback interface.
As we are not listening on it, all those packets are not being recorded.
Let's record on all interfaces instead and rely on the ip filtering to
record only the interesting packets.

Change-Id: I205786d5168acd66cf3427154d8bf307c5c58da5
2017-11-20 17:40:27 +01:00
Pau Espin 1e1d381a59 Configure bsc and msc to connect to the specific stp provided in test
Change-Id: I89deaa71956131766fec8fcc3bc7381ebb0e187f
2017-11-20 16:05:43 +00:00
Pau Espin fd5de3d2ca Move Test class to its own test.py module
Make the code more reachable for newcomers, as well as more organized
for people who work a lot with it.

SuiteRun in suite.py is already quite big, and having the Test class in
there make it unnecessarily more big, and makes it difficult to find
stuff.

At the same time, having a test.py which does actually not contain the
Test class but other stuff, makes it even more confusing.

Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a
2017-11-17 17:12:15 +01:00
Pau Espin dfe38ad239 Rename test module to testenv and update references
Preparation to move current Test class into its own module test from
suite module.

Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85
2017-11-17 17:07:51 +01:00
Pau Espin 24c5de89c9 modem, process: Remove unneeded test import
Change-Id: Icd8cbb753aafdef49bde56bc5b0294f82133887c
2017-11-12 13:19:24 +00:00
Pau Espin a02952a441 suite: Remove unneeded import copy
Change-Id: I7a7231439ce42d51e1b2ab413f64e217aaa8d145
2017-11-12 13:19:24 +00:00
Pau Espin ccc1ebc052 event_loop: Remove unneeded commented import line and explanation
Those lines come most probably from copy+paste using test.py header when
creating the file.

Change-Id: I7854d96de00124324bfbac8960e18ec30aa21296
2017-11-12 13:19:23 +00:00
Pau Espin 41dabb3627 suite: Separate better internal imports and the ones aimed at tests
Change-Id: Ib6f6fa561fbc4ed0d0f255ad54fdfdd823de1a8a
2017-11-12 13:19:23 +00:00
Pau Espin 99b0e0e609 Remove unused file bts_model.py
Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522
2017-11-10 21:28:17 +00:00
Pau Espin 386b78d8b0 Require OsmoMgw in OsmoBsc and update tests
Since Change-Id Ia2882b7ca31a3219c676986e85045fa08a425d7a, osmo-bsc
uses osmo-mgw and utilizes libosmo-mgcp-client to talk to it.

This commit fixes latest constant failures in voice suite.

Change-Id: I1dadd781a357fce33e7bde55e4bcbdaeb4633359
2017-11-09 13:06:03 +01:00
Pau Espin e9d4af8903 Introduce OsmoMgw class (osmo-mgw)
Change-Id: I6081ceaddcde748ada8b124a29432d498a9cbdac
2017-11-09 13:01:00 +01:00
Pau Espin ef96749a2c contrib: Add binary osmo-mgw to artifact with same name
Change-Id: I706a4428f01b4b5be2bedc2507f67d8d7a4ffc8d
2017-11-09 12:08:41 +01:00
Pau Espin 9f59b82598 modem: Fallback to automatic registration if manual one is not supported by modem
Some modems such as the gobi 2000 doesn't support the Register() method
in /operator path. If the method returns a NotSupported error, fallback
to automatic registration.

Change-Id: Ibc322317db634a5380573de88a56eb53fd92e67b
2017-11-08 10:12:07 +00:00
Pau Espin 9b67021b98 modem: Improve handling of errors in dbus_call_dismiss_error
Change-Id: I25d08c74608c3ec5c6e46c36c161e777b2ed337a
2017-11-08 10:12:07 +00:00
Pau Espin 6cdd2fdf61 Rename module ofono_client as modem
Change-Id: I43b51ae937d87d6d4e18caea59f9366e2e28c9f2
2017-11-08 10:12:07 +00:00
Pau Espin 0bcc074caf test.py: Remove unused parameter ofono_client in setup()
Change-Id: Ib8983421a7ca5f94fe1363768a12fff63c1fc64a
2017-11-08 10:12:07 +00:00
Pau Espin 1f5ae7d3b0 osmo-msc: Use mgw instead of mgcpgw in cfg
As of osmo-mgw 87203f2a3746d708f85ee75d978e2821bda58e6d, mgcpw commands
are deprectated.

Change-Id: Ib0220c9f7f6262234712c3195dda0e076c7dd390
2017-11-08 10:11:28 +00:00
Pau Espin 4ccce7c963 Use unique incrementing value for BTS CellId
Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39
2017-11-08 10:05:41 +00:00
Pau Espin 5e0c251c6c Use unique incrementing value for BTS LAC
Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0
2017-11-08 10:05:41 +00:00
Pau Espin 96d6b6ce22 resource: Refactor next_msisdn to be more generic
The logic in next_msisdn can be later re-used for other purposes, such
as getting different location area codes for BTS.

Change-Id: Ib04a34892aacd7e71f8f5961e7339add583f73f2
2017-11-08 10:05:40 +00:00
Pau Espin f3cb908c79 default-suites: Add test cases with octphy BTS
Change-Id: If8b5bda50c245ad693e7679ad44515b90a067fbb
2017-11-06 18:45:36 +01:00
Pau Espin e748bfc536 Change example config to use only 1 TRX for osmo-bts-octphy BTS.
Our current Octasic license has multi-trx support disabled and the board
rejects the configuration.

Change-Id: Id2c415deb85187feb42fb6d24cc86273eb722936
2017-11-06 17:43:01 +00:00
Pau Espin daed4471ba Add support for osmo-bts-octphy
Specific parts for this class:
- Runs osmo-bts-octphy binary, that requires CAP_NET_RAW capability
because it uses an AF_PACKET socket.
- As a consequence, it must use the previously added APIs to set the
capability and modify the RPATH of the binary before launching it. These
APIs require extra host setup and installed dependencies that will be
documented soon in osmo-gsm-tester manual.
- A num_trx() helper method is added because the binary requires that
parameter.
- A allocate_phy_instances() is added to help build/fill the conf
dictionary to be used in the tmpl to be able to easily set up trx, phy
and insances.

A config to use a osmo-bts-octphy at full power is used (4 trx) is added
in this commit to show how can it be configured. However our
current license only has support to use 1 TRX, and so next commit drops
most configurations to simplify the setup to use only 1 TRX.

Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297
2017-11-06 17:43:01 +00:00
Pau Espin ed6d4457e1 util: Add change_elf_rpath API
Linux dynamic loader avoids loading shared libraries from env vars such
as LD_LIBRALY_PATH for ELF binaries which have capabilitiy flags enabled
for security reasons. For these binaries, we modify the RPATH of the ELF
header to tell the loader where to find the libraries.

Process class from process module is imported inside the method after
module initialization in order to avoid circular dependency of relative
imports, which is only available since python 3.5.

Change-Id: Ibc356957fb3dbcf9947bfe96b671ec8c7ede33ff
2017-11-06 17:43:01 +00:00
Pau Espin 33c154bf32 util: Add setcap_net_raw API
Some binaries such as osmo-bts-ocpty require specific capabilities, and
we need to provide them in case osmo-gsm-tester is not run as root.

Process class from process module is imported inside the method after
module initialization in order to avoid circular dependency of relative
imports, which is only available since python 3.5.

Change-Id: If3eb24461c02173dc80837a4cc83f9f2420c7816
2017-11-06 17:43:01 +00:00
Pau Espin 2753204d3b config: Fix crash in overlay()
if len(src) > len(dest), then we hit an out-of-bounds crash accessing dest[i].

It is totally valid to have src and dest with different lens, as you may
want to override only part of the list.

Change-Id: I4f8a191810e89a4081199edcb390fb3bb27ed42f
2017-11-06 17:43:01 +00:00
Pau Espin d27de2ba56 suites: Add ussd support to interactive shell test
Change-Id: I055f2b9de56da8d956c3e4944f6600dea2ee5578
2017-11-06 17:44:43 +01:00
Pau Espin 2d9c14aeb9 ussd: Workaround ofono issue to prevent test failure
Change-Id: I72f68bc980e6421a65f7d33712a587da340698e5
2017-11-06 17:44:42 +01:00
Pau Espin 03983aace2 Add minimal USSD support to test extension number
Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89
2017-11-06 17:44:41 +01:00
Pau Espin 37d38f0bd9 contrib: Disable new dep gnutls in sysmocom SDK builds
Recently a new dependency on libgnutls was added to have a fallback for
kernels prior to 3.17 in which getrandom syscall fails, see libosmocore
ed029dfab959bca74bd43d86922727c2047eeb4d.

Since sysmobts has a kernel newer than 3.7 for a long time now, but we
are still running a 201310 image (and sdk) on them which doesn't contain
gnutls, let's disable it at configure time to fix the build against the
current SDK.

Change-Id: Iaa300c0eda2cf857f8c2915c6491efe583a12874
2017-11-06 15:39:20 +01:00