Recent commit changed the import line so it runs only when required, but
added a typo making tests uing it fail.
Change-Id: Id3e5c16adc763a9b79cc464937c541abd15f98de
Fixes: 2b959580b9
This way we don't need to manually add new imports here or drop unusued
ones. It also makes sure local imports in all our py files is correct.
For instance, running the script already caught an issue which is added
to this patch (osmo_ms_driver/__main__.py).
This new version of the script also allows specifying subsets of
features to skip when checking for dependencies. This way, for instance
somebody not willing to use a sispm powersupply can stil check all the
needed dependencies are fine.
This new tool will make it easier to slowly make some dependencies only
used by some object test classes optional (for instance, python-smpplib
if user doesn't want to run an ESME node).
It also allows to retrieve the required debian/manually installed
packages when run with "-p" option:
"""
Debian packages:
libpython3.5-minimal:amd64
python3-gi
python3-six
libpython3.5-stdlib:amd64
python3-pygments
python3-yaml
python3-mako
python3-numpy
python3-markupsafe
Modules without debian package (pip or setuptools?):
usb [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/usb/_interop.py]
pydbus [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/pydbus/proxy.py]
smpplib [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/smpplib/command_codes.py]
sispm [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/sispm/__init__.py]
"""
Change-Id: I29ddf8971837754abd930d847bd1036e8e510de6
This way we avoid unconditionally importing all subclass dependencies,
and make them optional based on whether the setup has devices of that
type or not.
Change-Id: I0d2f8b26364b45f0d837cc51078784d1d0fa7ea1
this allows to optionally specify a the GTP bind_address for a enb object
in the resources.conf
this address is then used for binding the listening socket for gtp connections
which, in turn, allows to run the enb and epc on the same host.
when gtp_bind_addr is not specified, addr is used by default
this is especially useful if eNB and EPC run on the same host
and ZMQ is used for RF between eNB and UE. Two eNB addresses
are needed in this case, one bind address and one "remote-accessable"
address for the UEs ZMQ radio to connect to
Change-Id: I4fe38f31401428ed3e74e1d0b64960f0af122d37
Some older iperf3 versions don't support the --logfile arg. Let's
instead parse the json from stdout. Old --logfile behavior is left in
code but disabled since it's a nicer (less hacky) way to get results,
because parsing from stdout means we need to avoid reading some content.
Change-Id: Ia1b7fa4dae074089878963aeddf0006aea68e31f
For some reason these classes were still not inheriting from the base
class (probably because it was added after they existed) and they
started failing after recent changes which presumed they where already
inheriting.
Change-Id: I88217baf490ec45373d0743585377ed2639a8cfd
Use the ifup script to set up the netns + configure the tun device
created by lteue. Use it also as a hook to know when the UE is attached.
Since tun setup is done by arch-optimized lte-avx(2) binaries, we also
need to give capabilitites to them (instead of allowing inheritance of
caps in general in the setcap script).
Change-Id: I1e228b1296eac8e4cb183c2faa735b0468abe124
Commit 12ae6d79a5 switched the rf_dev_type
to be in lowercase but forgot to change these conditions.
Change-Id: I91d3877381b4e6343dc4aa0465e699341ed6648d
the Amarisoft UE seems to be only working with UHD when the bandwidth
param is provided. It seems the set_bandwidth() API is used.
Change-Id: I3f20a5a8ca80c63374f0ad500fd2794e2dc45479
this commit adds basic support for configuring measurements in the
eNB config. It currently support A1, A2, and A3 events.
By default UE measurements are turned off and need to be enabled by
configuring an event with:
+mod-enb-meas-event@{name},{report_type},{value},{hysterisis},{time to trigger}
For example one can update the a2 and a3 event with:
+mod-enb-meas-event@a2,rsrq,-40,2,480+mod-enb-meas-event@a3,rsrp,6,1,512
Change-Id: Ia7657be2396886840570bc41645450a268b4cfff
the num_carriers is parsed as a string in the conf dict and therefore
needs to converted to int before matching
also changed the num_carriers to be of type UINT
Change-Id: I1386812d32e1181ba666720bbb875bf9bbce0f51
the num_cells modifier allows to create multiple cells in a single enb
both cells are by default configured for CA
Change-Id: Ie9f16ce06ee56002c01097f2d338278f09ea4337
This allows selecting modem by supported network type. It will allow
using 4G modems with type different than srsue in 4g suite in the future.
Change-Id: I38bcf6abf789f52c3ed0bee7911567fa872e2491
comma character ',' is used in the command line to split between
parameters, which means a parameter value itself couldn't contain it.
This commit allows passing a comma inside a character value by escaping
it with '\,'.
Change-Id: Ic0bd9a029137a59e8c4a32b807eba7a64fcfa51f
Older versions of srsLTe.git required passing UHD in caps to the conf
file, but that's not the case anymore. Let's use lowcase then.
Change-Id: If8a289ba110229d31b62b0d3adc1ae97324e6d27
the time is passed as a string param and is then converted
into seconds when literals "h" or "m" are found.
So it would accept 2m and would convert it to 120s, for example.
Example:
+cfg-iperf3-time@15+
Change-Id: Iff28816f83670751e9e91de31ec59b1b0ad8fc0d
* Since license_server_addr logic is generic among all amarisoft
software, let's move it to its own config category "amarisoft", which
all amarisoft classes (amarisoft_{enb,epc}.py as of now) will import
during configure().
* The license server is disabled by default (value 0.0.0.0) since the
usual case is to have a license in the local system.
* the license server can be enabled using scenario
cfg-amarisoft-license@A.B.C.D where A.B.C.D is the address to use.
Change-Id: Id5456ad9497e91370857b80ff9a389111d3611ff
* A new abstract generic base class EPC is created
* srsEPC and AmarisoftEPC inherit from that class
* options are loaded from defaults.conf in cascade. First generic "epc",
afterwards the specific enb type.
* A new scenario is added to select the EPC type to use. srsEPC is the
default unless stated by an scenario.
* AmarisoftEPC delegates setup of the tun IP address to an "ifup"
script. As a result, since we run without root permissions (ony with
CAP_NET_ADMIN), the ifup script itself is unablet o set the IP
address. To solve this, we introduce a new osmo-gsm-tester helper
script which must be installed in the slave node which can be called
through sudo to increase privileges to do so.
With this commit, I can already get srsUE<->amarisoftENB<->amarisoftEPC
to pass ping and iperf3 4g tests.
Change-Id: Ia50ea6a74b63b2d688c8d683aea11416ad40a6d3
* object class expects the amarisoft software to be placed in directory
provided by env var AMARISOFT_PATH_ENB. On local runs, it will run the
software from there. On remote runs it will copy over that directory to
the slave.
* Configuration provided works with 6 PRBs, but probably won't work for
other values (yet).
* ZMQ support not yet available, only UHD.
One can select the Amarisoft ENB by declaring it in resources.conf:
"""
- label: AmarisoftENB-B200
type: amarisoftenb
rf_dev_type: uhd
rf_dev_args: "type=b200,serial=317B9FE,recv_frame_size=9232,send_frame_size=9232"
remote_user: jenkins
addr: 10.12.1.206
"""
And running:
"""
$ export AMARISOFT_PATH_ENB=/path/to/binaries
$ osmo-gsm-tester.py ... -s 4g:amarisoftenb-rftype@uhd+srsue-rftype@UHD+mod-enb-nprb@6 -t ping
"""
Change-Id: I1ddf4962ea6438ad977382ab201b724028ca46b3
In order for the console trace to work over SSH this commit
switches to use the default RemoteProcess class. Note that srsENB
now correctly handles the SIGHUP signal.
Change-Id: I26391eb8409e14b34987e0b338e10613fa157e06
this is needed to support the upcoming multi-cell feature in srsENB.
It's required for carrier aggregation (CA) but can also
be used for (currently) two independent 4G cells.
This commit adds baseline support for the parameter. Upcoming
commits will add hooks to configure the cell's EARFCN, etc.
Change-Id: I6d1658bf820163aee03b64b0f4ac68046c243f37
this allows to specify a fixed APN address for each subscriber in the
HLR. If the param is not provided in the resources config, the default
allocation type is used, which is to dynamically allocate an IP in the
supported range.
Change-Id: Ie6fcd7987dc7bc62a686bee3a10c67e3dd813419
running with RemoteProcessFixIgnoreSIGHUP was needed bc
srsUE used to ignore SIGHUP that is delivered to the process
when the SSH session is terminated causing the UE to not
quit properly. This isn't the case anymore so we can use
RemoteProcess for spawning the UE.
Furthermore, the wrapper script didn't pass along stdin
to it's child process, i.e., srsUE. Therefore the console
trace can't be seen if the run through the wrapper.
Change-Id: Iab4dafc58167620362a36ec9e904b8d49a7d5fc1
this enables the console trace which is printed to stdout
and provides human readable radio statistics
Change-Id: If1c998aff1c5c11d3fa636fb60cb4991e0def768
Take the change to fix several small things and support recording pcap
in srsENB.
pcap generation can be enabled with scenario cfg-srs-enable-pcap.
Change-Id: Ia096a9be7efb2123f95115c751e2402fb4fec935
Those two BTS backends never had their own MS Power Control Loop, so
they should be using the "osmo" common one. This wrong value "dsp" used
to be accepted for no good reason, but it's no longer the case. Let's
remove the line to let the backend take the default one (osmo).
Change-Id: I842fce2b8185c53d1684747afcfc3ae8fba1afee
This way we have all known config file names in one place, in the module
containing the implementation to retrieve them
(config.read_config_file()).
Change-Id: I8304dda70268b16dbc316af882fecdbf20ac25ec
WARNING: Invalid PRACH configuration - prach=(2, 8) does not fit into the eNB PRBs=(0, 6).
Consider changing the "prach_freq_offset" value to 0 in the sib.conf file when using 6 PRBs.
Change-Id: Ie4374faca62a4d0289f78674eadec7eb5d045dfd
New version of srsEPC improved the information logged during S1 setup
request, which we use to wait for the ENB to be connected.
Change-Id: Ia2338e3161c66ef7c1ab50b024a70de661edc780
Latest ENB config file grammar changed and needs to be updated to work
with next versions of srsENB.
Change-Id: I84db30dc57ea9e0b05208fa86d88d42d492b237f
Otherwise processes run eventually as root (due to being run on another
netns) may change its permissions and other processes later will fail to
write to it (Permission Denied).
Change-Id: Ide092db082937be7c2fb16d60e099c85dc1941b7
Otherwise junit parser in jenkins fails:
org.dom4j.DocumentException: Error on line 20231 of document : An invalid XML character (Unicode: 0x1b) was found in the element content of the document.
Fixes: 5bbdab8d95
Change-Id: Ia629e43bba01e50fd718c16404a7796d4f4e3713
The idea is to have something similar to systemd template unit files:
https://fedoramagazine.org/systemd-template-unit-files/
Specially for modifiers, one finds the situation where same scenario structure
has to be created with lots of different values.
For instance, let's say we want to test with different eNodeB num_prb values:
[6, 15, 25, 50, 75,100]
Right now we'd need to create one scenario file for each of them, for instance:
mod-enb-nprb6.conf
mod-enb-nprb15.conf
mod-enb-nprb25.conf
mod-enb-nprb50.conf
mod-enb-nprb75.conf
mod-enb-nprb100.conf
And each of them containing something like (changing the num_prb value):
"""
modifiers:
enb:
- num_prb: 75
"""
Instead, we can now have one unique file mod-enb-nprb@.conf:
"""
modifiers:
enb:
- num_prb: ${param1}
"""
The general syntax is: "scenario-name@param1,param2,param3".
So "@" splits between scenario name and parameter list, and "," splits
between parameters.
For instance, one can now run following suite with scenario:
"4g:srsenb-rftype-uhd+srsue-rftype-uhd+mod-enb-nprb@75"
Related: OS#4424
Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca
Already existing script osmo-gsm-tester_netns_setup.sh is modified to
support only creating the entns without moving an iface to it.
Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74
Before this patch, only virtual RF through ZeroMQ was supported.
This patch allows configuring srsUE and srsENB to use a real SDR with
UHD/SoapySDR backend connected through a physical RF network, while
still keeping compatibility to run on virtual RF ZeroMQ network, based
on the resources used (controlled by scenarios). For instance, one can
first run a suite through the phyisical RF (using 2 UHD-controlled SDRs)
and afterwards with ZeroMQ using the following default-suites.conf:
- 4g:srsenb-rftype-uhd+srsue-rftype-uhd
- 4g:srsenb-rftype-zmq+srsue-rftype-zmq
Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049
during config.read(), on empty file yaml.safe_load() returns None, which
was then later converted to string "None" by _standardize(), and
osmo-gsm-tester.py was not catching "not combination_strs" condition.
Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0
2 tests (iperf3, ping) working against a full srs{UE,ENB,EPC} network
using ZeroMQ backend for RF (so no real RF support yet, that will come
next).
Related: OS##4295, OS#4296
Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4
The new RunNode class is used and ip_address support will be dropped
eventually, replaced by the former.
Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8
This API was already added for RemoteHost but forgot to add it too for
local systems. It will be used by srsue once support for it is added.
Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e
This class will be used to hold information for a run node, that is, a
target system or environment were a process or task is run.
It superseeds in functionality the old ip_address resource, which will
eventually be droped in favor of RunNode.
Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343
Improvements include:
* Avoid race condition between receiving signal and process not yet
started
* Make sure process is killed with -9 if process is still alive a while after
we killed it (SIGINT, SIGTERM). This is useful for processes which
sometimes hang during shutdown like srsue in some conditions.
Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b
Let's move code related to coping stuff to remote hosts and managing
remote processes under a class where relevant information is stored.
This simplifies parameters being passed all over and allows to reuse
more code.
Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a
bts_osmotrx will check if target host can run the inst, and otherwise
run osmo-trx-lms already present in the system (installed by other
means). This way same class can be used both ways, since the only real
difference between the 2 scenarios is:
* copying inst vs not copying it.
* Running binary from inst vs running it from PATH.
This commit does not provide a mechanism to make sure the osmo-trx or its
dependencies are up-to-date in the target system. A solution for that
will be provided separately.
Related: SYS#4663
Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341
This will be useful in the event a user wants to run a binary already
available in the target which needs no copying, but still requires the
non-binary related items to be copied and set up, such as config files,
directory structure, etc.
This option will be used to run osmo-trx-lms in LimeNetMicro already
installed from an OBS repo, since cross-compiling all related
dependencies would require a lot of work to do now.
Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74
Caller may want to access the proc object after running the process, for
instance to check return code or inspect its stdout/stderr logs.
Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282
This way there's no need to go over hours of logging in the main log to
find information of a failing test.
Change-Id: I8cb79c7855e0bc14282d6728841e92ba22699eed
This reverts commit 91199a3137.
Since we now support powercycling the SC5, we don't longer need to use a
different ARFCN for it.
Change-Id: Ie8b49c556c90b4a97a73695a93ac4108660a217f
* Add powersupply related code to bts_osmotrx.py to power cycle the
board.
* Each time the board is started, we need to unlock the RF (start TRX
implementation).
Change-Id: I8a1428c1ff90c9f5b42d7ffe86a6fc763819cba2
Parameter was dropped a while ago in osmo-bts, since it's calculated
dynamically from VTY config. So let's drop it to avoid a deprecation
warning message in osmo-bts log file.
Change-Id: Ia17a2528e091d4691c511732ed251e472d1270eb
Due to a bug in sysmocell-5K's TRX implementation, it may keep polluting
the air transmitting after the BTS is disconnected. This could cause
interferences with other tests. Correct fix would be to RF lock it after
test finishes (through ccli), but let's simply use a different ARFCN for
now.
Related: OS#4129
Change-Id: I6d5555aa8740b262ee92110987189c076db44f76
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
We will need to enable/disable generation of lua script code
depending on the subscriber and mass test.
Change-Id: Ide4d788543d910356efe9f61e789b3975f7bc558
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
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
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
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
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
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
This avoids extra unneeded logging about killing with signal when
actually no signal is being sent.
Change-Id: I5b5dd78fe3301d8eef2ab93da3b37029268ae198
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
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
This allows to easily differentiate different calls to kill in order to
terminate the process when looking at the logs.
Change-Id: Ida88f2674b0ed1802f20c519aa4e3cbe81e0def8
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
Introduce a strategy to terminate processes and begin with an
implementation for parallel (that has no degree of parallelism
right now).
Change-Id: I7dd4a7e26aca758198aa08a434eaf5f3f5af632d
Mention the attribute right away and remove a method that looks
to have been broken (more vs. more_rules).
Change-Id: Iba18a96ff804780e66c69b459e112f9d42b7b2ff
In case of the "virtual" tests we:
* Don't use ofono based modems (they are physical for now).
* Run in an environment that doesn't naturally run a dbus-daemon
Modify the code to memoize the bus by hand.
Change-Id: Ieae4bf819903402f7f715eb489e0a96ed59dc3f8
Bind the mobile's to a random (chosen by the kernel) VTY port. The
CLI option was removed and I added a new VTY command to be able to
specify the port in addition to the address.
Change-Id: Ie40a2ba156ba5674d37a15eb30e5b2527e75fbe7
It's very close to the osmo-bts-trx but without osmo-trx. Modify
the suite to make use of this BTS.
Change-Id: I9f5a2501eb4473ccf2287c902ee207c6a45a1bc5
Storing them inside the testrun directory will most likely violate
the file length limit of the AF_UNIX files. This has happened on
the jenkins test run and can not be mitigated by picking shorter
paths in the code. We are already storing the event server in a
tmp directory and can add subdirs+files there.
Change-Id: I9ba4cd5c3e220ec10fc7c3160d7211daa821358f
If OML IP doesn't need to be changed because it's the one already
configured, then there's no need to set + restart the nanoBTS, which
means we can speed up a test running a nanoBTS by aprox 2 minutes per
nanoBTS used.
Requires osmo-bsc.git 5c2485dcff35996fce328798351af79c0ff4474c, which
fixes json generation in ipaccess-config after -G -q was implemented.
Related: OS#3624
Change-Id: I2871dee3de11512250445127f0b807a8990fd4c6
It's always been the default anyway, so no need to explicitly state it.
Furthermore, recently (osmobsc 167cb828665b91ed7d28007abd4a1862ebbb78c9)
force-combined-si was enabled by default for nanoBTS due to issues with
some MS not registering when it's not enabled, so let's osmo-bsc decide
were should it be enabled.
Related: OS#3063
Change-Id: I97b10406a4a0048c66a47aa7d32a113f0c0366d1
Since tests running a single MS and several of them are really similar,
generic code handling the test for N concurrent iperf3 sessions is
writen an moved to testlib, and existing and new test use that code.
Change-Id: I57799fde49e6845379cca332eec0a1f70aaecd2b
This way several servers can run sharing same IP address.
default port variable is moved inside class to be available to tests.
Change-Id: Id4eae7cefbb1a18ecf2676f9cb22c60cc91cec7c
Use a single tmp/rundir for all these instances. In the next step
we can create separate directories.
Change-Id: Icf4d4e161ac4283a63ed4e0745b375e7e6a25004
For the proper trial/suite integration we can't assume that the
virtphy/mobile are in the PATH and that they can be executed
directly (e.g. need a LD_LIBRARY_PATH to be applied).
Introduce BinaryOptions to pass the name/path of the two executables
and the env to use. Default this to virtphy/mobile and an empty
environment.
Change-Id: I79a57e53bc20613ac061453c24fd29a6d05e1721
Otherwise there's too much output. With debug enabled, iperf3 test from
gprs testsuite generates a 111MB osmo-pcu.log.
Change-Id: I687361f3d6ede9a77531cd71204b1b07e0d1af42
Otherwise there's too much output. With debug enabled, iperf3 test from
gprs testsuite generates a 96MB osmo-pcu.log. With log level set to
info, size drops to 1.4M, which is a lot less after compressing in an
archive.
Change-Id: I008234024b9369db42c90ef5d59a013fd2d22718
Since the modem iface and the GGSN iface are on the same host/netns,
it's really difficult to conveniently test data plane without getting
routing loops. As a result, either GGSN or modem iface must be moved to
a different namespace. The decision after a few discussions was finally
to move modem interfaces to a different netns.
Expected setup:
* ofono is patched to avoid removing modem if it detects
through udev that its net iface was removed (due to for instance, net
iface being moved to another netns and thus not being reachable anymore
by systemd-udev process running in root netns).
* After ofono is started (and successfully configured all the modems and
detected its net ifaces through syfs/udev), script "modem-netns-setup.py
start" which creates a netns for each modem, naming it after its usb
path ID. net ifaces for that modem are moved into its netns.
* Modem is configured to use 802-3 data format, and as a result the net
iface is configured through DHCP (DHCP req only replied AFTER pdp ctx is
activated!).
* Since osmo-gsm-tester knowns the modem USB path ID (available in
resources.conf), it can run required steps (ifup, DHCP) to configure the
interface. The interface name is provided by ofono to osmo-gsm-tester.
* As a result, any process willing to transmit data through the modem
must be in the modem netns.
Related: OS#2308
Change-Id: Icb06bdfcdd37c797be95ab5addb28da2d9f6681c
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
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
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
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
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
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
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
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
In osmo-mgw.git 31b4729f2731c747b8b33c4646dd5ade2ace29bc, osmo-bsc_mgcp
was dropped and the one from openbsc.git must be used.
Change-Id: Ib1c46baf4d36ab18f8064a2234a0ba28a1e7d2c2
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
* 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
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
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
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
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
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
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
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
Remove non completed results before calculating the min/max. We will
need to check success/failure based on completion ratio.
Change-Id: Icaf9e90dd729b2339e409b3ec1593f456969fd19
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
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
As of osmo-hlr edca4f88a653cc688bc1c46611a9f0bc880637e2, hlr.sql file
has been moved to an sql subdir.
Change-Id: I1cbbe46edc6121476cd2422074a9f3cfc2d8e5ef
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
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
This way it can easily be spotted which port is being triggered in case
someone wants to manually test it.
Change-Id: Ibd2c70170d97a786e37b6838b1ed6d4eb637ad8b
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
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
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
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
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
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
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
Add a main file to start everything. All parameters need to
be made configurable. Composition of testcase and IMSI ranges
need to be configurable as well. This is left for future
commits. Right now it can execute a single UL test.
Start with:
export PATH=../osmocom-bb/src/host/layer23/src/mobile:$PATH
export PATH=../osmocom-bb/src/host/virt_phy/src/:$PATH
export PYTHONPATH=$PWD/src
python3 -mosmo_ms_driver
Change-Id: I58c938500a067eebb213750e56d8bf4d8af43df2
This is an interim solution but is bringing all parts together.
We will need to:
* Abstract this into a base class
* Be able to mix different tests without interfering with each
other (e.g. 10k LU tests, 2k SMS sending)
* The event loop will need to handle multiple timers/timeouts
* Stats printing should print more information and test pass/fail
* The test should quit early if everything has already passed
Change-Id: Id3277ed0f0f9ee734569bedd4752564eb68c9cfd
In the long run we might not want to start the virtphy but
for now virtphy+mobile belong together. Start virtphy first
as mobile will not handle a missing socket gracefully.
Change-Id: I5c6d742842d7f3e0a1858436ef3f8634d8c0582d
Add a JSON encoder and a small module to sent registration and
other events per unix datagram socket.
json.lua fetched using:
$ wget -O src/osmo_ms_driver/lua/json.lua \
https://raw.githubusercontent.com/rxi/json.lua/master/json.lua
Change-Id: I43ae84a944c7f33e41d5de0880d4aaab3378809b
Create an EventServer that will create a unix domain socket and
dispatch incoming datagram messages. The lua remotes are not
passing credentials so this is a one way communication channel
for now. Tests can register to handle the message.
Change-Id: Ida97c570e8e741410f2dba4a231a8058ca96da25
Create a C-like single process event loop. It could be powered by
select/epoll or kqueue. It should scale to many open fds but we
will not have that many.
Change-Id: Iea06f33870cab9f21e9a1a1feb9758467343dd29
We are using the CDF to decide which percentage of the jobs should
be running at a given point. The x-axis is time and the y-axis the
percentage of how many jobs should be running.
There are three functions to do this. The first one is a constant
which would result in everything being started right now, one to
start them linearly and the last (formula from Qt/3rdparty) to first
accelerate and decelerate slowly.
Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3
It seems there's a period of time in between the nanoBTS starts
announcing itself and it can actually be managed by the BSC
(ipaccess-config in this case). If ipaccess-config is called quickly
after nanoBTS it first announced, its TCP conn will be rejected with a
TCO RST, and ipaccess-config will fail. Let's see if waiting a few
seconds is enough to have this working more reliably.
Change-Id: Iec8adb2cd13d808a6ca1843dc95b81bd1a97d1c0
Several benefits:
- We can add APIs to poll on fds in the future (for smpp socket for
instance) instead of using busy polling.
- During wait(), we now block in the glib mainloop instead of sleeping
0.1 secs and not handling events during that time.
- We remove glib mainloop specific bits from modem.py
Change-Id: I8c3bc44bbe443703077110cdc67207e9cbb43767
osmo-bsc c74a5616bf1c77ac40ddd92f4927dca7a1b45bc8 removed these cfg
options as they are dead code.
Change-Id: I2fb63d31d5d7424b48ed2cfc694d09db072db485
File powersupply.py defines the interface to be used by child classes
implementing it. It also provides helpers to allocate a child class
based on configuration provided ('type' field).
File powersupply_sispm.py is an implementation using pysispm [1], as it's
the one used to control the programmable power socket we have right now.
This kind of class will be used in later commits by Nanobts class, as we
want to poweroff the Nanobts completelly when not in use.
Using it requires the following extra dependencies:
$ apt-get install python3-usb
$ pip3 install pysispm
Related: OS#3040
[1] https://github.com/xypron/pysispm
Change-Id: I981c260eca1a61657147e6d83b4226618088223c
This base class will be used to describe the required accessors for all
BTS objects, be it an osmocom BTS or not.
It is introduced in this commit and will be further used in the future
when adding a NanoBts object.
Change-Id: Ic13133e61abda73a8b507c1a1bd7b98c677460f9
This base class will be used to describe the required accessors for all
PCU objects.
It is introduced in this commit and will be further used in the future
when adding a Dummy PCU object which will be used by NanoBts object.
Change-Id: Ia3fd4551d1f2932362f99f7d44d65f8ae4fd1979
Since commit bfd0b2310c, the IMSI is
retreived from ofono. To get the IMSI, the modme must be powered ON
previously. The imsi() method is called before calling connect() in
order to set up the IMSI in the HLR. As a result, the following
behaviour occurs:
- Powered=true (in imsi())
- SimManager.GetProperties() (several of them)
- Powered=false (power_cycle() in connect()
It seems powering off the modem immediately after using the SIM service
makes ofono crash. Proof of it is that crashes were seen mainly on tests
using only 1 MS, in which we don't spend that much time between
SimManager.GetProperties() and Powered=false for the same modem.
Let's workaround the crash for now increasing the time between using the
SIM services and powering the modem off.
Related: OS#3064
Change-Id: Ief052cac5a862d6ef9391d40c294ba017387506c
There's no need to specify the IMSI manually in resource config
and it's also prone to errors. Let's take it from ofono.
Add a 'sim' feature to allow modem to auto-discover it,
otherwise if not supported leave that feature out of the config for that
modem and an imsi can still be manually providen.
Change-Id: I20f9e8d97775293925205e4ea576d814214bf1a8
Since commit 3da1f8352e337fb032bf7a58c2909d3ba918e237, osmo-trx requires
a cfg file to start successfully.
Change-Id: I8f0e0d0a9fa849f41c3cccc4059431f62f956eac
ofono dbus paths are non-deterministic and can change over time for a
given modem. For instance when ofono is restartd or if a modem crashes
and the object is destroyed and re-announced by udev.
Requires at least ofono 1df92289d4e09a1e2db0b189b5153a4c238f98f1, which
implemented the feature to export the sysfs path to modem properties.
Related: OS#2509
Change-Id: Ibc45a196abadded2706dc9d57b6a3a796b43a201
Commit osmo-msc 098aa71e83a86200a18088927b4753909f5ed518 removes this
option from default configuration as it is really not used in osmo-msc,
it comes from osmo-nitb times.
Change-Id: I928379ebabfc776f33b9f345d92a7a4a533fe25f
Commit osmo-msc 27b40c601c41fde70446ad553629494234c07662 removes this
option from default configuration as it is really not used in osmo-msc,
it comes from osmo-nitb times.
Change-Id: Iac1948113514414e7573f3bbfb3ce82e6c49adb6
The Osmo MS driver is launching many many processes and I would
like to use the logging framework for the code as well.
Unfortunately the inspect/traceback code will use a linecache which
will execute stat(2) on one or more python files.
Related: OS#2927
Change-Id: I8f6bacadcf74d3aa25db1e1f41644f64aa19cf92
There are plenty of VTY commands that were inherited from OsmoNITB,
but which make no sense in a BSC. Upstream OsmoBSC has removed them in
change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38,
c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and
8311a81bae85618302273c3f769275893161a7d7
Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
So far the resources.conf says we're using XOR, but we wrongly map 'xor' to 1,
which is actually comp128v1 in enum osmo_auth_algo from libosmocore (which
osmo-hlr uses to interpret the numbers from the hlr.db).
This explains why our "xor" tests are succeeding even though libosmocore
doesn't support XOR at all: we were using comp128v1 all the while.
Fix the auth algo mapping:
- define correct mappings, copying enum osmo_auth_algo, in util.py
- add a function to get the enum value from name, in util.py
- use this in osmo_hlr.py
Change subscriber_add() API to take the algorithm string instead of a number.
The number is libosmocore internal and we should not expose it within our API
beyond above dict. There are no callers using this parameter yet anyway.
Adjust resources.conf to indicate COMP128v1 which we are actually using and
which means we're still using algorithm number 1 after this change.
BTW, osmo-nitb uses the ctrl interface which interprets the names, so is not
vulnerable to mapping wrong numbers and needs no fix. (If osmo-hlr featured
similar CTRL, which it doesn't yet, this code could be more robust.)
Related: OS#2758
Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8
osmo-ggsn requires a link-local IPv6 address to be added to the
tun interface, otherwise the apn will not be configured correctly and it
won't be able to allocate addresses from the ipv6 pool later on.
Some OS don't support autoconfiguring link-local IPv6 addresses when the
interface is brought up (some linux versions are known to fail at it).
This is the case for our Prod osmo-gsm-tester setup (running debian8
with kernel 3.16.51).
Make sure we configure correctly the interface by forcing osmo-ggsn to
set on the interface and use a specific IPv6 link-local address. This is
done by using the "ipv6 link-local" vty cmd in osmo-ggsn.
After this modification, we can re-enable ipv6 gprs context creation as
it will work in Prod setup.
Related: OS#2746
Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34
Commit c9817a50ff moved code from
different BTS into a shared base class, and create_pcu method was
created to be implemented by subclasses to get a new pcu object.
However, parameters where wrongly copied over from pcu() method during
refactoring. create_pcu() has no parameters.
Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4
A lot of code can be shared by all osmocom related BTS we currently use
(sysmo, octphy, trx). This commits moves all this easily shareable code
to an abstract class OsmoBts which all (osmocom) BTS use.
Some bits of code do not apply for osmo-bts-sysmo but it's still shared
by BTS running in the main unit (octphy, trx), for instance the pcu
socket handling. Those are put together in OsmoBtsMainUnit.
This way we have:
log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsOctphy
log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsTrx
log.Origin<-OsmoBts<-OsmoBtsSysmo
Also take the chance to categorize the different APIs in the new
abstract class based on their use and scope.
Some code changes while moving which were required:
- A new protected abstract API "create_pcu", which returns an object of
"pcu" interface. Subclasses implement this API returning either a
PcySysmo or a PcuOsmo object. This is needed to abstract the pcu()
getter into the base class.
- For BTS running in the main unit, pcu_sk_tmp_dir object is allocated
when first used (API pcu_socket_path()) instead of doing it in the
constructor. This is moved into OsmoBtsMainUnit
Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2
This is a temporary workaround to be able to test gprs signalling until
we set up all required bits to run osmo-ggsn in its own namespace.
Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
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
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
In 3b18044859df15ffd2ad4c3e5c3d2c94a2923eb9 this command
has been dropped and is no longer recognized.
Change-Id: I98546e36f8c809e8066fe0cc0d80d0ae3276473f
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
As of osmo-bsc ad47f7108aff5438bd2c6f7c0e898f4aa3b66fbe, this command
has been dropped and is no longer recognized.
Change-Id: Id97074195f045e6872a1a7030671a06259c9ec31
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
* 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
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
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
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
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
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
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
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
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
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
I first wanted to use "reset" method, but according to [1]:
"The recommended practice is to drop the reference to a
cancellable after cancelling it, and let it die with the outstanding
async operations. You should create a fresh cancellable for further
async operations."
Pretty weird that in other parts of documentation it still says that it
can be used for concurrent events.
[1] https://developer.gnome.org/gio/2.54/GCancellable.html#g-cancellable-reset
Change-Id: I7392275620576fd0037be5b9d9f360a46a4f8312
The previous commit wrongly placed all of 'osmotrx' below 'instance 0', put the
'osmotrx ip' ones back in the parent (I3a48cda44b932b46f34f027ca88e3703b6f04bad
-- I should have known, the change Id ends in "bad").
The correct structure is:
phy 0
osmotrx ip ...
instance 0
osmotrx rx-gain ...
osmotrx tx-attenuation ...
i.e. the 'osmotrx' command name exists on both the 'phy' parent level as well
as the 'instance' child level. (Argh, can this be more confusing? I assume we
will be seeing a continuous flow of users hitting this now.)
Change-Id: I7ef7ab3048266c1b2a4f6f33951f1305ec5f0ad6
We hit this now because libosmocore has started strictly enforcing correct
indenting of child nodes. See I24cbb3f6de111f2d31110c3c484c066f1153aac9.
Change-Id: I3a48cda44b932b46f34f027ca88e3703b6f04bad
Same code is already being used by log.Error exception.
This way we can use:
raise resource.NoResourceExn("No free arfcns in any of bands", bands=supported_bands)
And get:
osmo_gsm_tester.resource.NoResourceExn: No free arfcns in any of bands {bands=['GSM-850', 'GSM-900', 'GSM-1800', 'GSM-1900']}
Change-Id: Ic960ae8db5372b0a4640356f0b4820ed42477b46
The idea behind this attribute is similar to the Features one in ofono:
To provide an easy-to-use list of features that a modem supports.
In osmo-gsm-tester this feature list can be used to create scenarios to
act as a filter for modems. For instance, if an sms related feature must
be tested, then a modem supporting sms features is required. This way
only modems supporting that feature are going to be selected for that
test when that scenario is used.
We provide our own list instead of dynamically using it for two reasons:
- Accessing the list from ofono means powering on + online the modem,
which requires using the modem before resource resolution is done.
- ofono may state that it has support for feature X, but it still
doesn't have all features required by osmo-gsm-tester or there is a bug
in some part of the feature which prevents it from being used for a
specific test.
Change-Id: I1634049f01859ae0310174892a96e204bb670bc1
This parameter is contains a list of supported encryption ciphers by the
modem or bts setting it. It is so far not directly/automatically used
inside osmo-gsm-tester code, but can be useful to create scenarios for
tests that require specific ciphering modes.
For instance, aoip_encryption suite contains tests that require a BTS and
a modem that supports a5 0 and a5 1, otherwise tests will fail.
Change-Id: Ic0e368843a6e58bd3eeef36d2c0a7501296f0f3e
... instead of using the one from from osmo vty directly.
This way we avoid having multiple word attribute value and we can skip
using quotes in the conf files.
Change-Id: I5265cc9990dd5e99dba1f6262b3a8c597a3e958d
We want to handle lists in the same way as we handle them in combine().
Without this commit, reserve()->find() failed to match objects
containing dictionaries inside lists correctly (such as trx configs).
A few attributes are added to trx_list of some resources in
suite_test/resources.conf to show a case in which resource reservation
would fail without this patch. It failed because before this patch,
dictionaries inside lists are compared to be equal instead of being
compared element by element to see if one dictionary is a subset of the
other one (for each element in the lists).
Change-Id: I8588d5b788b9f74a9cc84b8bdcb049921788bb48