pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21258 )
Change subject: ms_amarisoft: fix various regressions ...................................................................... ms_amarisoft: fix various regressions 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 --- M src/osmo_gsm_tester/obj/ms.py M src/osmo_gsm_tester/obj/ms_amarisoft.py M src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl M sysmocom/defaults.conf A sysmocom/scenarios/cfg-ms-count@.conf 5 files changed, 28 insertions(+), 10 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/obj/ms.py b/src/osmo_gsm_tester/obj/ms.py index 70ce558..7257769 100644 --- a/src/osmo_gsm_tester/obj/ms.py +++ b/src/osmo_gsm_tester/obj/ms.py @@ -36,6 +36,11 @@ } schema.register_resource_schema('modem', resource_schema) + config_schema = { + 'count': schema.UINT + } + schema.register_config_schema('modem', config_schema) + class MS(log.Origin, metaclass=ABCMeta): """Base for everything about mobile/modem and SIMs.""" @@ -125,3 +130,6 @@ def get_counter(self, counter_name): raise log.Error('get_counter() not implemented!') + + def features(self): + return self._conf.get('features', []) diff --git a/src/osmo_gsm_tester/obj/ms_amarisoft.py b/src/osmo_gsm_tester/obj/ms_amarisoft.py index fa16d63..9b6d64a 100644 --- a/src/osmo_gsm_tester/obj/ms_amarisoft.py +++ b/src/osmo_gsm_tester/obj/ms_amarisoft.py @@ -98,6 +98,7 @@ self.remote_config_rf_file = None self.remote_log_file = None self.remote_ifup_file = None + self.num_carriers = 1 if not rf_type_valid(conf.get('rf_dev_type', None)): raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) if conf.get('rf_dev_type') == 'zmq': @@ -247,13 +248,17 @@ # We need to set some specific variables programatically here to match IP addresses: if self._conf.get('rf_dev_type') == 'zmq': base_srate = num_prb2base_srate(self.enb.num_prb()) - enb_base_port = self.enb.zmq_base_bind_port() - rf_dev_args = 'tx_port0=tcp://' + self.addr() + ':' + str(self._zmq_base_bind_port + 0) \ - + ',tx_port1=tcp://' + self.addr() + ':' + str(self._zmq_base_bind_port + 1) \ - + ',rx_port0=tcp://' + self.enb.addr() + ':' + str(enb_base_port + 0) \ - + ',rx_port1=tcp://' + self.enb.addr() + ':' + str(enb_base_port + 1) \ - + ',tx_freq=2510e6,rx_freq=2630e6,tx_freq2=2530e6,rx_freq2=2650e6' \ - + ',id=ue,base_srate='+ str(base_srate) + rf_dev_args = self.enb.get_zmq_rf_dev_args_for_ue(self) + + # Single carrier + if self.enb.num_ports() == 1: + # SISO + rf_dev_args += ',rx_freq0=2630e6,tx_freq0=2510e6' + elif self.enb.num_ports() == 2: + # MIMO + rf_dev_args += ',rx_freq0=2630e6,rx_freq1=2630e6,tx_freq0=2510e6,tx_freq1=2510e6' + + rf_dev_args += ',id=ue,base_srate='+ str(base_srate) config.overlay(values, dict(ue=dict(sample_rate = base_srate / (1000*1000), rf_dev_args = rf_dev_args))) @@ -285,6 +290,7 @@ # different cfg namespace 'trx'. Copy needed values over there: config.overlay(values, dict(trx=dict(rf_dev_type=values['ue'].get('rf_dev_type', None), rf_dev_args=values['ue'].get('rf_dev_args', None), + rf_dev_sync=values['ue'].get('rf_dev_sync', None), rx_gain=values['ue'].get('rx_gain', None), tx_gain=values['ue'].get('tx_gain', None), ))) @@ -331,7 +337,7 @@ proc.launch_sync() return proc - def verify_metric(self, value, operation='avg', metric='dl_brate', criterion='gt'): + def verify_metric(self, value, operation='avg', metric='dl_brate', criterion='gt', window=None): return 'metrics not yet implemented with Amarisoft UE' # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl b/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl index d6ba32d..6f38491 100644 --- a/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl +++ b/src/osmo_gsm_tester/templates/amarisoft_lteue.cfg.tmpl @@ -48,7 +48,7 @@ ue_category: 4, /* USIM data */ - sim_algo: "${sub.auth_algo}", /* USIM authentication algorithm: xor, milenage or tuak */ + sim_algo: "${ue.auth_algo}", /* USIM authentication algorithm: xor, milenage or tuak */ imsi: "${ue.imsi}", K: "${ue.ki}", % if ue.opc is not None: @@ -65,7 +65,7 @@ event: "power_on", start_time: 1, }], - ue_count: 1, + ue_count: ${ue.count}, } ], diff --git a/sysmocom/defaults.conf b/sysmocom/defaults.conf index a9015f7..7704857 100644 --- a/sysmocom/defaults.conf +++ b/sysmocom/defaults.conf @@ -180,6 +180,7 @@ amarisoftue: tx_gain: 89 rx_gain: 60 + rf_dev_sync: none iperf3cli: time: 60 diff --git a/sysmocom/scenarios/cfg-ms-count@.conf b/sysmocom/scenarios/cfg-ms-count@.conf new file mode 100644 index 0000000..7ddc305 --- /dev/null +++ b/sysmocom/scenarios/cfg-ms-count@.conf @@ -0,0 +1,3 @@ +config: + modem: + count: ${param1} \ No newline at end of file -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21258 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: I397e675a4018acf3372a3b7e29fd864703b2b919 Gerrit-Change-Number: 21258 Gerrit-PatchSet: 3 Gerrit-Owner: srs_andre <an...@softwareradiosystems.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged