Change in osmo-gsm-tester[master]: WIP: Workaround poky SDK bug building libosmo-netif

2022-09-08 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/29290 )


Change subject: WIP: Workaround poky SDK bug building libosmo-netif
..

WIP: Workaround poky SDK bug building libosmo-netif

Change-Id: I330866badba8f30f500f74ac31e2c4e20b11d53c
---
M contrib/jenkins-build-osmo-bts-oc2g.sh
M contrib/jenkins-build-osmo-bts-sysmo.sh
M contrib/jenkins-build-osmo-pcu-oc2g.sh
M contrib/jenkins-build-osmo-pcu-sysmo.sh
4 files changed, 28 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/90/29290/1

diff --git a/contrib/jenkins-build-osmo-bts-oc2g.sh 
b/contrib/jenkins-build-osmo-bts-oc2g.sh
index 6d660ef..74ebf44 100755
--- a/contrib/jenkins-build-osmo-bts-oc2g.sh
+++ b/contrib/jenkins-build-osmo-bts-oc2g.sh
@@ -12,6 +12,13 @@
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
 export DESTDIR="$_poky_path/sysroots/cortexa15hf-neon-poky-linux-gnueabi"

+# Workaround to oe-core meta/site/* CONFIG_SITE files passed to autoconf 
forcing
+# unavailability of netinet/sctp.h.
+# Patch fixing issue upstream: https://patchwork.openembedded.org/patch/168892/
+# Merged: poky.git b11fc7795cd1a6d74c9bb50b922d928f4a17722d
+# See meta-telephony.git 7acf2bff4e279b7d974373b952bad8e400c3bff2
+export ac_cv_header_netinet_sctp_h=yes
+
 base="$PWD"
 name="osmo-bts-oc2g"
 prefix="/usr/local/jenkins-build/inst-$name"
diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh 
b/contrib/jenkins-build-osmo-bts-sysmo.sh
index 67681c3..472e73d 100755
--- a/contrib/jenkins-build-osmo-bts-sysmo.sh
+++ b/contrib/jenkins-build-osmo-bts-sysmo.sh
@@ -12,6 +12,13 @@
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
 export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"

+# Workaround to oe-core meta/site/* CONFIG_SITE files passed to autoconf 
forcing
+# unavailability of netinet/sctp.h.
+# Patch fixing issue upstream: https://patchwork.openembedded.org/patch/168892/
+# Merged: poky.git b11fc7795cd1a6d74c9bb50b922d928f4a17722d
+# See meta-telephony.git 7acf2bff4e279b7d974373b952bad8e400c3bff2
+export ac_cv_header_netinet_sctp_h=yes
+
 base="$PWD"
 name="osmo-bts-sysmo"
 prefix="/usr/local/jenkins-build/inst-$name"
diff --git a/contrib/jenkins-build-osmo-pcu-oc2g.sh 
b/contrib/jenkins-build-osmo-pcu-oc2g.sh
index 5e85c6e..60f42f7 100755
--- a/contrib/jenkins-build-osmo-pcu-oc2g.sh
+++ b/contrib/jenkins-build-osmo-pcu-oc2g.sh
@@ -12,6 +12,13 @@
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
 export DESTDIR="$_poky_path/sysroots/cortexa15hf-neon-poky-linux-gnueabi"

+# Workaround to oe-core meta/site/* CONFIG_SITE files passed to autoconf 
forcing
+# unavailability of netinet/sctp.h.
+# Patch fixing issue upstream: https://patchwork.openembedded.org/patch/168892/
+# Merged: poky.git b11fc7795cd1a6d74c9bb50b922d928f4a17722d
+# See meta-telephony.git 7acf2bff4e279b7d974373b952bad8e400c3bff2
+export ac_cv_header_netinet_sctp_h=yes
+
 base="$PWD"
 name="osmo-pcu-oc2g"
 prefix="/usr/local/jenkins-build/inst-$name"
diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh 
b/contrib/jenkins-build-osmo-pcu-sysmo.sh
index 86d53da..e55fd3d 100755
--- a/contrib/jenkins-build-osmo-pcu-sysmo.sh
+++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh
@@ -12,6 +12,13 @@
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
 export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"

+# Workaround to oe-core meta/site/* CONFIG_SITE files passed to autoconf 
forcing
+# unavailability of netinet/sctp.h.
+# Patch fixing issue upstream: https://patchwork.openembedded.org/patch/168892/
+# Merged: poky.git b11fc7795cd1a6d74c9bb50b922d928f4a17722d
+# See meta-telephony.git 7acf2bff4e279b7d974373b952bad8e400c3bff2
+export ac_cv_header_netinet_sctp_h=yes
+
 base="$PWD"
 name="osmo-pcu-sysmo"
 prefix="/usr/local/jenkins-build/inst-$name"

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/29290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I330866badba8f30f500f74ac31e2c4e20b11d53c
Gerrit-Change-Number: 29290
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-gsm-tester[master]: WIP: Introduce ZMQ GnuRadio stream broker

2020-10-09 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/20521 )


Change subject: WIP: Introduce ZMQ GnuRadio stream broker
..

WIP: Introduce ZMQ GnuRadio stream broker

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
---
M src/osmo_gsm_tester/obj/enb.py
M src/osmo_gsm_tester/obj/enb_amarisoft.py
M src/osmo_gsm_tester/obj/enb_srs.py
M src/osmo_gsm_tester/obj/ms_srs.py
M src/osmo_gsm_tester/obj/rfemu.py
A src/osmo_gsm_tester/obj/rfemu_gnuradio_zmq.py
M sysmocom/scenarios/mod-enb-cells-2ca.conf
A utils/bin/osmo-gsm-tester_zmq_broker.py
8 files changed, 516 insertions(+), 31 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/21/20521/1

diff --git a/src/osmo_gsm_tester/obj/enb.py b/src/osmo_gsm_tester/obj/enb.py
index ab50de8..7e3b145 100644
--- a/src/osmo_gsm_tester/obj/enb.py
+++ b/src/osmo_gsm_tester/obj/enb.py
@@ -21,6 +21,7 @@
 from ..core import log, config
 from ..core import schema
 from . import run_node
+from .rfemu_gnuradio_zmq import GrBroker

 def on_register_schemas():
 resource_schema = {
@@ -84,7 +85,53 @@
 self._num_prb = 0
 self._num_cells = None
 self._epc = None
-self._zmq_base_bind_port = None
+self.gen_conf = None
+self.gr_broker = None
+
+def using_grbroker(self, cfg_values):
+# whether we are to use Grbroker in between ENB and UE.
+# Initial checks:
+if cfg_values['enb'].get('rf_dev_type') != 'zmq':
+return False
+cell_list = cfg_values['enb']['cell_list']
+use_match = False
+notuse_match = False
+for cell in cell_list:
+if cell.get('dl_rfemu', False) and cell['dl_rfemu'].get('type', 
None) == 'gnuradio_zmq':
+use_match = True
+else:
+notuse_match = True
+if use_match and notuse_match:
+raise log.Error('Some Cells are configured to use gnuradio_zmq and 
some are not, unsupported')
+return use_match
+
+def calc_required_zmq_ports(self, cfg_values):
+cell_list = cfg_values['enb']['cell_list']
+return len(cell_list) * self.num_ports() # *2 if MIMO
+
+def calc_required_zmq_ports_joined_earfcn(self, cfg_values):
+#gr_broker will join the earfcns, so we need to count uniqe earfcns:
+cell_list = cfg_values['enb']['cell_list']
+earfcn_li = []
+[earfcn_li.append(int(cell['dl_earfcn'])) for cell in cell_list if 
int(cell['dl_earfcn']) not in earfcn_li]
+return len(earfcn_li) * self.num_ports() # *2 if MIMO
+
+
+def assign_enb_zmq_ports(self, cfg_values, port_name, base_port):
+port_offset = 0
+cell_list = cfg_values['enb']['cell_list']
+for cell in cell_list:
+cell[port_name] = base_port + port_offset
+port_offset += 

Change in osmo-gsm-tester[master]: WIP

2020-06-04 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18661 )


Change subject: WIP
..

WIP

Change-Id: Iff1a4dafcbf2193e95b1fb6e5a6712f1bcdd6309
---
A selftest/template_test/mytemplatedir/mytemplate.cfg.tmpl
A selftest/template_test/mytemplatedir/osmo-bsc.cfg.tmpl
D selftest/template_test/osmo-nitb.cfg.tmpl
M selftest/template_test/template_test.ok
M selftest/template_test/template_test.py
M src/osmo_gsm_tester/core/template.py
6 files changed, 214 insertions(+), 85 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/61/18661/1

diff --git a/selftest/template_test/mytemplatedir/mytemplate.cfg.tmpl 
b/selftest/template_test/mytemplatedir/mytemplate.cfg.tmpl
new file mode 100644
index 000..efafbca
--- /dev/null
+++ b/selftest/template_test/mytemplatedir/mytemplate.cfg.tmpl
@@ -0,0 +1 @@
+test-overlay-works-fine-only-available ${one.two.works}
diff --git a/selftest/template_test/mytemplatedir/osmo-bsc.cfg.tmpl 
b/selftest/template_test/mytemplatedir/osmo-bsc.cfg.tmpl
new file mode 100644
index 000..5c9400b
--- /dev/null
+++ b/selftest/template_test/mytemplatedir/osmo-bsc.cfg.tmpl
@@ -0,0 +1 @@
+test-overlay-works-fine ${foo.bar.works}
diff --git a/selftest/template_test/osmo-nitb.cfg.tmpl 
b/selftest/template_test/osmo-nitb.cfg.tmpl
deleted file mode 100644
index c0a5c46..000
--- a/selftest/template_test/osmo-nitb.cfg.tmpl
+++ /dev/null
@@ -1,82 +0,0 @@
-!
-! OpenBSC configuration saved from vty
-!
-password foo
-!
-log stderr
- logging filter all 1
- logging color 0
- logging print category 0
- logging print extended-timestamp 1
- logging level set-all debug
-!
-line vty
- no login
- bind ${vty_bind_ip}
-!
-e1_input
- e1_line 0 driver ipa
- ipa bind ${abis_bind_ip}
-network
- network country code ${mcc}
- mobile network code ${mnc}
- short name ${net_name_short}
- long name ${net_name_long}
- auth policy ${net_auth_policy}
- location updating reject cause 13
- encryption ${encryption}
- neci 1
- rrlp mode none
- mm info 1
- handover 0
- handover window rxlev averaging 10
- handover window rxqual averaging 1
- handover window rxlev neighbor averaging 10
- handover power budget interval 6
- handover power budget hysteresis 3
- handover maximum distance 
-smpp
- local-tcp-ip ${nitb.ip_address.addr} 2775
- system-id test-nitb
- policy ${smsc.policy}
- %for esme in esme_list:
-  esme ${esme.system_id}
- % if esme.password == '':
-   no password
- % else:
-   password ${esme.password}
- % endif
-   default-route
- %endfor
-ctrl
- bind ${ctrl_bind_ip}
-%for bts in bts_list:
- bts ${loop.index}
-  type ${bts.type}
-  band ${bts.band}
-  cell_identity ${bts.cell_identity}
-  location_area_code ${bts.location_area_code}
-  training_sequence_code 7
-  base_station_id_code ${bts.base_station_id_code}
-  ms max power 15
-  cell reselection hysteresis 4
-  rxlev access min 0
-  channel allocator ascending
-  rach tx integer 9
-  rach max transmission 7
-  ip.access unit_id ${bts.unit_id} 0
-  oml ip.access stream_id ${bts.stream_id} line 0
-  gprs mode none
-% for trx in bts.trx_list:
-  trx ${loop.index}
-   rf_locked 0
-   arfcn ${trx.arfcn}
-   nominal power 23
-   max_power_red ${trx.max_power_red}
-   rsl e1 tei 0
-%  for ts in trx.timeslot_list:
-   timeslot ${loop.index}
-phys_chan_config ${ts.phys_chan_config}
-%  endfor
-% endfor
-%endfor
diff --git a/selftest/template_test/template_test.ok 
b/selftest/template_test/template_test.ok
index 88b77b0..718ef6e 100644
--- a/selftest/template_test/template_test.ok
+++ b/selftest/template_test/template_test.ok
@@ -191,3 +191,201 @@
 - Testing: expect to fail on invalid templates dir
 sucess: setting non-existing templates dir raised RuntimeError

+- Testing: template directory overlay (still can find default one?)
+cnf Templates: DBG: rendering osmo-nitb.cfg.tmpl
+! Configuration rendered by osmo-gsm-tester
+password foo
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging print extended-timestamp 1
+ logging level set-all debug
+!
+line vty
+ no login
+ bind val_ip_address
+!
+e1_input
+ e1_line 0 driver ipa
+ ipa bind val_ip_address
+network
+ network country code val_mcc
+ mobile network code val_mnc
+ short name val_short_name
+ long name val_long_name
+ auth policy val_auth_policy
+ location updating reject cause 13
+ encryption val_encryption
+ neci 1
+ rrlp mode none
+ mm info 1
+ handover 0
+ handover window rxlev averaging 10
+ handover window rxqual averaging 1
+ handover window rxlev neighbor averaging 10
+ handover power budget interval 6
+ handover power budget hysteresis 3
+ handover maximum distance 
+ bts 0
+  type val_type_bts0
+  band val_band_bts0
+  cell_identity val_bts.cell_identity_bts0
+  location_area_code val_bts.location_area_code_bts0
+  training_sequence_code 7
+  base_station_id_code val_bts.base_station_id_code_bts0
+  ms max power 33

Change in osmo-gsm-tester[master]: WIP: Move all obj/ references in suite.py to testenv.py

2020-05-05 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18042 )


Change subject: WIP: Move all obj/ references in suite.py to testenv.py
..

WIP: Move all obj/ references in suite.py to testenv.py

Change-Id: If4ab39be7a97d33e82c5a34e2a10dfec38613a4e
---
M selftest/suite_test/test_suite/hello_world.py
M selftest/suite_test/test_suite/test_error.py
M selftest/suite_test/test_suite/test_fail.py
M src/osmo_gsm_tester/core/test.py
M src/osmo_gsm_tester/suite.py
M src/osmo_gsm_tester/testenv.py
M src/osmo_gsm_tester/trial.py
7 files changed, 315 insertions(+), 270 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/42/18042/1

diff --git a/selftest/suite_test/test_suite/hello_world.py 
b/selftest/suite_test/test_suite/hello_world.py
index 073d07f..a69f95a 100644
--- a/selftest/suite_test/test_suite/hello_world.py
+++ b/selftest/suite_test/test_suite/hello_world.py
@@ -1,5 +1,5 @@
 from osmo_gsm_tester.testenv import *

 print('hello world')
-print('I am %r / %r' % (suite.name(), test.name()))
+print('I am %r / %r' % (suite.suite().name(), test.name()))
 print('one\ntwo\nthree')
diff --git a/selftest/suite_test/test_suite/test_error.py 
b/selftest/suite_test/test_suite/test_error.py
index c0583ff..70d14a1 100755
--- a/selftest/suite_test/test_suite/test_error.py
+++ b/selftest/suite_test/test_suite/test_error.py
@@ -1,5 +1,5 @@
 from osmo_gsm_tester.testenv import *

-print('I am %r / %r' % (suite.name(), test.name()))
+print('I am %r / %r' % (suite.suite().name(), test.name()))

 assert False
diff --git a/selftest/suite_test/test_suite/test_fail.py 
b/selftest/suite_test/test_suite/test_fail.py
index cbaeded..ffb7218 100755
--- a/selftest/suite_test/test_suite/test_fail.py
+++ b/selftest/suite_test/test_suite/test_fail.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 from osmo_gsm_tester.testenv import *

-print('I am %r / %r' % (suite.name(), test.name()))
+print('I am %r / %r' % (suite.suite().name(), test.name()))

 test.set_fail('EpicFail', 'This failure is expected')
diff --git a/src/osmo_gsm_tester/core/test.py b/src/osmo_gsm_tester/core/test.py
index 93dbf6a..76c9ce9 100644
--- a/src/osmo_gsm_tester/core/test.py
+++ b/src/osmo_gsm_tester/core/test.py
@@ -21,9 +21,13 @@
 import sys
 import time
 import traceback
-from .. import testenv

-from . import log, util, resource
+from . import log
+from . import  util
+from . import resource
+from .event_loop import MainLoop
+
+from .. import testenv

 class Test(log.Origin):
 UNKNOWN = 'UNKNOWN' # matches junit 'error'
@@ -51,12 +55,13 @@
 return self._run_dir

 def run(self):
+testenv_obj = None
 try:
 self.log_target = 
log.FileLogTarget(self.get_run_dir().new_child('log')).set_all_levels(log.L_DBG).style_change(trace=True)
 log.large_separator(self.suite_run.trial.name(), 
self.suite_run.name(), self.name(), sublevel=3)
 self.status = Test.UNKNOWN
 self.start_timestamp = time.time()
-testenv.setup(self.suite_run, self)
+testenv_obj = testenv.setup(self.suite_run, self)
 with self.redirect_stdout():
 util.run_python_file('%s.%s' % 
(self.suite_run.definition.name(), self.basename),
  self.path)
@@ -83,6 +88,8 @@
 self.err('TEST RUN ABORTED: %s' % type(e).__name__)
 raise
 finally:
+if testenv_obj:
+testenv_obj.stop()
 if self.log_target:
 self.log_target.remove()

diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index 6952fd2..3416ff5 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -21,18 +21,12 @@
 import sys
 import time
 import pprint
-from .core import config, log, util, process, schema, resource
+from .core import config
+from .core import log
+from .core import util
+from .core import schema
+from .core import resource
 from .core import test
-from .core.event_loop import MainLoop
-from .obj import nitb_osmo, hlr_osmo, mgcpgw_osmo, mgw_osmo, msc_osmo, 
bsc_osmo, stp_osmo, ggsn_osmo, sgsn_osmo, esme, osmocon, ms_driver, iperf3
-from .obj import run_node
-from .obj import epc
-from .obj import enb
-from .obj import bts
-from .obj import ms
-
-class Timeout(Exception):
-pass

 class SuiteDefinition(log.Origin):
 '''A test suite reserves resources for a number of tests.
@@ -74,12 +68,9 @@
 self.start_timestamp = None
 self.duration = None
 self.reserved_resources = None
-self.objects_to_clean_up = None
-self.test_import_modules_to_clean_up = []
 self._resource_requirements = None
 self._resource_modifiers = None
 self._config = None
-self._processes = []
 self._run_dir = None
 self.trial = trial
 self.definition = 

Change in osmo-gsm-tester[master]: WIP

2020-04-20 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17901 )


Change subject: WIP
..

WIP

Change-Id: I0dff4af7e3a89804a03842ad4a4d697bca3a9773
---
A sysmocom/suites/4g/handover.py
1 file changed, 29 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/01/17901/1

diff --git a/sysmocom/suites/4g/handover.py b/sysmocom/suites/4g/handover.py
new file mode 100755
index 000..3a49321
--- /dev/null
+++ b/sysmocom/suites/4g/handover.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+from osmo_gsm_tester.testenv import *
+
+epc = suite.epc()
+enb = suite.enb()
+ue = suite.modem()
+
+epc.subscriber_add(ue)
+epc.start()
+enb.ue_add(ue)
+enb.start(epc)
+
+print('waiting for ENB to connect to EPC...')
+wait(epc.enb_is_connected, enb)
+print('ENB is connected to EPC')
+
+ue.connect(enb)
+print('waiting for UE to attach...')
+wait(ue.is_connected, None)
+print('UE is attached')
+
+sleep(2)
+
+rfemu = enb.get_rfemu()
+for att in range(1, 10, 1):
+print("Setting cell attenuation %d..." % att)
+rfemu.set_attenuation(att)
+sleep(1)
+print("Done")

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17901
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I0dff4af7e3a89804a03842ad4a4d697bca3a9773
Gerrit-Change-Number: 17901
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-gsm-tester[master]: WIP: ttcn3: Add test to reproduce high channel load

2020-02-10 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17116 )


Change subject: WIP: ttcn3: Add test to reproduce high channel load
..

WIP: ttcn3: Add test to reproduce high channel load

Change-Id: I42d6bd0f8b3ce63e15cc186e53e04dad6f1bc5c2
---
A ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py
M ttcn3/suites/ttcn3_bts_tests/lib/testlib.py
2 files changed, 52 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/16/17116/1

diff --git a/ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py 
b/ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py
new file mode 100755
index 000..6ec4767
--- /dev/null
+++ b/ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+import os
+
+from osmo_gsm_tester.testenv import *
+import testlib
+suite.test_import_modules_register_for_cleanup(testlib)
+from testlib import run_ttcn3
+
+ttcn3_test_execute="BTS_Tests_perf.TC_pespin"
+ttcn3_test_extra_module_params="BTS_Tests_perf.mp_wait_time := 11.0"
+
+hlr_dummy = suite.hlr()
+mgw_dummy = suite.mgw()
+stp_dummy = suite.stp()
+msc_dummy = suite.msc(hlr_dummy, mgw_dummy, stp_dummy)
+ggsn_dummy = suite.ggsn()
+sgsn_dummy = suite.sgsn(hlr_dummy, ggsn_dummy)
+bsc = suite.bsc(msc_dummy, mgw_dummy, stp_dummy)
+bts = suite.bts()
+osmocon = suite.osmocon()
+
+bts.set_num_trx(1)
+bts.set_trx_phy_channel(0, 0, 'CCCH+SDCCH4')
+bts.set_trx_phy_channel(0, 1, 'TCH/H')
+bts.set_trx_phy_channel(0, 2, 'TCH/H')
+bts.set_trx_phy_channel(0, 3, 'TCH/H')
+bts.set_trx_phy_channel(0, 4, 'TCH/H')
+bts.set_trx_phy_channel(0, 5, 'TCH/H')
+bts.set_trx_phy_channel(0, 6, 'TCH/H')
+bts.set_trx_phy_channel(0, 7, 'TCH/H')
+
+print('Starting CNI')
+hlr_dummy.start()
+stp_dummy.start()
+msc_dummy.start()
+mgw_dummy.start()
+
+nat_rsl_ip = suite.ip_address().get('addr')
+bsc.set_rsl_ip(nat_rsl_ip)
+bsc.bts_add(bts)
+sgsn_dummy.bts_add(bts)
+
+bsc.start()
+bts.start(keepalive=True)
+
+print('Starting osmocon')
+osmocon.start()
+
+testdir = os.path.dirname(os.path.realpath(__file__))
+run_ttcn3(suite, test, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute, 
ttcn3_test_extra_module_params)
diff --git a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py 
b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py
index 7e7e874..288450f 100644
--- a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py
+++ b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py
@@ -26,11 +26,11 @@
 f.write(r)


-print('Starting TTCN3 tests')
+print('Starting TTCN3 test suite')
 proc = process.Process('ttcn3', script_run_dir, docker_cmd)
 try:
 proc.launch()
-print('Starting TTCN3 launched, waiting until it finishes')
+print('TTCN3 test suite launched, waiting until it finishes')
 proc.wait(timeout=3600)
 except Exception as e:
 proc.terminate()

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17116
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I42d6bd0f8b3ce63e15cc186e53e04dad6f1bc5c2
Gerrit-Change-Number: 17116
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in osmo-gsm-tester[master]: WIP

2019-11-29 Thread pespin
pespin has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 )

Change subject: WIP
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I15da34c9467e46ae92adbce5f671b344bea5ee5a
Gerrit-Change-Number: 16173
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: fixeria 
Gerrit-MessageType: abandon


Change in osmo-gsm-tester[master]: WIP

2019-11-22 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 )


Change subject: WIP
..

WIP

Change-Id: I15da34c9467e46ae92adbce5f671b344bea5ee5a
---
M example/resources.conf.prod
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/process.py
M src/osmo_gsm_tester/resource.py
4 files changed, 71 insertions(+), 26 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/73/16173/1

diff --git a/example/resources.conf.prod b/example/resources.conf.prod
index 0bf9f45..826ed4f 100644
--- a/example/resources.conf.prod
+++ b/example/resources.conf.prod
@@ -62,6 +62,22 @@
 trx_ip: 10.42.42.117
 clock_reference: external
 dev_args: "LimeSDR-USB,serial=00090706024F0A22"
+channels:
+  - rx_path: "LNAW"
+
+- label: LimeNET-Micro
+  type: osmo-bts-trx
+  ipa_unit_id: 15
+  addr: 10.42.42.53
+  band: GSM-1800
+  ciphers: [a5_0, a5_1]
+  osmo_trx:
+type: lms
+launch_trx: true
+remote_user: pi
+trx_ip: 10.42.42.123
+clock_reference: external
+dev_args: "LimeNET-Micro,serial=005839AF25B352"

 - label: sysmoCell 5000
   type: osmo-bts-trx
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index 554a236..0578259 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -295,35 +295,55 @@
 os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC)
 return wrapper_script

+def inst_compatible_for_remote(self):
+proc = process.run_remote_sync(self.run_dir, self.remote_user, 
self.listen_ip, 'uname-m', ('uname', '-m'))
+if "x86_64" in (proc.get_stdout() or ''):
+return True
+return False
+
+def start_remotely(self, keepalive):
+# Run remotely through ssh. We need to run osmo-trx under a wrapper
+# script since osmo-trx ignores SIGHUP and will keep running after
+# we close local ssh session. The wrapper script catches SIGHUP and
+# sends SIGINT to it.
+remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR)
+remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX)
+
+have_inst = self.inst_compatible_for_remote()
+if have_inst:
+self.inst = 
util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx')))
+
+# if self.inst is None, we still want to copy config file, create 
remote run dir, etc.
+self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, 
remote_run_dir, self.remote_user,
+ self.listen_ip, 
self.binary_name(), self.config_file)
+
+wrapper_script = self.generate_wrapper_script()
+remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT)
+process.scp(self.run_dir, self.remote_user, self.listen_ip, 
'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script)
+
+if have_inst:
+remote_lib = self.remote_inst.child('lib')
+remote_binary = self.remote_inst.child('bin', self.binary_name())
+args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, 
remote_binary, '-C', remote_config_file)
+else: # Use whatever is available i nremote system PATH:
+args = (remote_wrapper_script, self.binary_name(), '-C', 
remote_config_file)
+
+self.proc_trx = self.launch_process_remote(self.binary_name(), args, 
remote_cwd=remote_run_dir, keepalive=keepalive)
+
 ##
 # PUBLIC (test API included)
 ##
 def start(self, keepalive=False):
 self.configure()
+if self.remote_user:
+self.start_remotely(keepalive)
+return
+# Run locally if ssh user is not set
 self.inst = 
util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx')))
-if not self.remote_user:
-# Run locally if ssh user is not set
-lib = self.inst.child('lib')
-self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) }
-self.proc_trx = self.launch_process_local(keepalive, 
self.binary_name(),
-'-C', 
os.path.abspath(self.config_file))
-else:
-# Run remotely through ssh. We need to run osmo-trx under a wrapper
-# script since osmo-trx ignores SIGHUP and will keep running after
-# we close local ssh session. The wrapper script catches SIGHUP and
-# sends SIGINT to it.
-wrapper_script = self.generate_wrapper_script()
-remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR)
-self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, 
remote_run_dir, self.remote_user,
-self.listen_ip, 
self.binary_name(), self.config_file)
-remote_wrapper_script = 

Change in osmo-gsm-tester[master]: WIP: HACK to integrate suite_run in osmo_ms_driver

2018-11-09 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/11517 )

Change subject: WIP: HACK to integrate suite_run in osmo_ms_driver
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/11517
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic84a549f2fbe5fc0700f501a5e08dbaa9f5cbb78
Gerrit-Change-Number: 11517
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-gsm-tester[master]: WIP: HACK to integrate suite_run in osmo_ms_driver

2018-10-30 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11517


Change subject: WIP: HACK to integrate suite_run in osmo_ms_driver
..

WIP: HACK to integrate suite_run in osmo_ms_driver

Template system still need to be ported to osmo-gsm-tester one, and Loop
needs to be moved to EventLoop.

Change-Id: Ic84a549f2fbe5fc0700f501a5e08dbaa9f5cbb78
---
M src/osmo_ms_driver/__main__.py
1 file changed, 30 insertions(+), 21 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/17/11517/1

diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
index 1573084..8fcd154 100644
--- a/src/osmo_ms_driver/__main__.py
+++ b/src/osmo_ms_driver/__main__.py
@@ -50,6 +50,8 @@
 parser.add_argument('-m', '--number-ms', dest="num_ms",
 default=10, type=int,
 help="Number of MobileStations to simulate")
+parser.add_argument('trial_package',
+help='Directory containing binaries to test')
 return parser

 def main():
@@ -61,35 +63,42 @@
 # We don't care what is happening to child processes we spawn!
 signal.signal(signal.SIGCHLD, signal.SIG_IGN)

-loop = SimpleLoop()
+with trial.Trial(args.trial_package) as current_trial:
+current_trial.verify()
+suite_scenario_str, suite_def, scenarios = 
suite.load_suite_scenario_str("nitb_netreg_mass")
+current_trial.add_suite_run(suite_scenario_str, suite_def, scenarios)
+#current_trial.run_suites(test_names)
+suite_run = current_trial.suites[0]

-tmp_dir = tempfile.mkdtemp(suffix="osmo-ms-driver")
-log.log("Going to store files in ", tmp_dir=tmp_dir)
+loop = SimpleLoop()

-# How long should starting all apps take
-time_start=datetime.timedelta(seconds=args.launch_duration)
-# In which steps to start processes
-time_step=datetime.timedelta(milliseconds=args.launch_interval)
+tmp_dir = tempfile.mkdtemp(suffix="osmo-ms-driver")
+log.log("Going to store files in ", tmp_dir=tmp_dir)

-# Event server path
-event_server_path = os.path.join(tmp_dir,  "osmo_ms_driver.unix")
+# How long should starting all apps take
+time_start=datetime.timedelta(seconds=args.launch_duration)
+# In which steps to start processes
+time_step=datetime.timedelta(milliseconds=args.launch_interval)

-# The function that decides when to start something
-cdf = cdfs[args.cdf_name](time_start, time_step)
+# Event server path
+event_server_path = os.path.join(tmp_dir,  "osmo_ms_driver.unix")

-# Event server to handle MS->test events
-ev_server = EventServer("ev_server", event_server_path)
-ev_server.listen(loop)
+# The function that decides when to start something
+cdf = cdfs[args.cdf_name](time_start, time_step)

-# Just a single test for now.
-test = MassUpdateLocationTest("lu_test", args.num_ms, cdf, ev_server, 
tmp_dir)
-atexit.register(test.stop_all)
+# Event server to handle MS->test events
+ev_server = EventServer("ev_server", event_server_path)
+ev_server.listen(loop)

-# Run until everything has been launched
-test.run_test(loop, timedelta(seconds=args.test_duration))
+# Just a single test for now.
+test = MassUpdateLocationTest(suite_run, "lu_test", args.num_ms, cdf, 
ev_server, tmp_dir)
+atexit.register(test.stop_all)

-# Print stats
-test.print_stats()
+# Run until everything has been launched
+test.run_test(loop, timedelta(seconds=args.test_duration))
+
+# Print stats
+test.print_stats()

 if __name__ == '__main__':
 main()

-- 
To view, visit https://gerrit.osmocom.org/11517
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic84a549f2fbe5fc0700f501a5e08dbaa9f5cbb78
Gerrit-Change-Number: 11517
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: WIP: gprs

2018-10-25 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11462


Change subject: WIP: gprs
..

WIP: gprs

Change-Id: Icb06bdfcdd37c797be95ab5addb28da2d9f6681c
---
A example/scenarios/modem-ec20.conf
M src/osmo_gsm_tester/modem.py
M src/osmo_gsm_tester/process.py
M src/osmo_gsm_tester/suite.py
M suites/gprs/ping.py
A utils/osmo-gsm-tester_netns_exec.sh
6 files changed, 47 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/62/11462/1

diff --git a/example/scenarios/modem-ec20.conf 
b/example/scenarios/modem-ec20.conf
new file mode 100644
index 000..c6dc8f9
--- /dev/null
+++ b/example/scenarios/modem-ec20.conf
@@ -0,0 +1,3 @@
+resources:
+  modem:
+  - label: ec20
diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py
index d0bbf23..f7acd8c 100644
--- a/src/osmo_gsm_tester/modem.py
+++ b/src/osmo_gsm_tester/modem.py
@@ -17,13 +17,14 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see .

-from . import log, util, sms
+from . import log, util, sms, process
 from .event_loop import MainLoop

 from pydbus import SystemBus, Variant
 import time
 import pprint
 import sys
+import os

 # Required for Gio.Cancellable.
 # See 
https://lazka.github.io/pgi-docs/Gio-2.0/classes/Cancellable.html#Gio.Cancellable
@@ -326,15 +327,17 @@
 CTX_PROT_IPv6 = 'ipv6'
 CTX_PROT_IPv46 = 'dual'

-def __init__(self, conf):
+def __init__(self, suite_run, conf):
+self.suite_run = suite_run
 self.conf = conf
 self.syspath = conf.get('path')
 self.dbuspath = get_dbuspath_from_syspath(self.syspath)
 super().__init__(log.C_TST, self.dbuspath)
-self.dbg('creating from syspath %s', self.syspath)
+self.dbg('creating from syspath %s' % self.syspath)
 self.msisdn = None
 self._ki = None
 self._imsi = None
+self.run_dir = 
util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name().strip('/')))
 self.sms_received_list = []
 self.dbus = ModemDbusInteraction(self.dbuspath)
 self.register_attempts = 0
@@ -361,6 +364,9 @@
 self.dbus.cleanup()
 self.dbus = None

+def netns(self):
+return os.path.basename(self.syspath.rstrip('/'))
+
 def properties(self, *args, **kwargs):
 '''Return a dict of properties on this modem. For the actual arguments,
 see ModemDbusInteraction.properties(), which this function calls.  The
@@ -630,6 +636,23 @@
 connmgr.RemoveContext(ctx_id)
 self.log('context deactivated', path=ctx_id)

+def run_netns_wait(self, name, popen_args):
+proc = process.NetNSProcess(name, self.run_dir.new_dir(name), 
self.netns(), popen_args,
+   env={})
+process.run_proc_sync(proc)
+
+def setup_context_data_plane(self, ctx_id):
+self.dbg('setup_context_data', path=ctx_id)
+ctx = systembus_get(ctx_id)
+ctx_settings = ctx.GetProperties().get('Settings', None)
+if not ctx_settings:
+raise log.Error('%s no Settings found! No way to get iface!' % 
ctx_id)
+iface = ctx_settings.get('Interface', None)
+if not iface:
+raise log.Error('%s Settings contains no iface! %r' % (ctx_id, 
repr(ctx_settings)))
+self.run_netns_wait('ifup', ('ip', 'link', 'set', 'dev', iface, 'up'))
+self.run_netns_wait('dhcp', ('udhcpc', '-q', '-i', iface))
+
 def sms_send(self, to_msisdn_or_modem, *tokens):
 if isinstance(to_msisdn_or_modem, Modem):
 to_msisdn = to_msisdn_or_modem.msisdn
diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py
index fb5c6f6..3764409 100644
--- a/src/osmo_gsm_tester/process.py
+++ b/src/osmo_gsm_tester/process.py
@@ -274,4 +274,12 @@
 scp(run_dir, remote_user, remote_addr, 'scp-cfg-to-remote', cfg_file_name, 
remote_config_file)
 return remote_inst

+class NetNSProcess(Process):
+NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh'
+def __init__(self, name, run_dir, netns, popen_args, **popen_kwargs):
+super().__init__(name, run_dir, popen_args, **popen_kwargs)
+self.netns = netns
+
+self.popen_args = ['sudo', self.NETNS_EXEC_BIN, self.netns] + 
list(popen_args)
+self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs)
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py
index 3a49574..bf8156d 100644
--- a/src/osmo_gsm_tester/suite.py
+++ b/src/osmo_gsm_tester/suite.py
@@ -323,7 +323,7 @@
 def modem(self, specifics=None):
 conf = self.reserved_resources.get(resource.R_MODEM, 
specifics=specifics)
 self.dbg('create Modem object', conf=conf)
-ms = modem.Modem(conf)
+ms 

Change in osmo-gsm-tester[master]: WIP: osmo-bts-trx: Enable support for several TRX

2018-09-17 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/11000


Change subject: WIP: osmo-bts-trx: Enable support for several TRX
..

WIP: osmo-bts-trx: Enable support for several TRX

Change-Id: If2bda5ec7ac9fa3fe6bc5d71f323c3ccc2a70158
---
M example/defaults.conf
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
M src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
4 files changed, 15 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/00/11000/1

diff --git a/example/defaults.conf b/example/defaults.conf
index fc4c324..42258a6 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -48,7 +48,7 @@
 - phys_chan_config: PDCH
   - nominal_power: 23
 max_power_red: 0
-arfcn: 870
+arfcn: 872
 timeslot_list:
 - phys_chan_config: TCH/F
 - phys_chan_config: TCH/F
@@ -76,6 +76,9 @@
 - phys_chan_config: TCH/F # nanobts only supports PDCH in TRX0.
 - phys_chan_config: TCH/F

+osmo_bts_trx:
+  max_trx: 2
+
 osmo_trx:
   type: uhd
   launch_trx: true
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index 1c7349f..f446dc3 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -77,7 +77,7 @@
 'osmo_trx': {
 'bts_ip': self.remote_addr(),
 'trx_ip': self.trx_remote_ip(),
-'channels': [{}] # TODO: implement channels 
for multiTRX
+'channels': [{} for trx_i in 
range(self.num_trx())]
 }
 }
 })
@@ -134,7 +134,8 @@

 self.proc_bts = self.launch_process(keepalive, OsmoBtsTrx.BIN_BTS_TRX, 
'-r', '1',
 '-c', os.path.abspath(self.config_file),
-'-i', self.bsc.addr())
+'-i', self.bsc.addr(),
+'-t', self.num_trx())
 self.suite_run.poll()

 class OsmoTrx(log.Origin, metaclass=ABCMeta):
diff --git a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
index 5dba323..677b047 100644
--- a/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bts-trx.cfg.tmpl
@@ -23,9 +23,11 @@
 phy 0
  osmotrx ip local ${osmo_bts_trx.osmo_trx.bts_ip}
  osmotrx ip remote ${osmo_bts_trx.osmo_trx.trx_ip}
- instance 0
+%for chan in osmo_bts_trx.osmo_trx.channels:
+ instance ${loop.index}
   osmotrx rx-gain 25
   osmotrx tx-attenuation oml
+%endfor
 bts 0
  band ${osmo_bts_trx.band}
  ipa unit-id ${osmo_bts_trx.ipa_unit_id} 0
@@ -44,5 +46,7 @@
  gsmtap-sapi ptcch
  gsmtap-sapi cbch
  gsmtap-sapi sacch
- trx 0
-  phy 0 instance 0
+%for chan in osmo_bts_trx.osmo_trx.channels:
+ trx ${loop.index}
+  phy 0 instance ${loop.index}
+%endfor
diff --git a/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
index 2f6e830..fa87ed6 100644
--- a/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-trx.cfg.tmpl
@@ -19,6 +19,7 @@
  remote-ip ${osmo_trx.bts_ip}
  base-port 5700
  egprs disable
+ multi-arfcn enable
  tx-sps 4
  rx-sps 4
  clock-ref ${osmo_trx.clock_reference}

--
To view, visit https://gerrit.osmocom.org/11000
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If2bda5ec7ac9fa3fe6bc5d71f323c3ccc2a70158
Gerrit-Change-Number: 11000
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol