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/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHello Pau Espin Pedrol, Jenkins Builder,
I'd like you to do a code review. Please visit
https://gerrit.osmocom.org/13124
to review the following change.
Change subject: Revert "nitb_netreg_mass: Add code to declare a run successful/failure"
......................................................................
Revert "nitb_netreg_mass: Add code to declare a run successful/failure"
This reverts commit b4ad8d72431df2336b9c7fbc6eb9597daa80a35c.
Reason for revert: There was a true dependency on earlier changes (len(mobiles)). Rollback until the resource configuration is merged.
Change-Id: If0f5e24cec2f0d1d144b464180b341cacbdf0ebb
---
M src/osmo_gsm_tester/ms_driver.py
M src/osmo_ms_driver/location_update_test.py
M suites/nitb_netreg_mass/register_default_mass.py
3 files changed, 7 insertions(+), 71 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/24/13124/1
diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py
index de2f967..e8e543c 100644
--- a/src/osmo_gsm_tester/ms_driver.py
+++ b/src/osmo_gsm_tester/ms_driver.py
@@ -146,18 +146,6 @@
"""
self._test_case.print_stats()
- def get_stats(self):
- """
- Returns a statistical summary of the test.
- """
- return self._test_case.get_stats()
-
- def get_result_values(self):
- """
- Returns the raw result values of the test run in any order.
- """
- return self._test_case.get_result_values()
-
def cleanup(self):
"""
Cleans up the driver (e.g. AF_UNIX files).
diff --git a/src/osmo_ms_driver/location_update_test.py b/src/osmo_ms_driver/location_update_test.py
index f14bd28..8500607 100644
--- a/src/osmo_ms_driver/location_update_test.py
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -23,11 +23,9 @@
from datetime import timedelta
-import collections
import time
class LUResult(Results):
- """Representation of a Location Updating Result."""
def __init__(self, name):
super().__init__(name)
@@ -46,10 +44,6 @@
def lu_delay(self):
return self.lu_time() - self.start_time()
-
-LUStats = collections.namedtuple("LUStats", ["num_attempted", "num_completed",
- "min_latency", "max_latency"])
-
class MassUpdateLocationTest(log.Origin):
"""
A test to launch a configurable amount of MS and make them
@@ -213,24 +207,9 @@
max_value = result.lu_delay()
return min_value, max_value
- def get_result_values(self):
- """
- Returns the raw result values of the test run in any order.
- """
- return self._results.values()
-
- def get_stats(self):
- """
- Returns a statistical summary of the test.
- """
- attempted = self._number_of_ms
- completed = attempted - self._outstanding
- min_latency, max_latency = self.find_min_max(filter(lambda x: x.has_lu_time(), self._results.values()))
- return LUStats(attempted, completed, min_latency, max_latency)
-
def print_stats(self):
- stats = self.get_stats()
- all_completed = stats.num_attempted == stats.num_completed
+ all_completed = self.all_completed()
+ min_value, max_value = self.find_min_max(filter(lambda x: x.has_lu_time(), self._results.values()))
self.log("Tests done", all_completed=all_completed,
- min=stats.min_latency, max=stats.max_latency)
+ min=min_value, max=max_value)
diff --git a/suites/nitb_netreg_mass/register_default_mass.py b/suites/nitb_netreg_mass/register_default_mass.py
index 8259359..ede2b74 100644
--- a/suites/nitb_netreg_mass/register_default_mass.py
+++ b/suites/nitb_netreg_mass/register_default_mass.py
@@ -1,17 +1,16 @@
#!/usr/bin/env python3
"""
-Runs a network registration with a 'massive' amount of MS
+Run a network registration with a 'massive' amount of MS
using the ms_driver infrastructure.
"""
from osmo_gsm_tester.testenv import *
-from datetime import timedelta
-print('Claiming resources for the test')
+print('use resources...')
nitb = suite.nitb()
bts = suite.bts()
ms_driver = suite.ms_driver()
-print('Launching a simple network')
+print('start nitb and bts...')
nitb.bts_add(bts)
nitb.start()
bts.start()
@@ -24,35 +23,5 @@
# Run the base test.
ms_driver.run_test()
-# Print the stats of the run.
+# Print stats
ms_driver.print_stats()
-
-# Evaluate if this run was successful or not. Our initial acceptance criteria
-# is quite basic but it should allow us to scale to a larger number of MS and
-# reasons (e.g. have a full BCCH).
-#
-# 99% of LUs should complete
-# 99% of successful LUs should complete within 10s.
-stats = ms_driver.get_stats()
-if len(mobiles) > 0 and stats.num_completed < 1:
- raise Exception("No run completed.")
-completion_ratio = stats.num_attempted / stats.num_completed
-
-# Verify that 99% of LUs completed.
-if completion_ratio < 0.99:
- raise Exception("Completion ratio of %f%% lower than threshold." % (completion_ratio * 100.0))
-
-# Check how many results are below our threshold.
-acceptable_delay = timedelta(seconds=20)
-results = ms_driver.get_result_values()
-quick_enough = 0
-for result in results:
- if not result.has_lu_time():
- continue
- if timedelta(seconds=result.lu_delay()) >= acceptable_delay:
- continue
- quick_enough = quick_enough + 1
-
-latency_ratio = quick_enough / len(results)
-if latency_ratio < 0.99:
- raise Exception("Latency ratio of %f%% lower than threshold." % (latency_ratio * 100.0))
--
To view, visit https://gerrit.osmocom.org/13124
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: If0f5e24cec2f0d1d144b464180b341cacbdf0ebb
Gerrit-Change-Number: 13124
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190305/83e95ae9/attachment.htm>