Build failure of network:osmocom:nightly/libosmocore in Raspbian_9.0/armv7l

2019-06-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Raspbian_9.0/armv7l

Package network:osmocom:nightly/libosmocore failed to build in 
Raspbian_9.0/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmocore

Last lines of build log:
[  899s] | This file was extended by libosmocore config.status 1.1.0.70-76e8c, 
which was
[  899s] | generated by GNU Autoconf 2.69.  Invocation command line was
[  899s] | 
[  899s] |   CONFIG_FILES= 
[  899s] |   CONFIG_HEADERS  = 
[  899s] |   CONFIG_LINKS= 
[  899s] |   CONFIG_COMMANDS = 
[  899s] |   $ ./config.status Doxyfile.core
[  899s] | 
[  899s] | on obs-arm-5
[  899s] | 
[  899s] | config.status:1200: creating Doxyfile.core
[  899s] 
[  899s] debian/rules:26: recipe for target 'override_dh_auto_test' failed
[  899s] make[1]: *** [override_dh_auto_test] Error 1
[  899s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  899s] debian/rules:15: recipe for target 'build' failed
[  899s] make: *** [build] Error 2
[  899s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  899s] 
[  899s] obs-arm-5 failed "build libosmocore_1.1.0.70.76e8c.dsc" at Wed Jun 19 
03:18:02 UTC 2019.
[  899s] 
[  899s] ### VM INTERACTION START ###
[  901s] [  871.581311] sysrq: SysRq : Power Off
[  901s] [  871.599249] reboot: Power down
[  901s] ### VM INTERACTION END ###
[  901s] 
[  901s] obs-arm-5 failed "build libosmocore_1.1.0.70.76e8c.dsc" at Wed Jun 19 
03:18:06 UTC 2019.
[  901s] 

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


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

2019-06-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/i586

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

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

Last lines of build log:
[  148s] 
[  148s] /* confdefs.h */
[  148s] #define PACKAGE_NAME "osmo-bsc"
[  148s] #define PACKAGE_TARNAME "osmo-bsc"
[  148s] #define PACKAGE_VERSION "1.4.0.91-1626f"
[  148s] #define PACKAGE_STRING "osmo-bsc 1.4.0.91-1626f"
[  148s] #define PACKAGE_BUGREPORT "open...@lists.osmocom.org"
[  148s] #define PACKAGE_URL ""
[  148s] #define PACKAGE "osmo-bsc"
[  148s] #define VERSION "1.4.0.91-1626f"
[  148s] 
[  148s] configure: exit 2
[  148s] 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 --with-systemdsystemunitdir=/lib/systemd/system 
--enable-manuals returned exit code 2
[  148s] debian/rules:50: recipe for target 'override_dh_auto_configure' failed
[  148s] make[1]: *** [override_dh_auto_configure] Error 255
[  148s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  148s] debian/rules:45: recipe for target 'build' failed
[  148s] make: *** [build] Error 2
[  148s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  148s] 
[  148s] lamb16 failed "build osmo-bsc_1.4.0.91.1626f.dsc" at Wed Jun 19 
03:11:27 UTC 2019.
[  148s] 
[  148s] ### VM INTERACTION START ###
[  151s] [  140.116734] sysrq: SysRq : Power Off
[  151s] [  140.124522] reboot: Power down
[  151s] ### VM INTERACTION END ###
[  151s] 
[  151s] lamb16 failed "build osmo-bsc_1.4.0.91.1626f.dsc" at Wed Jun 19 
03:11:31 UTC 2019.
[  151s] 

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


Build failure of network:osmocom:latest/openbsc in Debian_Unstable/x86_64

2019-06-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:latest/openbsc/Debian_Unstable/x86_64

Package network:osmocom:latest/openbsc failed to build in Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:latest openbsc

Last lines of build log:
[  213s] | configure: exit 0
[  213s] 
[  213s] # -*- compilation -*-
[  213s] 4. testsuite.at:23: testing db ...
[  213s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test
[  213s] --- expout 2019-06-19 01:55:44.496494851 +
[  213s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 
2019-06-19 01:55:44.720494847 +
[  213s] @@ -1,4 +1,6 @@
[  213s]  Testing subscriber database code.
[  213s]  DB: Database initialized.
[  213s] +no tables in statement !
[  213s] +no tables in statement !
[  213s]  DB: Database prepared.
[  213s]  Done
[  213s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28)
[  213s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1
[  213s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  213s] make: *** [debian/rules:13: build] Error 2
[  213s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  213s] 
[  213s] cloud129 failed "build openbsc_1.2.0.dsc" at Wed Jun 19 01:55:46 UTC 
2019.
[  213s] 
[  213s] ### VM INTERACTION START ###
[  216s] [  190.603220] sysrq: SysRq : Power Off
[  216s] [  190.615061] reboot: Power down
[  218s] ### VM INTERACTION END ###
[  218s] 
[  218s] cloud129 failed "build openbsc_1.2.0.dsc" at Wed Jun 19 01:55:52 UTC 
2019.
[  218s] 

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


Build failure of network:osmocom:latest/osmo-sysmon in Debian_Unstable/x86_64

2019-06-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-sysmon/Debian_Unstable/x86_64

Package network:osmocom:latest/osmo-sysmon failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:latest osmo-sysmon

Last lines of build log:
[   81s] #define VERSION "0.1.0"
[   81s] #define STDC_HEADERS 1
[   81s] [   71.168170] serial8250: too much work for irq4
[   81s] #define HAVE_SYS_TYPES_H 1
[   81s] #define HAVE_SYS_STAT_H 1
[   81s] #define HAVE_STDLIB_H 1
[   81s] #define HAVE_STRING_H 1
[   81s] #define HAVE_MEMORY_H 1
[   81s] #define HAVE_STRINGS_H 1
[   81s] #define HAVE_INTTYPES_H 1
[   81s] #define HAVE_STDINT_H 1
[   81s] #define HAVE_UNISTD_H 1
[   81s] #define HAVE_DLFCN_H 1
[   81s] #define LT_OBJDIR ".libs/"
[   81s] 
[   81s] configure: exit 1
[   81s] 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
[   81s] make: *** [debian/rules:45: build] Error 2
[   81s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[   81s] 
[   81s] sheep82 failed "build osmo-sysmon_0.1.0.dsc" at Wed Jun 19 01:48:04 
UTC 2019.
[   81s] 
[   81s] ### VM INTERACTION START ###
[   85s] [   74.261024] sysrq: SysRq : Power Off
[   85s] [   74.266329] reboot: Power down
[   85s] ### VM INTERACTION END ###
[   85s] 
[   85s] sheep82 failed "build osmo-sysmon_0.1.0.dsc" at Wed Jun 19 01:48:09 
UTC 2019.
[   85s] 

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


Change in ...osmo-bsc[master]: doc/manuals: review and tweak handover docs

2019-06-18 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14515


Change subject: doc/manuals: review and tweak handover docs
..

doc/manuals: review and tweak handover docs

Change-Id: Ib25cee8fd8c243881b99173a9a3036ad19d0f8af
---
M doc/manuals/chapters/handover.adoc
M doc/manuals/chapters/handover_inter_bsc.dot
M doc/manuals/chapters/handover_intra_bsc.dot
3 files changed, 62 insertions(+), 53 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/15/14515/1

diff --git a/doc/manuals/chapters/handover.adoc 
b/doc/manuals/chapters/handover.adoc
index c75b03c..2f9d598 100644
--- a/doc/manuals/chapters/handover.adoc
+++ b/doc/manuals/chapters/handover.adoc
@@ -22,9 +22,7 @@
 is currently not implemented.  However, you may still advertise 3G and 4G 
neighbor cells
 in order to facilitate cell/RAT re-selection to those neighbors.

-At the time of writing, OsmoMSC's inter-BSC handover support is not complete
-yet, so OsmoBSC can perform handover between separate BSS only in conjunction
-with a 3rd party MSC implementation.
+Since 2019, OsmoMSC fully supports both inter-BSC and inter-MSC handover.

 .Handover support in Osmocom at the time of writing
 [cols="^,^,^,^,^"]
@@ -34,6 +32,7 @@
 | OsmoMSC | (not involved, except for codec changes) | (planned)  | (planned)  
| -
 |

+Most handover related procedures are explained in 3GPP TS 48.008.

 === How Handover Works

@@ -45,9 +44,20 @@
 cells, its "neighbors". On the MS/BTS/BSS level, individual cells are
 identified by ARFCN+BSIC (frequency + 6-bit identification code).

-Each BTS is told by the BSC which cells identified by ARFCN+BSIC are its
-adjacent cells. Via System Information, each MS receives a list of these
-ARFCN+BSIC, and the MS then return measurements of reception levels.
+The BSC instructs each BTS with a list of ARFCNs (i.e. GSM frequency bands)
+that qualify as neighbor cells, as part of the System Information Type 2. Each
+MS served by a BTS receives the System Information Type 2 and thus knows which
+ARFCNs to measure for potential handover. Each MS with an active channel then
+returns up to 6 measurements of reception levels (RXLEV) to the BTS, to be
+forwarded to the BSC in RSL Measurement Report messages.
+
+Note that the BTS and MS are told only the ARFCNs, not the BSICs, of neighbor
+cells; the BSICs are however included in the measurements that an MS returns to
+BTS and BSC. Commonly, each ARFCN is owned by one specific operator, so, an MS
+considers all visible cells on a given ARFCN as possible neighbors. However, as
+soon as an MS reports RXLEV of a specific neighbor cell, the BSC needs to know
+which exact cell to possibly handover to, which is why the MS pinpoints the
+specific BSIC that it reported measurements for.

 The BSC is the point of decision whether to do handover or not. This can be a
 hugely complex combination of heuristics, knowledge of cell load and codec
@@ -74,18 +84,18 @@
 Should handover fail at any point, e.g. the new lchan never receives a RACH, or
 the MS reports a Handover Failure, then the new lchan is simply released again,
 and the old lchan remains in use. If the RTP stream has already been switched
-over to the new lchan, it may actually be switched back to the old lchan.
+over to the new lchan, it is switched back to the old lchan.

 This is simple enough if the new cell is managed by the same BSC: the OsmoMGW
 is simply instructed to relay the BTS-side of the RTP stream to another IP
 address and port, and the BSC continues to forward DTAP to the MSC
-transparently. The operation happens completely within the BSS. If the voice
-codec has remained unchanged, the MSC/MNCC may not even be notified that
-anything has happened at all.
+transparently. The operation happens completely within the BSS, except for the
+BSSMAP Handover Performed message sent to the MSC once the handover is
+completed (see 3GPP TS 48.008).

  External / Inter-BSC Handover

-If the adjacent target cell belongs to a different BSS, the RR procedure for
+If the handover target cell belongs to a different BSS, the RR procedure for
 handover remains the same, but we need to tell the _remote_ BSC to allocate the
 new lchan.

@@ -108,7 +118,7 @@
 The first part, identifying the remote BSC, is not as trivial as it sounds: as
 mentioned above, on the level of cell information seen by BTS and MS, the
 neighbor cells are identified by ARFCN+BSIC. However, on the A-interface and in
-the MSC, there is no knowledge of ARFCN+BSIC configurations, and instead each
+the MSC, there is no knowledge of ARFCN+BSIC configurations. Instead, each
 cell is identified by a LAC and CI (Location Area Code and Cell Identifier).

 NOTE: There are several different cell identification types on the A-interface:
@@ -116,15 +126,7 @@
 most of these (see <>). For simplicity, this description
 focuses on LAC+CI identification.

-The 

Change in ...osmo-msc[master]: tests/msc_vlr: fix: do not pass RAT type to expect_bssap_clear()

2019-06-18 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14514


Change subject: tests/msc_vlr: fix: do not pass RAT type to expect_bssap_clear()
..

tests/msc_vlr: fix: do not pass RAT type to expect_bssap_clear()

The function name implies OSMO_RAT_GERAN_A, and it has nothing
to do with other OSMO_RAT_* types. Found using clang:

  warning: too many arguments in call to 'expect_bssap_clear'
   expect_bssap_clear(OSMO_RAT_GERAN_A);
  

Change-Id: Id3a3af33fcc5da4ca4c48a2f589a69f3568d2586
---
M tests/msc_vlr/msc_vlr_test_gsm_authen.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
4 files changed, 11 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/14/14514/1

diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c 
b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 8776e03..ee5af1e 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -113,7 +113,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_ACCEPT, "%d");
 
/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -327,7 +327,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_ACCEPT, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -1017,7 +1017,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_ACCEPT, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c 
b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index c76cba4..155afbe 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -128,7 +128,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -363,7 +363,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -967,7 +967,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -1158,7 +1158,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -1375,7 +1375,7 @@
VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c 
b/tests/msc_vlr/msc_vlr_test_no_authen.c
index ae77252..9d506d6 100644
--- a/tests/msc_vlr/msc_vlr_test_no_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_no_authen.c
@@ -69,7 +69,7 @@
EXPECT_ACCEPTED(true);

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
@@ -227,7 +227,7 @@
EXPECT_ACCEPTED(true);

/* Release connection */
-   expect_bssap_clear(OSMO_RAT_GERAN_A);
+   expect_bssap_clear();
conn_conclude_cm_service_req(g_msub, MSC_A_USE_CM_SERVICE_SMS);

btw("all requests serviced, conn has been released");
diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c 
b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
index fe53469..648313f 100644
--- 

Change in ...docker-playground[master]: Add script to regenerate VTY and counter documentation

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14403 )

Change subject: Add script to regenerate VTY and counter documentation
..

Add script to regenerate VTY and counter documentation

This script needs access to the VTY interface, so I changed some
remaining config files to bind the VTY interface to 0.0.0.0.

There are a couple of services that do that already.

Related: OS#1700
Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5
---
M osmo-bsc-master/osmo-bsc.cfg
M osmo-hlr-master/osmo-hlr.cfg
M osmo-hnbgw-master/osmo-hnbgw.cfg
M osmo-mgw-master/osmo-mgw.cfg
M osmo-msc-master/osmo-msc.cfg
M osmo-sip-master/osmo-sip-connector.cfg
A scripts/regen_doc.sh
7 files changed, 53 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/osmo-bsc-master/osmo-bsc.cfg b/osmo-bsc-master/osmo-bsc.cfg
index cb0059d..7ce9173 100644
--- a/osmo-bsc-master/osmo-bsc.cfg
+++ b/osmo-bsc-master/osmo-bsc.cfg
@@ -46,6 +46,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 e1_input
  e1_line 0 driver ipa
diff --git a/osmo-hlr-master/osmo-hlr.cfg b/osmo-hlr-master/osmo-hlr.cfg
index f3be518..9d8b125 100644
--- a/osmo-hlr-master/osmo-hlr.cfg
+++ b/osmo-hlr-master/osmo-hlr.cfg
@@ -11,6 +11,7 @@
  logging level linp error
 !
 line vty
+ no login
  bind 0.0.0.0
 ctrl
  bind 0.0.0.0
diff --git a/osmo-hnbgw-master/osmo-hnbgw.cfg b/osmo-hnbgw-master/osmo-hnbgw.cfg
index 8bffd76..4c7e75b 100644
--- a/osmo-hnbgw-master/osmo-hnbgw.cfg
+++ b/osmo-hnbgw-master/osmo-hnbgw.cfg
@@ -19,6 +19,9 @@
  logging level lctrl notice
  logging level lgtp notice
  logging level lstats notice
+line vty
+ no login
+ bind 0.0.0.0
 cs7 instance 0
  point-code 0.23.5
  asp asp-clnt-OsmoHNBGW 2905 0 m3ua
diff --git a/osmo-mgw-master/osmo-mgw.cfg b/osmo-mgw-master/osmo-mgw.cfg
index 44653e3..682c4ed 100644
--- a/osmo-mgw-master/osmo-mgw.cfg
+++ b/osmo-mgw-master/osmo-mgw.cfg
@@ -31,6 +31,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 mgcp
   bind ip 172.18.0.180
diff --git a/osmo-msc-master/osmo-msc.cfg b/osmo-msc-master/osmo-msc.cfg
index 91c9eee..929e88c 100644
--- a/osmo-msc-master/osmo-msc.cfg
+++ b/osmo-msc-master/osmo-msc.cfg
@@ -3,6 +3,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 network
  network country code 1
diff --git a/osmo-sip-master/osmo-sip-connector.cfg 
b/osmo-sip-master/osmo-sip-connector.cfg
index ad42969..5a0b4f5 100644
--- a/osmo-sip-master/osmo-sip-connector.cfg
+++ b/osmo-sip-master/osmo-sip-connector.cfg
@@ -1,3 +1,6 @@
+line vty
+ no login
+ bind 0.0.0.0
 app
 mncc
   socket-path /tmp/bsc_mncc
diff --git a/scripts/regen_doc.sh b/scripts/regen_doc.sh
new file mode 100755
index 000..7c7529f
--- /dev/null
+++ b/scripts/regen_doc.sh
@@ -0,0 +1,43 @@
+#!/bin/sh +x
+
+. ../jenkins-common.sh
+
+NAME="$1"
+PORT="$2"
+COUNTERFILE="$3"
+VTYFILE="$4"
+
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+if [ -z "$OSMO_INTERACT_VTY" ]; then
+   OSMO_INTERACT_VTY="osmo-interact-vty.py"
+fi
+
+docker_images_require \
+   "$NAME-$IMAGE_SUFFIX"
+
+network_create 172.18.12.0/24
+
+container_create() {
+   CONTAINERNAME=$1
+   IP_ADDR=$2
+
+   docker run --rm --network ${NET_NAME} --ip ${IP_ADDR} \
+   --name ${BUILD_TAG}-${CONTAINERNAME} -d \
+   ${REPO_USER}/${CONTAINERNAME}
+
+
+}
+
+container_create "$NAME-$IMAGE_SUFFIX" 172.18.12.23
+
+# Get asciidoc counter info
+${OSMO_INTERACT_VTY} \
+   -c "enable;show asciidoc counters" -p "$PORT" -H 172.18.12.23 -O 
"$COUNTERFILE"
+
+# Get vty reference
+${OSMO_INTERACT_VTY} \
+   -X -p "$PORT" -H 172.18.12.23 -O "$VTYFILE"
+
+docker container kill "${BUILD_TAG}-$NAME-$IMAGE_SUFFIX"
+
+network_remove

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14403
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5
Gerrit-Change-Number: 14403
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...docker-playground[master]: Add script to regenerate VTY and counter documentation

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14403 )

Change subject: Add script to regenerate VTY and counter documentation
..


Patch Set 2: Verified+1


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14403
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5
Gerrit-Change-Number: 14403
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:17:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-msc[master]: manuals: Include overview chapter about counters

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14496 )

Change subject: manuals: Include overview chapter about counters
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14496
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8c3e8bcda27f35118ab0e3d75621a02eec86f15c
Gerrit-Change-Number: 14496
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:16:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-hlr[master]: manuals: Update vty documentation

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14498 )

Change subject: manuals: Update vty documentation
..

manuals: Update vty documentation

Related: OS#1700
Change-Id: Ia650ec9ab97dcb64e4b701328bc7e88d691d427a
---
M doc/manuals/vty/hlr_vty_reference.xml
1 file changed, 276 insertions(+), 23 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/doc/manuals/vty/hlr_vty_reference.xml 
b/doc/manuals/vty/hlr_vty_reference.xml
index cc97dc4..e5fd0f2 100644
--- a/doc/manuals/vty/hlr_vty_reference.xml
+++ b/doc/manuals/vty/hlr_vty_reference.xml
@@ -187,7 +187,7 @@
 
   
 
-
+
   
 
 
@@ -213,6 +213,7 @@
 
 
 
+
 
 
 
@@ -302,22 +303,63 @@
 
   
 
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
 
   
 
 
   
 
-
+
   
 
 
 
 
-
+
+
 
   
 
+
+  
+
+
+
+
+
+
+
+  
+
   
   
 enable
@@ -486,7 +528,7 @@
 
   
 
-
+
   
 
 
@@ -512,6 +554,7 @@
 
 
 
+
 
 
 
@@ -521,8 +564,7 @@
 
 
   
-
-
+
 
 
 
@@ -601,22 +643,63 @@
 
   
 
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
 
   
 
 
   
 
-
+
   
 
 
 
 
-
+
+
 
   
 
+
+  
+
+
+
+
+
+
+
+  
+
 
   
 
@@ -625,47 +708,52 @@
 
   
 
-
+
   
 
 
 
 
-
+
+
 
   
 
-
+
   
 
 
 
 
-
+
+
 
 
+
 
   
 
-
+
   
 
 
 
 
-
+
+
 
 
 
   
 
-
+
   
 
 
 
 
-
+
+
 
 
 
@@ -676,25 +764,27 @@
 
   
 
-
+
   
 
 
 
 
-
+
+
 
 
 
   
 
-
+
   
 
 
 
 
-
+
+
 
 
 
@@ -707,6 +797,20 @@
 
   
 
+
+  
+
+
+
+
+
+
+
+
+
+
+  
+
   
   
 config
@@ -883,7 +987,8 @@
 
 
   
-
+
+
   
 
 
@@ -905,6 +1010,43 @@
 
   
 
+
+  
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
 
   
 
@@ -985,7 +1127,7 @@
 
   
 
-
+
   
 
 
@@ -1011,6 +1153,7 @@
 
 
 
+
 
 
 
@@ -1051,6 +1194,75 @@
   
 
   
+  
+config-stats
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+  
+
+  
   
 config-line
 
@@ -1064,10 +1276,11 @@
 
   
 
-
+
   
 
 
+
   
 
   
@@ -1087,6 +1300,12 @@
 
   
 
+
+  
+
+
+  
+
 
   
 
@@ -1145,6 +1364,40 @@
 
   
 
+
+  
+
+
+  
+
+
+  
+
+  

Change in ...osmo-hlr[master]: manuals: Add script to update vty/counter documentation from docker

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14497 )

Change subject: manuals: Add script to update vty/counter documentation from 
docker
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14497
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Id57c34214396b02fafa55da223764748086290e8
Gerrit-Change-Number: 14497
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:16:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ci[master]: OBS: make nightly packages conflict with latest

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/14490 )

Change subject: OBS: make nightly packages conflict with latest
..

OBS: make nightly packages conflict with latest

Add conflicting dummy packages osmocom-nightly and osmocom-latest, and
make all packages from each repository depend on the right one.

As usually, the latest packages will only get changed when a new release
appears. So the dependency will get introduced after tagging a new
release. I have tested in an own OBS namespace, that everything works as
expected.

Related: OS#2640
Change-Id: I79c45e798c10a65443b9fb9ecb54393d1918608a
---
A scripts/common-obs.sh
M scripts/osmocom-latest-packages.sh
M scripts/osmocom-nightly-packages.sh
3 files changed, 95 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified



diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
new file mode 100644
index 000..2b33039
--- /dev/null
+++ b/scripts/common-obs.sh
@@ -0,0 +1,79 @@
+#!/bin/sh
+# Various common code used in the OBS (opensuse build service) related osmo-ci 
shell scripts
+
+# Create the source for a dummy package, that conflicts with another dummy 
package in the current directory. Example
+# of the structure that will be generated:
+# osmocom-nightly
+# └── debian
+# ├── changelog
+# ├── compat
+# ├── control
+# ├── copyright
+# ├── rules
+# └── source
+# └── format
+# $1: name of dummy package (e.g. "osmocom-nightly")
+# $2: name of conflicting package (e.g. "osmocom-latest")
+osmo_obs_prepare_conflict() {
+   local pkgname="$1"
+   local pkgname_conflict="$2"
+   local pkgver="0.0.0"
+   local oldpwd="$PWD"
+
+   mkdir -p "$pkgname/debian/source"
+   cd "$pkgname/debian"
+
+   # Fill control, changelog, rules
+   cat << EOF > control
+Source: ${pkgname}
+Section: unknown
+Priority: optional
+Maintainer: Oliver Smith 
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.8
+
+Package: ${pkgname}
+Depends: \${misc:Depends}
+Architecture: any
+Conflicts: ${pkgname_conflict}
+Description: Dummy package, which conflicts with ${pkgname_conflict}
+EOF
+   cat << EOF > changelog
+${pkgname} (${pkgver}) unstable; urgency=medium
+
+  * Dummy package, which conflicts with ${pkgname_conflict}.
+
+ -- Oliver Smith   Thu, 13 Jun 2019 12:50:19 +0200
+EOF
+   cat << EOF > rules
+#!/usr/bin/make -f
+%:
+   dh \$@
+EOF
+
+   # Finish up debian dir
+   chmod +x rules
+   echo "9" > compat
+   echo "3.0 (native)" > source/format
+   touch copyright
+
+   # Put in git repository
+   cd ..
+   git init .
+   git add -A
+   git commit -m "auto-commit: $pkgname dummy package" || true
+   git tag -f "$pkgver"
+
+   cd "$oldpwd"
+}
+
+# Add dependency to all (sub)packages in debian/control and commit the change.
+# $1: path to debian/control file
+# $2: name of the package to depend on
+osmo_obs_add_debian_dependency() {
+   # Note: adding the comma at the end should be fine. If there is a 
Depends: line, it is most likely not empty. It
+   # should at least have ${misc:Depends} according to lintian.
+   sed "s/^Depends: /Depends: $2, /g" -i "$1"
+
+   git -C "$(dirname "$1")" commit -m "auto-commit: debian: depend on $2" .
+}
diff --git a/scripts/osmocom-latest-packages.sh 
b/scripts/osmocom-latest-packages.sh
index 543c43a..2a9e28d 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+. "$(dirname "$0")/common-obs.sh"

 # requirements
 # apt install git-buildpackage osc git
@@ -28,6 +29,9 @@
   fi
   [ -d "$DEBSRCDIR" ] && rm -rf "$DEBSRCDIR"
   mkdir "$DEBSRCDIR"
+
+  cd "$TOP"
+  osmo_obs_prepare_conflict "osmocom-latest" "osmocom-nightly"
 }

 get_last_tag() {
@@ -84,6 +88,11 @@
   VER=$(get_last_tag "$project")
   if [ -x ./git-version-gen ]; then
 ./git-version-gen . > .tarball-version 2>/dev/null
+  fi
+
+  osmo_obs_add_debian_dependency "./debian/control" "osmocom-latest"
+
+  if [ -x ./git-version-gen ]; then
 gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$output" \
 "--git-debian-branch=$VER" --git-ignore-new $gitbpargs \
 --git-postexport='cp $GBP_GIT_DIR/../.tarball-version 
$GBP_TMP_DIR/'
@@ -152,6 +161,7 @@

   checkout_copy_debian8_jessie "osmo-gsm-manuals"

+  build osmocom-latest
   build limesuite --git-upstream-tree="$(get_last_tag limesuite)"
   build osmo-gsm-manuals
   build osmo-gsm-manuals-debian8-jessie
diff --git a/scripts/osmocom-nightly-packages.sh 
b/scripts/osmocom-nightly-packages.sh
index 27cd9dc..172e4e0 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+. "$(dirname "$0")/common-obs.sh"

 # requirements
 # apt install devscripts 

Change in ...osmo-ci[master]: OBS: make nightly packages conflict with latest

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/14490 )

Change subject: OBS: make nightly packages conflict with latest
..


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


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14490
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I79c45e798c10a65443b9fb9ecb54393d1918608a
Gerrit-Change-Number: 14490
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:16:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-hlr[master]: manuals: Add script to update vty/counter documentation from docker

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14497 )

Change subject: manuals: Add script to update vty/counter documentation from 
docker
..

manuals: Add script to update vty/counter documentation from docker

Related: OS#1700
Change-Id: Id57c34214396b02fafa55da223764748086290e8
---
M doc/manuals/Makefile.am
A doc/manuals/regen_doc.sh
2 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am
index 9e1295a..8a47f8a 100644
--- a/doc/manuals/Makefile.am
+++ b/doc/manuals/Makefile.am
@@ -4,6 +4,7 @@
 osmohlr-usermanual.adoc \
 osmohlr-usermanual-docinfo.xml \
 osmohlr-vty-reference.xml \
+regen_doc.sh \
 chapters \
 vty

diff --git a/doc/manuals/regen_doc.sh b/doc/manuals/regen_doc.sh
new file mode 100755
index 000..2e9194b
--- /dev/null
+++ b/doc/manuals/regen_doc.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -x
+
+if [ -z "$DOCKER_PLAYGROUND" ]; then
+   echo "You need to set DOCKER_PLAYGROUND"
+   exit 1
+fi
+
+SCRIPT=$(realpath "$0")
+MANUAL_DIR=$(dirname "$SCRIPT")
+
+COMMIT=${COMMIT:-$(git log -1 --format=format:%H)}
+
+cd "$DOCKER_PLAYGROUND/scripts" || exit 1
+
+OSMO_HLR_BRANCH=$COMMIT ./regen_doc.sh osmo-hlr 4258 \
+   "$MANUAL_DIR/chapters/counters_generated.adoc" \
+   "$MANUAL_DIR/vty/hlr_vty_reference.xml"

--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14497
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Id57c34214396b02fafa55da223764748086290e8
Gerrit-Change-Number: 14497
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-msc[master]: manuals: Include overview chapter about counters

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14496 )

Change subject: manuals: Include overview chapter about counters
..

manuals: Include overview chapter about counters

Change-Id: I8c3e8bcda27f35118ab0e3d75621a02eec86f15c
---
M doc/manuals/osmomsc-usermanual.adoc
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/doc/manuals/osmomsc-usermanual.adoc 
b/doc/manuals/osmomsc-usermanual.adoc
index 4fd0cc7..3c69d7b 100644
--- a/doc/manuals/osmomsc-usermanual.adoc
+++ b/doc/manuals/osmomsc-usermanual.adoc
@@ -14,6 +14,8 @@

 include::{srcdir}/chapters/control.adoc[]

+include::./common/chapters/counters-overview.adoc[]
+
 include::{srcdir}/chapters/counters.adoc[]

 include::./common/chapters/vty.adoc[]

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14496
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8c3e8bcda27f35118ab0e3d75621a02eec86f15c
Gerrit-Change-Number: 14496
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: BTS: BS power tests

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14507 )

Change subject: BTS: BS power tests
..

BTS: BS power tests

osmo-bts does currently not use the signaled lchan BS power level, nor
does it update the BS power IE returned in the measurement results.

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

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 9d7b8c2..3b27469 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1892,6 +1892,99 @@
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
 }

+function f_check_meas_bs_power_level(integer level) runs on ConnHdlr {
+   timer T := 8.0;
+   T.start;
+   var RSL_Message rsl;
+   alt {
+   [] as_l1_sacch();
+   [] L1CTL.receive { repeat; }
+   [] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, ?, ?, ?)) -> value rsl {
+   if (rsl.ies[3].body.bs_power.power_level == level) {
+   setverdict(pass)
+   } else {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
log2str("Received wrong BS power level in MEAS RES ", rsl));
+   }
+   }
+   [] T.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "No MEAS RES 
received at all");
+   }
+   }
+}
+
+/* see if the rsl meas res contains our expeced bs power level
+bs power set during assignment */
+function f_TC_rsl_bs_pwr_static_ass(charstring id) runs on ConnHdlr {
+   f_l1_tune(L1CTL);
+   RSL.clear;
+
+   if (mp_bts_trxc_port != -1) {
+   f_trxc_fake_rssi(rxlev2dbm(mp_ul_rxlev_exp));
+   f_trxc_fake_toffs256(g_pars.l1_pars.timing_offset_256syms);
+   }
+
+   var uint5_t pwr_var := 1;
+   var template (value) RSL_IE_BS_Power bs_power := 
ts_RSL_IE_BS_Power(pwr_var);
+   var template (value) RSL_IE pwr := t_RSL_IE(RSL_IE_BS_POWER, 
RSL_IE_Body:{bs_power := bs_power});
+
+   f_est_dchan(more_ies :={valueof(pwr)});
+
+   f_check_meas_bs_power_level(pwr_var);
+
+   f_rsl_chan_deact();
+   f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+}
+
+/* see if the rsl meas res contains our expeced bs power level
+bs power set after assignment */
+function f_TC_rsl_bs_pwr_static_power_control(charstring id) runs on ConnHdlr {
+   f_l1_tune(L1CTL);
+   RSL.clear;
+
+   if (mp_bts_trxc_port != -1) {
+   f_trxc_fake_rssi(rxlev2dbm(mp_ul_rxlev_exp));
+   f_trxc_fake_toffs256(g_pars.l1_pars.timing_offset_256syms);
+   }
+
+   var uint5_t pwr_var := 1;
+   var template (value) RSL_IE_BS_Power bs_power := 
ts_RSL_IE_BS_Power(pwr_var);
+
+   f_est_dchan();
+
+   RSL.send(ts_RSL_BS_PWR_CTRL(g_chan_nr, bs_power));
+
+   f_check_meas_bs_power_level(pwr_var);
+
+   f_rsl_chan_deact();
+   f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+}
+
+testcase TC_rsl_bs_pwr_static_ass() runs on test_CT {
+   var ConnHdlr vc_conn;
+   var ConnHdlrPars pars;
+   f_init();
+   for (var integer tn := 1; tn <= 4; tn := tn+1) {
+   pars := valueof(t_Pars(t_RslChanNr_Bm(tn), 
ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_TC_rsl_bs_pwr_static_ass), 
pars,
+  pcu_comp := false, trxc_comp := 
true);
+   vc_conn.done;
+   }
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
+testcase TC_rsl_bs_pwr_static_power_control() runs on test_CT {
+   var ConnHdlr vc_conn;
+   var ConnHdlrPars pars;
+   f_init();
+   for (var integer tn := 1; tn <= 4; tn := tn+1) {
+   pars := valueof(t_Pars(t_RslChanNr_Bm(tn), 
ts_RSL_ChanMode_SIGN));
+   vc_conn := 
f_start_handler(refers(f_TC_rsl_bs_pwr_static_power_control), pars,
+  pcu_comp := false, trxc_comp := 
true);
+   vc_conn.done;
+   }
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
 /* target level -100, first rssi -90, ms power 7, expected increase to 7+6 
within 6 seconds,
 second rssi -110, ms power 7+6, expected decrease to 7 within 6 seconds,
 These power levels are valid for all bands and require no special handling */
@@ -6012,6 +6105,8 @@
execute( TC_meas_res_sign_sdcch4() );
execute( TC_meas_res_sign_sdcch8() );
execute( TC_meas_res_sign_tchh_toa256() );
+   execute( TC_rsl_bs_pwr_static_ass() );
+   execute( TC_rsl_bs_pwr_static_power_control() );
execute( TC_rsl_ms_pwr_ctrl() );
execute( TC_rsl_ms_pwr_dyn_active() );
execute( TC_rsl_ms_pwr_dyn_active2() );
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index e8bb67f..87de9a4 100644
--- 

Change in ...osmo-ttcn3-hacks[master]: BTS: BS power tests

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14507 )

Change subject: BTS: BS power tests
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14507
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If91fb57b4070c60bb277d0b55d69ee3dde47ee48
Gerrit-Change-Number: 14507
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:15:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: bsc-sccplite: Fix expected DLCX in HO tests

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14508 )

Change subject: bsc-sccplite: Fix expected DLCX in HO tests
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14508
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia1d0db9af073760105cc8509e228e317dbea2268
Gerrit-Change-Number: 14508
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:12:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510 )

Change subject: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
Gerrit-Change-Number: 14510
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:12:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: bsc: Move hardcoded ip addr to variable

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14509 )

Change subject: bsc: Move hardcoded ip addr to variable
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14509
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3600fd0d0486205e5bdc487fa75e9038d3bfb52c
Gerrit-Change-Number: 14509
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:11:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bsc[master]: Remove extern declarations of libosmovty symbols

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14492 )

Change subject: Remove extern declarations of libosmovty symbols
..

Remove extern declarations of libosmovty symbols

The library has the declarations since 2011, so it's time to
get them removed from here.

Depends: libosmocore d61d517a2e35f482519561bd325652ee7144679a
Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
---
M include/osmocom/bsc/vty.h
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/vty.h b/include/osmocom/bsc/vty.h
index e632755..7e3c505 100644
--- a/include/osmocom/bsc/vty.h
+++ b/include/osmocom/bsc/vty.h
@@ -12,9 +12,6 @@

 struct buffer *vty_argv_to_buffer(int argc, const char *argv[], int base);

-extern struct cmd_element cfg_description_cmd;
-extern struct cmd_element cfg_no_description_cmd;
-
 enum bsc_vty_node {
GSMNET_NODE = _LAST_OSMOVTY_NODE + 1,
BTS_NODE,

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14492
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
Gerrit-Change-Number: 14492
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-bsc[master]: Remove extern declarations of libosmovty symbols

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14492 )

Change subject: Remove extern declarations of libosmovty symbols
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14492
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
Gerrit-Change-Number: 14492
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:09:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bsc[master]: Re-introduce support for IPA-encapsulated MGCP

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/9342 )

Change subject: Re-introduce support for IPA-encapsulated MGCP
..


Patch Set 9: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/9342
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
Gerrit-Change-Number: 9342
Gerrit-PatchSet: 9
Gerrit-Owner: laforge 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:09:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bsc[master]: Re-introduce support for IPA-encapsulated MGCP

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/9342 )

Change subject: Re-introduce support for IPA-encapsulated MGCP
..

Re-introduce support for IPA-encapsulated MGCP

Old osmo-bsc-sccplite already supported this, but in the migration
over to libosmo-sigtran and to real 3GPP AoIP, this functionality
got lost.

We now create a UDP proxy socket. Any MGCP commands received via IPA
from MSC (or rather: bsc_nat) are retransmitted to the MGW via UDP on
this socket.  Any responses back from the MGW received on the UDP
socket are retransmitted back to MSC/bsc_nat as MGCP inside the IPA
multiplex.

Closes: OS#2536
Change-Id: I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
---
M include/osmocom/bsc/bsc_msc_data.h
M include/osmocom/bsc/osmo_bsc_sigtran.h
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_ctrl.c
A src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M tests/handover/Makefile.am
8 files changed, 207 insertions(+), 20 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index 1f9872a..2ad7c68 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -33,6 +33,7 @@
 #include "osmux.h"

 #include 
+#include 
 #include 


@@ -135,6 +136,16 @@
enum osmux_usage use_osmux;
/* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */
bool remote_supports_osmux;
+
+   /* Proxy between IPA/SCCPlite encapsulated MGCP and UDP */
+   struct {
+   /* local (BSC) IP address to be used */
+   char *local_addr;
+   /* local (BSC) UDP port to be used to talk with MGW */
+   uint16_t local_port;
+   /* UDP socket for proxying MGCP via SCCPlite/IPA */
+   struct osmo_fd ofd;
+   } mgcp_ipa;
 };

 /*
diff --git a/include/osmocom/bsc/osmo_bsc_sigtran.h 
b/include/osmocom/bsc/osmo_bsc_sigtran.h
index bd8b063..b934d51 100644
--- a/include/osmocom/bsc/osmo_bsc_sigtran.h
+++ b/include/osmocom/bsc/osmo_bsc_sigtran.h
@@ -44,3 +44,12 @@

 /* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite 
link */
 int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg);
+
+/* receive + process a MGCP message from the piggy-back on the IPA/SCCPlite 
link */
+int bsc_sccplite_rx_mgcp(struct osmo_ss7_asp *asp, struct msgb *msg);
+
+/* send a message via SCCPLite to given MSC */
+int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg);
+
+/* we received some data on the UDP proxy socket from the MGW. Pass it to MSC 
via IPA */
+int bsc_sccplite_mgcp_proxy_cb(struct osmo_fd *ofd, unsigned int what);
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index e88e614..d50515b 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -78,6 +78,7 @@
osmo_bsc_grace.c \
osmo_bsc_lcls.c \
osmo_bsc_main.c \
+   osmo_bsc_mgcp.c \
osmo_bsc_msc.c \
osmo_bsc_sigtran.c \
osmo_bsc_vty.c \
diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c
index 80699f8..afe061e 100644
--- a/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -52,6 +52,39 @@
return rt->dest.as;
 }

+static int _ss7_as_send(struct osmo_ss7_as *as, struct msgb *msg)
+{
+   struct osmo_ss7_asp *asp;
+   unsigned int i;
+
+   /* FIXME: unify with xua_as_transmit_msg() and perform proper ASP 
lookup */
+   for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+   asp = as->cfg.asps[i];
+   if (!asp)
+   continue;
+   /* FIXME: deal with multiple ASPs per AS */
+   return osmo_ss7_asp_send(asp, msg);
+   }
+   msgb_free(msg);
+   return -1;
+}
+
+int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg)
+{
+   struct osmo_ss7_as *as;
+
+   as = msc_get_ss7_as(msc);
+   if (!as) {
+   msgb_free(msg);
+   return -1;
+   }
+
+   /* don't attempt to send CTRL on a non-SCCPlite AS */
+   if (as->cfg.proto != OSMO_SS7_ASP_PROT_IPA)
+   return 0;
+
+   return _ss7_as_send(as, msg);
+}

 /* Encode a CTRL command and send it to the given ASP
  * \param[in] asp ASP through which we shall send the encoded message
@@ -83,30 +116,20 @@
  * Caller must hence free 'cmd' itself. */
 static int sccplite_msc_ctrl_cmd_send(struct bsc_msc_data *msc, struct 
ctrl_cmd *cmd)
 {
-   struct osmo_ss7_as *as;
-   struct osmo_ss7_asp *asp;
-   unsigned int i;
+   struct msgb *msg;

-   as = msc_get_ss7_as(msc);
-   if (!as)
+   msg = ctrl_cmd_make(cmd);
+   if (!msg)
return -1;

-   /* don't attempt to send CTRL on a 

Change in ...osmo-bsc[master]: Re-introduce support for IPA-encapsulated MGCP

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/9342 )

Change subject: Re-introduce support for IPA-encapsulated MGCP
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/9342
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
Gerrit-Change-Number: 9342
Gerrit-PatchSet: 9
Gerrit-Owner: laforge 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Tue, 18 Jun 2019 18:07:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

2019-06-18 Thread pespin
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14513

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

Change subject: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests
..

bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

* MGCP-over-IPA handling in MSC_ConnectionHandler means we need to use
the new MGCP_CLIENT_MULTI port since we'll be managing MGCP messages
from 2 different UDP connections, and we need to be able to route
answers correctly. As a result, parameter multi_conn_mode is enabled for
SCCPlite and all code adapted to use that port in that type of scenario.
* iDuring calls when on SCCPlite, send a full (all-required-params-in)
CRCX through the MGCP-over-IPA connection towards the BSC in order to
emulate the MSC, and expect the correct answer back. This way we test
BSC funcionality to forward MGCP messages coming from MSC works as
expected.

Related: OS#2536
Depends: osmo-bsc.git I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
Change-Id: I31fed700772dd0b063f913b1e1639fd428c46e7d
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 135 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/13/14513/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14513
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I31fed700772dd0b063f913b1e1639fd428c46e7d
Gerrit-Change-Number: 14513
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...osmo-ttcn3-hacks[master]: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

2019-06-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14513


Change subject: bsc: Test MGCP-over-IPA forwarding in SCCPlite tests
..

bsc: Test MGCP-over-IPA forwarding in SCCPlite tests

* MGCP-over-IPA handling in MSC_ConnectionHandler means we need to use
the new MGCP_CLIENT_MULTI port since we'll be managing MGCP messages
from 2 different UDP connections, and we need to be able to route
answers correctly. As a result, parameter multi_conn_mode is enabled for
SCCPlite and all code adapted to use that port in that type of scenario.
* iDuring calls when on SCCPlite, send a full (all-required-params-in)
CRCX through the MGCP-over-IPA connection towards the BSC in order to
emulate the MSC, and expect the correct answer back. This way we test
BSC funcionality to forward MGCP messages coming from MSC works as
expected.

Related: OS#2536
Depends: osmo-bsc.git I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
Change-Id: I31fed700772dd0b063f913b1e1639fd428c46e7d
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 129 insertions(+), 18 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 4c86e51..ec1be13 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -38,6 +38,7 @@
 import from MGCP_Emulation all;
 import from MGCP_Templates all;
 import from MGCP_Types all;
+import from MGCP_CodecPort all;
 
 import from Osmocom_CTRL_Functions all;
 import from Osmocom_CTRL_Types all;
@@ -295,7 +296,9 @@
callagent_udp_port := -1,
mgw_ip := mp_test_ip,
mgw_udp_port := 2427,
-   multi_conn_mode := false
+   /* Enable it for SCCPlite, since we have 2 MGCP sockets towards 
MGW (UDP one +
+  the on  with MGCP over IPA forwarded from MSC one) */
+   multi_conn_mode := (mp_bssap_cfg.transport == 
BSSAP_TRANSPORT_SCCPlite_SERVER)
};

vc_MGCP := MGCP_Emulation_CT.create(id);
@@ -1718,6 +1721,7 @@
}
connect(vc_conn:BSSAP, g_bssap.vc_RAN:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
+   connect(vc_conn:MGCP_MULTI, vc_MGCP:MGCP_CLIENT_MULTI);
 }

 function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := 
omit)
@@ -2891,18 +2895,32 @@
 /* Expecting MGCP to DLCX the endpoint's two connections: towards BTS and 
towards MSC */
 private function f_expect_dlcx_conns(boolean exp_clear_cmpl := true) runs on 
MSC_ConnHdlr {
var MgcpCommand mgcp;
+   var template MgcpResponse mgcp_resp;
+   var MGCP_RecvFrom mrf;
+   var template MgcpMessage msg_resp;
+   var template MgcpMessage msg_dlcx := {
+   command := tr_DLCX()
+   }

-   MGCP.receive(tr_DLCX()) -> value mgcp {
+   if (g_pars.aoip) {
+   MGCP.receive(tr_DLCX()) -> value mgcp {
log("Got first DLCX: ", mgcp);
MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
-   };
+   };

-   /* For SCCPLite, BSC doesn't handle the MSC-side */
-   if (g_pars.aoip) {
MGCP.receive(tr_DLCX()) -> value mgcp {
log("Got second DLCX: ", mgcp);
MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
};
+   } else  {
+   /* For SCCPLite, BSC doesn't handle the MSC-side */
+   MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) -> value mrf 
{
+   log("Got first DLCX: ", mrf.msg.command);
+   msg_resp := {
+   response := 
ts_DLCX_ACK2(mrf.msg.command.line.trans_id)
+   }
+   MGCP_MULTI.send(t_MGCP_SendToMrf(mrf, msg_resp));
+   };
}

if (exp_clear_cmpl) {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 4f9870f..d578a14 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -15,6 +15,7 @@
 import from General_Types all;
 import from Osmocom_Types all;
 import from GSM_Types all;
+import from IPA_Emulation all;
 import from SCCPasp_Types all;
 import from BSSAP_Types all;
 import from RAN_Emulation all;
@@ -23,6 +24,7 @@
 import from IPL4asp_Types all;
 import from Native_Functions all;

+import from MGCP_CodecPort all;
 import from MGCP_Types all;
 import from MGCP_Templates all;
 import from MGCP_Emulation all;
@@ -330,13 +332,35 @@
return ts_MDCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp);
 }

+function tr_MGCP_RecvFrom_any(template MgcpMessage msg)
+runs on MSC_ConnHdlr return template MGCP_RecvFrom {
+   var template MGCP_RecvFrom mrf := {
+   connId := ?,
+   remName := ?,
+   

Change in ...osmo-ttcn3-hacks[master]: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()

2019-06-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510


Change subject: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()
..

lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()

Function will be re-used in forthcoming commits.

Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
---
M library/BSSMAP_Templates.ttcn
M library/RAN_Emulation.ttcnpp
2 files changed, 6 insertions(+), 1 deletion(-)



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

diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index b377358..9015680 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -402,6 +402,11 @@
cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 
5))
 }

+function f_bssmap_ie_cic_2_int(BSSMAP_IE_CircuitIdentityCode cic_ie) return 
integer {
+   var integer cic := (oct2int(cic_ie.cicHigh) * 256) + 
oct2int(cic_ie.cicLow);
+   return cic;
+}
+
 template (value) BSSMAP_IE_AoIP_TransportLayerAddress 
ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr,

uint16_t udp_port,

integer len) := {
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index cd0c867..de5b7f3 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -422,7 +422,7 @@

ispresent(bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode)) {
var BSSMAP_IE_CircuitIdentityCode cic_ie :=

bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode;
-   var integer cic := (oct2int(cic_ie.cicHigh) * 256) + 
oct2int(cic_ie.cicLow);
+   var integer cic := f_bssmap_ie_cic_2_int(cic_ie);
f_comp_store_cic(client, cic);
}
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
Gerrit-Change-Number: 14510
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: bsc-sccplite: Fix expected DLCX in HO tests

2019-06-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14508


Change subject: bsc-sccplite: Fix expected DLCX in HO tests
..

bsc-sccplite: Fix expected DLCX in HO tests

* TTCN3 code was not ACKing the DLCXs, and as a result retransmitted
DLCX BSC->MGW were being counted as 2nd DLCX.

* In SCCPLite, only 1 DLCX is expected BSC->MGW, because the BSC only
takes care of the BTS-side conn in the endpoint, while MSC takes care of
the MSC-side conn (which is not sent in this case because doesn't really
involved the BSC other than forwarding the message, which will already
be tested in other places in forthcoming commits).

* Getting rid of retransmissions by ACKing the DLCX, it unconvers a bug
in TC_ho_out_fail_no_ho_detect when on AoIP, where BSC only deletes one
of the 2 previously created connections.

* Code is refactored into the function because its logic is made more
complex, and may be even more complex in forthcoming commits when we add
MGCP-over-IPA forwarding verification support.

Change-Id: Ia1d0db9af073760105cc8509e228e317dbea2268
---
M bsc/BSC_Tests.ttcn
1 file changed, 31 insertions(+), 64 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 00995bf..976bc46 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2887,6 +2887,28 @@
vc_conn.done;
 }

+/* Expecting MGCP to DLCX the endpoint's two connections: towards BTS and 
towards MSC */
+private function f_expect_dlcx_conns(boolean exp_clear_cmpl := true) runs on 
MSC_ConnHdlr {
+   var MgcpCommand mgcp;
+
+   MGCP.receive(tr_DLCX()) -> value mgcp {
+   log("Got first DLCX: ", mgcp);
+   MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
+   };
+
+   /* For SCCPLite, BSC doesn't handle the MSC-side */
+   if (g_pars.aoip) {
+   MGCP.receive(tr_DLCX()) -> value mgcp {
+   log("Got second DLCX: ", mgcp);
+   MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
+   };
+   }
+
+   if (exp_clear_cmpl) {
+   BSSAP.receive(tr_BSSMAP_ClearComplete);
+   }
+}
+
 private function f_tc_ho_out_of_this_bsc(charstring id) runs on MSC_ConnHdlr {
g_pars := f_gen_test_hdlr_pars();

@@ -2937,17 +2959,7 @@
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));

-   /* Expecting MGCP to DLCX the endpoint's two connections: towards BTS 
and towards MSC */
-   var MgcpCommand mgcp;
-   interleave {
-   [] BSSAP.receive(tr_BSSMAP_ClearComplete);
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got first DLCX: ", mgcp);
-   }
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got second DLCX: ", mgcp);
-   }
-   }
+   f_expect_dlcx_conns(true);
setverdict(pass);
f_sleep(1.0);
 }
@@ -3154,14 +3166,10 @@
[] BSSAP.receive(tr_BSSMAP_ClearRequest) {
log("Got BSSMAP Clear Request");
}
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got first DLCX: ", mgcp);
-   }
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got second DLCX: ", mgcp);
-   }
}

+   f_expect_dlcx_conns(false);
+
setverdict(pass);
f_sleep(1.0);
 }
@@ -3305,17 +3313,7 @@
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));

-   /* Expecting MGCP to DLCX the endpoint's two connections: towards BTS 
and towards MSC */
-   var MgcpCommand mgcp;
-   interleave {
-   [] BSSAP.receive(tr_BSSMAP_ClearComplete);
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got first DLCX: ", mgcp);
-   }
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got second DLCX: ", mgcp);
-   }
-   }
+   f_expect_dlcx_conns(true);
setverdict(pass);
f_sleep(1.0);

@@ -3397,17 +3395,7 @@
var BssmapCause cause := enum2int(cause_val);
BSSAP.send(ts_BSSMAP_ClearCommand(cause));

-   /* Expecting MGCP to DLCX the endpoint's two connections: towards BTS 
and towards MSC */
-   var MgcpCommand mgcp;
-   interleave {
-   [] BSSAP.receive(tr_BSSMAP_ClearComplete);
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got first DLCX: ", mgcp);
-   }
-   [] MGCP.receive(tr_DLCX()) -> value mgcp {
-   log("Got second DLCX: ", mgcp);
-   }
-   }
+   f_expect_dlcx_conns(true);
setverdict(pass);
f_sleep(1.0);

Change in ...osmo-ttcn3-hacks[master]: lib/mgcp: Add new port with support to handle multiple MGCP sockets

2019-06-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14512


Change subject: lib/mgcp: Add new port with support to handle multiple MGCP 
sockets
..

lib/mgcp: Add new port with support to handle multiple MGCP sockets

* Some scenarios like MGW BSC-attached in SCCPlite require handling of
2 MGCP-over-UDP sockets in MGCP Emulation: 1 for regular
libosmomgcp-client from osmo-bsc and another one from the forward socket
from osmo-bsc (of MGCP-over-IPA messages communicated with MSC).

* Old port is kept for backward compatibility with other tests and
enabled by default. It's also interesting to keep it because it makes
tests without special needs (2 sockets) to use the old port/API which
produces simpler code to read and mantain.

* Users of the new port have to enable multi_conn_mode parameter and
expect to interact with port MGCP_CLIENT_MULTI instead of MGCP_CLIENT,
which will offer messages containing information about the UDP
connection being used by that message.

Change-Id: Ic0ba8c5cde068c07671512a83095d83e28b86746
---
M bsc/BSC_Tests.ttcn
M library/MGCP_CodecPort.ttcn
M library/MGCP_Emulation.ttcn
M msc/MSC_Tests.ttcn
4 files changed, 84 insertions(+), 13 deletions(-)



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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 976bc46..4c86e51 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -294,7 +294,8 @@
callagent_ip := mp_bsc_ip,
callagent_udp_port := -1,
mgw_ip := mp_test_ip,
-   mgw_udp_port := 2427
+   mgw_udp_port := 2427,
+   multi_conn_mode := false
};

vc_MGCP := MGCP_Emulation_CT.create(id);
diff --git a/library/MGCP_CodecPort.ttcn b/library/MGCP_CodecPort.ttcn
index d33afe1..8614eef 100644
--- a/library/MGCP_CodecPort.ttcn
+++ b/library/MGCP_CodecPort.ttcn
@@ -41,11 +41,33 @@
MgcpMessage msg
}

+   type record MGCP_SendTo {
+   ConnectionIdconnId,
+   HostNameremName,
+   PortNumber  remPort,
+   MgcpMessage msg
+   };
+
template MGCP_Send t_MGCP_Send(template ConnectionId connId, template 
MgcpMessage msg) := {
connId := connId,
msg := msg
}

+   template MGCP_SendTo t_MGCP_SendTo(template ConnectionId connId, 
HostName remName,
+PortNumber remPort,template 
MgcpMessage msg) := {
+   connId := connId,
+   remName := remName,
+   remPort := remPort,
+   msg := msg
+   }
+
+   template MGCP_SendTo t_MGCP_SendToMrf(MGCP_RecvFrom mrf,template 
MgcpMessage msg) := {
+   connId := mrf.connId,
+   remName := mrf.remName,
+   remPort := mrf.remPort,
+   msg := msg
+   }
+
private function IPL4_to_MGCP_RecvFrom(in ASP_RecvFrom pin, out 
MGCP_RecvFrom pout) {
pout.connId := pin.connId;
pout.remName := pin.remName;
@@ -65,13 +87,23 @@
pout.msg := char2oct(enc_MgcpMessage(pin.msg));
} with { extension "prototype(fast)" };

+   private function MGCP_to_IPL4_SendTo(in MGCP_SendTo pin, out ASP_SendTo 
out_ud) {
+   out_ud.connId := pin.connId;
+   out_ud.remName := pin.remName;
+   out_ud.remPort := pin.remPort;
+   out_ud.proto := { udp := {} };
+   out_ud.msg := char2oct(enc_MgcpMessage(pin.msg));
+   } with { extension "prototype(fast)" };
+
type port MGCP_CODEC_PT message {
-   out MGCP_Send;
+   out MGCP_Send,
+   MGCP_SendTo;
in  MGCP_RecvFrom,
ASP_ConnId_ReadyToRelease,
ASP_Event;
} with { extension "user IPL4asp_PT
-   out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send))
+   out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send);
+   MGCP_SendTo -> ASP_SendTo: function(MGCP_to_IPL4_SendTo))
in(ASP_RecvFrom -> MGCP_RecvFrom: 
function(IPL4_to_MGCP_RecvFrom);
   ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: 
simple;
   ASP_Event -> ASP_Event: simple)"
diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn
index 23cfeb4..494b171 100644
--- a/library/MGCP_Emulation.ttcn
+++ b/library/MGCP_Emulation.ttcn
@@ -37,8 +37,11 @@
 import from IPL4asp_Types all;

 type component MGCP_ConnHdlr {
+   /* Simple send/recv without caring about peer addr+port. Used with 
multi_conn_mode=false. */
port MGCP_Conn_PT MGCP;
-   /* procedure based port to register for incoming connections */
+   /* Handle multiple 

Change in ...osmo-ttcn3-hacks[master]: bsc: Refactor altstep as_Media_mgw()

2019-06-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14511


Change subject: bsc: Refactor altstep as_Media_mgw()
..

bsc: Refactor altstep as_Media_mgw()

Move logic handling CRCX and MDCX to function, so they can be reused for
other ports in forthcoming commits.

Change-Id: I07344657c5d1465a8e0c278adb76150ca7f449ba
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 66 insertions(+), 52 deletions(-)



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

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 4436b0c..4f9870f 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -270,69 +270,83 @@

 }

+function f_rx_crcx(MgcpCommand mgcp_cmd)
+runs on MSC_ConnHdlr return template MgcpResponse {
+   var MgcpOsmuxCID osmux_cid;
+   var SDP_Message sdp;
+   var integer cid := f_get_free_mgcp_conn();
+   if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
+   if (cid != 0) {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
"MGCP wildcard EP only works in first CRCX");
+   }
+   /* we keep the endpoint name allocated during MediaState_init */
+   } else {
+   /* Call Agent allocated endpoint, trust/use it always */
+   g_media.mgcp_ep := mgcp_cmd.line.ep;
+   }
+   if (isvalue(mgcp_cmd.sdp)) {
+   sdp := mgcp_cmd.sdp;
+   g_media.mgcp_conn[cid].peer.host := 
sdp.connection.conn_addr.addr;
+   g_media.mgcp_conn[cid].peer.port_nr := 
sdp.media_list[0].media_field.ports.port_number;
+   }
+   var MgcpConnState mgcp_conn := g_media.mgcp_conn[cid];
+   sdp := valueof(ts_SDP(mgcp_conn.mgw.host, mgcp_conn.mgw.host, "foo", 
"21",
+   mgcp_conn.mgw.port_nr, { 
int2str(mgcp_conn.rtp_pt) },
+   {valueof(ts_SDP_rtpmap(mgcp_conn.rtp_pt,
+   mgcp_conn.mime_type & "/" &
+   
int2str(mgcp_conn.sample_rate))),
+   valueof(ts_SDP_ptime(mgcp_conn.ptime)) } ));
+   var template MgcpResponse mgcp_resp;
+   if (g_pars.use_osmux and f_MgcpCmd_contains_par(mgcp_cmd, "X-OSMUX")) {
+   osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd);
+   mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, 
mgcp_conn.conn_id, osmux_cid, sdp);
+   } else {
+   mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, 
mgcp_conn.conn_id, sdp);
+   }
+   f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(g_media.mgcp_ep));
+   g_media.mgcp_conn[cid].crcx_seen := g_media.mgcp_conn[cid].crcx_seen + 
1;
+   return mgcp_resp;
+}
+
+function f_rx_mdcx(MgcpCommand mgcp_cmd)
+   runs on MSC_ConnHdlr return template MgcpResponse {
+   var SDP_Message sdp;
+   var integer cid := f_get_mgcp_conn(f_MgcpCmd_extract_conn_id(mgcp_cmd));
+   if (isvalue(mgcp_cmd.sdp)) {
+   sdp := mgcp_cmd.sdp;
+   g_media.mgcp_conn[cid].peer.host := 
sdp.connection.conn_addr.addr;
+   g_media.mgcp_conn[cid].peer.port_nr := 
sdp.media_list[0].media_field.ports.port_number;
+   } else {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "MDCX has no 
[recognizable] SDP");
+   }
+   var MgcpConnState mgcp_conn := g_media.mgcp_conn[cid];
+   sdp := valueof(ts_SDP(mgcp_conn.peer.host, mgcp_conn.peer.host, "foo", 
"21",
+   mgcp_conn.peer.port_nr, { 
int2str(mgcp_conn.rtp_pt) },
+   {valueof(ts_SDP_rtpmap(mgcp_conn.rtp_pt,
+   mgcp_conn.mime_type & "/" &
+   
int2str(mgcp_conn.sample_rate))),
+   valueof(ts_SDP_ptime(mgcp_conn.ptime)) } ));
+   g_media.mgcp_conn[cid].mdcx_seen := g_media.mgcp_conn[cid].mdcx_seen + 
1;
+   return ts_MDCX_ACK(mgcp_cmd.line.trans_id, mgcp_conn.conn_id, sdp);
+}
+
 /* altstep for handling of MGCP media related commands. Activated by 
as_Media() to test
  * MGW level media handling */
 altstep as_Media_mgw(boolean norepeat := false) runs on MSC_ConnHdlr {
var MgcpCommand mgcp_cmd;
-   var MgcpOsmuxCID osmux_cid;
+   var template MgcpResponse mgcp_resp;

[] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
-   var SDP_Message sdp;
-   var integer cid := f_get_free_mgcp_conn();
-   if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) {
-   if (cid != 0) {
-   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, 
fail, "MGCP wildcard EP only works in first CRCX");
-   }
-   /* we keep the endpoint name allocated 

Change in ...osmo-ttcn3-hacks[master]: bsc: Move hardcoded ip addr to variable

2019-06-18 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14509


Change subject: bsc: Move hardcoded ip addr to variable
..

bsc: Move hardcoded ip addr to variable

This way it's more clear what are those IP addresses for.

Change-Id: I3600fd0d0486205e5bdc487fa75e9038d3bfb52c
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 3 insertions(+), 1 deletion(-)



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

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index c709794..4436b0c 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -360,6 +360,8 @@
var MediaState g_media;
var TestHdlrParams g_pars;

+   var charstring host_bts := "127.0.0.2";
+   var charstring host_mgw := "127.0.0.3";
var boolean g_vty_initialized := false;
 }

@@ -878,7 +880,7 @@
codecType := FR_AMR;
}

-   f_MscConnHdlr_init(g_pars.media_nr, "127.0.0.2", "127.0.0.3", 
codecType);
+   f_MscConnHdlr_init(g_pars.media_nr, host_bts, host_mgw, codecType);

/* patch in the LCLS related items, as needed */
f_ass_patch_lcls(ass_tpl, exp_ass_cpl);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14509
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3600fd0d0486205e5bdc487fa75e9038d3bfb52c
Gerrit-Change-Number: 14509
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in ...osmo-msc[master]: manuals: Include overview chapter about counters

2019-06-18 Thread daniel
Hello laforge, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-msc/+/14496

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

Change subject: manuals: Include overview chapter about counters
..

manuals: Include overview chapter about counters

Change-Id: I8c3e8bcda27f35118ab0e3d75621a02eec86f15c
---
M doc/manuals/osmomsc-usermanual.adoc
1 file changed, 2 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8c3e8bcda27f35118ab0e3d75621a02eec86f15c
Gerrit-Change-Number: 14496
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in ...osmo-bsc[master]: Remove extern declarations of libosmovty symbols

2019-06-18 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14492 )

Change subject: Remove extern declarations of libosmovty symbols
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14492
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
Gerrit-Change-Number: 14492
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 15:46:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: BTS: BS power tests

2019-06-18 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14507


Change subject: BTS: BS power tests
..

BTS: BS power tests

osmo-bts does currently not use the signaled lchan BS power level, nor
does it update the BS power IE returned in the measurement results.

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



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 9d7b8c2..3b27469 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1892,6 +1892,99 @@
f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
 }

+function f_check_meas_bs_power_level(integer level) runs on ConnHdlr {
+   timer T := 8.0;
+   T.start;
+   var RSL_Message rsl;
+   alt {
+   [] as_l1_sacch();
+   [] L1CTL.receive { repeat; }
+   [] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, ?, ?, ?)) -> value rsl {
+   if (rsl.ies[3].body.bs_power.power_level == level) {
+   setverdict(pass)
+   } else {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, 
log2str("Received wrong BS power level in MEAS RES ", rsl));
+   }
+   }
+   [] T.timeout {
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "No MEAS RES 
received at all");
+   }
+   }
+}
+
+/* see if the rsl meas res contains our expeced bs power level
+bs power set during assignment */
+function f_TC_rsl_bs_pwr_static_ass(charstring id) runs on ConnHdlr {
+   f_l1_tune(L1CTL);
+   RSL.clear;
+
+   if (mp_bts_trxc_port != -1) {
+   f_trxc_fake_rssi(rxlev2dbm(mp_ul_rxlev_exp));
+   f_trxc_fake_toffs256(g_pars.l1_pars.timing_offset_256syms);
+   }
+
+   var uint5_t pwr_var := 1;
+   var template (value) RSL_IE_BS_Power bs_power := 
ts_RSL_IE_BS_Power(pwr_var);
+   var template (value) RSL_IE pwr := t_RSL_IE(RSL_IE_BS_POWER, 
RSL_IE_Body:{bs_power := bs_power});
+
+   f_est_dchan(more_ies :={valueof(pwr)});
+
+   f_check_meas_bs_power_level(pwr_var);
+
+   f_rsl_chan_deact();
+   f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+}
+
+/* see if the rsl meas res contains our expeced bs power level
+bs power set after assignment */
+function f_TC_rsl_bs_pwr_static_power_control(charstring id) runs on ConnHdlr {
+   f_l1_tune(L1CTL);
+   RSL.clear;
+
+   if (mp_bts_trxc_port != -1) {
+   f_trxc_fake_rssi(rxlev2dbm(mp_ul_rxlev_exp));
+   f_trxc_fake_toffs256(g_pars.l1_pars.timing_offset_256syms);
+   }
+
+   var uint5_t pwr_var := 1;
+   var template (value) RSL_IE_BS_Power bs_power := 
ts_RSL_IE_BS_Power(pwr_var);
+
+   f_est_dchan();
+
+   RSL.send(ts_RSL_BS_PWR_CTRL(g_chan_nr, bs_power));
+
+   f_check_meas_bs_power_level(pwr_var);
+
+   f_rsl_chan_deact();
+   f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+}
+
+testcase TC_rsl_bs_pwr_static_ass() runs on test_CT {
+   var ConnHdlr vc_conn;
+   var ConnHdlrPars pars;
+   f_init();
+   for (var integer tn := 1; tn <= 4; tn := tn+1) {
+   pars := valueof(t_Pars(t_RslChanNr_Bm(tn), 
ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_TC_rsl_bs_pwr_static_ass), 
pars,
+  pcu_comp := false, trxc_comp := 
true);
+   vc_conn.done;
+   }
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
+testcase TC_rsl_bs_pwr_static_power_control() runs on test_CT {
+   var ConnHdlr vc_conn;
+   var ConnHdlrPars pars;
+   f_init();
+   for (var integer tn := 1; tn <= 4; tn := tn+1) {
+   pars := valueof(t_Pars(t_RslChanNr_Bm(tn), 
ts_RSL_ChanMode_SIGN));
+   vc_conn := 
f_start_handler(refers(f_TC_rsl_bs_pwr_static_power_control), pars,
+  pcu_comp := false, trxc_comp := 
true);
+   vc_conn.done;
+   }
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
 /* target level -100, first rssi -90, ms power 7, expected increase to 7+6 
within 6 seconds,
 second rssi -110, ms power 7+6, expected decrease to 7 within 6 seconds,
 These power levels are valid for all bands and require no special handling */
@@ -6012,6 +6105,8 @@
execute( TC_meas_res_sign_sdcch4() );
execute( TC_meas_res_sign_sdcch8() );
execute( TC_meas_res_sign_tchh_toa256() );
+   execute( TC_rsl_bs_pwr_static_ass() );
+   execute( TC_rsl_bs_pwr_static_power_control() );
execute( TC_rsl_ms_pwr_ctrl() );
execute( TC_rsl_ms_pwr_dyn_active() );
execute( TC_rsl_ms_pwr_dyn_active2() );
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index e8bb67f..87de9a4 100644
--- 

Change in ...osmo-bsc[master]: Remove extern declarations of libosmovty symbols

2019-06-18 Thread pespin
Hello laforge, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/14492

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

Change subject: Remove extern declarations of libosmovty symbols
..

Remove extern declarations of libosmovty symbols

The library has the declarations since 2011, so it's time to
get them removed from here.

Depends: libosmocore d61d517a2e35f482519561bd325652ee7144679a
Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
---
M include/osmocom/bsc/vty.h
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/14492/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14492
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
Gerrit-Change-Number: 14492
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-bsc[master]: Remove extern declarations of libosmovty symbols

2019-06-18 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14492 )

Change subject: Remove extern declarations of libosmovty symbols
..


Patch Set 1:

> Patch Set 1: Code-Review+1
>
> > And the library has the declarations since 2011, so it's time to
>  > get them removed from here.
>
> This is exactly the kind of information I would want to read in the 
> changelog. Thanks!

That's precisely why I put the commit hash in libosmocore which added those 
symbols in vty.h, but fine, I'll add it.


-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14492
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
Gerrit-Change-Number: 14492
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 14:48:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505 )

Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..

sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

Base on the docker-playground.git's config, but with 127.0.0.*.
All tests passing in jenkins are passing locally with this config.

Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
---
A sgsn/SGSN_Tests.cfg
A sgsn/osmo-sgsn.cfg
2 files changed, 90 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/sgsn/SGSN_Tests.cfg b/sgsn/SGSN_Tests.cfg
new file mode 100644
index 000..8782845
--- /dev/null
+++ b/sgsn/SGSN_Tests.cfg
@@ -0,0 +1,18 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"../Common.cfg"
+# testsuite specific configuration, not expected to change
+"./SGSN_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+SGSN_Tests.control
diff --git a/sgsn/osmo-sgsn.cfg b/sgsn/osmo-sgsn.cfg
new file mode 100644
index 000..09da510
--- /dev/null
+++ b/sgsn/osmo-sgsn.cfg
@@ -0,0 +1,72 @@
+!
+! OsmoSGSN (1.2.0.46-e77e-dirty) configuration saved from vty
+!!
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 1
+ logging print extended-timestamp 1
+ logging print file 1
+ logging level set-all notice
+ logging level mm debug
+ logging level gprs debug
+ logging level ns info
+ logging level bssgp info
+ logging level llc debug
+ logging level sndcp debug
+ logging level ranap info
+ logging level sua info
+ logging level v42bis info
+ logging level lglobal info
+ logging level lgtp debug
+ logging level lgsup debug
+ logging level lsccp info
+!
+stats interval 5
+!
+line vty
+ no login
+ bind 127.0.0.1
+ctrl
+ bind 127.0.0.1
+!
+ns
+ timer tns-block 3
+ timer tns-block-retries 3
+ timer tns-reset 3
+ timer tns-reset-retries 3
+ timer tns-test 30
+ timer tns-alive 3
+ timer tns-alive-retries 10
+ encapsulation udp local-ip 127.0.0.1
+ encapsulation udp local-port 23000
+ encapsulation framerelay-gre enabled 0
+bssgp
+sgsn
+ gtp local-ip 127.0.0.1
+ ggsn 0 remote-ip 127.0.0.2
+ ggsn 0 gtp-version 1
+ gsup remote-ip 127.0.0.1
+ gsup remote-port 4222
+ auth-policy remote
+ gsup oap-id 0
+ ! apn * ggsn 0
+ no cdr filename
+ no cdr trap
+ cdr interval 600
+ timer t3312 600
+ timer t3322 6
+ timer t3350 6
+ timer t3360 6
+ timer t3370 6
+ timer t3313 30
+ timer t3314 44
+ timer t3316 44
+ timer t3385 8
+ timer t3386 8
+ timer t3395 8
+ timer t3397 8
+ no compression rfc1144
+ no compression v42bis

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505 )

Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..


Patch Set 2: Code-Review+2

Looks fine and clean now ;)


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 13:05:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-msc[master]: manuals: Add script to update vty/counter documentation from docker

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14494 )

Change subject: manuals: Add script to update vty/counter documentation from 
docker
..

manuals: Add script to update vty/counter documentation from docker

Change-Id: I3f5573f81460b40d4606fbcf0febcfd078a7bdca
Related: OS#1700
---
M doc/manuals/Makefile.am
A doc/manuals/regen_doc.sh
2 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am
index 2ce6a0a..3b50d4e 100644
--- a/doc/manuals/Makefile.am
+++ b/doc/manuals/Makefile.am
@@ -1,6 +1,7 @@
 EXTRA_DIST = osmomsc-usermanual.adoc \
 osmomsc-usermanual-docinfo.xml \
 osmomsc-vty-reference.xml \
+regen_doc.sh \
 chapters \
 images \
 vty
diff --git a/doc/manuals/regen_doc.sh b/doc/manuals/regen_doc.sh
new file mode 100755
index 000..55cda5c
--- /dev/null
+++ b/doc/manuals/regen_doc.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -x
+
+if [ -z "$DOCKER_PLAYGROUND" ]; then
+   echo "You need to set DOCKER_PLAYGROUND"
+   exit 1
+fi
+
+SCRIPT=$(realpath "$0")
+MANUAL_DIR=$(dirname "$SCRIPT")
+
+COMMIT=${COMMIT:-$(git log -1 --format=format:%H)}
+
+cd "$DOCKER_PLAYGROUND/scripts" || exit 1
+
+OSMO_MSC_BRANCH=$COMMIT ./regen_doc.sh osmo-msc 4254 \
+   "$MANUAL_DIR/chapters/counters_generated.adoc" \
+   "$MANUAL_DIR/vty/msc_vty_reference.xml"

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14494
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I3f5573f81460b40d4606fbcf0febcfd078a7bdca
Gerrit-Change-Number: 14494
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-msc[master]: manuals: Add script to update vty/counter documentation from docker

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14494 )

Change subject: manuals: Add script to update vty/counter documentation from 
docker
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14494
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I3f5573f81460b40d4606fbcf0febcfd078a7bdca
Gerrit-Change-Number: 14494
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Tue, 18 Jun 2019 12:51:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-msc[master]: manuals: Update counter/vty documentation

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/14495 )

Change subject: manuals: Update counter/vty documentation
..

manuals: Update counter/vty documentation

Change-Id: I1ef0e8ae166d7fdc5e85716a961e8387d26bdd2c
Related: OS#1700
---
M doc/manuals/chapters/counters_generated.adoc
M doc/manuals/vty/msc_vty_reference.xml
2 files changed, 199 insertions(+), 28 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/manuals/chapters/counters_generated.adoc 
b/doc/manuals/chapters/counters_generated.adoc
index afeb8ff..6a3a3d2 100644
--- a/doc/manuals/chapters/counters_generated.adoc
+++ b/doc/manuals/chapters/counters_generated.adoc
@@ -1,5 +1,8 @@
+
 // autogenerated by show asciidoc counters
-These counters and their description based on OsmoMSC UNKNOWN (OsmoMSC).
+These counters and their description based on OsmoMSC 1.4.0 (OsmoMSC).
+
+=== Rate Counters

 // generating tables for rate_ctr_group
 // rate_ctr_group table mobile switching center
@@ -13,6 +16,10 @@
 | loc_update_type:detach | <> | Received location 
update detach indication.
 | loc_update_resp:failed | <> | Rejected location 
updates.
 | loc_update_resp:completed | <> | Successful 
location updates.
+| cm_service_request:rejected | <> | Rejected 
CM Service Request.
+| cm_service_request:accepted | <> | Accepted 
CM Service Request.
+| paging_resp:rejected | <> | Rejected Paging 
Response.
+| paging_resp:accepted | <> | Accepted Paging 
Response.
 | sms:submitted | <> | Received a RPDU from a MS (MO).
 | sms:no_receiver | <> | Counts SMS which couldn't routed 
because no receiver found.
 | sms:delivered | <> | Global SMS Deliver attempts.
@@ -26,8 +33,18 @@
 | call:active | <> | Count total amount of calls that ever 
reached active state.
 | call:complete | <> | Count total amount of calls which 
got terminated by disconnect req or ind after reaching active state.
 | call:incomplete | <> | Count total amount of call which 
got terminated by any other reason after reaching active state.
+| nc_ss:mo_requests | <> | Received MS-initiated call 
independent SS/USSD requests.
+| nc_ss:mo_established | <> | Established 
MS-initiated call independent SS/USSD sessions.
+| nc_ss:mt_requests | <> | Received network-initiated 
call independent SS/USSD requests.
+| nc_ss:mt_established | <> | Established 
network-initiated call independent SS/USSD sessions.
+| bssmap:cipher_mode_reject | <> | Number of 
CIPHER MODE REJECT messages processed by BSSMAP layer
+| bssmap:cipher_mode_complete | <> | Number 
of CIPHER MODE COMPLETE messages processed by BSSMAP layer
 |===
+== Osmo Stat Items
+
 // generating tables for osmo_stat_items
+== Osmo Counters
+
 // generating tables for osmo_counters
 // ungrouped osmo_counters
 .ungrouped osmo counters
@@ -35,6 +52,5 @@
 |===
 | Name | Reference | Description
 | msc.active_calls | <> |
+| msc.active_nc_ss | <> |
 |===
-
-
diff --git a/doc/manuals/vty/msc_vty_reference.xml 
b/doc/manuals/vty/msc_vty_reference.xml
index bb7e958..0e5d04d 100644
--- a/doc/manuals/vty/msc_vty_reference.xml
+++ b/doc/manuals/vty/msc_vty_reference.xml
@@ -279,7 +279,7 @@
 
   
 
-
+
   
 
 
@@ -300,6 +300,7 @@
 
 
 
+
 
 
 
@@ -318,6 +319,7 @@
 
 
 
+
 
 
 
@@ -464,6 +466,12 @@
 
   
 
+
+  
+
+
+  
+
 
   
 
@@ -483,6 +491,12 @@
 
   
 
+
+  
+
+
+  
+
 
   
 
@@ -559,7 +573,7 @@
 
   
 
-
+
   
 
 
@@ -572,8 +586,16 @@
 
 
 
+
 
 
+
+
+
+
+
+
+
   
 
 
@@ -674,7 +696,7 @@
   
 
 
-
+
   
 
   
@@ -937,7 +959,7 @@
 
   
 
-
+
   
 
 
@@ -958,6 +980,7 @@
 
 
 
+
 
 
 
@@ -976,6 +999,7 @@
 
 
 
+
 
 
 
@@ -1122,6 +1146,12 @@
 
   
 
+
+  
+
+
+  
+
 
   
 
@@ -1141,6 +1171,12 @@
 
   
 
+
+  
+
+
+  
+
 
   
 
@@ -1217,7 +1253,7 @@
 
   
 
-
+
   
 
 
@@ -1230,8 +1266,16 @@
 
 
 
+
 
 
+
+
+
+
+
+
+
   
 
 
@@ -1379,11 +1423,24 @@
 
   
 
+
+  
+
+
+
+
+
+

Change in ...osmo-ttcn3-hacks[master]: hlr: add create-subscriber-on-demand tests

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14424 )

Change subject: hlr: add create-subscriber-on-demand tests
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14424
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id544fa906ad442c2bbbccff437c18d04ddccde2e
Gerrit-Change-Number: 14424
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 12:50:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: hlr: add create-subscriber-on-demand tests

2019-06-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14424 )

Change subject: hlr: add create-subscriber-on-demand tests
..

hlr: add create-subscriber-on-demand tests

Test all possible code paths where a subscriber on demand can be
created:
* Check IMEI early
* Location Update
* Send Auth Info

Related: OS#2542
Change-Id: Id544fa906ad442c2bbbccff437c18d04ddccde2e
---
M hlr/HLR_Tests.ttcn
1 file changed, 173 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 4c158fd..f309575 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -1196,6 +1196,176 @@
vc_conn.done;
 }

+/* Test create-subscriber-on-demand during Check IMEI (OsmoMSC would be set to 
"check-imei-rqd early") */
+private function f_TC_subscr_create_on_demand_check_imei_early() runs on 
HLR_ConnHdlr {
+   var GSUP_PDU res; /* save various return values to prevent ttcn3 
compiler warnings */
+   var charstring imsi_pattern := "*IMSI: " & hex2str(g_pars.sub.imsi) & 
"*";
+
+   /* Random MSISDN and CS+PS NAM (LU must pass) */
+   f_vty_config(VTY, "hlr", "subscriber-create-on-demand 3 cs+ps");
+   f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := 
OSMO_GSUP_IMEI_RESULT_ACK);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern imsi_pattern);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*MSISDN: \d\d\d*"); /* last 
line, hence not matching "\d\d\d\n" */
+   f_vty_subscr_show_nomatch(VTY, g_pars.sub, pattern "*[CP]S disabled*");
+   res := f_perform_UL(g_pars.sub.imsi, ?);
+   f_vty_subscr_delete(VTY, g_pars.sub);
+
+   /* Random MSISDN and PS NAM (LU must pass) */
+   f_vty_config(VTY, "hlr", "subscriber-create-on-demand 3 ps");
+   f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := 
OSMO_GSUP_IMEI_RESULT_ACK);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern imsi_pattern);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*MSISDN: \d\d\d*");
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*CS disabled*");
+   f_vty_subscr_show_nomatch(VTY, g_pars.sub, pattern "*PS disabled*");
+   res := f_perform_UL(g_pars.sub.imsi, ?);
+   f_vty_subscr_delete(VTY, g_pars.sub);
+
+   /* Random MSISDN and CS NAM (LU must fail) */
+   f_vty_config(VTY, "hlr", "subscriber-create-on-demand 3 cs");
+   f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := 
OSMO_GSUP_IMEI_RESULT_ACK);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern imsi_pattern);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*MSISDN: \d\d\d*");
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*PS disabled*");
+   f_vty_subscr_show_nomatch(VTY, g_pars.sub, pattern "*CS disabled*");
+   res := f_perform_UL(g_pars.sub.imsi, ?, 7 /* GPRS services not allowed 
*/);
+   f_vty_subscr_delete(VTY, g_pars.sub);
+
+   /* Random MSISDN and no NAM (LU must fail) */
+   f_vty_config(VTY, "hlr", "subscriber-create-on-demand 3 none");
+   f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := 
OSMO_GSUP_IMEI_RESULT_ACK);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern imsi_pattern);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*MSISDN: \d\d\d*");
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*CS disabled*PS disabled*");
+   res := f_perform_UL(g_pars.sub.imsi, ?, 7 /* GPRS services not allowed 
*/);
+   f_vty_subscr_delete(VTY, g_pars.sub);
+
+   /* No MSISDN and no NAM (LU must fail) */
+   f_vty_config(VTY, "hlr", "subscriber-create-on-demand no-msisdn none");
+   f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := 
OSMO_GSUP_IMEI_RESULT_ACK);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern imsi_pattern);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*MSISDN: none*");
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*CS disabled*PS disabled*");
+   res := f_perform_UL(g_pars.sub.imsi, ?, 7 /* GPRS services not allowed 
*/);
+   f_vty_subscr_delete(VTY, g_pars.sub);
+
+   /* No MSISDN and CS+PS NAM (LU must pass) */
+   f_vty_config(VTY, "hlr", "subscriber-create-on-demand no-msisdn cs+ps");
+   f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := 
OSMO_GSUP_IMEI_RESULT_ACK);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern imsi_pattern);
+   f_vty_subscr_show(VTY, g_pars.sub, pattern "*MSISDN: none*");
+   f_vty_subscr_show_nomatch(VTY, g_pars.sub, pattern "*[CP]S disabled*");
+   res := f_perform_UL(g_pars.sub.imsi, omit);
+   f_vty_subscr_delete(VTY, g_pars.sub);
+
+   setverdict(pass);
+}
+testcase TC_subscr_create_on_demand_check_imei_early() runs on test_CT {
+   var hexstring imsi := f_rnd_imsi('26242'H);
+   var HLR_ConnHdlrPars 

Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505 )

Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 12:49:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505 )

Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/14505/1/sgsn/osmo-sgsn.cfg
File sgsn/osmo-sgsn.cfg:

https://gerrit.osmocom.org/#/c/14505/1/sgsn/osmo-sgsn.cfg@12
PS1, Line 12: all everything
> Same here.
Thanks, done.


https://gerrit.osmocom.org/#/c/14505/1/sgsn/osmo-sgsn.cfg@50
PS1, Line 50: all everything
> This has been deprecated. Let's rather do: […]
I've removed the entire "log file sgsn-raw.log" block, because I realized that 
none of the other configs in osmo-ttcn3-hacks.git log to a separate log file. 
So let's make it behave like the other ones and just output to stderr.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 12:18:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread osmith
Hello fixeria, pespin, laforge, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505

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

Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..

sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

Base on the docker-playground.git's config, but with 127.0.0.*.
All tests passing in jenkins are passing locally with this config.

Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
---
A sgsn/SGSN_Tests.cfg
A sgsn/osmo-sgsn.cfg
2 files changed, 90 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/05/14505/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505 )

Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..


Patch Set 1: Code-Review+1

(2 comments)

https://gerrit.osmocom.org/#/c/14505/1/sgsn/osmo-sgsn.cfg
File sgsn/osmo-sgsn.cfg:

https://gerrit.osmocom.org/#/c/14505/1/sgsn/osmo-sgsn.cfg@12
PS1, Line 12: all everything
Same here.


https://gerrit.osmocom.org/#/c/14505/1/sgsn/osmo-sgsn.cfg@50
PS1, Line 50: all everything
This has been deprecated. Let's rather do:

  logging level set-all notice

and then list only those categories where level != NOTICE.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 18 Jun 2019 11:05:28 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ci[master]: WIP: coverity: Make sure curl is installed, as our coverity upload jo...

2019-06-18 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/14506


Change subject: WIP: coverity: Make sure curl is installed, as our coverity 
upload job needs it
..

WIP: coverity: Make sure curl is installed, as our coverity upload job needs it

This is untested. I'm on the train and have very limited understanding
of Ansible

Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71
---
M jobs/coverity.yml
1 file changed, 10 insertions(+), 0 deletions(-)



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

diff --git a/jobs/coverity.yml b/jobs/coverity.yml
index 576fa29..5614fc0 100644
--- a/jobs/coverity.yml
+++ b/jobs/coverity.yml
@@ -2,9 +2,19 @@
 - project:
 name: osmocom-coverity
 jobs:
+  - osmocom-coverity-deps
   - osmocom-coverity

 - job:
+name: 'osmocom-coverity-deps'
+apt:
+  name: "{{ item }}"
+  cache_valid_time: 3600
+  update_cache: yes
+with_items:
+  - curl
+
+- job:
 name: 'osmocom-coverity'
 project-type: freestyle
 defaults: global

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14506
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71
Gerrit-Change-Number: 14506
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

2019-06-18 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505


Change subject: sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg
..

sgsn: add osmo-sgsn.cfg, SGSN_Tests.cfg

Base on the docker-playground.git's config, but with 127.0.0.*.
All tests passing in jenkins are passing locally with this config.

Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
---
A sgsn/SGSN_Tests.cfg
A sgsn/osmo-sgsn.cfg
2 files changed, 145 insertions(+), 0 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.cfg b/sgsn/SGSN_Tests.cfg
new file mode 100644
index 000..8782845
--- /dev/null
+++ b/sgsn/SGSN_Tests.cfg
@@ -0,0 +1,18 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"../Common.cfg"
+# testsuite specific configuration, not expected to change
+"./SGSN_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+SGSN_Tests.control
diff --git a/sgsn/osmo-sgsn.cfg b/sgsn/osmo-sgsn.cfg
new file mode 100644
index 000..00c3fed
--- /dev/null
+++ b/sgsn/osmo-sgsn.cfg
@@ -0,0 +1,127 @@
+!
+! OsmoSGSN (1.2.0.46-e77e-dirty) configuration saved from vty
+!!
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 1
+ logging print extended-timestamp 1
+ logging print file 1
+ logging level all everything
+ logging level mm debug
+ logging level pag notice
+ logging level meas notice
+ logging level ref notice
+ logging level gprs debug
+ logging level ns info
+ logging level bssgp info
+ logging level llc debug
+ logging level sndcp debug
+ logging level slhc notice
+ logging level ranap info
+ logging level sua info
+ logging level v42bis info
+ logging level lglobal info
+ logging level llapd notice
+ logging level linp notice
+ logging level lmux notice
+ logging level lmi notice
+ logging level lmib notice
+ logging level lsms notice
+ logging level lctrl notice
+ logging level lgtp debug
+ logging level lstats notice
+ logging level lgsup debug
+ logging level loap notice
+ logging level lss7 notice
+ logging level lsccp info
+ logging level lsua notice
+ logging level lm3ua notice
+ logging level lmgcp notice
+!
+log file sgsn-raw.log
+  logging filter all 1
+  logging color 0
+  logging print category 1
+  logging timestamp 1
+  logging print file 1
+  logging level all everything
+  logging level mm debug
+  logging level pag notice
+  logging level meas notice
+  logging level ref notice
+  logging level gprs debug
+  logging level ns info
+  logging level bssgp info
+  logging level llc debug
+  logging level sndcp debug
+  logging level slhc notice
+  logging level ranap info
+  logging level sua info
+  logging level v42bis info
+  logging level lglobal info
+  logging level llapd notice
+  logging level linp notice
+  logging level lmux notice
+  logging level lmi notice
+  logging level lmib notice
+  logging level lsms notice
+  logging level lctrl notice
+  logging level lgtp debug
+  logging level lstats notice
+  logging level lgsup debug
+  logging level loap notice
+  logging level lss7 notice
+  logging level lsccp info
+  logging level lsua notice
+  logging level lm3ua notice
+  logging level lmgcp notice
+!
+stats interval 5
+!
+line vty
+ no login
+ bind 127.0.0.1
+ctrl
+ bind 127.0.0.1
+!
+ns
+ timer tns-block 3
+ timer tns-block-retries 3
+ timer tns-reset 3
+ timer tns-reset-retries 3
+ timer tns-test 30
+ timer tns-alive 3
+ timer tns-alive-retries 10
+ encapsulation udp local-ip 127.0.0.1
+ encapsulation udp local-port 23000
+ encapsulation framerelay-gre enabled 0
+bssgp
+sgsn
+ gtp local-ip 127.0.0.1
+ ggsn 0 remote-ip 127.0.0.2
+ ggsn 0 gtp-version 1
+ gsup remote-ip 127.0.0.1
+ gsup remote-port 4222
+ auth-policy remote
+ gsup oap-id 0
+ ! apn * ggsn 0
+ no cdr filename
+ no cdr trap
+ cdr interval 600
+ timer t3312 600
+ timer t3322 6
+ timer t3350 6
+ timer t3360 6
+ timer t3370 6
+ timer t3313 30
+ timer t3314 44
+ timer t3316 44
+ timer t3385 8
+ timer t3386 8
+ timer t3395 8
+ timer t3397 8
+ no compression rfc1144
+ no compression v42bis

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14505
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6da479e35fbe9f861a8bd8e578badcd1563e740f
Gerrit-Change-Number: 14505
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange