This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18471 ) Change subject: ms_srs: wait 6s after stopping srsUE ...................................................................... ms_srs: wait 6s after stopping srsUE we've only waited when running with ZMQ but in fact we need to always wait because the UE may need some time to gracefully exit, i.e. send the detach request and shut down correctly. this is checked in cleanup() and verity_metrics(), so also before copying back the CSV metrics. But we only wait once. Change-Id: I47e46b8ccce41c9a62d2d6866260d22c927e710d --- M src/osmo_gsm_tester/obj/ms_srs.py 1 file changed, 20 insertions(+), 15 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified srs_andre: Verified diff --git a/src/osmo_gsm_tester/obj/ms_srs.py b/src/osmo_gsm_tester/obj/ms_srs.py index a8e86d3..389ed6b 100644 --- a/src/osmo_gsm_tester/obj/ms_srs.py +++ b/src/osmo_gsm_tester/obj/ms_srs.py @@ -96,6 +96,7 @@ self.remote_log_file = None self.remote_pcap_file = None self.remote_metrics_file = None + self.stop_sleep_time = 6 # We require at most 5s to stop self.enable_pcap = False self.num_carriers = 1 self.testenv = testenv @@ -109,12 +110,10 @@ return if self.setup_runs_locally(): return - # When using zmq, srsUE is known to hang for a few seconds before - # exiting (3 seconds after alarm() watchdog kicks in). We hence need to - # wait to make sure the remote process terminated and the file was - # flushed, since cleanup() triggered means only the local ssh client was killed. - if self._conf and self._conf.get('rf_dev_type', '') == 'zmq': - MainLoop.sleep(self, 3) + + # Make sure we give the UE time to tear down + self.sleep_after_stop() + # copy back files (may not exist, for instance if there was an early error of process): try: self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) @@ -132,8 +131,15 @@ def netns(self): return "srsue1" + def sleep_after_stop(self): + # Only sleep once + if self.stop_sleep_time > 0: + MainLoop.sleep(self, self.stop_sleep_time) + self.stop_sleep_time = 0 + def stop(self): self.testenv.stop_process(self.process) + self.sleep_after_stop() def connect(self, enb): self.log('Starting srsue') @@ -341,15 +347,14 @@ # file is not properly flushed until the process has stopped. if self.running(): self.stop() - # metrics file is not flushed immediatelly by the OS during process - # tear down, we need to wait some extra time: - MainLoop.sleep(self, 2) - if not self.setup_runs_locally(): - try: - self.rem_host.scpfrom('scp-back-metrics', self.remote_metrics_file, self.metrics_file) - except Exception as e: - self.err('Failed copying back metrics file from remote host') - raise e + + if not self.setup_runs_locally(): + try: + self.rem_host.scpfrom('scp-back-metrics', self.remote_metrics_file, self.metrics_file) + except Exception as e: + self.err('Failed copying back metrics file from remote host') + raise e + metrics = srsUEMetrics(self.metrics_file) return metrics.verify(value, operation, metric, criterion, window) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18471 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: I47e46b8ccce41c9a62d2d6866260d22c927e710d Gerrit-Change-Number: 18471 Gerrit-PatchSet: 5 Gerrit-Owner: srs_andre <andre at softwareradiosystems.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-Reviewer: srs_andre <andre at softwareradiosystems.com> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200526/932dd523/attachment.htm>