osmo-trx[master]: jenkins.sh: change qemu-img default location to $HOME/qemu-i...

2018-02-25 Thread Pau Espin Pedrol

Patch Set 1:

> > Why? are you planning to install the qemu-img in there? Easier
 > than
 > > /opt for permission-related reasons?
 > 
 > IMHO: A jenkins job shouldn't do anything outside it's own working
 > directory. I know this is sometimes hard. Using $HOME/qemu-img is
 > still not optimal, but at least it doesn't require a directory to
 > be created by root with special owner/group..

I was not counting on creating the qemu-arm enviornment during usual jenkins 
job run, but now that we move to a more automatised way to create jenkins node 
it must happen and it's fine for me. Since I was expecting the qemu-arm to be 
already there  (manually set up), then the env was used mostly read-only, so no 
issue. But now that we are creating it, it's fine moving it to $HOME.

A better way would perhaps be creating it inside $OWRKSPACE. I think the 
clean_worksapce script has some way to set a blacklist to not clean that 
specific directory inside WORKSPACE. If it's not there, could be a nice 
addition, but for now using $HOME seems good if it takes a lot of time to add 
this feature.

-- 
To view, visit https://gerrit.osmocom.org/6909
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I56f314d78c0ca968b1fef9a91ecd540a7cc8fa86
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: No


osmo-gsm-tester[master]: ms: Add a main function to start all of it

2018-02-25 Thread Pau Espin Pedrol

Patch Set 3:

Overall it looks fine as a first working step, but I'd like seeing all this a 
lot better integrated with current osmo-gsm-tester, so that you can re-use more 
stuff which might be useful (testsuites, test, junit output, configuration of 
resources, etc.) and we can also re-use later in the future some stuff you are 
adding (using mobible app as ms, virtphy, etc). I understand that you are not 
familiar with all this specific osmo-gsm-tester parts, and some require some 
good amount of work, so we can merge it in a separate dir as it is now and work 
on it later.

What I envision is to have all this fully integrated at some point:
* mobile "app" + lua script + unix socket being an implementation of the Modem 
class (which we currently implement using ofono, but use the same API to be 
able to share tests).
* Have a OsmoBTSVirtphy implementation (bts_osmo_virtphy.py) the same way we 
have other osmo-bts implementations.
* To be able to handle both virt arfcn and real arfcn, we should add a property 
to arfcn resources to be able to disntiguish those for tests (and add it to the 
logic when implementing arfcn resources correctly, see 
https://osmocom.org/issues/2230).
* Improve our current loop to use passive polling for all the things which can 
be used this way (some still require active polling with a timeout, we can just 
add a timerfd for it or some specific implementation to handle a list of 
timers).
* Move most of the stuff in __main__ in this commit to a test in 
suites/suite_foobar/test_foobar.py and run it together with other currnet tests.

-- 
To view, visit https://gerrit.osmocom.org/6919
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I58c938500a067eebb213750e56d8bf4d8af43df2
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


libosmocore[master]: implement support for 3-digit MNC with leading zeros

2018-02-25 Thread Neels Hofmeyr

Patch Set 4:

This is breaking ABI, but not API. In the commit log, I wrote:

  - I decided against packing the mnc with the mnc_3_digits field into a 
sub-struct because it would enlarge this patch; plus, with a separate flag, 
current code can decide when to start heeding leading zeros. 

Maybe that wasn't clear enough, let me strengthen that case:

If we pack mnc+flag into a sub-struct, as soon as we merge that patch to 
libosmocore master, all of our projects flare up red and stop building. Keeping 
the 'mnc' member as it were and just adding a flag alongside allows us to 
tackle each code base when we're ready to use the flag. It would be quite a 
stunt to have all of the patches ready in gerrit before merging the libosmocore 
one; and we're making compiling old code against new libosmocore hard, 
unnecessarily so.

If we decide to indeed go for a new struct packing the mnc+flag or a string as 
it were, I'd also go the extra mile and actually "bump" the names of all the 
structs using it, i.e. introducing struct gprs_ra_id2, struct bssgp_bvc_ctx2, 
struct bssgp_paging_info2 etc. In that case we would be both API *and* ABI 
compatible (-- I'd have gone that way, the only reason I'm not doing it is 
because you said to rather bump ABI instead).

Either way, I would discourage changing the current structs in ways that the 
current dependent code cannot compile as-is.

-- 
To view, visit https://gerrit.osmocom.org/6659
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id2240f7f518494c9df6c8bda52c0d5092f90f221
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: ms: Create a starter for virtphy and mobile application

2018-02-25 Thread Pau Espin Pedrol

Patch Set 3: Code-Review-1

I think it makes a lot of sense separating these already in this commit. Better 
have a OsmoMobile and OsmoVirtPhy classes (put them in the same file if it is 
easier for you). Have a look for instance at osmo_bsc.py or bts_osmo_trx.py.

-- 
To view, visit https://gerrit.osmocom.org/6917
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5c6d742842d7f3e0a1858436ef3f8634d8c0582d
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-gsm-tester[master]: ms: Add lua script support utilities

2018-02-25 Thread Holger Freyther

Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/6915/3/src/osmo_ms_driver/lua/json.lua
File src/osmo_ms_driver/lua/json.lua:

Line 41: end 
> ws, lots of them
We are not upstream of this code. Any modification will create unnecessary diff 
to the upstream version. I should put the curl for fetching this file in the 
commit message.

The reason I import it is that lua doesn't have the equivalent of "pip" (or I 
didn't find it.


-- 
To view, visit https://gerrit.osmocom.org/6915
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I43ae84a944c7f33e41d5de0880d4aaab3378809b
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


osmo-trx[master]: jenkins.sh: enable the cleanup workspace after building

2018-02-25 Thread lynxis lazus

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/6911/1/contrib/jenkins.sh
File contrib/jenkins.sh:

Line 86: if [ -z "${INSIDE_CHROOT}" ]; then
> I think this should always be executed, with no condition. Otherwise in the
oh yes. you're right. I just looked at the warning (shellcheck).


-- 
To view, visit https://gerrit.osmocom.org/6911
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib228ff247a72b21b12e8dd4cbe3afe3e858c89d3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: Yes


osmo-trx[master]: jenkins.sh: change qemu-img default location to $HOME/qemu-i...

2018-02-25 Thread lynxis lazus

Patch Set 1:

> Why? are you planning to install the qemu-img in there? Easier than
 > /opt for permission-related reasons?

IMHO: A jenkins job shouldn't do anything outside it's own working directory. I 
know this is sometimes hard. Using $HOME/qemu-img is still not optimal, but at 
least it doesn't require a directory to be created by root with special 
owner/group..

-- 
To view, visit https://gerrit.osmocom.org/6909
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I56f314d78c0ca968b1fef9a91ecd540a7cc8fa86
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: No


osmo-gsm-tester[master]: ms: Add lua script support utilities

2018-02-25 Thread Pau Espin Pedrol

Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/6915/3/src/osmo_ms_driver/lua/json.lua
File src/osmo_ms_driver/lua/json.lua:

Line 41: end 
ws, lots of them


-- 
To view, visit https://gerrit.osmocom.org/6915
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I43ae84a944c7f33e41d5de0880d4aaab3378809b
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: ms: Create an event server to handle Unix datagram messages

2018-02-25 Thread Pau Espin Pedrol

Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/6914
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ida97c570e8e741410f2dba4a231a8058ca96da25
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-gsm-tester[master]: ms: Create a simple epoll (or kqueue) based event loop

2018-02-25 Thread Pau Espin Pedrol

Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/6913/2/src/osmo_ms_driver/simple_loop.py
File src/osmo_ms_driver/simple_loop.py:

Line 41: 
You could add extra checking for the maximum len of 107 chars, in case it is 
truncated at somedirectory level it will fail to be created. We already 
experienced this and was an annoying bug. Have a look at bts_osmo.py:44:

if len(self.pcu_socket_path().encode()) > 107:
raise log.Error('Path for pcu socket is longer than max allowed len 
for unix socket path (107):', self.pcu_socket_path())


-- 
To view, visit https://gerrit.osmocom.org/6913
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iea06f33870cab9f21e9a1a1feb9758467343dd29
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: ms: Create a cumulative distribution function class

2018-02-25 Thread Pau Espin Pedrol

Patch Set 3: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/#/c/6230/3/src/osmo_ms_driver/__init__.py
File src/osmo_ms_driver/__init__.py:

Line 5: # Authors: D. Lazlo Sitzer 
Better use your name here as this subdir is all from you?


https://gerrit.osmocom.org/#/c/6230/3/src/osmo_ms_driver/cdf.py
File src/osmo_ms_driver/cdf.py:

Line 65: 
ws


Line 89: Linear progression that reaches 100% after duration.total_seconds()
it would make a lot of sense to move this to selftest directory with its own 
testsuite. You can do it in nexts commits it it's easier for you.


-- 
To view, visit https://gerrit.osmocom.org/6230
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: Yes


[PATCH] osmo-trx[master]: debian: Depend on libtalloc and libosmocore

2018-02-25 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/6920

debian: Depend on libtalloc and libosmocore

Change-Id: If4bf03d164e9d19a8a21399a2c74b2984c48cc70
---
M debian/control
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/20/6920/1

diff --git a/debian/control b/debian/control
index c8a639e..b3d63a7 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,9 @@
libuhd-dev,
libusb-1.0-0-dev,
libboost-all-dev,
-   libfftw3-dev
+   libfftw3-dev,
+   libtalloc-dev,
+   libosmocore-dev (>= 0.10.0)
 Standards-Version: 3.9.6
 Vcs-Browser: http://cgit.osmocom.org/osmo-trx
 Vcs-Git: git://git.osmocom.org/osmo-trx

-- 
To view, visit https://gerrit.osmocom.org/6920
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4bf03d164e9d19a8a21399a2c74b2984c48cc70
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-gsm-tester[master]: ms: Lua part of location update testing

2018-02-25 Thread Holger Freyther

Patch Set 3:

> (4 comments)
 > 
 > Multiple ws...

I don't want to fix the json.lua as it is an import from upstream (we don't 
want a diff here). But I have fixed the ms_support.lua

-- 
To view, visit https://gerrit.osmocom.org/6232
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ica5aa0c2f86d0e5d8a2bc4dc0652de18762dd156
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] osmo-gsm-tester[master]: ms: Add lua script support utilities

2018-02-25 Thread Holger Freyther

ms: Add lua script support utilities

Add a JSON encoder and a small module to sent registration and
other events per unix datagram socket.

Change-Id: I43ae84a944c7f33e41d5de0880d4aaab3378809b
---
A src/osmo_ms_driver/lua/json.lua
A src/osmo_ms_driver/lua/ms_support.lua
2 files changed, 411 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/6915/3

diff --git a/src/osmo_ms_driver/lua/json.lua b/src/osmo_ms_driver/lua/json.lua
new file mode 100644
index 000..dda6193
--- /dev/null
+++ b/src/osmo_ms_driver/lua/json.lua
@@ -0,0 +1,380 @@
+--
+-- json.lua
+--
+-- Copyright (c) 2015 rxi
+--
+-- This library is free software; you can redistribute it and/or modify it
+-- under the terms of the MIT license. See LICENSE for details.
+--
+
+local json = { _version = "0.1.0" }
+
+---
+-- Encode
+---
+
+local encode
+
+local escape_char_map = {
+  [ "\\" ] = "",
+  [ "\"" ] = "\\\"",
+  [ "\b" ] = "\\b",
+  [ "\f" ] = "\\f",
+  [ "\n" ] = "\\n",
+  [ "\r" ] = "\\r",
+  [ "\t" ] = "\\t",
+}
+
+local escape_char_map_inv = { [ "\\/" ] = "/" }
+for k, v in pairs(escape_char_map) do
+  escape_char_map_inv[v] = k
+end
+
+
+local function escape_char(c)
+  return escape_char_map[c] or string.format("\\u%04x", c:byte())
+end
+
+
+local function encode_nil(val)
+  return "null"
+end 
+
+
+local function encode_table(val, stack)
+  local res = {}
+  stack = stack or {}
+
+  -- Circular reference?
+  if stack[val] then error("circular reference") end
+
+  stack[val] = true
+
+  if val[1] ~= nil or next(val) == nil then
+-- Treat as array -- check keys are valid and it is not sparse
+local n = 0
+for k in pairs(val) do
+  if type(k) ~= "number" then
+error("invalid table: mixed or invalid key types")
+  end
+  n = n + 1
+end
+if n ~= #val then
+  error("invalid table: sparse array")
+end
+-- Encode
+for i, v in ipairs(val) do
+  table.insert(res, encode(v, stack))
+end
+stack[val] = nil
+return "[" .. table.concat(res, ",") .. "]"
+
+  else
+-- Treat as an object
+for k, v in pairs(val) do
+  if type(k) ~= "string" then
+error("invalid table: mixed or invalid key types")
+  end
+  table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
+end
+stack[val] = nil
+return "{" .. table.concat(res, ",") .. "}"
+  end
+end
+
+
+local function encode_string(val)
+  return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
+end
+
+
+local function encode_number(val)
+  -- Check for NaN, -inf and inf
+  if val ~= val or val <= -math.huge or val >= math.huge then
+error("unexpected number value '" .. tostring(val) .. "'")
+  end
+  return string.format("%.14g", val)
+end
+
+
+local type_func_map = {
+  [ "nil" ] = encode_nil,
+  [ "table"   ] = encode_table,
+  [ "string"  ] = encode_string,
+  [ "number"  ] = encode_number,
+  [ "boolean" ] = tostring,
+}
+
+
+encode = function(val, stack)
+  local t = type(val)
+  local f = type_func_map[t]
+  if f then
+return f(val, stack)
+  end
+  error("unexpected type '" .. t .. "'")
+end
+
+
+function json.encode(val)
+  return ( encode(val) )
+end
+
+
+---
+-- Decode
+---
+
+local parse
+
+local function create_set(...) 
+  local res = {}
+  for i = 1, select("#", ...) do
+res[ select(i, ...) ] = true
+  end
+  return res
+end
+
+local space_chars   = create_set(" ", "\t", "\r", "\n")
+local delim_chars   = create_set(" ", "\t", "\r", "\n", "]", "}", ",")
+local escape_chars  = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u")
+local literals  = create_set("true", "false", "null")
+
+local literal_map = {
+  [ "true"  ] = true,
+  [ "false" ] = false,
+  [ "null"  ] = nil,
+}
+
+
+local function next_char(str, idx, set, negate)
+  for i = idx, #str do
+if set[str:sub(i, i)] ~= negate then
+  return i
+end
+  end
+  return #str + 1
+end
+
+
+local function decode_error(str, idx, msg)
+  local line_count = 1
+  local col_count = 1
+  for i = 1, idx - 1 do
+col_count = col_count + 1
+if str:sub(i, i) == "\n" then
+  line_count = line_count + 1
+  col_count = 1
+end
+  end
+  error( string.format("%s at line %d col %d", msg, line_count, col_count) )
+end
+
+
+local function codepoint_to_utf8(n)
+  -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=iws-appendixa
+  local f = math.floor
+  if n <= 0x7f then
+return string.char(n)
+  elseif n <= 0x7ff then
+return string.char(f(n / 64) + 192, n % 64 + 128)
+  elseif n <= 0x then
+return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128)
+  elseif n <= 0x10 then
+

[PATCH] osmo-gsm-tester[master]: ms: Create a cumulative distribution function class

2018-02-25 Thread Holger Freyther
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/6230

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

ms: Create a cumulative distribution function class

We are using the CDF to decide which percentage of the jobs should
be running at a given point. The x-axis is time and the y-axis the
percentage of how many jobs should be running.

There are three functions to do this. The first one is a constant
which would result in everything being started right now, one to
start them linearly and the last (formula from Qt/3rdparty) to first
accelerate and decelerate slowly.

Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3
---
A src/osmo_ms_driver/__init__.py
A src/osmo_ms_driver/cdf.py
2 files changed, 252 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/30/6230/3

diff --git a/src/osmo_ms_driver/__init__.py b/src/osmo_ms_driver/__init__.py
new file mode 100644
index 000..d3c1590
--- /dev/null
+++ b/src/osmo_ms_driver/__init__.py
@@ -0,0 +1,29 @@
+# osmo_gsm_tester: automated cellular network hardware tests
+#
+# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH
+#
+# Authors: D. Lazlo Sitzer 
+#  Neels Hofmeyr 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+__version__ = 'UNKNOWN'
+
+try:
+from ._version import _version
+__version__ = _version
+except:
+pass
+
+# vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_ms_driver/cdf.py b/src/osmo_ms_driver/cdf.py
new file mode 100644
index 000..067b62e
--- /dev/null
+++ b/src/osmo_ms_driver/cdf.py
@@ -0,0 +1,223 @@
+# osmo_ms_driver: A cumululative distribution function class.
+# Help to start processes over time.
+#
+# Copyright (C) 2018 by Holger Hans Peter Freyther
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+
+from datetime import timedelta
+
+class DistributionFunctionHandler(object):
+"""
+The goal is to start n "mobile" processes. We like to see some
+conflicts (RACH bursts being ignored) but starting n processes
+at the same time is not a realistic model.
+We use the concept of cumulative distribution function here. On
+the x-axis we have time (maybe in steps of 10ms) and on the
+y-axis we have the percentage (from 0.0 to 1.0) of how many
+processes should run at the given time.
+"""
+
+def __init__(self, step, duration, fun):
+self._step = step
+self._fun = fun
+self._x = 0.0
+self._y = self._fun(self._x)
+self._target = 1.0
+self._duration = duration
+
+def step_size(self):
+return self._step
+
+def set_target(self, scale):
+"""
+Scale the percentage to the target value..
+"""
+self._target = scale
+
+def is_done(self):
+return self._y >= 1.0
+
+def current_value(self):
+return self._y
+
+def current_scaled_value(self):
+return self._y * self._target
+
+def step_once(self):
+self._x = self._x + self._step.total_seconds()
+self._y = self._fun(self._x)
+
+def duration(self):
+return self._duration
+
+
+def immediate(step_size=timedelta(milliseconds=20)):
+"""
+Reaches 100% at the first step.
+
+Example:
+>>> a = immediate()
+>>> a.is_done()
+True
+>>> a.current_value()
+1
+"""
+duration = timedelta(seconds=0)
+return DistributionFunctionHandler(step_size, duration, lambda x: 1)
+
+def linear_with_slope(slope, duration, step_size=timedelta(milliseconds=20)):
+"""
+Use the slope and step size you want
+"""
+return DistributionFunctionHandler(step_size, duration, lambda x: slope*x)
+
+def 

[PATCH] osmo-gsm-tester[master]: ms: Create a cumulative distribution function class

2018-02-25 Thread Holger Freyther
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/6230

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

ms: Create a cumulative distribution function class

We are using the CDF to decide which percentage of the jobs should
be running at a given point. The x-axis is time and the y-axis the
percentage of how many jobs should be running.

There are three functions to do this. The first one is a constant
which would result in everything being started right now, one to
start them linearly and the last (formula from Qt/3rdparty) to first
accelerate and decelerate slowly.

Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3
---
A src/osmo_ms_driver/__init__.py
A src/osmo_ms_driver/cdf.py
2 files changed, 252 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/30/6230/2

diff --git a/src/osmo_ms_driver/__init__.py b/src/osmo_ms_driver/__init__.py
new file mode 100644
index 000..d3c1590
--- /dev/null
+++ b/src/osmo_ms_driver/__init__.py
@@ -0,0 +1,29 @@
+# osmo_gsm_tester: automated cellular network hardware tests
+#
+# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH
+#
+# Authors: D. Lazlo Sitzer 
+#  Neels Hofmeyr 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+__version__ = 'UNKNOWN'
+
+try:
+from ._version import _version
+__version__ = _version
+except:
+pass
+
+# vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_ms_driver/cdf.py b/src/osmo_ms_driver/cdf.py
new file mode 100644
index 000..3a6faa3
--- /dev/null
+++ b/src/osmo_ms_driver/cdf.py
@@ -0,0 +1,223 @@
+# osmo_ms_driver: A cumululative distribution function class.
+# Help to start processes over time.
+#
+# Copyright (C) 2018 by Holger Hans Peter Freyther
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+
+from datetime import timedelta
+
+class DistributionFunctionHandler(object):
+"""
+The goal is to start n "mobile" processes. We like to see some
+conflicts (RACH bursts being ignored) but starting n processes
+at the same time is not a realistic model.
+We use the concept of cumulative distribution function here. On
+the x-axis we have time (maybe in steps of 10ms) and on the
+y-axis we have the percentage (from 0.0 to 1.0) of how many
+processes should run at the given time.
+"""
+
+def __init__(self, step, duration, fun):
+self._step = step
+self._fun = fun
+self._x = 0.0
+self._y = self._fun(self._x)
+self._target = 1.0
+self._duration = duration
+
+def step_size(self):
+return self._step
+
+def set_target(self, scale):
+"""
+Scale the percentage to the target value..
+"""
+self._target = scale
+
+def is_done(self):
+return self._y >= 1.0
+
+def current_value(self):
+return self._y
+
+def current_scaled_value(self):
+return self._y * self._target
+
+def step_once(self):
+self._x = self._x + self._step.total_seconds()
+self._y = self._fun(self._x)
+
+def duration(self):
+return self._duration
+
+
+def immediate(step_size=timedelta(milliseconds=20)):
+"""
+Reaches 100% at the first step.
+
+Example:
+>>> a = immediate()
+>>> a.is_done()
+True
+>>> a.current_value()
+1
+"""
+duration = timedelta(seconds=0)
+return DistributionFunctionHandler(step_size, duration, lambda x: 1)
+
+def linear_with_slope(slope, duration, step_size=timedelta(milliseconds=20)):
+"""
+Use the slope and step size you want
+"""
+return DistributionFunctionHandler(step_size, duration, lambda x: slope*x)
+
+def 

[PATCH] osmo-gsm-tester[master]: ms: Create a starter for virtphy and mobile application

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6917

ms: Create a starter for virtphy and mobile application

In the long run we might not want to start the virtphy but
for now virtphy+mobile belong together. Start virtphy first
as mobile will not handle a missing socket gracefully.

Change-Id: I5c6d742842d7f3e0a1858436ef3f8634d8c0582d
---
A src/osmo_ms_driver/starter.py
1 file changed, 110 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_ms_driver/starter.py b/src/osmo_ms_driver/starter.py
new file mode 100644
index 000..8b6c591
--- /dev/null
+++ b/src/osmo_ms_driver/starter.py
@@ -0,0 +1,110 @@
+# osmo_ms_driver: Starter for processes
+# Help to start processes over time.
+#
+# Copyright (C) 2018 by Holger Hans Peter Freyther
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+from osmo_gsm_tester import log, template
+
+import os
+import os.path
+import subprocess
+
+_devnull = open(os.devnull, 'w')
+#_devnull = open('/dev/stdout', 'w')
+
+class Launcher(log.Origin):
+"""
+I launch an OsmocomBB mobile and the virtphy. In the future we
+might want to test with real phones and then don't launch the
+virtphy. This needs to be handled once we move to bare iron.
+
+>>> Launcher("", "mobile", "mobile.tmpl", {})
+osmo-ms/
+"""
+def __init__(self, name_number, tmp_dir, lua_tmpl, cfg_tmpl, 
imsi_ki_generator, ev_server_path):
+super().__init__(log.C_RUN, "osmo-ms/" + name_number)
+self._lua_template = lua_tmpl
+self._cfg_template = cfg_tmpl
+self._name_number = name_number
+self._tmp_dir = tmp_dir
+self._imsi_ki_generator = imsi_ki_generator
+self._ev_server_path = ev_server_path
+
+def name_number(self):
+return self._name_number
+
+def write_lua_cfg(self):
+lua_support = os.path.join(os.path.dirname(__file__), 'lua')
+cfg = {
+'test': {
+'event_path': self._ev_server_path,
+'lua_support': lua_support,
+}
+}
+lua_cfg_file = os.path.join(self._tmp_dir, "lua_" + self._name_number 
+ ".lua")
+lua_script = template.render(self._lua_template, cfg)
+with open(lua_cfg_file, 'w') as w:
+w.write(lua_script)
+return lua_cfg_file
+
+def write_mob_cfg(self, lua_filename, phy_filename):
+(imsi, ki) = next(self._imsi_ki_generator)
+cfg = {
+'test': {
+'script': lua_filename,
+'virt_phy': phy_filename,
+'imsi': imsi,
+'ki_comp128': ki,
+'ms_number': self._name_number,
+}
+}
+mob_cfg_file = os.path.join(self._tmp_dir, "mob_" + self._name_number 
+ ".cfg")
+mob_vty = template.render(self._cfg_template, cfg)
+with open(mob_cfg_file, 'w') as w:
+w.write(mob_vty)
+return mob_cfg_file
+
+def start_virtphy(self, loop):
+self._phy_filename = os.path.join(self._tmp_dir, "osmocom_l2_" + 
self._name_number)
+
+self.log("Starting virtphy process")
+args = ["virtphy", "--l1ctl-sock=" + self._phy_filename]
+self.log(' '.join(args))
+self._vphy_proc = subprocess.Popen(args, stderr=_devnull, 
stdout=_devnull)
+
+def verify_phy_ready(self):
+while True:
+if os.path.exists(self._phy_filename):
+return
+import time
+time.sleep(0.2)
+
+def start_mobile(self, loop):
+lua_filename = self.write_lua_cfg()
+mob_filename = self.write_mob_cfg(lua_filename, self._phy_filename)
+
+self.log("Starting process")
+# Let the kernel pick an unused port for the VTY.
+args = ["mobile", "-c", mob_filename, "--vty-port=0"]
+self.log(' '.join(args))
+self._omob_proc = subprocess.Popen(args, stderr=_devnull, 
stdout=_devnull)
+
+def kill(self):
+"""Clean up things."""
+if self._vphy_proc:
+self._vphy_proc.kill()
+if self._omob_proc:
+self._omob_proc.kill()

-- 
To view, visit https://gerrit.osmocom.org/6917
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c6d742842d7f3e0a1858436ef3f8634d8c0582d
Gerrit-PatchSet: 1

[PATCH] osmo-gsm-tester[master]: ms: Add lua script support utilities

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6915

ms: Add lua script support utilities

Add a JSON encoder and a small module to sent registration and
other events per unix datagram socket.

Change-Id: I43ae84a944c7f33e41d5de0880d4aaab3378809b
---
A src/osmo_ms_driver/lua/json.lua
A src/osmo_ms_driver/lua/ms_support.lua
2 files changed, 411 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_ms_driver/lua/json.lua b/src/osmo_ms_driver/lua/json.lua
new file mode 100644
index 000..dda6193
--- /dev/null
+++ b/src/osmo_ms_driver/lua/json.lua
@@ -0,0 +1,380 @@
+--
+-- json.lua
+--
+-- Copyright (c) 2015 rxi
+--
+-- This library is free software; you can redistribute it and/or modify it
+-- under the terms of the MIT license. See LICENSE for details.
+--
+
+local json = { _version = "0.1.0" }
+
+---
+-- Encode
+---
+
+local encode
+
+local escape_char_map = {
+  [ "\\" ] = "",
+  [ "\"" ] = "\\\"",
+  [ "\b" ] = "\\b",
+  [ "\f" ] = "\\f",
+  [ "\n" ] = "\\n",
+  [ "\r" ] = "\\r",
+  [ "\t" ] = "\\t",
+}
+
+local escape_char_map_inv = { [ "\\/" ] = "/" }
+for k, v in pairs(escape_char_map) do
+  escape_char_map_inv[v] = k
+end
+
+
+local function escape_char(c)
+  return escape_char_map[c] or string.format("\\u%04x", c:byte())
+end
+
+
+local function encode_nil(val)
+  return "null"
+end 
+
+
+local function encode_table(val, stack)
+  local res = {}
+  stack = stack or {}
+
+  -- Circular reference?
+  if stack[val] then error("circular reference") end
+
+  stack[val] = true
+
+  if val[1] ~= nil or next(val) == nil then
+-- Treat as array -- check keys are valid and it is not sparse
+local n = 0
+for k in pairs(val) do
+  if type(k) ~= "number" then
+error("invalid table: mixed or invalid key types")
+  end
+  n = n + 1
+end
+if n ~= #val then
+  error("invalid table: sparse array")
+end
+-- Encode
+for i, v in ipairs(val) do
+  table.insert(res, encode(v, stack))
+end
+stack[val] = nil
+return "[" .. table.concat(res, ",") .. "]"
+
+  else
+-- Treat as an object
+for k, v in pairs(val) do
+  if type(k) ~= "string" then
+error("invalid table: mixed or invalid key types")
+  end
+  table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
+end
+stack[val] = nil
+return "{" .. table.concat(res, ",") .. "}"
+  end
+end
+
+
+local function encode_string(val)
+  return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
+end
+
+
+local function encode_number(val)
+  -- Check for NaN, -inf and inf
+  if val ~= val or val <= -math.huge or val >= math.huge then
+error("unexpected number value '" .. tostring(val) .. "'")
+  end
+  return string.format("%.14g", val)
+end
+
+
+local type_func_map = {
+  [ "nil" ] = encode_nil,
+  [ "table"   ] = encode_table,
+  [ "string"  ] = encode_string,
+  [ "number"  ] = encode_number,
+  [ "boolean" ] = tostring,
+}
+
+
+encode = function(val, stack)
+  local t = type(val)
+  local f = type_func_map[t]
+  if f then
+return f(val, stack)
+  end
+  error("unexpected type '" .. t .. "'")
+end
+
+
+function json.encode(val)
+  return ( encode(val) )
+end
+
+
+---
+-- Decode
+---
+
+local parse
+
+local function create_set(...) 
+  local res = {}
+  for i = 1, select("#", ...) do
+res[ select(i, ...) ] = true
+  end
+  return res
+end
+
+local space_chars   = create_set(" ", "\t", "\r", "\n")
+local delim_chars   = create_set(" ", "\t", "\r", "\n", "]", "}", ",")
+local escape_chars  = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u")
+local literals  = create_set("true", "false", "null")
+
+local literal_map = {
+  [ "true"  ] = true,
+  [ "false" ] = false,
+  [ "null"  ] = nil,
+}
+
+
+local function next_char(str, idx, set, negate)
+  for i = idx, #str do
+if set[str:sub(i, i)] ~= negate then
+  return i
+end
+  end
+  return #str + 1
+end
+
+
+local function decode_error(str, idx, msg)
+  local line_count = 1
+  local col_count = 1
+  for i = 1, idx - 1 do
+col_count = col_count + 1
+if str:sub(i, i) == "\n" then
+  line_count = line_count + 1
+  col_count = 1
+end
+  end
+  error( string.format("%s at line %d col %d", msg, line_count, col_count) )
+end
+
+
+local function codepoint_to_utf8(n)
+  -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi=iws-appendixa
+  local f = math.floor
+  if n <= 0x7f then
+return string.char(n)
+  elseif n <= 0x7ff then
+return string.char(f(n / 64) + 192, n % 64 + 128)
+  elseif n <= 0x then
+return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 

[PATCH] osmo-gsm-tester[master]: ms: Create template for the osmocom-bb mobile application

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6916

ms: Create template for the osmocom-bb mobile application

Change-Id: I9296f42edfab57762f8dd317d63231298cda5430
---
A src/osmo_gsm_tester/templates/osmocom-bb.cfg.tmpl
1 file changed, 49 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_gsm_tester/templates/osmocom-bb.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmocom-bb.cfg.tmpl
new file mode 100644
index 000..96ec0d9
--- /dev/null
+++ b/src/osmo_gsm_tester/templates/osmocom-bb.cfg.tmpl
@@ -0,0 +1,49 @@
+no gps enable
+no hide-default
+ms ${test.ms_number}
+ layer2-socket ${test.virt_phy}
+ sim test
+ network-selection-mode auto
+ imei 000 0
+ imei-fixed
+ no emergency-imsi
+ no sms-service-center
+ no call-waiting
+ no auto-answer
+ no force-rekey
+ no clip
+ no clir
+ tx-power auto
+ no simulated-delay
+ no stick
+ location-updating
+ neighbour-measurement
+ codec full-speed prefer
+ codec half-speed
+ no abbrev
+ support
+  sms
+  a5/1
+  a5/2
+  p-gsm
+  e-gsm
+  r-gsm
+  no gsm-850
+  dcs
+  no pcs
+  class-900 4
+  class-850 4
+  class-dcs 1
+  class-pcs 1
+  channel-capability sdcch+tchf+tchh
+  full-speech-v1
+  full-speech-v2
+  half-speech-v1
+  min-rxlev -106
+  dsc-max 90
+  no skip-max-per-band
+ test-sim
+  imsi ${test.imsi}
+  ki comp128 ${test.ki_comp128}
+  no barred-access
+ lua-script ${test.script}

-- 
To view, visit https://gerrit.osmocom.org/6916
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9296f42edfab57762f8dd317d63231298cda5430
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 


[PATCH] osmo-gsm-tester[master]: ms: Add a main function to start all of it

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6919

ms: Add a main function to start all of it

Add a main file to start everything. All parameters need to
be made configurable. Composition of testcase and IMSI ranges
need to be configurable as well. This is left for future
commits. Right now it can execute a single UL test.

Start with:
export PATH=../osmocom-bb/src/host/layer23/src/mobile:$PATH
export PATH=../osmocom-bb/src/host/virt_phy/src/:$PATH
export PYTHONPATH=$PWD/src

python3 -mosmo_ms_driver

Change-Id: I58c938500a067eebb213750e56d8bf4d8af43df2
---
A src/osmo_ms_driver/__main__.py
1 file changed, 79 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
new file mode 100644
index 000..6b61d64
--- /dev/null
+++ b/src/osmo_ms_driver/__main__.py
@@ -0,0 +1,79 @@
+# osmo_ms_driver: Main test runner
+#
+# Copyright (C) 2018 by Holger Hans Peter Freyther
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+# Local modules
+from .event_server import EventServer
+from .simple_loop import SimpleLoop
+from .location_update_test import MassUpdateLocationTest
+from .cdf import ease_in_out_duration, linear_with_duration
+from osmo_gsm_tester import log
+
+# System modules
+import datetime
+import subprocess
+import signal
+import tempfile
+import os.path
+
+
+def main():
+# Create a default log to stdout
+log.LogTarget().style(src=False)
+
+# We don't care what is happening to child processes we spawn!
+signal.signal(signal.SIGCHLD, signal.SIG_IGN)
+
+loop = SimpleLoop()
+
+# TODO: Parse parameters and test composition. Right now we test
+# with a single set of values.
+num_ms = 10
+
+tmp_dir = tempfile.mkdtemp(suffix="osmo-ms-driver")
+log.log("Going to store files in ", tmp_dir=tmp_dir)
+
+# How long should starting all apps take
+time_start=datetime.timedelta(seconds=60)
+# In which steps to start processes
+time_step=datetime.timedelta(milliseconds=100)
+
+# Event server path
+event_server_path = os.path.join(tmp_dir,  "osmo_ms_driver.unix")
+
+# The function that decides when to start something
+cdf = ease_in_out_duration(time_start, time_step)
+
+# Event server to handle MS->test events
+ev_server = EventServer("ev_server", event_server_path)
+ev_server.listen(loop)
+#while True:
+#   loop.select()
+
+# Just a single test for now.
+test = MassUpdateLocationTest("lu_test", num_ms, cdf, ev_server, tmp_dir)
+
+# Run until everything has been launched
+test.launch(loop)
+
+# Wait for it to complete
+test.wait_for_result(loop)
+
+# Print stats
+test.print_stats()
+
+if __name__ == '__main__':
+main()

-- 
To view, visit https://gerrit.osmocom.org/6919
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58c938500a067eebb213750e56d8bf4d8af43df2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 


[PATCH] osmo-gsm-tester[master]: ms: Add a first test to use all parts of the system

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6918

ms: Add a first test to use all parts of the system

This is an interim solution but is bringing all parts together.
We will need to:

 * Abstract this into a base class
 * Be able to mix different tests without interfering with each
   other (e.g. 10k LU tests, 2k SMS sending)
 * The event loop will need to handle multiple timers/timeouts
 * Stats printing should print more information and test pass/fail
 * The test should quit early if everything has already passed

Change-Id: Id3277ed0f0f9ee734569bedd4752564eb68c9cfd
---
A src/osmo_ms_driver/location_update_test.py
1 file changed, 200 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_ms_driver/location_update_test.py 
b/src/osmo_ms_driver/location_update_test.py
new file mode 100644
index 000..893ee72
--- /dev/null
+++ b/src/osmo_ms_driver/location_update_test.py
@@ -0,0 +1,200 @@
+# osmo_ms_driver: Starter for processes
+# Help to start processes over time.
+#
+# Copyright (C) 2018 by Holger Hans Peter Freyther
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+
+from osmo_gsm_tester import log
+from .starter import Launcher
+
+from datetime import timedelta
+
+import time
+
+def imsi_ki_gen():
+"""
+Generate IMSIs and KIs to be used by test.
+"""
+n = 10100
+while True:
+yield ("%.15d" % n, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00")
+n += 1
+
+class Results(log.Origin):
+
+def __init__(self, name):
+super().__init__(log.C_RUN, name)
+self._time_of_registration = None
+self._time_of_launch = None
+self._time_of_lu = None
+
+def set_start_time(self, time):
+assert self._time_of_registration is None
+self._time_of_registration = time
+
+def set_launch_time(self, time):
+assert self._time_of_launch is None
+self._time_of_launch = time
+
+def set_lu_time(self, time):
+assert self._time_of_lu is None
+self._time_of_lu = time
+
+def start_time(self):
+return self._time_of_registration
+
+def launch_time(self):
+return self._time_of_launch
+
+def lu_time(self):
+return self._time_of_lu
+
+def lu_delay(self):
+return self._time_of_lu - self._time_of_registration
+
+class MassUpdateLocationTest(log.Origin):
+"""
+A test to launch a configurable amount of MS and make them
+execute a Location Updating Procedure.
+
+Configure the number of MS to be tested and a function that
+decides how quickly to start them and a timeout.
+"""
+
+TEMPLATE_LUA = "osmocom-bb-lu.lua"
+TEMPLATE_CFG = "osmocom-bb.cfg"
+TEST_TIME = timedelta(seconds=120)
+
+def __init__(self, name, number_of_ms, cdf_function, event_server, 
tmp_dir):
+super().__init__(log.C_RUN, name)
+self._number_of_ms = number_of_ms
+self._cdf = cdf_function
+self._cdf.set_target(number_of_ms)
+self._unstarted = []
+self._results = {}
+imsi_gen = imsi_ki_gen()
+for i in range(0, number_of_ms):
+ms_name = "%.5d" % i
+launcher = Launcher(ms_name, tmp_dir, self.TEMPLATE_LUA,
+self.TEMPLATE_CFG, imsi_gen,
+event_server.server_path())
+self._results[ms_name] = Results(ms_name)
+self._unstarted.append(launcher)
+self._event_server = event_server
+self._event_server.register(self.handle_msg)
+
+def pre_launch(self, loop):
+"""
+We need the virtphy's be ready when the lua script in the
+mobile comes and kicks-off the test. In lua we don't seem to
+be able to just stat/check if a file/socket exists so we need
+to do this from here.
+"""
+self.log("Pre-launching all virtphy's")
+for ms in self._unstarted:
+ms.start_virtphy(loop)
+
+self.log("Checking if sockets are in the filesystem")
+for ms in self._unstarted:
+ms.verify_phy_ready()
+
+def launch(self, loop):
+self.log("Starting testcase")
+
+self.pre_launch(loop)
+
+self._start_time = time.clock_gettime(time.CLOCK_MONOTONIC)
+self._end_time = self._start_time + \
+ 

[PATCH] osmo-gsm-tester[master]: ms: Create an event server to handle Unix datagram messages

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6914

ms: Create an event server to handle Unix datagram messages

Create an EventServer that will create a unix domain socket and
dispatch incoming datagram messages. The lua remotes are not
passing credentials so this is a one way communication channel
for now. Tests can register to handle the message.

Change-Id: Ida97c570e8e741410f2dba4a231a8058ca96da25
---
A src/osmo_ms_driver/event_server.py
1 file changed, 33 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_ms_driver/event_server.py 
b/src/osmo_ms_driver/event_server.py
new file mode 100644
index 000..6b0232b
--- /dev/null
+++ b/src/osmo_ms_driver/event_server.py
@@ -0,0 +1,33 @@
+
+from osmo_gsm_tester import log
+from functools import partial
+
+import time
+
+
+class EventServer(log.Origin):
+"""
+Listen for AF_UNIX/SOCK_DGRAM messages from test apps and
+forward them.
+"""
+def __init__(self, name, path):
+super().__init__(log.C_RUN, name)
+self._path = path
+self._handlers = []
+
+def register(self, cb):
+self._handlers.append(cb)
+
+def server_path(self):
+return self._path
+
+def listen(self, loop):
+self._server = loop.create_unix_server(self.read_cb, self._path)
+
+def read_cb(self, obj, mask):
+# addresss doesn't give us the remote but currently we don't
+# need it.
+(data, address) = self._server.recvfrom(4096)
+now = time.clock_gettime(time.CLOCK_MONOTONIC)
+for handler in self._handlers:
+handler(data, now)

-- 
To view, visit https://gerrit.osmocom.org/6914
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida97c570e8e741410f2dba4a231a8058ca96da25
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 


[PATCH] osmo-gsm-tester[master]: ms: Create a simple epoll (or kqueue) based event loop

2018-02-25 Thread Holger Freyther

Review at  https://gerrit.osmocom.org/6913

ms: Create a simple epoll (or kqueue) based event loop

Create a C-like single process event loop. It could be powered by
select/epoll or kqueue. It should scale to many open fds but we
will not have that many.

Change-Id: Iea06f33870cab9f21e9a1a1feb9758467343dd29
---
A src/osmo_ms_driver/simple_loop.py
1 file changed, 60 insertions(+), 0 deletions(-)


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

diff --git a/src/osmo_ms_driver/simple_loop.py 
b/src/osmo_ms_driver/simple_loop.py
new file mode 100644
index 000..65417a3
--- /dev/null
+++ b/src/osmo_ms_driver/simple_loop.py
@@ -0,0 +1,60 @@
+# osmo_ms_driver: Event loop because asyncio is not up to the job
+#
+# Copyright (C) 2018 by Holger Hans Peter Freyther
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+from osmo_gsm_tester import log
+from functools import partial
+
+import os
+import selectors
+import socket
+
+
+class SimpleLoop(log.Origin):
+def __init__(self):
+super().__init__(log.C_RUN, "SimpleLoop")
+self._loop = selectors.DefaultSelector()
+self._timeout = None
+
+def register_fd(self, fd, event, callback):
+self._loop.register(fd, event, callback)
+
+def schedule_timeout(self, timeout):
+assert self._timeout == None
+self._timeout = timeout
+
+def create_unix_server(self, cb, path):
+sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
+
+# If not a special Linux namespace...
+if path[0] != '\0':
+try:
+os.unlink(path)
+except FileNotFoundError:
+pass
+
+# Now bind+listen+NONBLOCK
+sock.bind(path)
+sock.setblocking(False)
+
+self.register_fd(sock.fileno(), selectors.EVENT_READ, cb)
+return sock
+
+def select(self):
+events = self._loop.select(timeout=self._timeout)
+self._timeout = None
+for key, mask in events:
+key.data(key.fileobj, mask)

-- 
To view, visit https://gerrit.osmocom.org/6913
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea06f33870cab9f21e9a1a1feb9758467343dd29
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 


[PATCH] osmo-gsm-tester[master]: ms: Lua part of location update testing

2018-02-25 Thread Holger Freyther
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/6232

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

ms: Lua part of location update testing

The lua part to start the MS and then signal the first
successful Location Update.

Change-Id: Ica5aa0c2f86d0e5d8a2bc4dc0652de18762dd156
---
A src/osmo_gsm_tester/templates/osmocom-bb-lu.lua.tmpl
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/32/6232/2

diff --git a/src/osmo_gsm_tester/templates/osmocom-bb-lu.lua.tmpl 
b/src/osmo_gsm_tester/templates/osmocom-bb-lu.lua.tmpl
new file mode 100644
index 000..eed4e2b
--- /dev/null
+++ b/src/osmo_gsm_tester/templates/osmocom-bb-lu.lua.tmpl
@@ -0,0 +1,18 @@
+package.path = '${test.lua_support}/?.lua;' .. package.path
+event = require('ms_support')
+send = 1
+
+function mm_cb(new_state, new_substate, old_substate)
+if new_state == 19 and new_substate == 1 and send == 1then
+send = 0
+event.send({lu_done=1})
+end
+end
+
+local cbs = {
+Mm=mm_cb
+}
+osmo.ms():register(cbs)
+osmo.ms().start()
+
+event.register(osmo.ms():number(), "${test.event_path}")

-- 
To view, visit https://gerrit.osmocom.org/6232
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ica5aa0c2f86d0e5d8a2bc4dc0652de18762dd156
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


Build failure of network:osmocom:nightly/osmo-trx in Debian_9.0/armv7l

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_9.0/armv7l

Package network:osmocom:nightly/osmo-trx failed to build in Debian_9.0/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  209s] #define HAVE_STDLIB_H 1
[  209s] #define HAVE_STRING_H 1
[  209s] #define HAVE_MEMORY_H 1
[  209s] #define HAVE_STRINGS_H 1
[  209s] #define HAVE_INTTYPES_H 1
[  209s] #define HAVE_STDINT_H 1
[  209s] #define HAVE_UNISTD_H 1
[  209s] #define HAVE_DLFCN_H 1
[  209s] #define LT_OBJDIR ".libs/"
[  209s] #define STDC_HEADERS 1
[  209s] #define HAVE_BYTESWAP_H 1
[  209s] #define TIME_WITH_SYS_TIME 1
[  209s] 
[  209s] configure: exit 1
[  209s] dh_auto_configure: ./configure --build=arm-linux-gnueabihf 
--prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf 
--libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  209s] debian/rules:6: recipe for target 'build' failed
[  209s] make: *** [build] Error 2
[  209s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  209s] 
[  209s] armbuild04 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
21:26:31 UTC 2018.
[  209s] 
[  209s] ### VM INTERACTION START ###
[  212s] [  192.062921] SysRq : Power Off
[  212s] [  192.076725] reboot: Power down
[  212s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  212s] ### VM INTERACTION END ###
[  212s] 
[  212s] armbuild04 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
21:26:34 UTC 2018.
[  212s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[MERGED] osmo-ci[master]: jenkins: master-builds: replace the label linux_amd64_debian...

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins: master-builds: replace the label linux_amd64_debian8/9 
-> osmocom-master-debian8/9
..


jenkins: master-builds: replace the label linux_amd64_debian8/9 -> 
osmocom-master-debian8/9

Introduce more precise labels to allow more flexibility when extending the 
jenkins setup.
The linux_amd64_debian8 or linux_amd64_debian9 is used across all build jobs 
which
make it hard to add new nodes which might only support one group of
jobs.

Change-Id: I0fa3d3f81ab01e2488fe07601740f42eb54b6d9c
---
M jobs/README.adoc
M jobs/master-builds.yml
2 files changed, 12 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/jobs/README.adoc b/jobs/README.adoc
index d498658..5f94ca4 100644
--- a/jobs/README.adoc
+++ b/jobs/README.adoc
@@ -94,3 +94,11 @@
 and make sure to *not* pick the python3 versions
 (or you'll need to add catching of HTTPError to jenkins/__init__.py in
 'def maybe_add_crumb')
+
+*Jenkins labels*
+
+The build jobs are using labels to specify on which nodes the job should be 
run.
+Please use the following labels
+
+- osmocom-master-debian8: are nodes which can build osmocom-master and is a 
debian 8
+- osmocom-master-debian9: are nodes which can build osmocom-master and is a 
debian 9
diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 392d9ba..bb1de8d 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -5,9 +5,9 @@
 # following default values can be overridden by each repo
 disabled: false
 concurrent: false
-node: linux_amd64_debian8
+node: osmocom-master-debian8
 # axes related defaults
-slave_axis: !!python/tuple [linux_amd64_debian8]
+slave_axis: !!python/tuple [osmocom-master-debian8]
 a1_name: a1
 a1: !!python/tuple [default]
 a2_name: a2
@@ -156,7 +156,7 @@
 ./contrib/jenkins.sh --publish
 
   - osmo-hlr:
-  slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-master-debian8, 
osmocom-master-debian9]
 
   - osmo-iuh:
   trigger: master-osmo-msc, master-osmo-sgsn
@@ -244,7 +244,7 @@
   - osmo-tetra
 
   - osmo-trx:
-  slave_axis: !!python/tuple [linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-master-debian9]
   a1_name: INSTR
   a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4]
   concurrent: true

-- 
To view, visit https://gerrit.osmocom.org/6908
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fa3d3f81ab01e2488fe07601740f42eb54b6d9c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 


[MERGED] osmo-ci[master]: jenkins: gerrit-builds: replace the label linux_amd64_debian...

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins: gerrit-builds: replace the label linux_amd64_debian8/9 
-> osmocom-gerrit-debian8/9
..


jenkins: gerrit-builds: replace the label linux_amd64_debian8/9 -> 
osmocom-gerrit-debian8/9

Introduce more precise labels to allow more flexibility when extending the 
jenkins setup.
The linux_amd64_debian8 or linux_amd64_debian9 is used across all build jobs 
which
make it hard to add new nodes which might only support one group of
jobs.

Change-Id: I900b7b50b33cc95e127ca78d2a47f59d32a6dfee
---
M jobs/README.adoc
M jobs/gerrit-verifications.yml
2 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/jobs/README.adoc b/jobs/README.adoc
index 5f94ca4..fadafd8 100644
--- a/jobs/README.adoc
+++ b/jobs/README.adoc
@@ -102,3 +102,5 @@
 
 - osmocom-master-debian8: are nodes which can build osmocom-master and is a 
debian 8
 - osmocom-master-debian9: are nodes which can build osmocom-master and is a 
debian 9
+- osmocom-gerrit-debian8: are nodes which can build osmocom-gerrit and is a 
debian 8
+- osmocom-gerrit-debian9: are nodes which can build osmocom-gerrit and is a 
debian 9
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index 88b47bb..de836ae 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -6,9 +6,9 @@
 # following default values can be overridden by each repo
 disabled: false
 concurrent: false
-node: linux_amd64_debian8
+node: osmocom-gerrit-debian8
 # axes related defaults
-slave_axis: !!python/tuple [linux_amd64_debian8]
+slave_axis: !!python/tuple [osmocom-gerrit-debian8]
 a1_name: a1
 a1: !!python/tuple [default]
 a2_name: a2
@@ -109,7 +109,7 @@
   - osmo-gsm-manuals
 
   - osmo-hlr:
-  slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-gerrit-debian8, 
osmocom-gerrit-debian9]
 
   - osmo-iuh
 
@@ -174,7 +174,7 @@
   - osmo-sip-connector
 
   - osmo-trx:
-  slave_axis: !!python/tuple [linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-gerrit-debian9]
   a1_name: INSTR
   a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4]
   concurrent: true

-- 
To view, visit https://gerrit.osmocom.org/6912
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I900b7b50b33cc95e127ca78d2a47f59d32a6dfee
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 


[MERGED] osmo-ci[master]: jenkins: add node admin2-deb8build to the update jobs

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins: add node admin2-deb8build to the update jobs
..


jenkins: add node admin2-deb8build to the update jobs

Change-Id: I6b703b9f27865b146f20bea953fe3d6500a88166
---
M jobs/update-osmo-ci-on-slaves.yml
M jobs/update-osmo-python-on-slaves.yml
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/jobs/update-osmo-ci-on-slaves.yml 
b/jobs/update-osmo-ci-on-slaves.yml
index a809b5f..429c29d 100644
--- a/jobs/update-osmo-ci-on-slaves.yml
+++ b/jobs/update-osmo-ci-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb8build, admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30
diff --git a/jobs/update-osmo-python-on-slaves.yml 
b/jobs/update-osmo-python-on-slaves.yml
index d4407f4..c859ec6 100644
--- a/jobs/update-osmo-python-on-slaves.yml
+++ b/jobs/update-osmo-python-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb8build, admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30

-- 
To view, visit https://gerrit.osmocom.org/6907
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b703b9f27865b146f20bea953fe3d6500a88166
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 


osmo-ci[master]: jenkins: master-builds: replace the label linux_amd64_debian...

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2 Verified+1

-- 
To view, visit https://gerrit.osmocom.org/6908
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0fa3d3f81ab01e2488fe07601740f42eb54b6d9c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


[MERGED] osmo-ci[master]: jenkins: add node admin2-deb9build to the update jobs

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins: add node admin2-deb9build to the update jobs
..


jenkins: add node admin2-deb9build to the update jobs

Change-Id: Ie3803a46ee192dc72823291004ee20f4bdbe0126
---
M jobs/update-osmo-ci-on-slaves.yml
M jobs/update-osmo-python-on-slaves.yml
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/jobs/update-osmo-ci-on-slaves.yml 
b/jobs/update-osmo-ci-on-slaves.yml
index b79751e..a809b5f 100644
--- a/jobs/update-osmo-ci-on-slaves.yml
+++ b/jobs/update-osmo-ci-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30
diff --git a/jobs/update-osmo-python-on-slaves.yml 
b/jobs/update-osmo-python-on-slaves.yml
index ce3033d..d4407f4 100644
--- a/jobs/update-osmo-python-on-slaves.yml
+++ b/jobs/update-osmo-python-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30

-- 
To view, visit https://gerrit.osmocom.org/6906
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3803a46ee192dc72823291004ee20f4bdbe0126
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 


osmo-ci[master]: jenkins: gerrit-builds: replace the label linux_amd64_debian...

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2 Verified+1

-- 
To view, visit https://gerrit.osmocom.org/6912
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I900b7b50b33cc95e127ca78d2a47f59d32a6dfee
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-ci[master]: jenkins: add node admin2-deb9build to the update jobs

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2 Verified+1

-- 
To view, visit https://gerrit.osmocom.org/6906
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3803a46ee192dc72823291004ee20f4bdbe0126
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-ci[master]: jenkins: add node admin2-deb8build to the update jobs

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2 Verified+1

-- 
To view, visit https://gerrit.osmocom.org/6907
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b703b9f27865b146f20bea953fe3d6500a88166
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-trx[master]: jenkins.sh: fix the download url if the qemu image wasn't setup

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6910
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I75e270b7255c1cd7fca1674111b0f19fc7bba74f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-trx[master]: jenkins.sh: change qemu-img default location to $HOME/qemu-i...

2018-02-25 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+1

Why? are you planning to install the qemu-img in there? Easier than /opt for 
permission-related reasons?

-- 
To view, visit https://gerrit.osmocom.org/6909
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I56f314d78c0ca968b1fef9a91ecd540a7cc8fa86
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-trx[master]: jenkins.sh: enable the cleanup workspace after building

2018-02-25 Thread Pau Espin Pedrol

Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/6911/1/contrib/jenkins.sh
File contrib/jenkins.sh:

Line 86: if [ -z "${INSIDE_CHROOT}" ]; then
I think this should always be executed, with no condition. Otherwise in the 
case in which we call us recursively, the workspace won't be cleaned after 
finishing (since this condition won't be true and exit 0 is called after the 
recursive call in line 59.


-- 
To view, visit https://gerrit.osmocom.org/6911
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib228ff247a72b21b12e8dd4cbe3afe3e858c89d3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-trx[master]: jenkins.sh: fix the download url if the qemu image wasn't setup

2018-02-25 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/6910
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I75e270b7255c1cd7fca1674111b0f19fc7bba74f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_17.04/x86_64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_17.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  219s] #define HAVE_SYS_STAT_H 1
[  219s] #define HAVE_STDLIB_H 1
[  219s] #define HAVE_STRING_H 1
[  219s] #define HAVE_MEMORY_H 1
[  219s] #define HAVE_STRINGS_H 1
[  219s] #define HAVE_INTTYPES_H 1
[  219s] #define HAVE_STDINT_H 1
[  219s] #define HAVE_UNISTD_H 1
[  219s] #define HAVE_DLFCN_H 1
[  219s] #define LT_OBJDIR ".libs/"
[  219s] #define STDC_HEADERS 1
[  219s] #define HAVE_BYTESWAP_H 1
[  219s] #define TIME_WITH_SYS_TIME 1
[  219s] 
[  219s] configure: exit 1
[  219s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  219s] debian/rules:6: recipe for target 'build' failed
[  219s] make: *** [build] Error 2
[  219s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  219s] 
[  219s] cloud120 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:16:11 UTC 2018.
[  219s] 
[  219s] ### VM INTERACTION START ###
[  222s] [  183.050497] reboot: Power down
[  224s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  224s] ### VM INTERACTION END ###
[  224s] 
[  224s] cloud120 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:16:16 UTC 2018.
[  224s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_17.10/x86_64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  146s] #define HAVE_SYS_STAT_H 1
[  146s] #define HAVE_STDLIB_H 1
[  146s] #define HAVE_STRING_H 1
[  146s] #define HAVE_MEMORY_H 1
[  146s] #define HAVE_STRINGS_H 1
[  146s] #define HAVE_INTTYPES_H 1
[  146s] #define HAVE_STDINT_H 1
[  146s] #define HAVE_UNISTD_H 1
[  146s] #define HAVE_DLFCN_H 1
[  146s] #define LT_OBJDIR ".libs/"
[  146s] #define STDC_HEADERS 1
[  146s] #define HAVE_BYTESWAP_H 1
[  146s] #define TIME_WITH_SYS_TIME 1
[  146s] 
[  146s] configure: exit 1
[  146s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=\${prefix}/include --mandir=\${prefix}/share/man 
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu 
--libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  146s] debian/rules:6: recipe for target 'build' failed
[  146s] make: *** [build] Error 2
[  146s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  146s] 
[  146s] lamb61 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:14:41 UTC 2018.
[  146s] 
[  146s] ### VM INTERACTION START ###
[  149s] [  140.593832] reboot: Power down
[  149s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_8/root.monitor: Permission denied
[  149s] ### VM INTERACTION END ###
[  149s] 
[  149s] lamb61 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:14:45 UTC 2018.
[  149s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/x86_64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  140s] #define HAVE_SYS_STAT_H 1
[  140s] #define HAVE_STDLIB_H 1
[  140s] #define HAVE_STRING_H 1
[  140s] #define HAVE_MEMORY_H 1
[  140s] #define HAVE_STRINGS_H 1
[  140s] #define HAVE_INTTYPES_H 1
[  140s] #define HAVE_STDINT_H 1
[  140s] #define HAVE_UNISTD_H 1
[  140s] #define HAVE_DLFCN_H 1
[  140s] #define LT_OBJDIR ".libs/"
[  140s] #define STDC_HEADERS 1
[  140s] #define HAVE_BYTESWAP_H 1
[  140s] #define TIME_WITH_SYS_TIME 1
[  140s] 
[  140s] configure: exit 1
[  140s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  140s] debian/rules:6: recipe for target 'build' failed
[  140s] make: *** [build] Error 2
[  140s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  140s] 
[  140s] lamb51 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:10:52 UTC 2018.
[  140s] 
[  140s] ### VM INTERACTION START ###
[  143s] [  134.127372] reboot: Power down
[  143s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_5/root.monitor: Permission denied
[  143s] ### VM INTERACTION END ###
[  143s] 
[  143s] lamb51 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:10:56 UTC 2018.
[  143s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.10/i586

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.10/i586

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  142s] #define HAVE_STDLIB_H 1
[  142s] #define HAVE_STRING_H 1
[  142s] #define HAVE_MEMORY_H 1
[  142s] #define HAVE_STRINGS_H 1
[  142s] #define HAVE_INTTYPES_H 1
[  142s] #define HAVE_STDINT_H 1
[  142s] #define HAVE_UNISTD_H 1
[  142s] #define HAVE_DLFCN_H 1
[  142s] #define LT_OBJDIR ".libs/"
[  142s] #define STDC_HEADERS 1
[  142s] #define HAVE_BYTESWAP_H 1
[  142s] #define TIME_WITH_SYS_TIME 1
[  142s] 
[  142s] configure: exit 1
[  142s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu 
--libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  142s] debian/rules:6: recipe for target 'build' failed
[  142s] make: *** [build] Error 2
[  142s] dpkg-buildpackage: error:[  132.924227] serial8250: too much work for 
irq4
[  142s]  debian/rules build gave error exit status 2
[  142s] 
[  142s] lamb22 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:10:11 UTC 2018.
[  142s] 
[  142s] ### VM INTERACTION START ###
[  145s] [  135.846819] reboot: Power down
[  145s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_10/root.monitor: Permission denied
[  145s] ### VM INTERACTION END ###
[  145s] 
[  145s] lamb22 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:10:15 UTC 2018.
[  145s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_17.04/i586

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_17.04/i586

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  129s] #define HAVE_SYS_STAT_H 1
[  129s] #define HAVE_STDLIB_H 1
[  129s] #define HAVE_STRING_H 1
[  129s] #define HAVE_MEMORY_H 1
[  129s] #define HAVE_STRINGS_H 1
[  129s] #define HAVE_INTTYPES_H 1
[  129s] #define HAVE_STDINT_H 1
[  129s] #define HAVE_UNISTD_H 1
[  129s] #define HAVE_DLFCN_H 1
[  129s] #define LT_OBJDIR ".libs/"
[  129s] #define STDC_HEADERS 1
[  129s] #define HAVE_BYTESWAP_H 1
[  129s] #define TIME_WITH_SYS_TIME 1
[  129s] 
[  129s] configure: exit 1
[  129s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu 
--libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  129s] debian/rules:6: recipe for target 'build' failed
[  129s] make: *** [build] Error 2
[  129s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  129s] 
[  129s] lamb60 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:08:28 UTC 2018.
[  129s] 
[  129s] ### VM INTERACTION START ###
[  132s] [  123.130732] reboot: Power down
[  132s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_11/root.monitor: Permission denied
[  132s] ### VM INTERACTION END ###
[  132s] 
[  132s] lamb60 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:08:32 UTC 2018.
[  132s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_9.0/i586

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_9.0/i586

Package network:osmocom:nightly/osmo-trx failed to build in Debian_9.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  251s] #define HAVE_SYS_STAT_H 1
[  251s] #define HAVE_STDLIB_H 1
[  251s] #define HAVE_STRING_H 1
[  251s] #define HAVE_MEMORY_H 1
[  251s] #define HAVE_STRINGS_H 1
[  251s] #define HAVE_INTTYPES_H 1
[  251s] #define HAVE_STDINT_H 1
[  251s] #define HAVE_UNISTD_H 1
[  251s] #define HAVE_DLFCN_H 1
[  251s] #define LT_OBJDIR ".libs/"
[  251s] #define STDC_HEADERS 1
[  251s] #define HAVE_BYTESWAP_H 1
[  251s] #define TIME_WITH_SYS_TIME 1
[  251s] 
[  251s] configure: exit 1
[  251s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu 
--libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  251s] debian/rules:6: recipe for target 'build' failed
[  251s] make: *** [build] Error 2
[  251s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  251s] 
[  251s] cloud128 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:06:36 UTC 2018.
[  251s] 
[  251s] ### VM INTERACTION START ###
[  254s] [  207.955167] reboot: Power down
[  254s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_1/root.monitor: Permission denied
[  254s] ### VM INTERACTION END ###
[  254s] 
[  254s] cloud128 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:06:40 UTC 2018.
[  254s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/i586

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/i586

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  155s] #define HAVE_SYS_STAT_H 1
[  155s] #define HAVE_STDLIB_H 1
[  155s] #define HAVE_STRING_H 1
[  155s] #define HAVE_MEMORY_H 1
[  155s] #define HAVE_STRINGS_H 1
[  155s] #define HAVE_INTTYPES_H 1
[  155s] #define HAVE_STDINT_H 1
[  155s] #define HAVE_UNISTD_H 1
[  155s] #define HAVE_DLFCN_H 1
[  155s] #define LT_OBJDIR ".libs/"
[  155s] #define STDC_HEADERS 1
[  155s] #define HAVE_BYTESWAP_H 1
[  155s] #define TIME_WITH_SYS_TIME 1
[  155s] 
[  155s] configure: exit 1
[  155s] dh_auto_configure: ./configure --build=i686-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/i386-linux-gnu 
--libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  155s] debian/rules:6: recipe for target 'build' failed
[  155s] make: *** [build] Error 255
[  155s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  155s] 
[  155s] lamb08 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:04:26 UTC 2018.
[  155s] 
[  155s] ### VM INTERACTION START ###
[  158s] [  149.626942] reboot: Power down
[  158s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_3/root.monitor: Permission denied
[  158s] ### VM INTERACTION END ###
[  158s] 
[  158s] lamb08 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:04:31 UTC 2018.
[  158s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_9.0/aarch64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-trx failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  520s] configure:10092: $? = 0
[  520s] configure:10092: result: yes
[  520s] configure:10106: checking for dlfcn.h
[  520s] configure:10106: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
[  520s] configure:10106: $? = 0
[  520s] configure:10106: result: yes
[  520s] configure:10310: checking for objdir
[  520s] configure:10325: result: .libs
[  520s] configure:10589: checking if gcc supports -fno-rtti -fno-exceptions
[  520s] configure:10607: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fno-rtti 
-fno-exceptions conftest.c >&5
[  520s] cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ 
but not for C
[  520s] configure:10611: $? = 0
[  520s] configure:10624: result: no
[  520s] configure:10982: checking for gcc option to produce PIC
[  520s] configure:10989: result: -fPIC -DPIC
[  520s] configure:10997: checking if gcc PIC flag -fPIC -DPIC works
[  520s] configure:11015: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPIC -DPIC 
conftest.c >&5
[  520s] configure:11019: $? = 0
[  520s] configure:11032: result: yes
[  520s] configure:11061: checking if gcc static flag -static works
[  520s] configure:11089: result: yes
[  520s] configure:11104: checking if gcc supports -c -o file.o
[  522s] configure:11125: gcc -c -g -O2 -fdebug-[  482.553977] sysrq: SysRq : 
Power Off
[  522s] [  482.576320] reboot: Power down
[  522s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_23/root.monitor: Permission denied
[  522s] ### VM INTERACTION END ###
[  522s] 
[  522s] obs-arm-2 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:00:54 UTC 2018.
[  522s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in xUbuntu_16.04/x86_64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in xUbuntu_16.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  242s] #define HAVE_SYS_STAT_H 1
[  242s] #define HAVE_STDLIB_H 1
[  242s] #define HAVE_STRING_H 1
[  242s] #define HAVE_MEMORY_H 1
[  242s] #define HAVE_STRINGS_H 1
[  242s] #define HAVE_INTTYPES_H 1
[  242s] #define HAVE_STDINT_H 1
[  242s] #define HAVE_UNISTD_H 1
[  242s] #define HAVE_DLFCN_H 1
[  242s] #define LT_OBJDIR ".libs/"
[  242s] #define STDC_HEADERS 1
[  242s] #define HAVE_BYTESWAP_H 1
[  242s] #define TIME_WITH_SYS_TIME 1
[  242s] 
[  242s] configure: exit 1
[  242s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  242s] debian/rules:6: recipe for target 'build' failed
[  242s] make: *** [build] Error 255
[  242s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  242s] 
[  242s] lamb57 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:00:20 UTC 2018.
[  242s] 
[  242s] ### VM INTERACTION START ###
[  245s] [  228.843881] reboot: Power down
[  245s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  245s] ### VM INTERACTION END ###
[  245s] 
[  245s] lamb57 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
20:00:23 UTC 2018.
[  245s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_9.0/x86_64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_9.0/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in Debian_9.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  165s] #define HAVE_INTTYPES_H 1
[  165s] #define HAVE_STDINT_H 1
[  165s] #define HAVE_UNISTD_H 1
[  165s] #define HAVE_DLFCN_H 1
[  165s] #define LT_OBJDIR ".libs/"
[  165s] #define STDC_HEADERS 1
[  165s] #define HAVE_BYTESWAP_H 1
[  165s] #define TIME_WITH_SYS_TIME 1
[  165s] 
[  165s] configure: exit 1
[  165s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  165s] debian/rules:6: recipe for target 'build' failed
[  165s] make: *** [build] Error 2
[  165s] [  155.721251] serial8250: too much work for irq4
[  165s] [  155.828357] serial8250: too much work for irq4
[  165s] [  155.936311] serial8250: too much work for irq4
[  165s] [  156.032348] serial8250: too much work for irq4
[  165s] [  156.132096] serial8250: too much work for irq4
[  165s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  165s] 
[  165s] lamb52 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
19:59:02 UTC 2018.
[  165s] 
[  165s] ### VM INTERACTION START ###
[  168s] [  159.294908] reboot: Power down
[  168s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_11/root.monitor: Permission denied
[  168s] ### VM INTERACTION END ###
[  168s] 
[  168s] lamb52 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
19:59:06 UTC 2018.
[  168s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/i586

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/i586

Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  132s] #define HAVE_STDLIB_H 1
[  132s] #define HAVE_STRING_H 1
[  132s] #define HAVE_MEMORY_H 1
[  132s] #define HAVE_STRINGS_H 1
[  132s] #define HAVE_INTTYPES_H 1
[  132s] #define HAVE_STDINT_H 1
[  132s] #define HAVE_UNISTD_H 1
[  132s] #define HAVE_DLFCN_H 1
[  132s] #define LT_OBJDIR ".libs/"
[  132s] #define STDC_HEADERS 1
[  132s] #define HAVE_BYTESWAP_H 1
[  132s] #define TIME_WITH_SYS_TIME 1
[  132s] 
[  132s] configure: exit 1
[  132s] dh_auto_configure: ./configure --build=i586-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--libdir=${prefix}/lib/i386-linux-gnu --libexecdir=${prefix}/lib/i386-linux-gnu 
--disable-maintainer-mode --disable-dependency-tracking returned exit code 1
[  132s] debian/rules:6: recipe for target 'build' failed
[  132s] make: *** [build] Error 255
[  132s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  132s] 
[  132s] lamb12 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
19:58:07 UTC 2018.
[  132s] 
[  132s] ### VM INTERACTION START ###
[  133s] Powering off.
[  133s] [  124.343436] reboot: Power down
[  133s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  133s] ### VM INTERACTION END ###
[  133s] 
[  133s] lamb12 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
19:58:09 UTC 2018.
[  133s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_8.0/x86_64

2018-02-25 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_8.0/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in Debian_8.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  126s] #define HAVE_STDLIB_H 1
[  126s] #define HAVE_STRING_H 1
[  126s] #define HAVE_MEMORY_H 1
[  126s] #define HAVE_STRINGS_H 1
[  126s] #define HAVE_INTTYPES_H 1
[  126s] #define HAVE_STDINT_H 1
[  126s] #define HAVE_UNISTD_H 1
[  126s] #define HAVE_DLFCN_H 1
[  126s] #define LT_OBJDIR ".libs/"
[  126s] #define STDC_HEADERS 1
[  126s] #define HAVE_BYTESWAP_H 1
[  126s] #define TIME_WITH_SYS_TIME 1
[  126s] 
[  126s] configure: exit 1
[  126s] dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
[  126s] debian/rules:6: recipe for target 'build' failed
[  126s] make: *** [build] Error 255
[  126s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  126s] 
[  126s] lamb14 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
19:57:34 UTC 2018.
[  126s] 
[  126s] ### VM INTERACTION START ###
[  127s] Powering off.
[  127s] [  118.817259] reboot: Power down
[  127s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  127s] ### VM INTERACTION END ###
[  127s] 
[  127s] lamb14 failed "build osmo-trx_0.2.0.20180225.dsc" at Sun Feb 25 
19:57:35 UTC 2018.
[  127s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-ci[master]: jenkins: gerrit-builds: replace the label linux_amd64_debian...

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6912

jenkins: gerrit-builds: replace the label linux_amd64_debian8/9 -> 
osmocom-gerrit-debian8/9

Introduce more precise labels to allow more flexibility when extending the 
jenkins setup.
The linux_amd64_debian8 or linux_amd64_debian9 is used across all build jobs 
which
make it hard to add new nodes which might only support one group of
jobs.

Change-Id: I900b7b50b33cc95e127ca78d2a47f59d32a6dfee
---
M jobs/README.adoc
M jobs/gerrit-verifications.yml
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/12/6912/1

diff --git a/jobs/README.adoc b/jobs/README.adoc
index 5f94ca4..fadafd8 100644
--- a/jobs/README.adoc
+++ b/jobs/README.adoc
@@ -102,3 +102,5 @@
 
 - osmocom-master-debian8: are nodes which can build osmocom-master and is a 
debian 8
 - osmocom-master-debian9: are nodes which can build osmocom-master and is a 
debian 9
+- osmocom-gerrit-debian8: are nodes which can build osmocom-gerrit and is a 
debian 8
+- osmocom-gerrit-debian9: are nodes which can build osmocom-gerrit and is a 
debian 9
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index 88b47bb..de836ae 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -6,9 +6,9 @@
 # following default values can be overridden by each repo
 disabled: false
 concurrent: false
-node: linux_amd64_debian8
+node: osmocom-gerrit-debian8
 # axes related defaults
-slave_axis: !!python/tuple [linux_amd64_debian8]
+slave_axis: !!python/tuple [osmocom-gerrit-debian8]
 a1_name: a1
 a1: !!python/tuple [default]
 a2_name: a2
@@ -109,7 +109,7 @@
   - osmo-gsm-manuals
 
   - osmo-hlr:
-  slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-gerrit-debian8, 
osmocom-gerrit-debian9]
 
   - osmo-iuh
 
@@ -174,7 +174,7 @@
   - osmo-sip-connector
 
   - osmo-trx:
-  slave_axis: !!python/tuple [linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-gerrit-debian9]
   a1_name: INSTR
   a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4]
   concurrent: true

-- 
To view, visit https://gerrit.osmocom.org/6912
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I900b7b50b33cc95e127ca78d2a47f59d32a6dfee
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-trx[master]: jenkins.sh: enable the cleanup workspace after building

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6911

jenkins.sh: enable the cleanup workspace after building

Emptyness with a literal string will never be zero.

Change-Id: Ib228ff247a72b21b12e8dd4cbe3afe3e858c89d3
---
M contrib/jenkins.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/11/6911/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index a063b2e..50ad6fd 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -83,6 +83,6 @@
 $MAKE check \
   || cat-testlogs.sh
 
-if [ -z "x${INSIDE_CHROOT}" ]; then
+if [ -z "${INSIDE_CHROOT}" ]; then
 osmo-clean-workspace.sh
 fi

-- 
To view, visit https://gerrit.osmocom.org/6911
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib228ff247a72b21b12e8dd4cbe3afe3e858c89d3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-trx[master]: jenkins.sh: fix the download url if the qemu image wasn't setup

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6910

jenkins.sh: fix the download url if the qemu image wasn't setup

Download the image from yesterday because linuxcontainers only contains the 
images of the last 3 days.

Change-Id: I75e270b7255c1cd7fca1674111b0f19fc7bba74f
---
M contrib/jenkins.sh
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/10/6910/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 781e699..a063b2e 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -41,7 +41,8 @@
 sed -i "s/setup_proc//g" 
"$ROOTFS/debootstrap/suite-script"
 mychroot /debootstrap/debootstrap 
--second-stage --verbose http://ftp.de.debian.org/debian/
 else
-wget -nc -q 
"https://uk.images.linuxcontainers.org/images/debian/stretch/armhf/default/20180114_22:42/rootfs.tar.xz;
+YESTERDAY=$(python -c 'import datetime ; 
print((datetime.datetime.now() - 
datetime.timedelta(days=1)).strftime("%Y%m%d"))')
+wget -nc -q 
"https://uk.images.linuxcontainers.org/images/debian/stretch/armhf/default/${YESTERDAY}_22:42/rootfs.tar.xz;
 tar -xf rootfs.tar.xz -C "$ROOTFS/" || true
 echo "nameserver 8.8.8.8" > 
"$ROOTFS/etc/resolv.conf"
 fi

-- 
To view, visit https://gerrit.osmocom.org/6910
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75e270b7255c1cd7fca1674111b0f19fc7bba74f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-trx[master]: jenkins.sh: change qemu-img default location to $HOME/qemu-i...

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6909

jenkins.sh: change qemu-img default location to $HOME/qemu-img instead of 
/opt/qemu-img

Change-Id: I56f314d78c0ca968b1fef9a91ecd540a7cc8fa86
---
M contrib/jenkins.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/09/6909/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index cee709d..781e699 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -28,7 +28,7 @@
 if ! $(substr "arm" "$(uname -m)") && [ "x${INSTR}" = "x--with-neon" 
-o "x${INSTR}" = "x--with-neon-vfpv4" ]; then
 
 OSMOTRX_DIR="$PWD" # we assume we are called as 
contrib/jenkins.sh
-ROOTFS_PREFIX="${ROOTFS_PREFIX:-/opt}"
+ROOTFS_PREFIX="${ROOTFS_PREFIX:-$HOME}"
 ROOTFS="${ROOTFS_PREFIX}/qemu-img"
 mkdir -p "${ROOTFS_PREFIX}"
 

-- 
To view, visit https://gerrit.osmocom.org/6909
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56f314d78c0ca968b1fef9a91ecd540a7cc8fa86
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-ci[master]: jenkins: master-builds: replace the label linux_amd64_debian...

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6908

jenkins: master-builds: replace the label linux_amd64_debian8/9 -> 
osmocom-master-debian8/9

Introduce more precise labels to allow more flexibility when extending the 
jenkins setup.
The linux_amd64_debian8 or linux_amd64_debian9 is used across all build jobs 
which
make it hard to add new nodes which might only support one group of
jobs.

Change-Id: I0fa3d3f81ab01e2488fe07601740f42eb54b6d9c
---
M jobs/README.adoc
M jobs/master-builds.yml
2 files changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/08/6908/1

diff --git a/jobs/README.adoc b/jobs/README.adoc
index d498658..5f94ca4 100644
--- a/jobs/README.adoc
+++ b/jobs/README.adoc
@@ -94,3 +94,11 @@
 and make sure to *not* pick the python3 versions
 (or you'll need to add catching of HTTPError to jenkins/__init__.py in
 'def maybe_add_crumb')
+
+*Jenkins labels*
+
+The build jobs are using labels to specify on which nodes the job should be 
run.
+Please use the following labels
+
+- osmocom-master-debian8: are nodes which can build osmocom-master and is a 
debian 8
+- osmocom-master-debian9: are nodes which can build osmocom-master and is a 
debian 9
diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 392d9ba..bb1de8d 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -5,9 +5,9 @@
 # following default values can be overridden by each repo
 disabled: false
 concurrent: false
-node: linux_amd64_debian8
+node: osmocom-master-debian8
 # axes related defaults
-slave_axis: !!python/tuple [linux_amd64_debian8]
+slave_axis: !!python/tuple [osmocom-master-debian8]
 a1_name: a1
 a1: !!python/tuple [default]
 a2_name: a2
@@ -156,7 +156,7 @@
 ./contrib/jenkins.sh --publish
 
   - osmo-hlr:
-  slave_axis: !!python/tuple [linux_amd64_debian8, linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-master-debian8, 
osmocom-master-debian9]
 
   - osmo-iuh:
   trigger: master-osmo-msc, master-osmo-sgsn
@@ -244,7 +244,7 @@
   - osmo-tetra
 
   - osmo-trx:
-  slave_axis: !!python/tuple [linux_amd64_debian9]
+  slave_axis: !!python/tuple [osmocom-master-debian9]
   a1_name: INSTR
   a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4]
   concurrent: true

-- 
To view, visit https://gerrit.osmocom.org/6908
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fa3d3f81ab01e2488fe07601740f42eb54b6d9c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-ci[master]: jenkins: add node admin2-deb8build to the update jobs

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6907

jenkins: add node admin2-deb8build to the update jobs

Change-Id: I6b703b9f27865b146f20bea953fe3d6500a88166
---
M jobs/update-osmo-ci-on-slaves.yml
M jobs/update-osmo-python-on-slaves.yml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/07/6907/1

diff --git a/jobs/update-osmo-ci-on-slaves.yml 
b/jobs/update-osmo-ci-on-slaves.yml
index a809b5f..429c29d 100644
--- a/jobs/update-osmo-ci-on-slaves.yml
+++ b/jobs/update-osmo-ci-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb8build, admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30
diff --git a/jobs/update-osmo-python-on-slaves.yml 
b/jobs/update-osmo-python-on-slaves.yml
index d4407f4..c859ec6 100644
--- a/jobs/update-osmo-python-on-slaves.yml
+++ b/jobs/update-osmo-python-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb8build, admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30

-- 
To view, visit https://gerrit.osmocom.org/6907
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b703b9f27865b146f20bea953fe3d6500a88166
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-ci[master]: jenkins: add node admin2-deb9build to the update jobs

2018-02-25 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/6906

jenkins: add node admin2-deb9build to the update jobs

Change-Id: Ie3803a46ee192dc72823291004ee20f4bdbe0126
---
M jobs/update-osmo-ci-on-slaves.yml
M jobs/update-osmo-python-on-slaves.yml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/06/6906/1

diff --git a/jobs/update-osmo-ci-on-slaves.yml 
b/jobs/update-osmo-ci-on-slaves.yml
index b79751e..a809b5f 100644
--- a/jobs/update-osmo-ci-on-slaves.yml
+++ b/jobs/update-osmo-ci-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30
diff --git a/jobs/update-osmo-python-on-slaves.yml 
b/jobs/update-osmo-python-on-slaves.yml
index ce3033d..d4407f4 100644
--- a/jobs/update-osmo-python-on-slaves.yml
+++ b/jobs/update-osmo-python-on-slaves.yml
@@ -5,7 +5,7 @@
   - axis:
   type: slave
   name: label
-  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build ]
+  values: [ OsmocomBuild1, build1-debian9-lxc, build2-deb8build, 
admin2-deb9build ]
 properties:
   - build-discarder:
   days-to-keep: 30

-- 
To view, visit https://gerrit.osmocom.org/6906
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3803a46ee192dc72823291004ee20f4bdbe0126
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[MERGED] osmo-ttcn3-hacks[master]: Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation
..


Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation

Let's have one SI3 definition rather than multiple...

Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
---
M bts/BTS_Tests.ttcn
M bts/gen_links.sh
M library/GSM_RR_Types.ttcn
M library/GSM_SystemInformation.ttcn
M sysinfo/Test.ttcn
5 files changed, 67 insertions(+), 107 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index cc78057..ba76cf6 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -6,6 +6,7 @@
 import from Osmocom_Types all;
 import from GSM_Types all;
 import from GSM_RR_Types all;
+import from GSM_SystemInformation all;
 import from L1CTL_PortType all;
 import from L1CTL_Types all;
 import from LAPDm_Types all;
@@ -86,8 +87,16 @@
ConnL1Pars l1_pars
 }
 
+template (value) RachControlParameters ts_RachCtrl_default := {
+   max_retrans := RACH_MAX_RETRANS_1,
+   tx_integer := ''B, /* 3 slots */
+   cell_barr_access := false,
+   re_not_allowed := true,
+   acc := ''B
+};
+
 /* Default SYSTEM INFORMATION 3 */
-template (value) GsmRrMessage ts_SI3_default := {
+template (value) SystemInformation ts_SI3_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 0),
payload := {
si3 := {
@@ -101,32 +110,26 @@
att := true,
bs_ag_blks_res := 1,
ccch_conf := CCHAN_DESC_1CCCH_COMBINED,
-   si22_ind := false,
+   si22ind := false,
cbq3 := CBQ3_IU_MODE_NOT_SUPPORTED,
spare := '00'B,
bs_pa_mfrms := 0, /* 2 multiframes */
t3212 := 1 /* 6 minutes */
},
-   cell_opts := {
+   cell_options := {
dn_ind := false,
pwrc := false,
dtx := MS_MAY_USE_UL_DTX,
radio_link_tout_div4 := 4/4
},
-   cell_sel_pars := {
+   cell_sel_par := {
cell_resel_hyst_2dB := 0,
ms_txpwr_max_cch := 0,
acs := '0'B,
neci := true,
rxlev_access_min := 0
},
-   rach_ctrl_pars := {
-   max_retrans := RACH_MAX_RETRANS_1,
-   tx_integer := ''B, /* 3 slots */
-   cell_bar_access := false,
-   re_not_allowed := true,
-   acc := ''B
-   },
+   rach_control := ts_RachCtrl_default,
rest_octets := ''O
}
}
@@ -139,9 +142,9 @@
f_sleep(0.5);   /* workaround for OS#3000 */
 
/* Send SI3 to the BTS, it is needed for various computations */
-   var GsmRrMessage si3 := valueof(ts_SI3_default);
+   var SystemInformation si3 := valueof(ts_SI3_default);
log("Sending SI3 ", si3);
-   var octetstring si3_enc := enc_GsmRrMessage(si3);
+   var octetstring si3_enc := enc_SystemInformation(si3);
RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc)));
 }
 
diff --git a/bts/gen_links.sh b/bts/gen_links.sh
index 81df7bb..eaafd19 100755
--- a/bts/gen_links.sh
+++ b/bts/gen_links.sh
@@ -36,7 +36,7 @@
 gen_links $DIR $FILES
 
 DIR=../library
-FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn 
RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn 
L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn "
+FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn 
GSM_SystemInformation.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn 
RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn 
LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn "
 #FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn 
NS_CodecPort_CtrlFunctDef.cc "
 #FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn 
RSL_Types.ttcn RSL_Emulation.ttcn "
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index a8b6db2..75be6f8 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn

[MERGED] osmo-ttcn3-hacks[master]: Helper functions in GSM_Tyes and Osmocom_Types

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Helper functions in GSM_Tyes and Osmocom_Types
..


Helper functions in GSM_Tyes and Osmocom_Types

Change-Id: Ibd8f215a7cd4564126503c3552bbcceb6d31c779
---
M library/GSM_Types.ttcn
M library/Osmocom_Types.ttcn
2 files changed, 24 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 5884c27..b86bfd7 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -247,5 +247,10 @@
return GSM51_MFRAMES_PER_SEC * int2float(bs_ag_blks_res);
 }
 
+/* compute TC as per 45.002 6.3.1.3 */
+function f_gsm_compute_tc(integer fn) return integer {
+   return (fn / 51) mod 8;
+}
+
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" }
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index 713acc9..a6d5c82 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -99,5 +99,24 @@
self.stop;
 }
 
+type record of integer IntegerRecord;
+
+function int2bool(integer int) return boolean {
+   if (int != 0) {
+   return true;
+   } else {
+   return false;
+   }
+}
+
+function f_array_contains(IntegerRecord arr, integer key) return boolean {
+   for (var integer i:= 0; i< sizeof(arr); i := i + 1) {
+   if (arr[i] == key) {
+   return true;
+   }
+   }
+   return false;
+}
+
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" }

-- 
To view, visit https://gerrit.osmocom.org/6903
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd8f215a7cd4564126503c3552bbcceb6d31c779
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on l...

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on 
lchan)
..


bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on lchan)

Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
---
M bts/BTS_Tests.ttcn
1 file changed, 28 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 9c2e74a..cc78057 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1049,6 +1049,33 @@
vc_conn.done;
 }
 
+/* Sequence of CRCX, 2x MDCX, DLCX */
+function f_TC_ipa_crcx_mdcx_mdcx_dlcx_not_active(charstring id) runs on 
ConnHdlr {
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?),
+"IPA CRCX ACK");
+   var uint32_t remote_ip := f_rnd_int(c_UINT32_MAX);
+   var uint16_t remote_port := f_rnd_int(c_UINT16_MAX);
+   var uint7_t rtp_pt2 := f_rnd_int(127);
+   var uint16_t fake_conn_id := 23; /* we're too lazy to read it out from 
the CRCX ACK above */
+   f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, 
remote_port, rtp_pt2),
+tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2),
+"IPA MDCX ACK");
+   /* Second MDCX */
+   remote_ip := f_rnd_int(c_UINT32_MAX);
+   remote_port := f_rnd_int(c_UINT16_MAX);
+   f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, 
remote_port, rtp_pt2),
+tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2),
+"IPA MDCX ACK");
+   f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, fake_conn_id), 
tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?),
+"IPA DLCX ACK");
+}
+testcase TC_ipa_crcx_mdcx_mdcx_dlcx_not_active() runs on test_CT {
+   var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN));
+   f_init(testcasename());
+   var ConnHdlr vc_conn := 
f_start_handler(refers(f_TC_ipa_crcx_mdcx_mdcx_dlcx_not_active), pars);
+   vc_conn.done;
+}
+
 /* IPA CRCX on SDCCH/4 and SDCCH/8 (doesn't make sense) */
 function f_TC_ipa_crcx_sdcch_not_active(charstring id) runs on ConnHdlr {
f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_NACK(g_chan_nr, ?),
@@ -1122,6 +1149,7 @@
execute( TC_ipa_dlcx_not_active() );
execute( TC_ipa_crcx_twice_not_active() );
execute( TC_ipa_crcx_mdcx_dlcx_not_active() );
+   execute( TC_ipa_crcx_mdcx_mdcx_dlcx_not_active() );
execute( TC_ipa_crcx_sdcch_not_active() );
 }
 

-- 
To view, visit https://gerrit.osmocom.org/6901
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Set not only SI3 but also SI2+SI4 during initialization

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Set not only SI3 but also SI2+SI4 during initialization
..


bts: Set not only SI3 but also SI2+SI4 during initialization

Change-Id: I9146792285cdb7225150320d1949aaec28290abf
---
M bts/BTS_Tests.ttcn
1 file changed, 57 insertions(+), 15 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ba76cf6..7d4469e 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -95,16 +95,26 @@
acc := ''B
 };
 
+template (value) CellSelectionParameters ts_CellSelPar_default := {
+   cell_resel_hyst_2dB := 0,
+   ms_txpwr_max_cch := 0,
+   acs := '0'B,
+   neci := true,
+   rxlev_access_min := 0
+}
+
+template (value) LocationAreaIdentification ts_LAI_default := {
+   mcc_mnc := '262F42'H,
+   lac := 42
+}
+
 /* Default SYSTEM INFORMATION 3 */
 template (value) SystemInformation ts_SI3_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 0),
payload := {
si3 := {
cell_id := 23,
-   lai := {
-   mcc_mnc := '262F42'H,
-   lac := 42
-   },
+   lai := ts_LAI_default,
ctrl_chan_desc := {
msc_r99 := true,
att := true,
@@ -122,17 +132,49 @@
dtx := MS_MAY_USE_UL_DTX,
radio_link_tout_div4 := 4/4
},
-   cell_sel_par := {
-   cell_resel_hyst_2dB := 0,
-   ms_txpwr_max_cch := 0,
-   acs := '0'B,
-   neci := true,
-   rxlev_access_min := 0
-   },
+   cell_sel_par := ts_CellSelPar_default,
rach_control := ts_RachCtrl_default,
rest_octets := ''O
}
}
+}
+
+template (value) SystemInformation ts_SI2_default := {
+   header := t_RrHeader(SYSTEM_INFORMATION_TYPE_2, 0),
+   payload := {
+   si2 := {
+   bcch_freq_list := ''O,
+   ncc_permitted := ''B,
+   rach_control := ts_RachCtrl_default
+   }
+   }
+}
+
+template (value) SystemInformation ts_SI4_default := {
+   header := t_RrHeader(SYSTEM_INFORMATION_TYPE_4, 0),
+   payload := {
+   si4 := {
+   lai := ts_LAI_default,
+   cell_sel_par := ts_CellSelPar_default,
+   rach_control := ts_RachCtrl_default,
+   cbch_chan_desc := omit,
+   cbch_mobile_alloc := omit,
+   rest_octets := ''O
+   }
+   }
+}
+
+function f_rsl_bcch_fill_raw(RSL_IE_SysinfoType rsl_si_type, octetstring 
si_enc)
+runs on test_CT {
+   log("Setting ", rsl_si_type, ": ", si_enc);
+   RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(rsl_si_type, si_enc)));
+}
+
+function f_rsl_bcch_fill(RSL_IE_SysinfoType rsl_si_type, template (value) 
SystemInformation si_dec)
+runs on test_CT {
+   var octetstring si_enc := enc_SystemInformation(valueof(si_dec));
+   log("Setting ", rsl_si_type, ": ", si_dec);
+   f_rsl_bcch_fill_raw(rsl_si_type, si_enc);
 }
 
 /* global init function */
@@ -142,10 +184,10 @@
f_sleep(0.5);   /* workaround for OS#3000 */
 
/* Send SI3 to the BTS, it is needed for various computations */
-   var SystemInformation si3 := valueof(ts_SI3_default);
-   log("Sending SI3 ", si3);
-   var octetstring si3_enc := enc_SystemInformation(si3);
-   RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc)));
+   f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default);
+   /* SI2 + SI4 are required for SI testing as they are mandatory defaults 
*/
+   f_rsl_bcch_fill(RSL_SYSTEM_INFO_2, ts_SI2_default);
+   f_rsl_bcch_fill(RSL_SYSTEM_INFO_4, ts_SI4_default);
 }
 
 /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */

-- 
To view, visit https://gerrit.osmocom.org/6904
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9146792285cdb7225150320d1949aaec28290abf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: Add some more comments for better code grouping

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6905
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: bts: Add some more comments for better code grouping

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Add some more comments for better code grouping
..


bts: Add some more comments for better code grouping

Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
---
M bts/BTS_Tests.ttcn
1 file changed, 28 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 7d4469e..ab93c30 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -326,6 +326,10 @@
}
 }
 
+/***
+ * Channel Activation / Deactivation
+ ***/
+
 /* Stress test: Do 500 channel activations/deactivations in rapid succession */
 function f_TC_chan_act_stress(charstring id) runs on ConnHdlr {
for (var integer i := 0; i < 500; i := i+1) {
@@ -437,6 +441,10 @@
}
 }
 
+/***
+ * RACH Handling
+ ***/
+
 function f_TC_chan_req(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
 
@@ -452,6 +460,10 @@
vc_conn := f_start_handler(refers(f_TC_chan_req), pars);
vc_conn.done;
 }
+
+/***
+ * Measurement Processing / Reporting
+ ***/
 
 template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) := {
spare := '0'B,
@@ -722,6 +734,10 @@
vc_conn.done;
 }
 
+/***
+ * Paging
+ ***/
+
 function tmsi_is_dummy(TMSIP_TMSI_V tmsi) return boolean {
if (tmsi == ''O) {
return true;
@@ -729,7 +745,6 @@
return false;
}
 }
-
 
 altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer 
num_paging_rcv_ids)
 runs on test_CT {
@@ -977,6 +992,10 @@
 }
 
 
+/***
+ * Immediate Assignment / AGCH
+ ***/
+
 testcase TC_imm_ass() runs on test_CT {
f_init(testcasename());
for (var integer i := 0; i < 1000; i := i+1) {
@@ -996,6 +1015,10 @@
/* expect no ERROR REPORT after either of them *
/* negative test: ensure ERROR REPORT on unsupported types */
 }
+
+/***
+ * Low-Level Protocol Errors / ERROR REPORT
+ ***/
 
 private function f_exp_err_rep(template RSL_Cause cause) runs on test_CT {
timer T := 5.0;
@@ -1046,6 +1069,10 @@
 
f_exp_err_rep(RSL_ERR_IE_CONTENT);
 }
+
+/***
+ * IPA CRCX/MDCX/DLCS media stream handling
+ ***/
 
 /* Send IPA DLCX to inactive lchan */
 function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr {
@@ -1164,7 +1191,6 @@
 * Delete Indication on AGCH overflow
 * SMS Broadcast Req / Cmd / CBCH LOad Ind
 * RF resource ind
-* IPA/speech related commands
 * error handling
 * discriminator error
 ** type error

-- 
To view, visit https://gerrit.osmocom.org/6905
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: Set not only SI3 but also SI2+SI4 during initialization

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6904
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9146792285cdb7225150320d1949aaec28290abf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Helper functions in GSM_Tyes and Osmocom_Types

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6903
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibd8f215a7cd4564126503c3552bbcceb6d31c779
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6902
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on l...

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6901
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6902

Merge duplicate SI3 in GSM_RR_Types and GSM_SystemInformation

Let's have one SI3 definition rather than multiple...

Change-Id: I3c4754c9a69cb2fa51d88ef6358d5399dbb29860
---
M bts/BTS_Tests.ttcn
M bts/gen_links.sh
M library/GSM_RR_Types.ttcn
M library/GSM_SystemInformation.ttcn
M sysinfo/Test.ttcn
5 files changed, 67 insertions(+), 107 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/02/6902/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index cc78057..ba76cf6 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -6,6 +6,7 @@
 import from Osmocom_Types all;
 import from GSM_Types all;
 import from GSM_RR_Types all;
+import from GSM_SystemInformation all;
 import from L1CTL_PortType all;
 import from L1CTL_Types all;
 import from LAPDm_Types all;
@@ -86,8 +87,16 @@
ConnL1Pars l1_pars
 }
 
+template (value) RachControlParameters ts_RachCtrl_default := {
+   max_retrans := RACH_MAX_RETRANS_1,
+   tx_integer := ''B, /* 3 slots */
+   cell_barr_access := false,
+   re_not_allowed := true,
+   acc := ''B
+};
+
 /* Default SYSTEM INFORMATION 3 */
-template (value) GsmRrMessage ts_SI3_default := {
+template (value) SystemInformation ts_SI3_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 0),
payload := {
si3 := {
@@ -101,32 +110,26 @@
att := true,
bs_ag_blks_res := 1,
ccch_conf := CCHAN_DESC_1CCCH_COMBINED,
-   si22_ind := false,
+   si22ind := false,
cbq3 := CBQ3_IU_MODE_NOT_SUPPORTED,
spare := '00'B,
bs_pa_mfrms := 0, /* 2 multiframes */
t3212 := 1 /* 6 minutes */
},
-   cell_opts := {
+   cell_options := {
dn_ind := false,
pwrc := false,
dtx := MS_MAY_USE_UL_DTX,
radio_link_tout_div4 := 4/4
},
-   cell_sel_pars := {
+   cell_sel_par := {
cell_resel_hyst_2dB := 0,
ms_txpwr_max_cch := 0,
acs := '0'B,
neci := true,
rxlev_access_min := 0
},
-   rach_ctrl_pars := {
-   max_retrans := RACH_MAX_RETRANS_1,
-   tx_integer := ''B, /* 3 slots */
-   cell_bar_access := false,
-   re_not_allowed := true,
-   acc := ''B
-   },
+   rach_control := ts_RachCtrl_default,
rest_octets := ''O
}
}
@@ -139,9 +142,9 @@
f_sleep(0.5);   /* workaround for OS#3000 */
 
/* Send SI3 to the BTS, it is needed for various computations */
-   var GsmRrMessage si3 := valueof(ts_SI3_default);
+   var SystemInformation si3 := valueof(ts_SI3_default);
log("Sending SI3 ", si3);
-   var octetstring si3_enc := enc_GsmRrMessage(si3);
+   var octetstring si3_enc := enc_SystemInformation(si3);
RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc)));
 }
 
diff --git a/bts/gen_links.sh b/bts/gen_links.sh
index 81df7bb..eaafd19 100755
--- a/bts/gen_links.sh
+++ b/bts/gen_links.sh
@@ -36,7 +36,7 @@
 gen_links $DIR $FILES
 
 DIR=../library
-FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn 
RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn 
L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn "
+FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn 
GSM_SystemInformation.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn 
RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn 
LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn "
 #FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn 
NS_CodecPort_CtrlFunctDef.cc "
 #FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn 
RSL_Types.ttcn RSL_Emulation.ttcn "
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index a8b6db2..75be6f8 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -366,68 +366,6 @@
uint3_t non_drx_timer
} with { variant "" };
 
-   /* 44.018 10.5.2.3 */
-   type enumerated 

[PATCH] osmo-ttcn3-hacks[master]: bts: Add some more comments for better code grouping

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6905

bts: Add some more comments for better code grouping

Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
---
M bts/BTS_Tests.ttcn
1 file changed, 28 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/05/6905/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 7d4469e..ab93c30 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -326,6 +326,10 @@
}
 }
 
+/***
+ * Channel Activation / Deactivation
+ ***/
+
 /* Stress test: Do 500 channel activations/deactivations in rapid succession */
 function f_TC_chan_act_stress(charstring id) runs on ConnHdlr {
for (var integer i := 0; i < 500; i := i+1) {
@@ -437,6 +441,10 @@
}
 }
 
+/***
+ * RACH Handling
+ ***/
+
 function f_TC_chan_req(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
 
@@ -452,6 +460,10 @@
vc_conn := f_start_handler(refers(f_TC_chan_req), pars);
vc_conn.done;
 }
+
+/***
+ * Measurement Processing / Reporting
+ ***/
 
 template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) := {
spare := '0'B,
@@ -722,6 +734,10 @@
vc_conn.done;
 }
 
+/***
+ * Paging
+ ***/
+
 function tmsi_is_dummy(TMSIP_TMSI_V tmsi) return boolean {
if (tmsi == ''O) {
return true;
@@ -729,7 +745,6 @@
return false;
}
 }
-
 
 altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer 
num_paging_rcv_ids)
 runs on test_CT {
@@ -977,6 +992,10 @@
 }
 
 
+/***
+ * Immediate Assignment / AGCH
+ ***/
+
 testcase TC_imm_ass() runs on test_CT {
f_init(testcasename());
for (var integer i := 0; i < 1000; i := i+1) {
@@ -996,6 +1015,10 @@
/* expect no ERROR REPORT after either of them *
/* negative test: ensure ERROR REPORT on unsupported types */
 }
+
+/***
+ * Low-Level Protocol Errors / ERROR REPORT
+ ***/
 
 private function f_exp_err_rep(template RSL_Cause cause) runs on test_CT {
timer T := 5.0;
@@ -1046,6 +1069,10 @@
 
f_exp_err_rep(RSL_ERR_IE_CONTENT);
 }
+
+/***
+ * IPA CRCX/MDCX/DLCS media stream handling
+ ***/
 
 /* Send IPA DLCX to inactive lchan */
 function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr {
@@ -1164,7 +1191,6 @@
 * Delete Indication on AGCH overflow
 * SMS Broadcast Req / Cmd / CBCH LOad Ind
 * RF resource ind
-* IPA/speech related commands
 * error handling
 * discriminator error
 ** type error

-- 
To view, visit https://gerrit.osmocom.org/6905
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe68067f20d72318716c6a27f02d7bc9b56f1b01
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: bts: Set not only SI3 but also SI2+SI4 during initialization

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6904

bts: Set not only SI3 but also SI2+SI4 during initialization

Change-Id: I9146792285cdb7225150320d1949aaec28290abf
---
M bts/BTS_Tests.ttcn
1 file changed, 57 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/04/6904/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ba76cf6..7d4469e 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -95,16 +95,26 @@
acc := ''B
 };
 
+template (value) CellSelectionParameters ts_CellSelPar_default := {
+   cell_resel_hyst_2dB := 0,
+   ms_txpwr_max_cch := 0,
+   acs := '0'B,
+   neci := true,
+   rxlev_access_min := 0
+}
+
+template (value) LocationAreaIdentification ts_LAI_default := {
+   mcc_mnc := '262F42'H,
+   lac := 42
+}
+
 /* Default SYSTEM INFORMATION 3 */
 template (value) SystemInformation ts_SI3_default := {
header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 0),
payload := {
si3 := {
cell_id := 23,
-   lai := {
-   mcc_mnc := '262F42'H,
-   lac := 42
-   },
+   lai := ts_LAI_default,
ctrl_chan_desc := {
msc_r99 := true,
att := true,
@@ -122,17 +132,49 @@
dtx := MS_MAY_USE_UL_DTX,
radio_link_tout_div4 := 4/4
},
-   cell_sel_par := {
-   cell_resel_hyst_2dB := 0,
-   ms_txpwr_max_cch := 0,
-   acs := '0'B,
-   neci := true,
-   rxlev_access_min := 0
-   },
+   cell_sel_par := ts_CellSelPar_default,
rach_control := ts_RachCtrl_default,
rest_octets := ''O
}
}
+}
+
+template (value) SystemInformation ts_SI2_default := {
+   header := t_RrHeader(SYSTEM_INFORMATION_TYPE_2, 0),
+   payload := {
+   si2 := {
+   bcch_freq_list := ''O,
+   ncc_permitted := ''B,
+   rach_control := ts_RachCtrl_default
+   }
+   }
+}
+
+template (value) SystemInformation ts_SI4_default := {
+   header := t_RrHeader(SYSTEM_INFORMATION_TYPE_4, 0),
+   payload := {
+   si4 := {
+   lai := ts_LAI_default,
+   cell_sel_par := ts_CellSelPar_default,
+   rach_control := ts_RachCtrl_default,
+   cbch_chan_desc := omit,
+   cbch_mobile_alloc := omit,
+   rest_octets := ''O
+   }
+   }
+}
+
+function f_rsl_bcch_fill_raw(RSL_IE_SysinfoType rsl_si_type, octetstring 
si_enc)
+runs on test_CT {
+   log("Setting ", rsl_si_type, ": ", si_enc);
+   RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(rsl_si_type, si_enc)));
+}
+
+function f_rsl_bcch_fill(RSL_IE_SysinfoType rsl_si_type, template (value) 
SystemInformation si_dec)
+runs on test_CT {
+   var octetstring si_enc := enc_SystemInformation(valueof(si_dec));
+   log("Setting ", rsl_si_type, ": ", si_dec);
+   f_rsl_bcch_fill_raw(rsl_si_type, si_enc);
 }
 
 /* global init function */
@@ -142,10 +184,10 @@
f_sleep(0.5);   /* workaround for OS#3000 */
 
/* Send SI3 to the BTS, it is needed for various computations */
-   var SystemInformation si3 := valueof(ts_SI3_default);
-   log("Sending SI3 ", si3);
-   var octetstring si3_enc := enc_SystemInformation(si3);
-   RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc)));
+   f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default);
+   /* SI2 + SI4 are required for SI testing as they are mandatory defaults 
*/
+   f_rsl_bcch_fill(RSL_SYSTEM_INFO_2, ts_SI2_default);
+   f_rsl_bcch_fill(RSL_SYSTEM_INFO_4, ts_SI4_default);
 }
 
 /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */

-- 
To view, visit https://gerrit.osmocom.org/6904
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9146792285cdb7225150320d1949aaec28290abf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on l...

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6901

bts: Add TC_ipa_crcx_mdcx_mdcx_dlcx_not_active (2x MDCX on lchan)

Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
---
M bts/BTS_Tests.ttcn
1 file changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/01/6901/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 9c2e74a..cc78057 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1049,6 +1049,33 @@
vc_conn.done;
 }
 
+/* Sequence of CRCX, 2x MDCX, DLCX */
+function f_TC_ipa_crcx_mdcx_mdcx_dlcx_not_active(charstring id) runs on 
ConnHdlr {
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?),
+"IPA CRCX ACK");
+   var uint32_t remote_ip := f_rnd_int(c_UINT32_MAX);
+   var uint16_t remote_port := f_rnd_int(c_UINT16_MAX);
+   var uint7_t rtp_pt2 := f_rnd_int(127);
+   var uint16_t fake_conn_id := 23; /* we're too lazy to read it out from 
the CRCX ACK above */
+   f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, 
remote_port, rtp_pt2),
+tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2),
+"IPA MDCX ACK");
+   /* Second MDCX */
+   remote_ip := f_rnd_int(c_UINT32_MAX);
+   remote_port := f_rnd_int(c_UINT16_MAX);
+   f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, 
remote_port, rtp_pt2),
+tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2),
+"IPA MDCX ACK");
+   f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, fake_conn_id), 
tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?),
+"IPA DLCX ACK");
+}
+testcase TC_ipa_crcx_mdcx_mdcx_dlcx_not_active() runs on test_CT {
+   var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN));
+   f_init(testcasename());
+   var ConnHdlr vc_conn := 
f_start_handler(refers(f_TC_ipa_crcx_mdcx_mdcx_dlcx_not_active), pars);
+   vc_conn.done;
+}
+
 /* IPA CRCX on SDCCH/4 and SDCCH/8 (doesn't make sense) */
 function f_TC_ipa_crcx_sdcch_not_active(charstring id) runs on ConnHdlr {
f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_NACK(g_chan_nr, ?),
@@ -1122,6 +1149,7 @@
execute( TC_ipa_dlcx_not_active() );
execute( TC_ipa_crcx_twice_not_active() );
execute( TC_ipa_crcx_mdcx_dlcx_not_active() );
+   execute( TC_ipa_crcx_mdcx_mdcx_dlcx_not_active() );
execute( TC_ipa_crcx_sdcch_not_active() );
 }
 

-- 
To view, visit https://gerrit.osmocom.org/6901
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58475e15958002e18cbe9d471bb5c8959bbf7bed
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: Helper functions in GSM_Tyes and Osmocom_Types

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6903

Helper functions in GSM_Tyes and Osmocom_Types

Change-Id: Ibd8f215a7cd4564126503c3552bbcceb6d31c779
---
M library/GSM_Types.ttcn
M library/Osmocom_Types.ttcn
2 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/03/6903/1

diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 5884c27..b86bfd7 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -247,5 +247,10 @@
return GSM51_MFRAMES_PER_SEC * int2float(bs_ag_blks_res);
 }
 
+/* compute TC as per 45.002 6.3.1.3 */
+function f_gsm_compute_tc(integer fn) return integer {
+   return (fn / 51) mod 8;
+}
+
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" }
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index 713acc9..a6d5c82 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -99,5 +99,24 @@
self.stop;
 }
 
+type record of integer IntegerRecord;
+
+function int2bool(integer int) return boolean {
+   if (int != 0) {
+   return true;
+   } else {
+   return false;
+   }
+}
+
+function f_array_contains(IntegerRecord arr, integer key) return boolean {
+   for (var integer i:= 0; i< sizeof(arr); i := i + 1) {
+   if (arr[i] == key) {
+   return true;
+   }
+   }
+   return false;
+}
+
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" }

-- 
To view, visit https://gerrit.osmocom.org/6903
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd8f215a7cd4564126503c3552bbcceb6d31c779
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


libosmocore[master]: implement support for 3-digit MNC with leading zeros

2018-02-25 Thread Harald Welte

Patch Set 4:

I think it would make sense to introuce a new 'struct gsm_mcc' or the like to 
encapsulate the uint16_t + bool flag and then use that as function argument 
rather than always having a mnc _and_ a 'bool thre_digits' argument.

Or even start to treat the MNC as a string in the libosmo* API? The [NUL 
terminated] string carries length information with it implicitly. Or something 
like a 'char[4]' which has space for 2/3-digit MNC plus terminating NUL?

I mean, as we're breaking the API/ABI anyway, we can mals ake it comfortable 
for the API user, not harder.

-- 
To view, visit https://gerrit.osmocom.org/6659
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id2240f7f518494c9df6c8bda52c0d5092f90f221
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-trx[master]: osmo-trx: Drop cmd lines and use VTY cfg

2018-02-25 Thread Harald Welte

Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/6651/5//COMMIT_MSG
Commit Message:

Line 7: osmo-trx: Drop cmd lines and use VTY cfg
command line (options|arguments)


-- 
To view, visit https://gerrit.osmocom.org/6651
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8de1a5da4b3c0b6a49e00033f616e1d66656adf
Gerrit-PatchSet: 5
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6900
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: bts: Sleep for some time after RSL is up before using it

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Sleep for some time after RSL is up before using it
..


bts: Sleep for some time after RSL is up before using it

This is a work-around for an OsmoBSC bug, see OS#3000

Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Related: OS#3000
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index d3bdd62..bf7e839 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -136,6 +136,7 @@
 function f_init(charstring id := "BTS-Test") runs on test_CT {
f_init_rsl(id);
RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
+   f_sleep(0.5);   /* workaround for OS#3000 */
 
/* Send SI3 to the BTS, it is needed for various computations */
var GsmRrMessage si3 := valueof(ts_SI3_default);

-- 
To view, visit https://gerrit.osmocom.org/6899
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)
..


bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)

Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
---
M bts/BTS_Tests.ttcn
M library/RSL_Types.ttcn
2 files changed, 24 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index bf7e839..9c2e74a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1049,6 +1049,25 @@
vc_conn.done;
 }
 
+/* IPA CRCX on SDCCH/4 and SDCCH/8 (doesn't make sense) */
+function f_TC_ipa_crcx_sdcch_not_active(charstring id) runs on ConnHdlr {
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_NACK(g_chan_nr, ?),
+"IPA CRCX NACK");
+}
+testcase TC_ipa_crcx_sdcch_not_active() runs on test_CT {
+   var ConnHdlrPars pars;
+   var ConnHdlr vc_conn;
+   f_init(testcasename());
+
+   pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,1), ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_TC_ipa_crcx_sdcch_not_active), 
pars);
+   vc_conn.done;
+
+   pars := valueof(t_Pars(t_RslChanNr_SDCCH8(6,5), ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_TC_ipa_crcx_sdcch_not_active), 
pars);
+   vc_conn.done;
+}
+
 
 /* TODO Areas:
 
@@ -1103,6 +1122,7 @@
execute( TC_ipa_dlcx_not_active() );
execute( TC_ipa_crcx_twice_not_active() );
execute( TC_ipa_crcx_mdcx_dlcx_not_active() );
+   execute( TC_ipa_crcx_sdcch_not_active() );
 }
 
 
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 1d68969..3c2db73 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -475,6 +475,10 @@
RSL_ERR_SERV_OPT_UNIMPL ('4f'O),
/* invalid message */
RSL_ERR_RCH_ALR_ACTV_ALLOC  ('50'O),
+   RSL_ERR_IPA_RCH_NOT_ACTV_ALLOC  ('51'O),
+   RSL_ERR_IPA_CONN_INVALID('52'O),
+   RSL_ERR_IPA_CONN_IN_USE ('53'O),
+   RSL_ERR_IPA_CONN_ALREADY_EXISTS ('54'O),
RSL_ERR_INVALID_MESSAGE ('5f'O),
/* protocol error */
RSL_ERR_MSG_DISCR   ('60'O),

-- 
To view, visit https://gerrit.osmocom.org/6900
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: Sleep for some time after RSL is up before using it

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6899
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: bts: Sleep for some time after RSL is up before using it

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6899

bts: Sleep for some time after RSL is up before using it

This is a work-around for an OsmoBSC bug, see OS#3000

Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Related: OS#3000
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/99/6899/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index d3bdd62..bf7e839 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -136,6 +136,7 @@
 function f_init(charstring id := "BTS-Test") runs on test_CT {
f_init_rsl(id);
RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
+   f_sleep(0.5);   /* workaround for OS#3000 */
 
/* Send SI3 to the BTS, it is needed for various computations */
var GsmRrMessage si3 := valueof(ts_SI3_default);

-- 
To view, visit https://gerrit.osmocom.org/6899
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a552984a895b08d3f517bdc5844b810eb57700f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)

2018-02-25 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6900

bts: Add TC_ipa_crcx_sdcch_not_active (CRCX on SDDCH)

Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
---
M bts/BTS_Tests.ttcn
M library/RSL_Types.ttcn
2 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/00/6900/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index bf7e839..9c2e74a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1049,6 +1049,25 @@
vc_conn.done;
 }
 
+/* IPA CRCX on SDCCH/4 and SDCCH/8 (doesn't make sense) */
+function f_TC_ipa_crcx_sdcch_not_active(charstring id) runs on ConnHdlr {
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_NACK(g_chan_nr, ?),
+"IPA CRCX NACK");
+}
+testcase TC_ipa_crcx_sdcch_not_active() runs on test_CT {
+   var ConnHdlrPars pars;
+   var ConnHdlr vc_conn;
+   f_init(testcasename());
+
+   pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,1), ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_TC_ipa_crcx_sdcch_not_active), 
pars);
+   vc_conn.done;
+
+   pars := valueof(t_Pars(t_RslChanNr_SDCCH8(6,5), ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_TC_ipa_crcx_sdcch_not_active), 
pars);
+   vc_conn.done;
+}
+
 
 /* TODO Areas:
 
@@ -1103,6 +1122,7 @@
execute( TC_ipa_dlcx_not_active() );
execute( TC_ipa_crcx_twice_not_active() );
execute( TC_ipa_crcx_mdcx_dlcx_not_active() );
+   execute( TC_ipa_crcx_sdcch_not_active() );
 }
 
 
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 1d68969..3c2db73 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -475,6 +475,10 @@
RSL_ERR_SERV_OPT_UNIMPL ('4f'O),
/* invalid message */
RSL_ERR_RCH_ALR_ACTV_ALLOC  ('50'O),
+   RSL_ERR_IPA_RCH_NOT_ACTV_ALLOC  ('51'O),
+   RSL_ERR_IPA_CONN_INVALID('52'O),
+   RSL_ERR_IPA_CONN_IN_USE ('53'O),
+   RSL_ERR_IPA_CONN_ALREADY_EXISTS ('54'O),
RSL_ERR_INVALID_MESSAGE ('5f'O),
/* protocol error */
RSL_ERR_MSG_DISCR   ('60'O),

-- 
To view, visit https://gerrit.osmocom.org/6900
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8286cc5c36f4abff301f54f831adb672a1661a79
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[MERGED] osmo-ttcn3-hacks[master]: RSL: ts_RSL_IPA_MDCX_ACK contains *local* IP+Port, not remote

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL: ts_RSL_IPA_MDCX_ACK contains *local* IP+Port, not remote
..


RSL: ts_RSL_IPA_MDCX_ACK contains *local* IP+Port, not remote

the IPA_MDCX_ACK contains the BTS-side IP/Port, despite the MDCX
containing the BSC-side IP/Port!

Change-Id: Ided8acff720aeb52232d17c8f142a97557f4b424
---
M library/RSL_Types.ttcn
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 45d6aec..ddee44d 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1369,7 +1369,7 @@
}
 
template RSL_Message ts_RSL_IPA_MDCX_ACK(RslChannelNr chan_nr, template 
uint16_t ipa_conn_id,
-uint32_t remote_ip, uint16_t 
remote_port,
+uint32_t local_ip, uint16_t 
local_port,
 uint7_t rtp_pt2) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
msg_type := RSL_MT_IPAC_MDCX_ACK,
@@ -1377,8 +1377,8 @@
t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr}),
/* optional */
t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id 
:= ipa_conn_id}),
-   t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, 
RSL_IE_Body:{ipa_remote_ip := remote_ip}),
-   t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, 
RSL_IE_Body:{ipa_remote_port := remote_port}),
+   t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, 
RSL_IE_Body:{ipa_local_ip := local_ip}),
+   t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, 
RSL_IE_Body:{ipa_local_port := local_port}),
/* optional: RTP Payload Type */
t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, 
RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2})
}

-- 
To view, visit https://gerrit.osmocom.org/6892
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ided8acff720aeb52232d17c8f142a97557f4b424
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: RSL: Add more IPA related templates

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL: Add more IPA related templates
..


RSL: Add more IPA related templates

Change-Id: I432c75c25e20dd211c8a429bfd9d407999f6e99a
---
M library/RSL_Types.ttcn
1 file changed, 45 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index ddee44d..336b042 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1357,6 +1357,21 @@
}
}
 
+   template RSL_Message ts_RSL_IPA_MDCX(RslChannelNr chan_nr,
+uint16_t ipa_conn_id,
+uint32_t remote_ip, uint16_t 
remote_port,
+uint7_t rtp_pt2) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+   msg_type := RSL_MT_IPAC_MDCX,
+   ies := {
+   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr}),
+   t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id 
:= ipa_conn_id}),
+   t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, 
RSL_IE_Body:{ipa_remote_ip := remote_ip}),
+   t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, 
RSL_IE_Body:{ipa_remote_port := remote_port}),
+   /* optional: RTP Payload Type */
+   t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, 
RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2})
+   }
+   }
template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr,
 template uint16_t ipa_conn_id) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
@@ -1383,6 +1398,23 @@
t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, 
RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2})
}
}
+   template RSL_Message tr_RSL_IPA_MDCX_ACK(template RslChannelNr chan_nr,
+template uint16_t ipa_conn_id,
+template uint32_t local_ip,
+template uint16_t local_port,
+template uint7_t rtp_pt2) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+   msg_type := RSL_MT_IPAC_MDCX_ACK,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+   /* optional */
+   tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}),
+   tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}),
+   tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}),
+   /* optional: RTP Payload Type */
+   tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2})
+   }
+   }
 
template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, 
RSL_Cause cause,
  template uint16_t 
ipa_conn_id) := {
@@ -1395,6 +1427,19 @@
t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := 
ts_RSL_IE_Cause(cause)})
}
}
+   template RSL_Message tr_RSL_IPA_MDCX_NACK(template RslChannelNr chan_nr,
+ template RSL_Cause cause,
+ template uint16_t 
ipa_conn_id) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+   msg_type := RSL_MT_IPAC_MDCX_NACK,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+   /* optional connection ID */
+   tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}),
+   tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)})
+   }
+   }
+
 
template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t 
ipa_conn_id,
 RSL_IE_IPA_ConnectionStats 
stats, RSL_Cause cause) := {

-- 
To view, visit https://gerrit.osmocom.org/6893
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I432c75c25e20dd211c8a429bfd9d407999f6e99a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Add TC_ipa_dlcx_not_active()

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Add TC_ipa_dlcx_not_active()
..


bts: Add TC_ipa_dlcx_not_active()

Change-Id: I5c8eec8ba56b35aa8d7df87649389392ffd1a78c
---
M bts/BTS_Tests.ttcn
M library/RSL_Types.ttcn
2 files changed, 58 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ed37428..92fde03 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -999,6 +999,29 @@
f_exp_err_rep(RSL_ERR_IE_CONTENT);
 }
 
+/* Send IPA DLCX to inactive lchan */
+function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr {
+   timer T := 3.0;
+   RSL.send(ts_RSL_IPA_DLCX(g_chan_nr));
+   T.start;
+   alt {
+   [] RSL.receive(tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?)) {
+   setverdict(pass);
+   }
+   [] RSL.receive(tr_RSL_IPA_DLCX_NACK(g_chan_nr, ?)) {
+   setverdict(fail);
+   }
+   [] T.timeout {
+   setverdict(fail, "Timeout expecting RF_CHAN_REL_ACK");
+   }
+   }
+}
+testcase TC_ipa_dlcx_not_active() runs on test_CT {
+   var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN));
+   f_init(testcasename());
+   var ConnHdlr vc_conn := 
f_start_handler(refers(f_TC_ipa_dlcx_not_active), pars);
+   vc_conn.done;
+}
 
 /* TODO Areas:
 
@@ -1050,6 +1073,7 @@
execute( TC_rsl_protocol_error() );
execute( TC_rsl_mand_ie_error() );
execute( TC_rsl_ie_content_error() );
+   execute( TC_ipa_dlcx_not_active() );
 }
 
 
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index ba467c6..79f5920 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1409,6 +1409,15 @@
}
}
 
+   template RSL_Message ts_RSL_IPA_DLCX(RslChannelNr chan_nr,
+template (omit) uint16_t 
ipa_conn_id := omit) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+   msg_type := RSL_MT_IPAC_DLCX,
+   ies := {
+   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr})
+   /* FIXME: optional conn_id */
+   }
+   }
template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr,
 template uint16_t ipa_conn_id := 
omit) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
@@ -1430,6 +1439,19 @@
t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats 
:= stats})
}
}
+   template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr,
+template uint16_t ipa_conn_id,
+template 
RSL_IE_IPA_ConnectionStats stats) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+   msg_type := RSL_MT_IPAC_DLCX_ACK,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+   tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}),
+   tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats})
+   }
+   }
+
+
 
template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, 
RSL_Cause cause,
  template uint16_t 
ipa_conn_id) := {
@@ -1442,6 +1464,18 @@
t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := 
ts_RSL_IE_Cause(cause)})
}
}
+   template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr,
+ template RSL_Cause cause) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
+   msg_type := RSL_MT_IPAC_DLCX_NACK,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+   /* optional connection ID */
+   *,
+   tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)})
+   }
+   }
+
 
template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) 
:= {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),

-- 
To view, visit https://gerrit.osmocom.org/6889
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c8eec8ba56b35aa8d7df87649389392ffd1a78c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: RSL_Types: Remove RT_PT2 from tr_RSL_IPA_CRCX_ACK

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL_Types: Remove RT_PT2 from tr_RSL_IPA_CRCX_ACK
..


RSL_Types: Remove RT_PT2 from tr_RSL_IPA_CRCX_ACK

The way how TTCN-3 templates work we cannot use a template parameter
to decide if we want to match only on messages that contain a matching
RTP_PT2, or (alternatively) on any messages whether or not they have
a RTP_PT2 IE at all :(

Change-Id: I7a4f5d7e1d44994316717da5b769e278ea188b12
---
M library/RSL_Types.ttcn
1 file changed, 3 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 79f5920..45d6aec 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1327,16 +1327,15 @@
template RSL_Message tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr,
 template uint16_t ipa_conn_id,
 template uint32_t local_ip,
-template uint16_t local_port,
-template uint7_t rtp_pt2) := {
+template uint16_t local_port) 
:= {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
msg_type := RSL_MT_IPAC_CRCX_ACK,
ies := {
tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}),
tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}),
-   tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}),
-   tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2})
+   tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port})
+   /* Optional: RTP Payload Type 2 IE */
}
}
 

-- 
To view, visit https://gerrit.osmocom.org/6891
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a4f5d7e1d44994316717da5b769e278ea188b12
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: TC_ipa_crcx_twice_not_active + TC_ipa_crcx_mdcx_dlcx_no...

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: TC_ipa_crcx_twice_not_active + 
TC_ipa_crcx_mdcx_dlcx_not_active
..


bts: TC_ipa_crcx_twice_not_active + TC_ipa_crcx_mdcx_dlcx_not_active

Change-Id: Ie643203c4fa4ba0baf5c640d9fd8eaf9fd85cd5b
---
M bts/BTS_Tests.ttcn
1 file changed, 38 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 267d7a3..d3bdd62 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1013,6 +1013,42 @@
vc_conn.done;
 }
 
+/* Send IPA CRCX twice to inactive lchan */
+function f_TC_ipa_crcx_twice_not_active(charstring id) runs on ConnHdlr {
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?),
+"IPA CRCX ACK");
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_NACK(g_chan_nr, RSL_ERR_RES_UNAVAIL),
+"IPA CRCX NACK");
+}
+testcase TC_ipa_crcx_twice_not_active() runs on test_CT {
+   var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN));
+   f_init(testcasename());
+   var ConnHdlr vc_conn := 
f_start_handler(refers(f_TC_ipa_crcx_twice_not_active), pars);
+   vc_conn.done;
+}
+
+/* Regular sequence of CRCX/MDCX/DLCX */
+function f_TC_ipa_crcx_mdcx_dlcx_not_active(charstring id) runs on ConnHdlr {
+   f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), 
tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?),
+"IPA CRCX ACK");
+   var uint32_t remote_ip := f_rnd_int(c_UINT32_MAX);
+   var uint16_t remote_port := f_rnd_int(c_UINT16_MAX);
+   var uint7_t rtp_pt2 := f_rnd_int(127);
+   var uint16_t fake_conn_id := 23; /* we're too lazy to read it out from 
the CRCX ACK above */
+   f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, 
remote_port, rtp_pt2),
+tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2),
+"IPA MDCX ACK");
+   f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, fake_conn_id), 
tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?),
+"IPA DLCX ACK");
+}
+testcase TC_ipa_crcx_mdcx_dlcx_not_active() runs on test_CT {
+   var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN));
+   f_init(testcasename());
+   var ConnHdlr vc_conn := 
f_start_handler(refers(f_TC_ipa_crcx_mdcx_dlcx_not_active), pars);
+   vc_conn.done;
+}
+
+
 /* TODO Areas:
 
 * channel activation
@@ -1064,6 +1100,8 @@
execute( TC_rsl_mand_ie_error() );
execute( TC_rsl_ie_content_error() );
execute( TC_ipa_dlcx_not_active() );
+   execute( TC_ipa_crcx_twice_not_active() );
+   execute( TC_ipa_crcx_mdcx_dlcx_not_active() );
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/6896
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie643203c4fa4ba0baf5c640d9fd8eaf9fd85cd5b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: RSL: Make ts_RSL_IPA_DLCX require a conn_id value

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL: Make ts_RSL_IPA_DLCX require a conn_id value
..


RSL: Make ts_RSL_IPA_DLCX require a conn_id value

The way how TTCN-3 templates work it's not possible for us to have
a parametric template for both generating DLCX with conn_id and without :(

Change-Id: Icb772ca5b9661ab39b1c161fa4ebc70544275d8f
---
M bts/BTS_Tests.ttcn
M library/RSL_Types.ttcn
2 files changed, 4 insertions(+), 5 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 92fde03..00143bf 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1002,7 +1002,7 @@
 /* Send IPA DLCX to inactive lchan */
 function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr {
timer T := 3.0;
-   RSL.send(ts_RSL_IPA_DLCX(g_chan_nr));
+   RSL.send(ts_RSL_IPA_DLCX(g_chan_nr, 0));
T.start;
alt {
[] RSL.receive(tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?)) {
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 336b042..1d68969 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1453,13 +1453,12 @@
}
}
 
-   template RSL_Message ts_RSL_IPA_DLCX(RslChannelNr chan_nr,
-template (omit) uint16_t 
ipa_conn_id := omit) := {
+   template RSL_Message ts_RSL_IPA_DLCX(RslChannelNr chan_nr, uint16_t 
ipa_conn_id) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false),
msg_type := RSL_MT_IPAC_DLCX,
ies := {
-   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr})
-   /* FIXME: optional conn_id */
+   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr}),
+   t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id 
:= ipa_conn_id})
}
}
template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr,

-- 
To view, visit https://gerrit.osmocom.org/6894
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb772ca5b9661ab39b1c161fa4ebc70544275d8f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Introduce f_rsl_transceive() and reduce code duplication

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Introduce f_rsl_transceive() and reduce code duplication
..


bts: Introduce f_rsl_transceive() and reduce code duplication

Change-Id: I56de61e08bd1508a0531f720561ead84d1075de3
---
M bts/BTS_Tests.ttcn
1 file changed, 23 insertions(+), 33 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 00143bf..267d7a3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -225,33 +225,35 @@
fn.apply(id);
 }
 
-
-function f_rsl_chan_act(RSL_IE_ChannelMode mode) runs on ConnHdlr {
-   RSL.send(ts_RSL_CHAN_ACT(g_chan_nr, mode));
+function f_rsl_transceive(template RSL_Message tx, template RSL_Message 
exp_rx, charstring id)
+runs on ConnHdlr {
+   timer T := 3.0;
+   RSL.send(tx);
+   T.start;
alt {
-   [] RSL.receive(tr_RSL_CHAN_ACT_ACK(g_chan_nr)) {
-   g_Tmeas_exp.start;
+   [] RSL.receive(exp_rx) {
+   T.stop;
+   setverdict(pass);
}
-   [] RSL.receive(tr_RSL_CHAN_ACT_NACK(g_chan_nr)) {
-   setverdict(fail, "Unexpected RF CHAN ACT NACK");
+   [] T.timeout {
+   setverdict(fail, "Timeout expecting " & id);
+   self.stop;
+   }
+   [] RSL.receive {
+   setverdict(fail, "Unexpected RSL message received");
}
}
+}
+
+function f_rsl_chan_act(RSL_IE_ChannelMode mode) runs on ConnHdlr {
+   f_rsl_transceive(ts_RSL_CHAN_ACT(g_chan_nr, mode), 
tr_RSL_CHAN_ACT_ACK(g_chan_nr),
+"RSL CHAN ACT");
 }
 
 function f_rsl_chan_deact() runs on ConnHdlr {
-   timer T := 3.0;
-   RSL.send(ts_RSL_RF_CHAN_REL(g_chan_nr));
-   T.start;
-   alt {
-   [] RSL.receive(tr_RSL_RF_CHAN_REL_ACK(g_chan_nr)) {
-   g_Tmeas_exp.stop;
-   }
-   [] T.timeout {
-   setverdict(fail, "Timeout waiting for RF CHAN REL ACK");
-   }
-   }
+   f_rsl_transceive(ts_RSL_RF_CHAN_REL(g_chan_nr), 
tr_RSL_RF_CHAN_REL_ACK(g_chan_nr),
+   "RF CHAN REL");
 }
-
 
 private template ConnHdlrPars t_Pars(template RslChannelNr chan_nr,
template RSL_IE_ChannelMode chan_mode,
@@ -1001,20 +1003,8 @@
 
 /* Send IPA DLCX to inactive lchan */
 function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr {
-   timer T := 3.0;
-   RSL.send(ts_RSL_IPA_DLCX(g_chan_nr, 0));
-   T.start;
-   alt {
-   [] RSL.receive(tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?)) {
-   setverdict(pass);
-   }
-   [] RSL.receive(tr_RSL_IPA_DLCX_NACK(g_chan_nr, ?)) {
-   setverdict(fail);
-   }
-   [] T.timeout {
-   setverdict(fail, "Timeout expecting RF_CHAN_REL_ACK");
-   }
-   }
+   f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, 0), 
tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?),
+"IPA DLCX ACK");
 }
 testcase TC_ipa_dlcx_not_active() runs on test_CT {
var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), 
ts_RSL_ChanMode_SIGN));

-- 
To view, visit https://gerrit.osmocom.org/6895
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I56de61e08bd1508a0531f720561ead84d1075de3
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: Introduce f_rsl_transceive() and reduce code duplication

2018-02-25 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6895
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I56de61e08bd1508a0531f720561ead84d1075de3
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: Osmocom_Types: Add c_UINT16_MAX / c_UINT32_MAX

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Osmocom_Types: Add c_UINT16_MAX / c_UINT32_MAX
..


Osmocom_Types: Add c_UINT16_MAX / c_UINT32_MAX

Change-Id: I99f3b08b07a46042a8c1e13a420743c58e94603b
---
M library/Osmocom_Types.ttcn
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index 1766a40..713acc9 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -25,6 +25,10 @@
type integer uint14_t (0..16383) with { variant "unsigned 14 bit" };
type integer uint15_t (0..32767) with { variant "unsigned 15 bit" };
 
+
+   const uint16_t c_UINT16_MAX := 65535;
+   const uint32_t c_UINT32_MAX := 4294967295;
+
type record Arfcn {
boolean pcs,
uint15_tarfcn

-- 
To view, visit https://gerrit.osmocom.org/6890
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I99f3b08b07a46042a8c1e13a420743c58e94603b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: TC_ipa_crcx_twice_not_active + TC_ipa_crcx_mdcx_dlcx_no...

2018-02-25 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6896
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie643203c4fa4ba0baf5c640d9fd8eaf9fd85cd5b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: RSL: Make ts_RSL_IPA_DLCX require a conn_id value

2018-02-25 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6894
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb772ca5b9661ab39b1c161fa4ebc70544275d8f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-bts[master]: RSL IPA DLCX: Avoid another null-pointer dereference

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL IPA DLCX: Avoid another null-pointer dereference
..


RSL IPA DLCX: Avoid another null-pointer dereference

In case a DLCX _with conn-id_ is issued without any CRCX before,
we ran into a NULL pointer dereference in adding the connection
statistics.  Let's handle this gracefully and simply return empty
statistics.

Change-Id: If8b71266c847b90cdc51695b9f47b527c51bd70c
Closes: OS#2996
---
M src/common/rsl.c
1 file changed, 5 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 2f6e295..5c266ba 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1482,14 +1482,13 @@
 
struct ipa_stats stats;
 
-
memset(, 0, sizeof(stats));
 
-
-   osmo_rtp_socket_stats(lchan->abis_ip.rtp_socket,
-   _sent, _sent,
-   _recv, _recv,
-   _lost, _jitter);
+   if (lchan->abis_ip.rtp_socket)
+   osmo_rtp_socket_stats(lchan->abis_ip.rtp_socket,
+   _sent, _sent,
+   _recv, _recv,
+   _lost, 
_jitter);
/* convert to network byte order */
stats.packets_sent = htonl(stats.packets_sent);
stats.octets_sent = htonl(stats.octets_sent);

-- 
To view, visit https://gerrit.osmocom.org/6898
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If8b71266c847b90cdc51695b9f47b527c51bd70c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: RSL_Types: Add ts_RSL_BCCH_INFO() for sending BCCH_INFO

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL_Types: Add ts_RSL_BCCH_INFO() for sending BCCH_INFO
..


RSL_Types: Add ts_RSL_BCCH_INFO() for sending BCCH_INFO

Change-Id: Id9ad914f67137e38c7ad259c7a74de0e98c8f50d
---
M library/RSL_Types.ttcn
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 2cd5bd5..8fb44ad 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1129,6 +1129,17 @@
 
/* COMMON CHANNEL MANAGEMENT MESSAGES */
 
+   /* 8.5.1 BTS <- BSC */
+   template RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, 
octetstring full_bcch_info) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
+   msg_type := RSL_MT_BCCH_INFO,
+   ies := {
+   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
t_RslChanNr_BCCH(0)}),
+   t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type 
:= si_type}),
+   t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := 
ts_RSL_LV(full_bcch_info)})
+   }
+   }
+
/* 8.5.2 BTS -> BSC */
template RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t 
busy_ct, uint16_t acc_ct) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),

-- 
To view, visit https://gerrit.osmocom.org/6884
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9ad914f67137e38c7ad259c7a74de0e98c8f50d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Type Definition + Template for SI3; Send SI3 at start o...

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Type Definition + Template for SI3; Send SI3 at start of 
test
..


bts: Type Definition + Template for SI3; Send SI3 at start of test

The BTS needs some of the SI3 parameters like BS_AG_BLKS_RES for
internal computations, so make sure we send it after the connection
has been established.

Change-Id: I5dc3724f79e669f52593cd776806d84b4dd4bf5c
---
M bts/BTS_Tests.ttcn
M library/GSM_RR_Types.ttcn
M library/General_Types.ttcn
M library/L3_Templates.ttcn
4 files changed, 142 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 58c7118..287d869 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -12,6 +12,7 @@
 import from Osmocom_CTRL_Adapter all;
 
 import from RSL_Types all;
+import from IPA_Types all;
 import from IPA_Emulation all;
 import from RSL_Emulation all;
 
@@ -19,6 +20,9 @@
 import from TRXC_Types all;
 import from TRXC_CodecPort all;
 import from TRXC_CodecPort_CtrlFunct all;
+
+import from L3_Templates all;
+import from MobileL3_CommonIE_Types all;
 
 /* The tests assume a BTS with the following timeslot configuration:
  * TS0 : Combined CCCH + SDCCH/4
@@ -75,11 +79,62 @@
ConnL1Pars l1_pars
 }
 
+/* Default SYSTEM INFORMATION 3 */
+template (value) GsmRrMessage ts_SI3_default := {
+   header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 0),
+   payload := {
+   si3 := {
+   cell_id := 23,
+   lai := {
+   mcc_mnc := '262F42'H,
+   lac := 42
+   },
+   ctrl_chan_desc := {
+   msc_r99 := true,
+   att := true,
+   bs_ag_blks_res := 1,
+   ccch_conf := CCHAN_DESC_1CCCH_COMBINED,
+   si22_ind := false,
+   cbq3 := CBQ3_IU_MODE_NOT_SUPPORTED,
+   spare := '00'B,
+   bs_pa_mfrms := 0, /* 2 multiframes */
+   t3212 := 1 /* 6 minutes */
+   },
+   cell_opts := {
+   dn_ind := false,
+   pwrc := false,
+   dtx := MS_MAY_USE_UL_DTX,
+   radio_link_tout_div4 := 4/4
+   },
+   cell_sel_pars := {
+   cell_resel_hyst_2dB := 0,
+   ms_txpwr_max_cch := 0,
+   acs := '0'B,
+   neci := true,
+   rxlev_access_min := 0
+   },
+   rach_ctrl_pars := {
+   max_retrans := RACH_MAX_RETRANS_1,
+   tx_integer := ''B, /* 3 slots */
+   cell_bar_access := false,
+   re_not_allowed := true,
+   acc := ''B
+   },
+   rest_octets := ''O
+   }
+   }
+}
 
 /* global init function */
 function f_init(charstring id) runs on test_CT {
f_init_rsl(id);
RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
+
+   /* Send SI3 to the BTS, it is needed for various computations */
+   var GsmRrMessage si3 := valueof(ts_SI3_default);
+   log("Sending SI3 ", si3);
+   var octetstring si3_enc := enc_GsmRrMessage(si3);
+   RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc)));
 }
 
 type function void_fn(charstring id) runs on ConnHdlr;
@@ -99,6 +154,17 @@
return vc_conn;
 }
 
+template ASP_RSL_Unitdata ts_RSL_UD(template RSL_Message rsl, IpaStreamId sid 
:= IPAC_PROTO_RSL_TRX0) := {
+   streamId := sid,
+   rsl := rsl
+}
+
+template ASP_RSL_Unitdata tr_RSL_UD(template RSL_Message rsl,
+   template IpaStreamId sid := 
IPAC_PROTO_RSL_TRX0) := {
+   streamId := sid,
+   rsl := rsl
+}
+
 private altstep as_Tguard() runs on ConnHdlr {
[] g_Tguard.timeout {
setverdict(fail, "Tguard timeout");
diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 4d1efd7..a8b6db2 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -366,6 +366,68 @@
uint3_t non_drx_timer
} with { variant "" };
 
+   /* 44.018 10.5.2.3 */
+   type enumerated CellOptions_DTX {
+   MS_MAY_USE_UL_DTX   ('00'B),
+   MS_SHALL_USE_UL_DTX ('01'B),
+   MS_SHALL_NOT_USE_UL_DTX 

[MERGED] osmo-ttcn3-hacks[master]: RSL_Emulation: Make CCHAN_PT bi-directional

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RSL_Emulation: Make CCHAN_PT bi-directional
..


RSL_Emulation: Make CCHAN_PT bi-directional

So far we only dispatched received Common Channel messages from the
wire / IUT into the CCHAN_PT. Now the tester can also send Common
Channel messages back to the wire / IUT.

Change-Id: If3d5516c14ea3fbbd8c3de35eaa8ea5f18a00933
---
M library/RSL_Emulation.ttcn
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index bf6686a..635ee42 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -396,6 +396,10 @@

IPA_PT.send(ts_ASP_RSL_UD(ConnectionTable[cid].stream_id, rx_rsl_msg));
}
 
+   [] CCHAN_PT.receive(tr_RSL(?)) -> value rx_rsl {
+   IPA_PT.send(ts_ASP_RSL_UD(rx_rsl.streamId, rx_rsl.rsl));
+   }
+
/* explicit registration, e.g. in (non-immediate) assignment 
case */
[] RSL_PROC.getcall(RSLEM_register:{?,?,?}) -> param(trx_nr, 
chan_nr, vc_conn) {
f_cid_create_cnr(trx_nr, chan_nr, vc_conn);

-- 
To view, visit https://gerrit.osmocom.org/6883
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If3d5516c14ea3fbbd8c3de35eaa8ea5f18a00933
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: bts: low-level RSL ERROR REPORT Testing

2018-02-25 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6887
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If1cc6c672d5a0cf8eb8ef23b96eb1e80ceef30f1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: bts: low-level RSL ERROR REPORT Testing

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: low-level RSL ERROR REPORT Testing
..


bts: low-level RSL ERROR REPORT Testing

Change-Id: If1cc6c672d5a0cf8eb8ef23b96eb1e80ceef30f1
---
M bts/BTS_Tests.ttcn
M library/RSL_Types.ttcn
2 files changed, 64 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2d0b81d..ed37428 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -949,6 +949,56 @@
/* negative test: ensure ERROR REPORT on unsupported types */
 }
 
+private function f_exp_err_rep(template RSL_Cause cause) runs on test_CT {
+   timer T := 5.0;
+   T.start;
+   alt {
+   [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_ERROR_REPORT(cause))) {
+   setverdict(pass);
+   }
+   [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_ERROR_REPORT(?))) {
+   setverdict(fail, "Wrong cause in RSL ERR REP");
+   }
+   [] RSL_CCHAN.receive {
+   repeat;
+   }
+   [] T.timeout {
+   setverdict(fail, "Timeout waiting for RSL ERR REP");
+   }
+   }
+}
+
+/* Provoke a protocol error (message too short) and match on ERROR REPORT */
+testcase TC_rsl_protocol_error() runs on test_CT {
+   f_init(testcasename());
+   var RSL_Message rsl := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, 
''O));
+   rsl.ies := omit;
+   RSL_CCHAN.send(ts_RSL_UD(rsl));
+
+   f_exp_err_rep(RSL_ERR_PROTO);
+}
+
+/* Provoke a mandatory IE error and match on ERROR REPORT */
+testcase TC_rsl_mand_ie_error() runs on test_CT {
+   f_init(testcasename());
+
+   var RSL_Message rsl := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, 
''O));
+   rsl.ies := { rsl.ies[0] };
+   RSL_CCHAN.send(ts_RSL_UD(rsl));
+
+   f_exp_err_rep(RSL_ERR_MAND_IE_ERROR);
+}
+
+/* Provoke an IE content error and match on ERROR REPORT */
+testcase TC_rsl_ie_content_error() runs on test_CT {
+   f_init(testcasename());
+   var RSL_Message rsl := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, 
''O));
+   rsl.ies[1].body.sysinfo_type := RSL_SYSTEM_INFO_5;
+   RSL_CCHAN.send(ts_RSL_UD(rsl));
+
+   f_exp_err_rep(RSL_ERR_IE_CONTENT);
+}
+
 
 /* TODO Areas:
 
@@ -979,8 +1029,6 @@
 ** type error
 ** sequence error
 ** IE duplicated?
-** IE missing
-** IE length error
 
 */
 
@@ -999,6 +1047,9 @@
execute( TC_paging_tmsi_80percent() );
execute( TC_paging_imsi_200percent() );
execute( TC_paging_tmsi_200percent() );
+   execute( TC_rsl_protocol_error() );
+   execute( TC_rsl_mand_ie_error() );
+   execute( TC_rsl_ie_content_error() );
 }
 
 
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 5366b31..ba467c6 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -1275,12 +1275,21 @@
 
/* 8.6.4 BTS -> BSC */
template RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := {
-   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
-   msg_type := RSL_MT_ERROR_IND,
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false),
+   msg_type := RSL_MT_ERROR_REPORT,
ies := {
t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := 
ts_RSL_IE_Cause(cause)})
}
}
+   template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) 
:= {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false),
+   msg_type := RSL_MT_ERROR_REPORT,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{cause := 
tr_RSL_IE_Cause(cause)}),
+   *
+   }
+   }
+
 
 
/* Abis/IP specific messages */

-- 
To view, visit https://gerrit.osmocom.org/6887
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If1cc6c672d5a0cf8eb8ef23b96eb1e80ceef30f1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: bts: Add paging related tests

2018-02-25 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bts: Add paging related tests
..


bts: Add paging related tests

We're testing at 80% and 200% of PCH capacity, both for either IMSI-only
or TMSI-only paging requests.  The way how we test ensures:

* the expected number of paged mobile identities end up on the Um interface
* we implicitly check the queuing limit of 200 paging records by
  overflowing it in the 20-seconds-of-200%-load cases
* we implicitly check the batching of mobile identities into different
  paging types
* we test the PCH load reporting over RSL

As a side note, in case you were ever wondering what's the expected
paging throughput / capacity, there are now helper functions to compute
it.  For our combined CCCH/SDCCH4, it's about 16 IMSIs per second or
about 32 TMSIs per second.

Change-Id: I0b80b72bdab3d80d915296d70e1174623fbd8610
---
A bts/BTS_Tests.default
M bts/BTS_Tests.ttcn
M library/GSM_Types.ttcn
M library/L1CTL_Types.ttcn
M library/L3_Templates.ttcn
M library/RSL_Types.ttcn
6 files changed, 500 insertions(+), 12 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bts/BTS_Tests.default b/bts/BTS_Tests.default
new file mode 100644
index 000..927d7c4
--- /dev/null
+++ b/bts/BTS_Tests.default
@@ -0,0 +1,21 @@
+[LOGGING]
+"BTS-Test-RSL-IPA".FileMask := ERROR | WARNING;
+"BTS-Test-RSL".FileMask := ERROR | WARNING;
+"IPA0-CTRL-IPA".FileMask := ERROR | WARNING;
+mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
+
+[TESTPORT_PARAMETERS]
+*.BTSVTY.CTRL_MODE := "client"
+*.BTSVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.BTSVTY.CTRL_PORTNUM := "4241"
+*.BTSVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.BTSVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.BTSVTY.CTRL_READMODE := "buffered"
+*.BTSVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.BTSVTY.PROMPT1 := "OsmoBTS> "
+
+[MODULE_PARAMETERS]
+//Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBTS";
+
+[EXECUTE]
+BTS_Tests.control
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 287d869..2d0b81d 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -21,8 +21,10 @@
 import from TRXC_CodecPort all;
 import from TRXC_CodecPort_CtrlFunct all;
 
-import from L3_Templates all;
 import from MobileL3_CommonIE_Types all;
+import from MobileL3_RRM_Types all;
+import from MobileL3_Types all;
+import from L3_Templates all;
 
 /* The tests assume a BTS with the following timeslot configuration:
  * TS0 : Combined CCCH + SDCCH/4
@@ -40,10 +42,15 @@
 }
 
 type component test_CT extends CTRL_Adapter_CT {
+   /* IPA Emulation component underneath RSL */
var IPA_Emulation_CT vc_IPA;
-
+   /* RSL Emulation component (for ConnHdlr tests) */
var RSL_Emulation_CT vc_RSL;
+   /* Direct RSL_CCHAN_PT */
port RSL_CCHAN_PT RSL_CCHAN;
+
+   /* L1CTL port (for classic tests) */
+   port L1CTL_PT L1CTL;
 }
 
 /* an individual call / channel */
@@ -126,7 +133,7 @@
 }
 
 /* global init function */
-function f_init(charstring id) runs on test_CT {
+function f_init(charstring id := "BTS-Test") runs on test_CT {
f_init_rsl(id);
RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP});
 
@@ -135,6 +142,12 @@
log("Sending SI3 ", si3);
var octetstring si3_enc := enc_GsmRrMessage(si3);
RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc)));
+}
+
+/* Attach L1CTL to master test_CT (classic tests, non-handler mode) */
+function f_init_l1ctl() runs on test_CT {
+   map(self:L1CTL, system:L1CTL);
+   f_connect_reset(L1CTL);
 }
 
 type function void_fn(charstring id) runs on ConnHdlr;
@@ -172,10 +185,7 @@
}
 }
 
-private function f_l1_tune() runs on ConnHdlr {
-   /* tune our virtual L1 to the right ARFCN */
-   //var BCCH_tune_req tune_req := { arfcn := { false, mp_trx0_arfcn }, 
combined_ccch := true };
-   //L1.send(tune_req);
+private function f_l1_tune(L1CTL_PT L1CTL) {
f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, CCCH_MODE_COMBINED);
 }
 
@@ -380,7 +390,7 @@
 }
 
 function f_TC_chan_req(charstring id) runs on ConnHdlr {
-   f_l1_tune();
+   f_l1_tune(L1CTL);
 
RSL.clear;
//L1.send(DCCH_establish_req:{ra := 23});
@@ -559,7 +569,7 @@
 
 /* establish DChan, verify existance + contents of measurement reports */
 function f_TC_meas_res_periodic(charstring id) runs on ConnHdlr {
-   f_l1_tune();
+   f_l1_tune(L1CTL);
RSL.clear;
 
g_pars.l1_pars.meas_ul.full.rxlev := dbm2rxlev(-100);
@@ -634,7 +644,7 @@
 
 /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND */
 private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
-   f_l1_tune();
+   f_l1_tune(L1CTL);
RSL.clear;
 
f_est_dchan();
@@ -664,8 +674,315 @@
vc_conn.done;
 }
 
+function tmsi_is_dummy(TMSIP_TMSI_V 

osmo-ttcn3-hacks[master]: bts: Type Definition + Template for SI3; Send SI3 at start o...

2018-02-25 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6885
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5dc3724f79e669f52593cd776806d84b4dd4bf5c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: RSL IPA DLCX: Avoid another null-pointer dereference

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6898
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If8b71266c847b90cdc51695b9f47b527c51bd70c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: RSL: Fix encoding of ConnectionID in IPA_DLCX_ACK

2018-02-25 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6897
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifdea747e78f191902870af53692f7a70fa7ece93
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


  1   2   >