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
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
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
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
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
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
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
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
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
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
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