The blocking CTRL socket must have a timeout.
So far we have always been reading from the CTRL socket in a blocking
way. So far we are always lucky that we are indeed getting a response to
receive. Should the CTRL interface ever fail to answer, the tester would
be stuck infinitely.
Change-Id: I20091daf13981dc3d0d894af5a65c23f4db0471d
Jenkins does support showing ANSI colors on the web, but apparently not
in the junit results output. Strip ansi colors from report fragment
<system-out> text, to make it less annoying to read those on jenkins.
Change-Id: I656ecc23bbfd3f25bdf012c890e0c998168844d3
Allow enriching the junit output with arbitrary subtasks within a test.
The current aim is, for handover tests, to not just show that a test
failed, but to show exactly which steps worked and which didn't, e.g.:
handover.py/01_bts0_started PASSED
handover.py/02.1_ms0_attach PASSED
handover.py/02.2_ms1_attach PASSED
handover.py/02.3_subscribed_in_msc PASSED
handover.py/03_call_established PASSED
handover.py/04.1_bts1_started FAILED
In this case it is immediately obvious from looking at the jenkins
results analyzer that bts1 is the cause of the test failure, and it is
visible which parts of the test are flaky, over time.
First user Will be the upcoming handover_2G suite, in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8.
Change-Id: I4ca9100b6f8db24d1f7e0a09b3b7ba88b8ae3b59
Retrieve a test's own logging. The aim is to provide logging belonging
to a given report fragment in the junit XML output, will be used by
upcoming test.report_fragment() feature.
Change-Id: Idfa0a45f3e6a18dd4fe692e81d732c70b5cffb76
In a test, I called print() on a multi-line string and saw the log
showing each line 0.2 seconds apart. redirect.stdout seems to be pretty
inefficient.
Instead, put a print() function into the testenv, to directly call log()
on the strings passed to print().
The initial idea for redirect_stdout was that we could print() in any
deeper functions called from a test script. But we have no such nested
print() anywhere, only in test scripts themselves.
As a result of this, a multi-line print() in test scripts now no longer
puts the log prefix (timestamp, test name...) and suffix (backtrace /
source position) to each single line, but prints the multiline block
between a single log prefix and suffix -- exactly like the log()
function does everywhere else.
I actually briefly implemented adding the log prefix to each separate
line everywhere, but decided that it is not a good idea: in some places
we log config file snippets and other lists, and prepending the log
prefix to each line makes pasting such a snippet from (say) a jenkins
log super cumbersome. And the log prefix (backtrace) attached on each
separate line makes multiline blocks very noisy, unreadable.
Change-Id: I0972c66b9165bd7f2b0b387e0335172849199193
test.Test() overrides name() in order to provide source line number
information. However, overriding name() is the wrong place for that, as
name() is also often used for identifying an object - when listing the
tests of a suite, the line number should not appear in the test name.
For example, the line number sometimes ends up in the test results in
jenkins, making 'foo.py' and 'foo.py:23' two distinct report items.
Instead, add a separate function Origin.src() that defaults to name(),
but specific classes can override src() if they wish to provide more
detailed information with the object name.
Override src() in Test, not name().
Use src() in backtraces.
The suite_test.ok shows that the backtracing in the log remains
unchanged, but the place where the test name is printed is corrected:
I am 'test_suite' / 'hello_world.py:23'
becomes
I am 'test_suite' / 'hello_world.py'
(Notice that "[LINENR]" in suite_test.ok is a masking of an actual
number, done within the selftest suite)
Change-Id: I0c4698fa2b3db3de777d8b6dcdcee84e433c62b7
Allow showing log lines matching specific regexes, from a specific start
point of a log.
My use case is to echo the handover related logging after an expected
handover failed, so that the reason is visible already in the console
output of a jenkins run. So far I would need to open the endless bsc log
and look up the matching place in it to get a conclusion about why a
handover failed.
Change-Id: Ib6569f7486e9d961bd79a5f24232e58d053667a1
Remove ARFCNs as a concept from resource pool, assign a fixed ARFCN to
each BTS and TRX in the resource pools.
Using ARFCNs on specific bands as resources was an idea that is hard to
implement, because specific BTS dictate selection of bands which
influences which ARFCNs can be picked. That means reserving ARFCN
resources is only possible after reserving specific BTS resources, but
the tester is currently not capable of such two-stage resolution.
Writing handover tests, I got the problem that both BTS in a scenario
attempt to use the same ARFCN.
The by far easiest solution is to assign one fixed ARFCN to each BTS and
TRX. If ever needed, a scenario modifier can still configure different
ARFCNs.
(Due to uncertainty about OC2G operation stability, I prefer to leave
OC2G on ARFCN 50, as it happened to end up being configured before this
patch.)
Change-Id: I0a6c60544226f4261f9106013478d6a27fc39f38
On non-debug log level, show something like this at the beginning of
each suite:
03:45:49.439720 tst handover:sysmo+secondbts-trx-b200: RESERVED RESOURCES for handover:
bts
sysmoBTS 1002
Ettus B200
ip_address
10.42.42.2
10.42.42.3
10.42.42.4
10.42.42.5
10.42.42.6
10.42.42.7
modem
sierra_1st
sierra_2nd
Change-Id: Ic23556eafee654c93d13c5ef405028da09bd51d7
In the end of a test suite, do not omit the passed tests. For example,
running handover against N BTS combinations, it was hard to summarize
which BTS models actually succeeded, with only the failures listed.
Besides the "FAIL" listings, now print something like this in the end:
PASS: handover:sysmo+secondbts-trx-b200 (pass: 1)
pass: handover.py (198.8 sec)
PASS: handover:sysmo+secondbts-trx-umtrx (pass: 1)
pass: handover.py (192.7 sec)
PASS: handover:trx-b200+secondbts-trx-umtrx (pass: 1)
pass: handover.py (193.1 sec)
Change-Id: Ib85a5b90e267c2ed2f844691187ecadc8939b1bb
resources.conf is already allowed to set these, but in order to let
scenarios and suites modify these values, they need to be in the schema.
Change-Id: I8e0583e9208d563c66b0bdc9f25b1b74f92403c2
Will be used in upcoming handover_2G test suite in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8, which needs to verify that a
handover actually ended up on the expected lchan.
Change-Id: I03df8f3ae2ee47930eee311c7ce104c36dbb3154
The BSC's VTY port will be used to trigger manual handover, and to
retrieve a list of active lchans from the BSC, in the upcoming
handover_2G test suite, I0b2671304165a1aaae2b386af46fbd8b098e3bd8.
Change-Id: I06652db04fc9e48748f3c2196334f5352e9cc48a
To trigger manual handovers, I need a VTY interface. The non-trivial
parts of this are copied from osmo-python-tests osmo_interact_vty.py.
Will be used in the upcoming handover_2G test suite in
I0b2671304165a1aaae2b386af46fbd8b098e3bd8.
Change-Id: I7c17b143b7c690b8c4105ee7c6272670046fa91d
remote_port defines a custom/additional port for
connections over ssh. It may be used in case several
ssh instances share one IP address.
Change-Id: I2c93fd2ea1c10c333d00eafd3c1066c35796e398
this patch fixes some regressions in the Amarisoft UE class,
the config template, etc. that have been undetected bc we never
executed tests with it.
Change-Id: I397e675a4018acf3372a3b7e29fd864703b2b919
* add new UE feature
* enable in srsue.conf.templ
* add new table for maximum rates
* add config scenario to enable SIB option for QAM64
Change-Id: I6ac2c9989a761e91b93d76c2507f55f0140b202d
Due to the integration of DL-QAM256 another table for DL max rates is needed.
Therefore, I added the parameter 'qam256' to the feature list in the resource.cfg.
The patch also enables the correct UE settings in the config file.
Change-Id: I2d34395449cdcfb31db66ea887d9adbee551e757
Before this patch, almost everything was in place to support concurrent
osmo-gsm-tester instances sharing a common state dir. However, during
resource reservation, if the reservation couldn't be done due to too
many resources being in use, osmo-gsm-tester would fail and skip the
test suite.
With this patch, OGT will wait until some reserved resources are
released and then try requesting the reservation again.
Change-Id: I938602ee890712fda82fd3f812d8edb1bcd05e08
make sure to insert cell specific TAC, PCI and root seq ind
into cell config and do not depend on cell index for a particular
enb. This causes issues in multi-eNB setups.
Change-Id: I6642128a449a0562dd23f7fa393ff48ae2503006
ENB was using its own address as a remote address when the broker is
used, which actually only holds true for the first ENB (since the broker
is currently run on the same host/address of the first ENB).
Change-Id: I5c83075d140632846c6d357152963754d16b4633
The remotely run script is moved into a new subdir called "external",
where external utils to be used by osmo-gsm-tester (exernal to its own
process) are placed.
It needs to be in another directory because python files in obj/ are
loaded at startup of osmo-gsm-tester to dynamically load schemas.
Change-Id: I633a85294694f2c6efd58535729e9b8af166b3ff
It may happen that the non-emergency call MT leg is still not properly
released when the emergency call MT leg is to be assigned a TCH, meaning
BSC will fail with an Assignment Failure upon Assignment request from
MSC.
The test sometimes passed and sometimes didn't, due to above mentioned
race condition. Let's relax a bit the test expectancies to have it
always passing, while still verifying preemption happens, and MT phone
is reached.
Related: OS#4549
Change-Id: I3697227cac56a1327f9ea08c5c2f52568e8d2a8a
First step towards support everal ENBs and installing the remote script
at runtime:
* The gnuradio broker class is moved to its own file, to decouple it
from RFemu.
* The ENBs are registered earlier in the test so that the GrBroker knows
when to start (delay start + setup until all ENBs have been configured).
* Handle ENBs internally as a list.
Change-Id: I4f1095bbc7ed0a816fe47caef44f7becadd9d737
this patch adds the basic notion of FDD and TDD duplexing modes
to the eNB object. So far we've always assume FDD.
Since only Amarisoft eNB supports TDD, the required config
template changes, etc. are only applied there.
The patch also adds a scenario to enable the default TDD config.
Change-Id: I37216b5bfdf527d221913283b6c41d3c8fd6b500
Don't wait until adding it to the subscriber data base, since the msisdn
may be needed beforehand (for instance in follow up patch to be passed
to osmo-msc configuration to route emergency calls).
Change-Id: I0d6902687e4beb3d6cdcefd4e343f21496100504
srsENB currently creates 1 zmq stream (1 tx, 1 rx) for each cell (2 if
MIMO is enabled). Each cell transceives on a given EARFCN (and several
cells can transmit on same EARFCN).
However, for handover test purposes, we want to join all cells operating
on the same EARFCN to transceive on the same ZMQ conn, so that an srsUE
can interact with them at the same time (same as if the medium was shared).
Furthermore, we want to set different gains on each of those paths
before merging them in order to emulate RF conditions like handover.
In order to do so, a new element called the Broker is introduced, which
is placed in between ENBs and UEs ZMQ conenctions, multiplexing the
connections on the ENB side towards the UE side.
A separate process for the broker is run remotely (ENB run host) which
listens on a ctrl socket for commands. An internal Broker class is used
in osmo-gsm-tester to interact with the remote script, for instance to
configure the ports, start and stop the remote process, send commands to
it, etc.
On each ENB, when the rfemu "gnuradio_zmq" rfemu implementation is selected
in configuration, it will configure its zmq connections and the UE ones to
go over the Broker.
As a result, that means the UE zmq port configuration is expected to be
different than when no broker is in used, since there's the multiplexing
per EARFCN in between.
In this commit, only 1 ENB is supported, but multi-enb support is
planned in the future.
The handover test passes in the docker setup with this config:
"""
OSMO_GSM_TESTER_OPTS="-T -l dbg -s 4g:srsue-rftype@zmq+srsenb-rftype@zmq+" \
"mod-enb-nprb@6+mod-enb-ncells@2+mod-enb-cells-2ca+suite-4g@10,2+" \
"mod-enb-meas-enable -t =handover.py"
"""
and in resources.conf (or scenario), added:
"""
enb:
...
cell_list:
- dl_rfemu:
type: gnuradio_zmq
- dl_rfemu:
type: gnuradio_zmq
"""
Note that since the broker is used, there's not need for mod-srsue-ncarriers@2
since the broker is joining the 2 enb cells into 1 stream on the UE side.
Change-Id: I6282cda400558dcb356276786d91e6388524c5b1
The getter method was named the same as the itnernal field, and hence
when used it would fail since the intenral field would be sleect and
fail to be called.
Change-Id: I2f631eb6256eb0e065f41d5b7531395c4a054cd8
Otherwise osmo-trx with a B200 seems to be having issues receiving some
data from the MS otherwise, making "sms" test fail. In general LU works
fine, and when MS sends the SMS, CM Service Request+Accept also works
fine, but then the BTS never sees the CP-DATA afterwards probably due to
MS power loop.
Change-Id: I5f7e3d22a142521ab83db81635ded252dabcf111
the logic for the RF emulator on the command line is, like the
Amarisoft equivalent, to set a negative gain value to express
attenuation. Therefore, the sign needs to be inverted.
Change-Id: I7b6ac611a9f711bbdc1570602bfd797a5346ab86
So far we only support setting cell IDs from same ENB. Support for
handover to other ENB will come later, probably by adding some API to be
called during the test to add own's CellID's to other ENB's config.t
Change-Id: I1780bda130cde0faab15d4032117e0aa2b9c5dbe
pass-through the option so they can be used in templates
just concatenate with rf_dev_args for srsLTE eNB/UE, arguments
parsing will handle them
Change-Id: I3818026c159780f29968888f547163cdf730afad
the get_num_phy_errors() uses the external KPI analyzer module
to calculate the number of PHY layers errors in a vector of log metrics
Change-Id: I0c8de87e7f83f986e288585640ce56847959c497
seperate the root sequence index for each cell a bit more to
avoid detection of a single PRACH in both cells
Change-Id: I5aea1a27939c880944779c282e902465ab513715
this avoids the eNB from releasing the UE too early if the UL channel
stays very bad for a longer time but many PUSCH are scheduled
Change-Id: Ib82616e920eecc70fbded12433e54bd90ae1bcd4
this is the default TAC used in the EPC. A recent EPC patch
will reject the S1 setup request if the TACs don't match
Change-Id: I94fdb96631ce3ae35a1b2a9f90d1101df9161233
we've added the modifier to configure Amarisoft eNB channel
model. This patch enables it for srsENB.
Change-Id: I30e65d0431b2d2792986128287caf8b23a22b2c1
Power ramping features were implemented recently for osmo-bts-trx. We
don't want to enable them because it makes phones take longer (if even
at all) to find the network.
Change-Id: I35e2f560b28eddef886ad3b2f8ffb4ff79be77da
this avoids a false negative detection when the UE attach takes a bit
longer and the first seconds all zeros are reported in the CSV
the HO test, for example, would fail in such a case as it expects
no zero TP over the course of the experiment.
Change-Id: I96dab17bb19249504dedda6659aed5eac0a65a26
this gives higher UL throughput because less resources are reserved for
SR/CQI. For more users we may have to make the value configurable again.
Change-Id: If6c313a1deafffda26e9effeb807ca71064c46bc
the WS is closed if the eNB process dies. this patch will log an
event but not stop the experiment.
Change-Id: I0fafc7e38954400540375d51813e96500700f50c
report generation failed when duration was not set correctly
and None was returned. Use 0 as duration by default.
Change-Id: Ia654c67bf2dcce432f84e869550c516d8d5a07a0
we use the otherwise unused QCI 8 as a slightly modified
version of QCI 7 (default RLC UM) with a PDCP discard
timer set to infinity to avoid dropping PDCP SDUs if
packets arive faster than can be processed in the DL
Change-Id: I06b7b583701f90827fba36564f969b5d58c9b9ad
we've noticed that the Iperf client times out too soon in
some experiment. It seems that this happens with ZMQ if
the RAT is too slow (slower than realtime) and the eNB buffers
too much data. This causes iperf to still receive DL data
for example long after the configured runtime.
Change-Id: I9b823ab22812c96920d54fb7342c8d4c578d5270
same as for srsEPC this is also required for Amarisoft MME and eNB to support, i.e. 001/01
Note that the 3 digit MNC isn't covered by this.
Change-Id: I80a84e01ec9530c285634452d7c18c17bdd595ce
Since a while ago, we avoid by default using the --logfile param to log
the json output to a different file, in order to stay compatible with
older versions of iperf3.
However, the local logfile was still being created, and was not
overwritten with the remote file with content because there's none
created remotely (due to reasons explained above).
Change-Id: I218ec28dc65febc7bd083d6d15854319bf4f3daf
srsEPC expect zero-padding MNC/MCC in config file. However,
001 and mcc will end up as 1 in the rendered template.
Therefore, they need to be formatted correctly.
Change-Id: Ie63cd1b15b961e493a6dcbd7e5a4fbabe0bb6f33
when phy.signal=1 is set in the log_options, the eNB will dump
a binary file that needs to be copied back as well
Change-Id: I63d13cb74572ac065d5a3fcfb1632552d0a6dbc6
this avoids issues when the channel emulation stops in the middle
of a high attenuation values and the device is left in this state.
Change-Id: I9aeafc68bf81b8932aac4cb28040b9aea6bfcbdb
This object allows to run the "stress" cmdline program in the background
on the specifies run_node, to simulate system load.
To run stress, a test can simply do:
stress = tenv.stress(epc.run_node())
stress.start(cpu_workers=2, mem_workers=1, io_workers=1)
And the test environment will remember to stop it when the test finishes.
Change-Id: I21023e6c64c48109f294291bfe3d8d8f4e1de038
this method uses the kpi_analyzer module for analyzing
stdout, CSV metrics and the logfile (if present).
if the module can't be loaded, no KPI will be added.
Change-Id: I28226a375f9ac4e08424c488062ae6a74a19af92
New patchelf 0.11 release is out and it has fixes hitting us in both 0.9
and 0.10 on different binaries. So let's simply requiring having
patchelf 0.11 in all cases and be done with it (actually, if not running
4G binaries, using 0.9 is enough).
Related: OS#4389
Change-Id: I2701e46e7710db4c923a68e6b3a2f3c7b126f356
every call to verify_metrics would copy back metrics again. see log here:
23:29:22.149299 run srsue(pid=31521): Terminating (SIGINT)
23:29:22.368263 run srsue(pid=31521): Terminated: ok {rc=0}
23:29:28.401035 run scp-back-metrics(pid=32265): Launched
23:29:29.423083 run scp-back-metrics(pid=32265): Terminated: ok {rc=0}
23:29:29.490275 run scp-back-metrics(pid=32271): Launched
23:29:30.513852 run scp-back-metrics(pid=32271): Terminated: ok {rc=0}
23:29:30.550862 run scp-back-metrics(pid=32277): Launched
23:29:31.573962 run scp-back-metrics(pid=32277): Terminated: ok {rc=0}
this patch only copies back metrics only once. also make sure that, similar
to logs, metrics are always copied back at the end of the run even if they
are not used for metrics checking. this is needed to run the plotting
script.
Change-Id: Ie7c156a5b2c8768bf90ff8e86515976e0d454c25