Change in osmo-gsm-tester[master]: virtual: Unify the lua script into a single one

2019-04-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13804 )

Change subject: virtual: Unify the lua script into a single one
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
Gerrit-Change-Number: 13804
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 15:40:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: virtual: Have a single result class that can store data

2019-04-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13805 )

Change subject: virtual: Have a single result class that can store data
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie99351bee1515de8cf6870467f08256a53701907
Gerrit-Change-Number: 13805
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 15:43:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: Add script to bisect test failures with ttcn3 and docker

2019-04-28 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13790 )

Change subject: Add script to bisect test failures with ttcn3 and docker
..

Add script to bisect test failures with ttcn3 and docker

With this script you can now use docker ttcn3 test results to bisect a
regression and find the offending commit.

Use like this from the osmo-* git repository:
$ git bisect start  
$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh 
 
e.g.:
$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc 
BSC_Tests.TC_ho_in_fail_no_detect

Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
---
A osmo-bisect.sh
1 file changed, 53 insertions(+), 0 deletions(-)

Approvals:
  Daniel Willmann: Verified
  lynxis lazus: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/osmo-bisect.sh b/osmo-bisect.sh
new file mode 100755
index 000..5ca69cd
--- /dev/null
+++ b/osmo-bisect.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Script to bisect an osmo-* project with the docker ttcn3 images
+# You need the git checkout of the project you wand to test as well as a
+# checkout of the docker-playground repository.
+
+# Use like this from the osmo-* project repository where the regression
+# occurs:
+# $ git bisect start  
+# $ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh 
 
+# e.g.:
+# $ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc 
BSC_Tests.TC_ho_in_fail_no_detect
+
+
+DOCKER_PLAYGROUND=$(dirname "$0")
+COMP_UPPER=$(echo "$1" | tr '[:lower:]' '[:upper:]')
+COMP_LOWER=$(echo "$1" | tr '[:upper:]' '[:lower:]')
+TESTCASE=$2
+
+COMMIT=$(git log -1 --format=format:%H)
+
+case $COMP_LOWER in
+   "hnbgw")
+   BRANCH="OSMO_IUH_BRANCH"
+   SUITE="ttcn3-hnbgw-test"
+   ;;
+   "bsc"|\
+   "bts"|\
+   "ggsn"|\
+   "hlr"|\
+   "mgw"|\
+   "msc"|\
+   "nitb"|\
+   "pcu"|\
+   "sgsn"|\
+   "sip"|\
+   "stp")
+   BRANCH="OSMO_${COMP_UPPER}_BRANCH"
+   SUITE="ttcn3-${COMP_LOWER}-test"
+   ;;
+   *)
+   echo "Unknown repo, please fix the script!"
+   exit 125
+   ;;
+esac
+
+export "$BRANCH=$COMMIT"
+
+cd "$DOCKER_PLAYGROUND/$SUITE" || exit 125
+
+echo "Testing for $COMMIT"
+./jenkins.sh | grep -- "== $TESTCASE pass =="
+exit $?

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
Gerrit-Change-Number: 13790
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 


Change in docker-playground[master]: Add script to bisect test failures with ttcn3 and docker

2019-04-28 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13790 )

Change subject: Add script to bisect test failures with ttcn3 and docker
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
Gerrit-Change-Number: 13790
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Sun, 28 Apr 2019 15:06:02 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: virtual: Unify the lua script into a single one

2019-04-28 Thread Holger Freyther
Holger Freyther has uploaded a new patch set (#3). ( 
https://gerrit.osmocom.org/13804 )

Change subject: virtual: Unify the lua script into a single one
..

virtual: Unify the lua script into a single one

In the quest to support multiple testcases we will use a single
script. Parts can be enabled/disabled depending on which tests
we want/need to run.

Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
---
R src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
M src/osmo_ms_driver/location_update_test.py
M src/osmo_ms_driver/starter.py
3 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/04/13804/3
--
To view, visit https://gerrit.osmocom.org/13804
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
Gerrit-Change-Number: 13804
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: virtual: Have a single result class that can store data

2019-04-28 Thread Holger Freyther
Holger Freyther has uploaded a new patch set (#3). ( 
https://gerrit.osmocom.org/13805 )

Change subject: virtual: Have a single result class that can store data
..

virtual: Have a single result class that can store data

We want to have LU, SMS and other tests run at the same time. Begin
by creating a single result where testcases can store additional data.

Move the stats code into the UL test case handling and out of the
suite.

Change-Id: Ie99351bee1515de8cf6870467f08256a53701907
---
M src/osmo_gsm_tester/ms_driver.py
M src/osmo_ms_driver/location_update_test.py
M src/osmo_ms_driver/test_support.py
M suites/nitb_netreg_mass/register_default_mass.py
4 files changed, 69 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/05/13805/3
--
To view, visit https://gerrit.osmocom.org/13805
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie99351bee1515de8cf6870467f08256a53701907
Gerrit-Change-Number: 13805
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: virtual: The completion ratio is success / success+failure

2019-04-28 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/13803 )

Change subject: virtual: The completion ratio is success / success+failure
..


Patch Set 2:

(1 comment)

> Patch Set 2: Code-Review+2
>
> (1 comment)

https://gerrit.osmocom.org/#/c/13803/2/suites/nitb_netreg_mass/suite.conf
File suites/nitb_netreg_mass/suite.conf:

https://gerrit.osmocom.org/#/c/13803/2/suites/nitb_netreg_mass/suite.conf@11
PS2, Line 11:   timeout: 50s
> This change is actually unrelated but fine.
Now that the ratio can be < 1.0 we need some more time to make the test pass. ;)



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
Gerrit-Change-Number: 13803
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 14:50:48 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: virtual: Unify the lua script into a single one

2019-04-28 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/13804 )

Change subject: virtual: Unify the lua script into a single one
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13804/2/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
File src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl:

https://gerrit.osmocom.org/#/c/13804/2/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl@18
PS2, Line 18:   lu_test_mm_cb(new_state, new_substate, old_substate)
> shouldn't the %if and %endif stuff be here instead of the concrete function?
Sure. I can move it here but then the above must always be well defined.



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
Gerrit-Change-Number: 13804
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 14:50:43 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: virtual: Have a single result class that can store data

2019-04-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13805 )

Change subject: virtual: Have a single result class that can store data
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13805/2/src/osmo_ms_driver/test_support.py
File src/osmo_ms_driver/test_support.py:

https://gerrit.osmocom.org/#/c/13805/2/src/osmo_ms_driver/test_support.py@29
PS2, Line 29: class Result(log.Origin):
That's more like a ResultStorage or ResultStore right? Result which actually 
contains a set of different results is really confusing.



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie99351bee1515de8cf6870467f08256a53701907
Gerrit-Change-Number: 13805
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 14:37:36 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: virtual: The completion ratio is success / success+failure

2019-04-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13803 )

Change subject: virtual: The completion ratio is success / success+failure
..


Patch Set 2: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/#/c/13803/2/suites/nitb_netreg_mass/suite.conf
File suites/nitb_netreg_mass/suite.conf:

https://gerrit.osmocom.org/#/c/13803/2/suites/nitb_netreg_mass/suite.conf@11
PS2, Line 11:   timeout: 50s
This change is actually unrelated but fine.



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
Gerrit-Change-Number: 13803
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 14:27:31 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: virtual: Unify the lua script into a single one

2019-04-28 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/13804 )

Change subject: virtual: Unify the lua script into a single one
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/13804/2/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
File src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl:

https://gerrit.osmocom.org/#/c/13804/2/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl@18
PS2, Line 18:   lu_test_mm_cb(new_state, new_substate, old_substate)
shouldn't the %if and %endif stuff be here instead of the concrete function?



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
Gerrit-Change-Number: 13804
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 28 Apr 2019 14:29:43 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: replace osmo_counter with stat items

2019-04-28 Thread lynxis lazus
Hello Daniel Willmann, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/13802

to look at the new patch set (#3).

Change subject: replace osmo_counter with stat items
..

replace osmo_counter with stat items

Depends on: Id2462c4866bd22bc2338c9c8f69b775f88ae7511 (libosmocore)
Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_09_11.c
M src/libmsc/osmo_msc.c
4 files changed, 29 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/02/13802/3
--
To view, visit https://gerrit.osmocom.org/13802
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
Gerrit-Change-Number: 13802
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: replace osmo_counter with stat items

2019-04-28 Thread lynxis lazus
Hello Daniel Willmann, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/13802

to look at the new patch set (#2).

Change subject: replace osmo_counter with stat items
..

replace osmo_counter with stat items

Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_09_11.c
M src/libmsc/osmo_msc.c
4 files changed, 29 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/02/13802/2
--
To view, visit https://gerrit.osmocom.org/13802
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
Gerrit-Change-Number: 13802
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: remove msc specific db counters

2019-04-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13800 )

Change subject: remove msc specific db counters
..


Patch Set 1:

Ah, did you check that it doesn't break neels' inter-msc ho branch?


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id64f1839a55b5326f74ec04b7a5dbed9d269b89c
Gerrit-Change-Number: 13800
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 28 Apr 2019 11:11:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: virtual: The completion ratio is success / success+failure

2019-04-28 Thread Holger Freyther
Holger Freyther has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/13803 )

Change subject: virtual: The completion ratio is success / success+failure
..

virtual: The completion ratio is success / success+failure

Fix the stats code to calculate the real completion ratio.

Change-Id: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
---
M suites/nitb_netreg_mass/register_default_mass.py
M suites/nitb_netreg_mass/suite.conf
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/03/13803/2
--
To view, visit https://gerrit.osmocom.org/13803
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
Gerrit-Change-Number: 13803
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 


Change in osmo-gsm-tester[master]: virtual: Have a single result class that can store data

2019-04-28 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/13805


Change subject: virtual: Have a single result class that can store data
..

virtual: Have a single result class that can store data

We want to have LU, SMS and other tests run at the same time. Begin
by creating a single result where testcases can store additional data.

Move the stats code into the UL test case handling and out of the
suite.

Change-Id: Ie99351bee1515de8cf6870467f08256a53701907
---
M src/osmo_gsm_tester/ms_driver.py
M src/osmo_ms_driver/location_update_test.py
M src/osmo_ms_driver/test_support.py
M suites/nitb_netreg_mass/register_default_mass.py
4 files changed, 69 insertions(+), 37 deletions(-)



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

diff --git a/src/osmo_gsm_tester/ms_driver.py b/src/osmo_gsm_tester/ms_driver.py
index 96b907a..3cfcad6 100644
--- a/src/osmo_gsm_tester/ms_driver.py
+++ b/src/osmo_gsm_tester/ms_driver.py
@@ -130,6 +130,12 @@
 """
 return self._test_case.get_result_values()

+def lus_less_than(self, acceptable_delay):
+"""
+Returns the results that completed their LU within the acceptable 
delay.
+"""
+return self._test_case.lus_less_than(acceptable_delay)
+
 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 82c1cb3..6681d85 100644
--- a/src/osmo_ms_driver/location_update_test.py
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -19,32 +19,39 @@
 from copy import copy
 from osmo_gsm_tester import log
 from .starter import OsmoVirtPhy, OsmoMobile
-from .test_support import Results
+from .test_support import Result

 from datetime import timedelta

 import collections
 import time

-class LUResult(Results):
-"""Representation of a Location Updating Result."""
+# Key used for the result dictionary
+LU_RESULT_NAME = 'lu_time'

-def __init__(self, name):
-super().__init__(name)
-self._time_of_lu = None
+def has_lu_time(result):
+"""
+Returns true if a LU occurred.
+"""
+return result.has_result(LU_RESULT_NAME)

-def set_lu_time(self, time):
-assert self._time_of_lu is None
-self._time_of_lu = time
+def lu_time(result):
+"""
+Returns the time of the LU occurrence.
+"""
+return result.get_result(LU_RESULT_NAME, default=0)

-def has_lu_time(self):
-return self._time_of_lu is not None
+def lu_delay(result):
+"""
+Returns the delay from LU success to MS start time.
+"""
+return lu_time(result) - result.start_time()

-def lu_time(self):
-return self._time_of_lu or 0
-
-def lu_delay(self):
-return self.lu_time() - self.start_time()
+def set_lu_time(result, time):
+"""
+Sets/Overrides the time of the LU success for this MS.
+"""
+result.set_result(LU_RESULT_NAME, time)


 LUStats = collections.namedtuple("LUStats", ["num_attempted", "num_completed",
@@ -106,7 +113,7 @@
 self.TEMPLATE_CFG, self._subscribers[i],
 phy.phy_filename(),
 self._event_server.server_path())
-self._results[ms_name] = LUResult(ms_name)
+self._results[ms_name] = Result(ms_name)
 self._mobiles.append(launcher)
 self._unstarted = copy(self._mobiles)

@@ -204,10 +211,10 @@
 elif data['type'] == 'event':
 if data['data']['lu_done'] == 1:
 ms = self._results[data['ms']]
-if not ms.has_lu_time():
+if not has_lu_time(ms):
 self._outstanding = self._outstanding - 1
-ms.set_lu_time(time)
-self.log("MS performed LU ", ms=ms, at=time, 
lu_delay=ms.lu_delay())
+set_lu_time(ms, time)
+self.log("MS performed LU ", ms=ms, at=time, 
lu_delay=lu_delay(ms))
 else:
 print(time, data)
 raise Exception("Unknown event type..:" + _data.decode())
@@ -219,10 +226,10 @@
 def find_min_max(self, results):
 min_value = max_value = None
 for result in results:
-if min_value is None or result.lu_delay() < min_value:
-min_value = result.lu_delay()
-if max_value is None or result.lu_delay() > max_value:
-max_value = result.lu_delay()
+if min_value is None or lu_delay(result) < min_value:
+min_value = lu_delay(result)
+if max_value is None or lu_delay(result) > max_value:
+max_value = lu_delay(result)
 return min_value, max_value

 def get_result_values(self):
@@ -237,7 +244,7 @@
 """
 attempted = len(self._subscribers)
 com

Change in osmo-gsm-tester[master]: virtual: Unify the lua script into a single one

2019-04-28 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/13804


Change subject: virtual: Unify the lua script into a single one
..

virtual: Unify the lua script into a single one

In the quest to support multiple testcases we will use a single
script. Parts can be enabled/disabled depending on which tests
we want/need to run.

Change-Id: I8a093671173976eba9215c00a7aea0f6cab467c6
---
R src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
M src/osmo_ms_driver/location_update_test.py
M src/osmo_ms_driver/starter.py
3 files changed, 12 insertions(+), 2 deletions(-)



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

diff --git a/src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl 
b/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
similarity index 73%
rename from src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl
rename to src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
index c25d799..5f2f482 100644
--- a/src/osmo_gsm_tester/templates/osmo-mobile-lu.lua.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-mobile.lua.tmpl
@@ -2,11 +2,20 @@
 event = require('ms_support')
 send = 1

-function mm_cb(new_state, new_substate, old_substate)
+
+function lu_test_mm_cb(new_state, new_substate, old_substate)
+%if test.run_lu_test:
+
 if new_state == 19 and new_substate == 1 and send == 1 then
 send = 0
 event.send({lu_done=1})
 end
+
+% endif
+end
+
+function mm_cb(new_state, new_substate, old_substate)
+   lu_test_mm_cb(new_state, new_substate, old_substate)
 end

 local cbs = {
diff --git a/src/osmo_ms_driver/location_update_test.py 
b/src/osmo_ms_driver/location_update_test.py
index 5ff2199..82c1cb3 100644
--- a/src/osmo_ms_driver/location_update_test.py
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -59,7 +59,7 @@
 decides how quickly to start them and a timeout.
 """

-TEMPLATE_LUA = "osmo-mobile-lu.lua"
+TEMPLATE_LUA = "osmo-mobile.lua"
 TEMPLATE_CFG = "osmo-mobile.cfg"

 def __init__(self, name, options, cdf_function,
diff --git a/src/osmo_ms_driver/starter.py b/src/osmo_ms_driver/starter.py
index 010947b..20977d6 100644
--- a/src/osmo_ms_driver/starter.py
+++ b/src/osmo_ms_driver/starter.py
@@ -91,6 +91,7 @@
 'test': {
 'event_path': self._ev_server_path,
 'lua_support': lua_support,
+'run_lu_test': True,
 }
 }
 lua_cfg_file = os.path.join(self._tmp_dir, "lua_" + self._name_number 
+ ".lua")

--
To view, visit https://gerrit.osmocom.org/13804
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: I8a093671173976eba9215c00a7aea0f6cab467c6
Gerrit-Change-Number: 13804
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 


Change in osmo-bsc[master]: assignment_fsm: Properly support assigning signalling mode TCH/x

2019-04-28 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/13172 )

Change subject: assignment_fsm: Properly support assigning signalling mode TCH/x
..


Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/13172/5/src/osmo-bsc/assignment_fsm.c
File src/osmo-bsc/assignment_fsm.c:

https://gerrit.osmocom.org/#/c/13172/5/src/osmo-bsc/assignment_fsm.c@350
PS5, Line 350:
here you forget to conn->assignment.requires_voice_stream = requires_voice_pref;
and a voice call fails to get an actual RTP stream.
With this line included, I tested voice calls to work fine again.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c7499c8c866ea3ff7b1327edb3615d003d927d3
Gerrit-Change-Number: 13172
Gerrit-PatchSet: 5
Gerrit-Owner: tnt 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: tnt 
Gerrit-CC: Max 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Sun, 28 Apr 2019 10:43:40 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: virtual: The completion ratio is success / success+failure

2019-04-28 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/13803


Change subject: virtual: The completion ratio is success / success+failure
..

virtual: The completion ratio is success / success+failure

Fix the stats code to calculate the real completion ratio.

Change-Id: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
---
M suites/nitb_netreg_mass/register_default_mass.py
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/suites/nitb_netreg_mass/register_default_mass.py 
b/suites/nitb_netreg_mass/register_default_mass.py
index 76c53f1..306eb81 100644
--- a/suites/nitb_netreg_mass/register_default_mass.py
+++ b/suites/nitb_netreg_mass/register_default_mass.py
@@ -38,7 +38,7 @@
 stats = ms_driver.get_stats()
 if len(modems) > 0 and stats.num_completed < 1:
 raise Exception("No run completed.")
-completion_ratio = stats.num_attempted / stats.num_completed
+completion_ratio = stats.num_completed / stats.num_attempted

 # Verify that 99% of LUs completed.
 if completion_ratio < 0.99:

--
To view, visit https://gerrit.osmocom.org/13803
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: I1b8f32dfbe8faa4c255a8d2d9806303fc8e5933b
Gerrit-Change-Number: 13803
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 


Change in osmo-msc[master]: replace osmo_counter with stat items

2019-04-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13802 )

Change subject: replace osmo_counter with stat items
..


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/13802/1/include/osmocom/msc/gsm_data.h
File include/osmocom/msc/gsm_data.h:

https://gerrit.osmocom.org/#/c/13802/1/include/osmocom/msc/gsm_data.h@119
PS1, Line 119: Current
Currently


https://gerrit.osmocom.org/#/c/13802/1/include/osmocom/msc/gsm_data.h@120
PS1, Line 120: ""
"Currently active SS/USSD sessions"



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
Gerrit-Change-Number: 13802
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 28 Apr 2019 09:51:27 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: replace osmo_counter with stat items

2019-04-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13802 )

Change subject: replace osmo_counter with stat items
..


Patch Set 1:

Can you add the Depends: (or whatever it was called) for change ID 
d2462c4866bd22bc2338c9c8f69b775f88ae75 in libosmocore?


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a20123b263f4f808153794ee8a735092deb399e
Gerrit-Change-Number: 13802
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Daniel Willmann 
Gerrit-Comment-Date: Sun, 28 Apr 2019 09:39:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative

2019-04-28 Thread Daniel Willmann
Daniel Willmann has posted comments on this change. ( 
https://gerrit.osmocom.org/13801 )

Change subject: add osmo_stat_item_inc/osmo_stat_item_dec to set it relative
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id2462c4866bd22bc2338c9c8f69b775f88ae7511
Gerrit-Change-Number: 13801
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 28 Apr 2019 09:36:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes