Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l

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

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l

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

Last lines of build log:
[  243s] | #define HAVE_STDINT_H 1
[  243s] | #define HAVE_UNISTD_H 1
[  243s] | #define HAVE_DLFCN_H 1
[  243s] | #define LT_OBJDIR ".libs/"
[  243s] | #define BUILD_SMPP 1
[  243s] | #define STDC_HEADERS 1
[  243s] | #define HAVE_DBI_DBD_H 1
[  243s] | #define HAVE_PCAP_PCAP_H 1
[  243s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  243s] | 
[  243s] | configure: exit 0
[  243s] 
[  243s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  243s] make[1]: *** [override_dh_auto_test] Error 1
[  243s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  243s] debian/rules:13: recipe for target 'build' failed
[  243s] make: *** [build] Error 2
[  243s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  243s] 
[  243s] armbuild04 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
21:52:27 UTC 2018.
[  243s] 
[  243s] ### VM INTERACTION START ###
[  245s] [  226.641014] SysRq : Power Off
[  245s] [  226.643350] reboot: Power down
[  245s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_6/root.monitor: Permission denied
[  245s] ### VM INTERACTION END ###
[  245s] 
[  245s] armbuild04 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
21:52:30 UTC 2018.
[  245s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64

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

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64

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

Last lines of build log:
[  488s] | configure:4524: checking for fgrep
[  488s] | configure:4586: result: /bin/grep -F
[  488s] | configure:4621: checking for ld used by gcc
[  488s] | configure:4688: result: /usr/bin/ld
[  488s] | configure:4695: checking if the linker (/usr/bin/ld) is GNU ld
[  488s] | configure:4710: result: yes
[  488s] | configure:4722: checking for BSD- or MS-compatible name lister (nm)
[  488s] | configure:4776: result: /usr/bin/nm -B
[  488s] | configure:4906: checking the name lister (/usr/bin/nm -B) interface
[  488s] | configure:4913: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
[  488s] | configure:4916: /usr/bin/nm -B "conftest.o"
[  488s] | configure:4919: output
[  488s] |  B some_variable
[  488s] | configure:4926: result: BSD nm
[  488s] | configure:4929: checking whether ln -s works
[  488s] | configure:4933: result: yes
[  488s] | configure:4941: checking the maximum length of command line arguments
[  488s] | configure:5072: result: 1572864
[  488s] | configure:5120: checking how to convert aarch64-unknown-linux-gnu 
file names to aarch64-unknown-linux-gnu format
[  488s] | configure:5160: result: func_convert_file_noop
[  488s] | configure:5167: checking how to convert aarch64-unknown-linux-gnu 
file names to toolchain format
[  488s] | configure:5187: result: func_convert_file_noop
[  490s] | configure:5194: che[  459.977952] sysrq: SysRq : Power Off
[  490s] [  459.987968] reboot: Power down
[  490s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_26/root.monitor: Permission denied
[  490s] ### VM INTERACTION END ###
[  490s] 
[  490s] obs-arm-3 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:28:45 UTC 2018.
[  490s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/i586

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

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/i586

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

Last lines of build log:
[  185s] | #define HAVE_INTTYPES_H 1
[  185s] | #define HAVE_STDINT_H 1
[  185s] | #define HAVE_UNISTD_H 1
[  185s] | #define HAVE_DLFCN_H 1
[  185s] | #define LT_OBJDIR ".libs/"
[  185s] | #define BUILD_SMPP 1
[  185s] | #define STDC_HEADERS 1
[  185s] | #define HAVE_DBI_DBD_H 1
[  185s] | #define HAVE_PCAP_PCAP_H 1
[  185s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  185s] | 
[  185s] | configure: exit 0
[  185s] 
[  185s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  185s] make[1]: *** [override_dh_auto_test] Error 1
[  185s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  185s] debian/rules:13: recipe for target 'build' failed
[  185s] make: *** [build] Error 2
[  185s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  185s] 
[  185s] cloud106 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:07:06 UTC 2018.
[  185s] 
[  185s] ### VM INTERACTION START ###
[  189s] [  173.122379] reboot: Power down
[  190s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  190s] ### VM INTERACTION END ###
[  190s] 
[  190s] cloud106 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:07:11 UTC 2018.
[  190s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586

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

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586

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

Last lines of build log:
[  203s] | #define HAVE_INTTYPES_H 1
[  203s] | #define HAVE_STDINT_H 1
[  203s] | #define HAVE_UNISTD_H 1
[  203s] | #define HAVE_DLFCN_H 1
[  203s] | #define LT_OBJDIR ".libs/"
[  203s] | #define BUILD_SMPP 1
[  203s] | #define STDC_HEADERS 1
[  203s] | #define HAVE_DBI_DBD_H 1
[  203s] | #define HAVE_PCAP_PCAP_H 1
[  203s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  203s] | 
[  203s] | configure: exit 0
[  203s] 
[  203s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  203s] make[1]: *** [override_dh_auto_test] Error 1
[  203s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  203s] debian/rules:13: recipe for target 'build' failed
[  203s] make: *** [build] Error 2
[  203s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  203s] 
[  203s] cloud113 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:07:25 UTC 2018.
[  203s] 
[  203s] ### VM INTERACTION START ###
[  206s] [  188.505117] reboot: Power down
[  207s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_4/root.monitor: Permission denied
[  207s] ### VM INTERACTION END ###
[  207s] 
[  207s] cloud113 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:07:30 UTC 2018.
[  207s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.10/x86_64

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

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.10/x86_64

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

Last lines of build log:
[  128s] -
[  128s] -Testing nanobts_attr_nscv_get()...
[  128s] -result=  2d0b0500020362
[  128s] -expected=2d0b0500020362
[  128s] -ok.
[  128s] -
[  128s] -Done
[  128s] +backtrace() returned 4 addresses
[  128s] 
+/usr/src/packages/BUILD/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test(+0x3a7f)
 [0x55ce7e868a7f]
[  128s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) 
[0x7f10af8fc1c1]
[  128s] 
+/usr/src/packages/BUILD/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test(+0x3b0a)
 [0x55ce7e868b0a]
[  128s] ./testsuite.at:104: exit code was 134, expected 0
[  128s] 15. testsuite.at:101: 15. nanobts_omlattr (testsuite.at:101): FAILED 
(testsuite.at:104)
[  128s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  128s] make[1]: *** [override_dh_auto_test] Error 1
[  128s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  128s] debian/rules:13: recipe for target 'build' failed
[  128s] make: *** [build] Error 2
[  128s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  128s] 
[  128s] lamb63 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:04:39 UTC 2018.
[  128s] 
[  128s] ### VM INTERACTION START ###
[  131s] [  122.828284] reboot: Power down
[  131s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_7/root.monitor: Permission denied
[  131s] ### VM INTERACTION END ###
[  131s] 
[  131s] lamb63 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:04:42 UTC 2018.
[  131s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/i586

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

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/i586

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

Last lines of build log:
[  143s] | #define HAVE_INTTYPES_H 1
[  143s] | #define HAVE_STDINT_H 1
[  143s] | #define HAVE_UNISTD_H 1
[  143s] | #define HAVE_DLFCN_H 1
[  143s] | #define LT_OBJDIR ".libs/"
[  143s] | #define BUILD_SMPP 1
[  143s] | #define STDC_HEADERS 1
[  143s] | #define HAVE_DBI_DBD_H 1
[  143s] | #define HAVE_PCAP_PCAP_H 1
[  143s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  143s] | 
[  143s] | configure: exit 0
[  143s] 
[  143s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  143s] make[1]: *** [override_dh_auto_test] Error 1
[  143s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  143s] debian/rules:13: recipe for target 'build' failed
[  143s] make: *** [build] Error 2
[  143s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  143s] 
[  143s] lamb58 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:03:42 UTC 2018.
[  143s] 
[  143s] ### VM INTERACTION START ###
[  147s] [  138.563826] reboot: Power down
[  147s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_6/root.monitor: Permission denied
[  147s] ### VM INTERACTION END ###
[  147s] 
[  147s] lamb58 failed "build openbsc_1.0.0.20180302.dsc" at Fri Mar  2 
20:03:46 UTC 2018.
[  147s] 

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


osmo-bts[master]: rsl: remove unused variable

2018-03-02 Thread Vadim Yanitskiy

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic07edfa04c2184bff4a043e96e69c07df38607e4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] osmo-msc[master]: msc_vlr_tests: improve cipher mode coverage

2018-03-02 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/7057

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

msc_vlr_tests: improve cipher mode coverage

Actually call msc_vlr_set_ciph_mode() and wrap away a_iface_tx_cipher_mode()
and ranap_iu_tx_sec_mode_cmd(). Hence we'll see decisions and errors in
msc_vlr_set_ciph_mode() as well.

Change-Id: Id23bc245d4b5707edcd27c44db272fbb211bf9bd
---
M src/libmsc/gsm_04_08.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
7 files changed, 148 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/57/7057/2

diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 18f8412..995bbf6 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -3611,10 +3611,11 @@
 osmo_static_assert(sizeof(((struct gsm0808_encrypt_info*)0)->key) >= 
sizeof(((struct osmo_auth_vector*)0)->kc),
   gsm0808_encrypt_info_key_fits_osmo_auth_vec_kc);
 
-/* VLR asks us to start using ciphering */
-static int msc_vlr_set_ciph_mode(void *msc_conn_ref,
-bool umts_aka,
-bool retrieve_imeisv)
+/* VLR asks us to start using ciphering.
+ * (Keep non-static to allow regression testing on this function.) */
+int msc_vlr_set_ciph_mode(void *msc_conn_ref,
+ bool umts_aka,
+ bool retrieve_imeisv)
 {
struct gsm_subscriber_connection *conn = msc_conn_ref;
struct vlr_subscr *vsub;
diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am
index 43b4e07..8194f22 100644
--- a/tests/msc_vlr/Makefile.am
+++ b/tests/msc_vlr/Makefile.am
@@ -32,6 +32,8 @@
-Wl,--wrap=osmo_get_rand_id \
-Wl,--wrap=msc_mgcp_call_release \
-Wl,--wrap=msc_mgcp_call_assignment \
+   -Wl,--wrap=a_iface_tx_cipher_mode \
+   -Wl,--wrap=ranap_iu_tx_sec_mode_cmd \
$(NULL)
 
 LDADD = \
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err 
b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
index 2899daa..ea3b989 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
@@ -491,7 +491,9 @@
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: Received Event 
VLR_ULA_E_AUTH_RES
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth()
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
-- sending SecurityModeControl for IMSI:90170010650
+DMM -> SECURITY MODE CONTROL IMSI:90170010650
+- sending SecurityModeControl for UE ctx 42 send_ck=0 new_key=1
+- ...ik=27497388b6cb044648f396aa155b95ef
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: state_chg to 
VLR_ULA_S_WAIT_CIPH
 DMM IMSI:90170010650: bump: conn still being established 
(SUBSCR_CONN_S_NEW)
 DREF IMSI:90170010650: MSC conn use - dtap == 1 (0x4)
@@ -669,7 +671,9 @@
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: got 
VLR_AUTH_RES_PASSED
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: 
_proc_arq_vlr_node2()
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: Set 
Ciphering Mode
-- sending SecurityModeControl for MSISDN:42342
+DMM -> SECURITY MODE CONTROL MSISDN:42342
+- sending SecurityModeControl for UE ctx 42 send_ck=0 new_key=1
+- ...ik=27497388b6cb044648f396aa155b95ef
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: 
state_chg to PR_ARQ_S_WAIT_CIPH
 DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW)
 DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4)
@@ -798,7 +802,9 @@
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: got 
VLR_AUTH_RES_PASSED
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: 
_proc_arq_vlr_node2()
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: Set 
Ciphering Mode
-- sending SecurityModeControl for MSISDN:42342
+DMM -> SECURITY MODE CONTROL MSISDN:42342
+- sending SecurityModeControl for UE ctx 42 send_ck=0 new_key=1
+- ...ik=1159ec926a50e98c034a6b7d7c9f418d
 DVLR Process_Access_Request_VLR(90170010650){PR_ARQ_S_WAIT_AUTH}: 
state_chg to PR_ARQ_S_WAIT_CIPH
 DMM MSISDN:42342: bump: conn still being established (SUBSCR_CONN_S_NEW)
 DREF MSISDN:42342: MSC conn use - dtap == 1 (0x4)
@@ -1466,7 +1472,9 @@
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: Received Event 
VLR_ULA_E_AUTH_RES
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth()
 DVLR vlr_lu_fsm(90170010650){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
-- sending SecurityModeControl for IMSI:90170010650
+DMM -> SECURITY MODE CONTROL IMSI:90170010650
+- sending SecurityModeControl for UE ctx 42 send_ck=0 new_key=1
+- 

[PATCH] libosmocore[master]: features: move bts feature related functionality to libosmocore

2018-03-02 Thread dexter
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/7034

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

features: move bts feature related functionality to libosmocore

osmo-bsc and osmo-bts share enums and value strings to describe
feature data that is exchanged via OML (manufacturer id) on startup.
Also the functions to set and get the respecitive bits in the feature
bitvectors are in osmo-bsc and osmo-bts. This is a code duplication
and should be resolved.

- add enum osmo_bts_features (replaces enum gsm_bts_features)
- add osmo_bts_features_descs (replaces gsm_bts_features_descs)
- add osmo_bts_set_feature (replaces gsm_btsmodel_set_feature)
- add osmo_bts_has_feature (replaces gsm_btsmodel_has_feature)

Change-Id: Id0c35aef11aa49aa40abe7deef1f9dbd12210776
---
M include/Makefile.am
A include/osmocom/gsm/bts_features.h
M src/gsm/Makefile.am
A src/gsm/bts_features.c
M src/gsm/libosmogsm.map
5 files changed, 95 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/7034/4

diff --git a/include/Makefile.am b/include/Makefile.am
index 8b05f80..f82012f 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -67,6 +67,7 @@
osmocom/gsm/a5.h \
osmocom/gsm/abis_nm.h \
osmocom/gsm/apn.h \
+   osmocom/gsm/bts_features.h \
osmocom/gsm/comp128.h \
osmocom/gsm/comp128v23.h \
osmocom/gsm/bitvec_gsm.h \
diff --git a/include/osmocom/gsm/bts_features.h 
b/include/osmocom/gsm/bts_features.h
new file mode 100644
index 000..f9b0142
--- /dev/null
+++ b/include/osmocom/gsm/bts_features.h
@@ -0,0 +1,43 @@
+#pragma once
+
+#include 
+#include 
+
+#define MAX_BTS_FEATURES 128
+
+/* N. B: always add new features to the end of the list (right before 
_NUM_BTS_FEAT) to avoid breaking compatibility
+   with BTS compiled against earlier version of this header. Also make sure 
that the description strings
+   gsm_bts_features_descs[] in gsm_data.c are also updated accordingly! */
+enum osmo_bts_features {
+   BTS_FEAT_HSCSD,
+   BTS_FEAT_GPRS,
+   BTS_FEAT_EGPRS,
+   BTS_FEAT_ECSD,
+   BTS_FEAT_HOPPING,
+   BTS_FEAT_MULTI_TSC,
+   BTS_FEAT_OML_ALERTS,
+   BTS_FEAT_AGCH_PCH_PROP,
+   BTS_FEAT_CBCH,
+   BTS_FEAT_SPEECH_F_V1,
+   BTS_FEAT_SPEECH_H_V1,
+   BTS_FEAT_SPEECH_F_EFR,
+   BTS_FEAT_SPEECH_F_AMR,
+   BTS_FEAT_SPEECH_H_AMR,
+   _NUM_BTS_FEAT
+};
+
+extern const struct value_string osmo_bts_features_descs[];
+
+const char *osmo_bts_feature_name(enum osmo_bts_features feature);
+
+inline int osmo_bts_set_feature(struct bitvec *features, enum 
osmo_bts_features feature)
+{
+   OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
+   return bitvec_set_bit_pos(features, feature, 1);
+}
+
+inline bool osmo_bts_has_feature(const struct bitvec *features, enum 
osmo_bts_features feature)
+{
+   OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
+   return bitvec_get_bit_pos(features, feature);
+}
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index b0d6dbd..0439ce6 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -30,7 +30,7 @@
milenage/aes-internal.c milenage/aes-internal-enc.c \
milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \
gsup.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \
-   gsm23003.c mncc.c
+   gsm23003.c mncc.c bts_features.c
 libgsmint_la_LDFLAGS = -no-undefined
 libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la
 
diff --git a/src/gsm/bts_features.c b/src/gsm/bts_features.c
new file mode 100644
index 000..4ec24fa
--- /dev/null
+++ b/src/gsm/bts_features.c
@@ -0,0 +1,48 @@
+/*! \file bts_features.c
+ * osmo-bts features. */
+/*
+ * (C) 2018 by sysmocom s.f.m.c. GmbH
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301, USA.
+ */
+
+#include 
+
+const struct value_string osmo_bts_features_descs[] = {
+   { BTS_FEAT_HSCSD,   "HSCSD" },
+   { BTS_FEAT_GPRS,"GPRS" },
+   { 

[PATCH] osmo-bsc[master]: bsc_vty: display bts features in show bts

2018-03-02 Thread dexter
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/6994

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

bsc_vty: display bts features in show bts

The command show bts displays all kind of BTS related info, but it
does not display the bts features yet.

- display bts specific features in vty-command show bts

Change-Id: I650133563436349d4ce55f292ea683dbb2ae68d7
---
M src/libbsc/bsc_vty.c
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/94/6994/4

diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index be2e559..d0bfbcf 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -288,6 +288,24 @@
vty_out(vty, " (%d)", count);
 }
 
+static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts)
+{
+   unsigned int i;
+   bool no_features = true;
+   vty_out(vty, "  Features:%s", VTY_NEWLINE);
+
+   for (i = 0; i < _NUM_BTS_FEAT; i++) {
+   if (osmo_bts_has_feature(>features, i)) {
+   vty_out(vty, "%03u ", i);
+   vty_out(vty, "%-40s%s", osmo_bts_feature_name(i), 
VTY_NEWLINE);
+   no_features = false;
+   }
+   }
+
+   if (no_features)
+   vty_out(vty, "(not available)%s", VTY_NEWLINE);
+}
+
 static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
 {
struct pchan_load pl;
@@ -461,6 +479,8 @@
bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL].current,
bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL].current,
VTY_NEWLINE);
+
+   bts_dump_vty_features(vty, bts);
 }
 
 DEFUN(show_bts, show_bts_cmd, "show bts [<0-255>]",

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I650133563436349d4ce55f292ea683dbb2ae68d7
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: ciph command: return more meaningful cause values

2018-03-02 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/7059/1/src/libmsc/gsm_04_08.c
File src/libmsc/gsm_04_08.c:

Line 3683:  return GSM48_REJECT_PROTOCOL_ERROR;
> remember, this is the cause value as sent back to the MS.
yeah, I tried to make sense of 24.008 annex G but it's quite open for 
interpretation.

>From the fact that the MS sending a wrong SRES leads to Illegal MS, I thought 
>that sending A5 capabilites not compatible with the network might also qualify 
>as Illegal MS; as in, something about your crypto is wrong, you're illegal ... 
>?

Then I thought, the MS contacting with the wrong protocol (RAN) would be a 
Protocol Error; that's highly unlikely to happen anyway and actually you're 
right that Network Failure is a better fit here.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4db77fea1a4bcd161218582126a5d83ca171f7cb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] osmo-bts[master]: ipac: fix log output

2018-03-02 Thread dexter

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

ipac: fix log output

The current log output logs connect_ip connect_port
speech mode and payload type over multiple lines and without
logging context (lchan name). Also the logging level
incorrectly set.

- shrink log output into one line.
- add context (lchan name)
- encode ip/port into human readable form

Change-Id: I61044edc0672b268aeebf48b59a772887703399f
Closes: OS#3001
---
M src/common/rsl.c
1 file changed, 10 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/64/7064/1

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 98e8913..d048c82 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1689,6 +1689,7 @@
int rc, inc_ip_port = 0, port;
char *name;
struct in_addr ia;
+   struct in_addr addr;
 
if (dch->c.msg_type == RSL_MT_IPAC_CRCX)
name = "CRCX";
@@ -1705,31 +1706,28 @@
return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR,
 0, dch->c.msg_type);
 
+   LOGP(DRSL, LOGL_DEBUG, "%s IPAC_%s: ", gsm_lchan_name(lchan), name);
if (TLVP_PRES_LEN(, RSL_IE_IPAC_REMOTE_IP, 4)) {
connect_ip = tlvp_val32_unal(, RSL_IE_IPAC_REMOTE_IP);
-   LOGP(DRSL, LOGL_NOTICE, "connect_ip %d \n", connect_ip );
+   addr.s_addr = connect_ip;
+   LOGPC(DRSL, LOGL_DEBUG, "connect_ip=%s ", inet_ntoa(addr));
}
-   else
-   LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote IP\n");
 
if (TLVP_PRES_LEN(, RSL_IE_IPAC_REMOTE_PORT, 2)) {
connect_port = tlvp_val16_unal(, RSL_IE_IPAC_REMOTE_PORT);
-   LOGP(DRSL, LOGL_NOTICE, "connect_port %d \n", connect_port );
+   LOGPC(DRSL, LOGL_DEBUG, "connect_port=%u ",
+ ntohs(connect_port));
}
-   else
-   LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote 
port\n");
 
speech_mode = TLVP_VAL(, RSL_IE_IPAC_SPEECH_MODE);
if (speech_mode)
-   LOGP(DRSL, LOGL_NOTICE, "speech mode: %d\n", *speech_mode);
-   else
-   LOGP(DRSL, LOGL_NOTICE, "speech mode: none\n");
+   LOGPC(DRSL, LOGL_DEBUG, "speech_mode=%u ", *speech_mode);
 
payload_type = TLVP_VAL(, RSL_IE_IPAC_RTP_PAYLOAD);
if (payload_type)
-   LOGP(DRSL, LOGL_NOTICE, "payload type: %d\n",*payload_type);
-   else
-   LOGP(DRSL, LOGL_NOTICE, "payload type: none\n");
+   LOGPC(DRSL, LOGL_DEBUG, "payload_type=%u ", *payload_type);
+
+   LOGPC(DRSL, LOGL_DEBUG, "\n");
 
payload_type2 = TLVP_VAL(, RSL_IE_IPAC_RTP_PAYLOAD2);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61044edc0672b268aeebf48b59a772887703399f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bts[master]: rsl: remove unused variable

2018-03-02 Thread dexter

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

rsl: remove unused variable

The variable btsb in rsl_rx_mode_modif() is set but not used.

- remove btsb

Change-Id: Ic07edfa04c2184bff4a043e96e69c07df38607e4
---
M src/common/rsl.c
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/65/7065/1

diff --git a/src/common/rsl.c b/src/common/rsl.c
index d048c82..47f59d8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1343,7 +1343,6 @@
struct gsm_lchan *lchan = msg->lchan;
struct rsl_ie_chan_mode *cm;
struct tlv_parsed tp;
-   struct gsm_bts_role_bts *btsb = bts_role_bts(lchan->ts->trx->bts);
 
rsl_tlv_parse(, msgb_l3(msg), msgb_l3len(msg));
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic07edfa04c2184bff4a043e96e69c07df38607e4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 


libosmocore[master]: features: move bts feature related functionality to libosmocore

2018-03-02 Thread Harald Welte

Patch Set 3:

(2 comments)

https://gerrit.osmocom.org/#/c/7034/3/include/osmocom/gsm/bts_features.h
File include/osmocom/gsm/bts_features.h:

Line 29: extern const struct value_string osmo_bts_features_descs[];
It is our general policy (mentioned over and over again in patch review) to 
provide an inline function wrapper around every value_string array that is 
exported.  something like "osmo_bts_feature_name(enum osmo_bts_features 
feature)". Please add.


Line 31: static inline int osmo_bts_set_feature(struct bitvec *features, enum 
osmo_bts_features feature)
I don't think those functions are particularly performance critical / called 
frequently (and hence should be inline functions).  What was the rationale?  
I'm not fundamentally opposed, I was just wondering...


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0c35aef11aa49aa40abe7deef1f9dbd12210776
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-HasComments: Yes


[MERGED] osmo-bsc[master]: Revert "Generate the S_L_INP_TEI_UP signal earlier."

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

Change subject: Revert "Generate the S_L_INP_TEI_UP signal earlier."
..


Revert "Generate the S_L_INP_TEI_UP signal earlier."

This reverts commit faf0982ae20001519cf20c5d6345dad490a135f2, as it
introduces a severe regression: No more BCCH FILL / SACCH INFO are sent
upon RSL establishment to the BTS.  See OS#2719 for more details

Change-Id: I8a4f3be9928bc3a0b61f23dc3e41200105204651
Related: OS#2719
---
M src/libbsc/bts_ipaccess_nanobts.c
1 file changed, 13 insertions(+), 12 deletions(-)

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



diff --git a/src/libbsc/bts_ipaccess_nanobts.c 
b/src/libbsc/bts_ipaccess_nanobts.c
index 99e178d..cf85961 100644
--- a/src/libbsc/bts_ipaccess_nanobts.c
+++ b/src/libbsc/bts_ipaccess_nanobts.c
@@ -438,11 +438,6 @@
bts->oml_tei, 0);
rc = clock_gettime(CLOCK_MONOTONIC, );
bts->uptime = (rc < 0) ? 0 : tp.tv_sec; /* we don't need 
sub-second precision for uptime */
-   if (!(sign_link->trx->bts->ip_access.flags & OML_UP)) {
-   e1inp_event(sign_link->ts, S_L_INP_TEI_UP,
-   sign_link->tei, sign_link->sapi);
-   sign_link->trx->bts->ip_access.flags |= OML_UP;
-   }
break;
case E1INP_SIGN_RSL: {
struct e1inp_ts *ts;
@@ -463,13 +458,6 @@
e1inp_sign_link_create(ts, E1INP_SIGN_RSL,
   trx, trx->rsl_tei, 0);
trx->rsl_link->ts->sign.delay = 0;
-   if (!(sign_link->trx->bts->ip_access.flags &
-   (RSL_UP << sign_link->trx->nr))) {
-   e1inp_event(sign_link->ts, S_L_INP_TEI_UP,
-   sign_link->tei, sign_link->sapi);
-   sign_link->trx->bts->ip_access.flags |=
-   (RSL_UP << sign_link->trx->nr);
-   }
break;
}
default:
@@ -502,12 +490,25 @@
 {
int ret = 0;
struct e1inp_sign_link *link = msg->dst;
+   struct e1inp_ts *e1i_ts = link->ts;
 
switch (link->type) {
case E1INP_SIGN_RSL:
+   if (!(link->trx->bts->ip_access.flags &
+   (RSL_UP << link->trx->nr))) {
+   e1inp_event(e1i_ts, S_L_INP_TEI_UP,
+   link->tei, link->sapi);
+   link->trx->bts->ip_access.flags |=
+   (RSL_UP << link->trx->nr);
+   }
ret = abis_rsl_rcvmsg(msg);
break;
case E1INP_SIGN_OML:
+   if (!(link->trx->bts->ip_access.flags & OML_UP)) {
+   e1inp_event(e1i_ts, S_L_INP_TEI_UP,
+   link->tei, link->sapi);
+   link->trx->bts->ip_access.flags |= OML_UP;
+   }
ret = abis_nm_rcvmsg(msg);
break;
default:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a4f3be9928bc3a0b61f23dc3e41200105204651
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bsc[master]: Revert "Generate the S_L_INP_TEI_UP signal earlier."

2018-03-02 Thread Harald Welte

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

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

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


[PATCH] osmo-bsc[master]: Revert "Generate the S_L_INP_TEI_UP signal earlier."

2018-03-02 Thread Harald Welte

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

Revert "Generate the S_L_INP_TEI_UP signal earlier."

This reverts commit faf0982ae20001519cf20c5d6345dad490a135f2, as it
introduces a severe regression: No more BCCH FILL / SACCH INFO are sent
upon RSL establishment to the BTS.  See OS#2719 for more details

Change-Id: I8a4f3be9928bc3a0b61f23dc3e41200105204651
Related: OS#2719
---
M src/libbsc/bts_ipaccess_nanobts.c
1 file changed, 13 insertions(+), 12 deletions(-)


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

diff --git a/src/libbsc/bts_ipaccess_nanobts.c 
b/src/libbsc/bts_ipaccess_nanobts.c
index 99e178d..cf85961 100644
--- a/src/libbsc/bts_ipaccess_nanobts.c
+++ b/src/libbsc/bts_ipaccess_nanobts.c
@@ -438,11 +438,6 @@
bts->oml_tei, 0);
rc = clock_gettime(CLOCK_MONOTONIC, );
bts->uptime = (rc < 0) ? 0 : tp.tv_sec; /* we don't need 
sub-second precision for uptime */
-   if (!(sign_link->trx->bts->ip_access.flags & OML_UP)) {
-   e1inp_event(sign_link->ts, S_L_INP_TEI_UP,
-   sign_link->tei, sign_link->sapi);
-   sign_link->trx->bts->ip_access.flags |= OML_UP;
-   }
break;
case E1INP_SIGN_RSL: {
struct e1inp_ts *ts;
@@ -463,13 +458,6 @@
e1inp_sign_link_create(ts, E1INP_SIGN_RSL,
   trx, trx->rsl_tei, 0);
trx->rsl_link->ts->sign.delay = 0;
-   if (!(sign_link->trx->bts->ip_access.flags &
-   (RSL_UP << sign_link->trx->nr))) {
-   e1inp_event(sign_link->ts, S_L_INP_TEI_UP,
-   sign_link->tei, sign_link->sapi);
-   sign_link->trx->bts->ip_access.flags |=
-   (RSL_UP << sign_link->trx->nr);
-   }
break;
}
default:
@@ -502,12 +490,25 @@
 {
int ret = 0;
struct e1inp_sign_link *link = msg->dst;
+   struct e1inp_ts *e1i_ts = link->ts;
 
switch (link->type) {
case E1INP_SIGN_RSL:
+   if (!(link->trx->bts->ip_access.flags &
+   (RSL_UP << link->trx->nr))) {
+   e1inp_event(e1i_ts, S_L_INP_TEI_UP,
+   link->tei, link->sapi);
+   link->trx->bts->ip_access.flags |=
+   (RSL_UP << link->trx->nr);
+   }
ret = abis_rsl_rcvmsg(msg);
break;
case E1INP_SIGN_OML:
+   if (!(link->trx->bts->ip_access.flags & OML_UP)) {
+   e1inp_event(e1i_ts, S_L_INP_TEI_UP,
+   link->tei, link->sapi);
+   link->trx->bts->ip_access.flags |= OML_UP;
+   }
ret = abis_nm_rcvmsg(msg);
break;
default:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a4f3be9928bc3a0b61f23dc3e41200105204651
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[MERGED] osmo-bts[master]: pcuif_proto: add version 8 features

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

Change subject: pcuif_proto: add version 8 features
..


pcuif_proto: add version 8 features

Add PCU_IF_MSG_DATA_CNF_DT and PCU_IF_SAPI_AGCH_DT to bring the
pccif_proto into sync. Both commands are required to support the
rb11 with an osmo-bsc co-located pcu.

Change-Id: I6d330aca26249ee94ece5e415079f0b75c6e8b48
---
M include/osmo-bts/pcuif_proto.h
1 file changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index be63f1a..00b7bd5 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -5,7 +5,7 @@
 
 #define PCU_SOCK_DEFAULT   "/tmp/pcu_bts"
 
-#define PCU_IF_VERSION 0x07
+#define PCU_IF_VERSION 0x08
 #define TXT_MAX_LEN128
 
 /* msg_type */
@@ -13,6 +13,7 @@
 #define PCU_IF_MSG_DATA_CNF0x01/* confirm (e.g. transmission on PCH) */
 #define PCU_IF_MSG_DATA_IND0x02/* receive data from given channel */
 #define PCU_IF_MSG_RTS_REQ 0x10/* ready to send request */
+#define PCU_IF_MSG_DATA_CNF_DT 0x11/* confirm (with direct tlli) */
 #define PCU_IF_MSG_RACH_IND0x22/* receive RACH */
 #define PCU_IF_MSG_INFO_IND0x32/* retrieve BTS info */
 #define PCU_IF_MSG_ACT_REQ 0x40/* activate/deactivate PDCH */
@@ -28,6 +29,7 @@
 #define PCU_IF_SAPI_PDTCH  0x05/* packet data/control/ccch block */
 #define PCU_IF_SAPI_PRACH  0x06/* packet random access channel */
 #define PCU_IF_SAPI_PTCCH  0x07/* packet TA control channel */
+#define PCU_IF_SAPI_AGCH_DT0x08/* assignment on AGCH but with 
additional TLLI */
 
 /* flags */
 #define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
@@ -60,6 +62,21 @@
uint8_t sapi;
uint8_t len;
uint8_t data[162];
+   uint32_tfn;
+   uint16_tarfcn;
+   uint8_t trx_nr;
+   uint8_t ts_nr;
+   uint8_t block_nr;
+   int8_t  rssi;
+   uint16_tber10k; /* !< \brief BER in units of 0.01% */
+   int16_t ta_offs_qbits;  /* !< \brief Burst TA Offset in quarter 
bits */
+   int16_t lqual_cb;   /* !< \brief Link quality in centiBel */
+} __attribute__ ((packed));
+
+/* data confirmation with direct tlli (instead of raw mac block with tlli) */
+struct gsm_pcu_if_data_cnf_dt {
+   uint8_t sapi;
+   uint32_ttlli;
uint32_tfn;
uint16_tarfcn;
uint8_t trx_nr;
@@ -161,6 +178,7 @@
union {
struct gsm_pcu_if_data  data_req;
struct gsm_pcu_if_data  data_cnf;
+   struct gsm_pcu_if_data_cnf_dt   data_cnf_dt;
struct gsm_pcu_if_data  data_ind;
struct gsm_pcu_if_rts_req   rts_req;
struct gsm_pcu_if_rach_ind  rach_ind;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d330aca26249ee94ece5e415079f0b75c6e8b48
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: pcuif_proto: add version 8 features

2018-03-02 Thread Harald Welte

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6d330aca26249ee94ece5e415079f0b75c6e8b48
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


libosmocore[master]: features: move bts feature related functionality to libosmocore

2018-03-02 Thread dexter

Patch Set 3:

> I cannot See the requested changes, sorry

Sorry, I did not push correctly. Now it should be visible.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0c35aef11aa49aa40abe7deef1f9dbd12210776
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


[PATCH] libosmocore[master]: features: move bts feature related functionality to libosmocore

2018-03-02 Thread dexter
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/7034

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

features: move bts feature related functionality to libosmocore

osmo-bsc and osmo-bts share enums and value strings to describe
feature data that is exchanged via OML (manufacturer id) on startup.
Also the functions to set and get the respecitive bits in the feature
bitvectors are in osmo-bsc and osmo-bts. This is a code duplication
and should be resolved.

- add enum osmo_bts_features (replaces enum gsm_bts_features)
- add osmo_bts_features_descs (replaces gsm_bts_features_descs)
- add osmo_bts_set_feature (replaces gsm_btsmodel_set_feature)
- add osmo_bts_has_feature (replaces gsm_btsmodel_has_feature)

Change-Id: Id0c35aef11aa49aa40abe7deef1f9dbd12210776
---
M include/Makefile.am
A include/osmocom/gsm/bts_features.h
M src/gsm/Makefile.am
A src/gsm/bts_features.c
M src/gsm/libosmogsm.map
5 files changed, 86 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/7034/3

diff --git a/include/Makefile.am b/include/Makefile.am
index 8b05f80..f82012f 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -67,6 +67,7 @@
osmocom/gsm/a5.h \
osmocom/gsm/abis_nm.h \
osmocom/gsm/apn.h \
+   osmocom/gsm/bts_features.h \
osmocom/gsm/comp128.h \
osmocom/gsm/comp128v23.h \
osmocom/gsm/bitvec_gsm.h \
diff --git a/include/osmocom/gsm/bts_features.h 
b/include/osmocom/gsm/bts_features.h
new file mode 100644
index 000..5e7a87e
--- /dev/null
+++ b/include/osmocom/gsm/bts_features.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include 
+#include 
+
+#define MAX_BTS_FEATURES 128
+
+/* N. B: always add new features to the end of the list (right before 
_NUM_BTS_FEAT) to avoid breaking compatibility
+   with BTS compiled against earlier version of this header. Also make sure 
that the description strings
+   gsm_bts_features_descs[] in gsm_data.c are also updated accordingly! */
+enum osmo_bts_features {
+   BTS_FEAT_HSCSD,
+   BTS_FEAT_GPRS,
+   BTS_FEAT_EGPRS,
+   BTS_FEAT_ECSD,
+   BTS_FEAT_HOPPING,
+   BTS_FEAT_MULTI_TSC,
+   BTS_FEAT_OML_ALERTS,
+   BTS_FEAT_AGCH_PCH_PROP,
+   BTS_FEAT_CBCH,
+   BTS_FEAT_SPEECH_F_V1,
+   BTS_FEAT_SPEECH_H_V1,
+   BTS_FEAT_SPEECH_F_EFR,
+   BTS_FEAT_SPEECH_F_AMR,
+   BTS_FEAT_SPEECH_H_AMR,
+   _NUM_BTS_FEAT
+};
+
+extern const struct value_string osmo_bts_features_descs[];
+
+static inline int osmo_bts_set_feature(struct bitvec *features, enum 
osmo_bts_features feature)
+{
+   OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
+   return bitvec_set_bit_pos(features, feature, 1);
+}
+
+static inline bool osmo_bts_has_feature(const struct bitvec *features, enum 
osmo_bts_features feature)
+{
+   OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
+   return bitvec_get_bit_pos(features, feature);
+}
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index b0d6dbd..0439ce6 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -30,7 +30,7 @@
milenage/aes-internal.c milenage/aes-internal-enc.c \
milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \
gsup.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \
-   gsm23003.c mncc.c
+   gsm23003.c mncc.c bts_features.c
 libgsmint_la_LDFLAGS = -no-undefined
 libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la
 
diff --git a/src/gsm/bts_features.c b/src/gsm/bts_features.c
new file mode 100644
index 000..4386c60
--- /dev/null
+++ b/src/gsm/bts_features.c
@@ -0,0 +1,42 @@
+/*! \file bts_features.c
+ * osmo-bts features. */
+/*
+ * (C) 2018 by sysmocom s.f.m.c. GmbH
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301, USA.
+ */
+
+#include 
+
+const struct value_string osmo_bts_features_descs[] = {
+   { BTS_FEAT_HSCSD,   "HSCSD" },
+   { BTS_FEAT_GPRS,"GPRS" },
+   { BTS_FEAT_EGPRS,   "EGPRS" },
+   { BTS_FEAT_ECSD, 

libosmocore[master]: features: move bts feature related functionality to libosmocore

2018-03-02 Thread Harald Welte

Patch Set 2:

I cannot See the requested changes, sorry

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0c35aef11aa49aa40abe7deef1f9dbd12210776
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


libosmocore[master]: features: move bts feature related functionality to libosmocore

2018-03-02 Thread dexter

Patch Set 2:

> Please call the files bts_features.[ch] and put them in libosmogsm,
 > as it's BTS/GSM specific.  otherwise I think everything is fine.

I have changed it now.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id0c35aef11aa49aa40abe7deef1f9dbd12210776
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: bts: f_validate_si_scheduling(): Print correct TC value

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

Change subject: bts: f_validate_si_scheduling(): Print correct TC value
..


bts: f_validate_si_scheduling(): Print correct TC value

We always claimed "No SI messages for TC=0" even in cases where
TC is actually a different value.

Change-Id: I53e357c21b3f1090e4e396e292fcd193581d5bb8
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 83688b9..e0e8ac4 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1371,7 +1371,7 @@
var integer i;
for (i := 0; i < sizeof(si_per_tc); i := i + 1) {
if (sizeof(si_per_tc[i]) == 0) {
-   setverdict(fail, "No SI messages for TC=0!");
+   setverdict(fail, "No SI messages for TC=", i);
}
}
if (cfg.si1_present) {

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

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


osmo-ttcn3-hacks[master]: hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-ttcn3-hacks[master]: f_rach_toffs: Print toffs256 value in verdict when failing

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

Change subject: f_rach_toffs: Print toffs256 value in verdict when failing
..


f_rach_toffs: Print toffs256 value in verdict when failing

Change-Id: I82a8f7c8dd3ce3327aa43bfb9f03795531718320
---
M bts/BTS_Tests.ttcn
M hlr/HLR_Tests.ttcn
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 890c216..83688b9 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -648,7 +648,7 @@
setverdict(pass);
}
[not expect_pass] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(ra, fn))) 
{
-   setverdict(fail, "RACH passed but was expected to be dropped");
+   setverdict(fail, "RACH passed but was expected to be dropped: 
", toffs256);
}
[] RSL_CCHAN.receive { repeat; }
[not expect_pass] T.timeout {
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index c1e29d8..eca4f4b 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -530,7 +530,6 @@
 /* TODO:
   * UL with ISD error
   * UL with ISD timeout
-  * PURGE MS
   * LOCATION CANCEL
   * AUTH FAIL REP
   * DELETE DATA after hlr_subscr_nam() change

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

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


[MERGED] osmo-ttcn3-hacks[master]: hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases

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

Change subject: hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases
..


hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases

Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a
---
M hlr/HLR_Tests.ttcn
1 file changed, 16 insertions(+), 2 deletions(-)

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



diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index eca4f4b..8b21626 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -353,14 +353,27 @@
 
 
 testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT {
-   var hexstring imsi := '01234'H;
+   /* 23.003 Section 2.2 clearly states that an IMSI with less
+* than 5 digits is impossible. Even 5 digits is still questionable */
+   var hexstring imsi := '0123'H;
var GSUP_PDU res;
 
f_init();
 
-   res := f_perform_SAI(imsi, 17);
+   res := f_perform_SAI(imsi, 96); /* Invalid Mandatory information */
setverdict(pass);
 }
+
+testcase TC_gsup_sai_err_unknown_imsi() runs on test_CT {
+   var hexstring imsi := f_rnd_imsi('26242'H);
+   var GSUP_PDU res;
+
+   f_init();
+
+   res := f_perform_SAI(imsi, 2);
+   setverdict(pass);
+}
+
 
 /* test SAI for a number of different subscriber cases (algo, 2g/3g, ...) */
 testcase TC_gsup_sai() runs on test_CT {
@@ -545,6 +558,7 @@
execute( TC_gsup_sai_err_invalid_imsi() );
execute( TC_gsup_sai() );
execute( TC_gsup_ul_unknown_imsi() );
+   execute( TC_gsup_sai_err_unknown_imsi() );
execute( TC_gsup_ul() );
execute( TC_vty() );
execute( TC_vty_msisdn_isd() );

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

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


osmo-ttcn3-hacks[master]: bts: f_validate_si_scheduling(): Print correct TC value

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: f_rach_toffs: Print toffs256 value in verdict when failing

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[PATCH] osmo-ttcn3-hacks[master]: hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases

2018-03-02 Thread Harald Welte

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

hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases

Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a
---
M hlr/HLR_Tests.ttcn
1 file changed, 16 insertions(+), 2 deletions(-)


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

diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index eca4f4b..8b21626 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -353,14 +353,27 @@
 
 
 testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT {
-   var hexstring imsi := '01234'H;
+   /* 23.003 Section 2.2 clearly states that an IMSI with less
+* than 5 digits is impossible. Even 5 digits is still questionable */
+   var hexstring imsi := '0123'H;
var GSUP_PDU res;
 
f_init();
 
-   res := f_perform_SAI(imsi, 17);
+   res := f_perform_SAI(imsi, 96); /* Invalid Mandatory information */
setverdict(pass);
 }
+
+testcase TC_gsup_sai_err_unknown_imsi() runs on test_CT {
+   var hexstring imsi := f_rnd_imsi('26242'H);
+   var GSUP_PDU res;
+
+   f_init();
+
+   res := f_perform_SAI(imsi, 2);
+   setverdict(pass);
+}
+
 
 /* test SAI for a number of different subscriber cases (algo, 2g/3g, ...) */
 testcase TC_gsup_sai() runs on test_CT {
@@ -545,6 +558,7 @@
execute( TC_gsup_sai_err_invalid_imsi() );
execute( TC_gsup_sai() );
execute( TC_gsup_ul_unknown_imsi() );
+   execute( TC_gsup_sai_err_unknown_imsi() );
execute( TC_gsup_ul() );
execute( TC_vty() );
execute( TC_vty_msisdn_isd() );

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

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


[PATCH] osmo-ttcn3-hacks[master]: bts: f_validate_si_scheduling(): Print correct TC value

2018-03-02 Thread Harald Welte

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

bts: f_validate_si_scheduling(): Print correct TC value

We always claimed "No SI messages for TC=0" even in cases where
TC is actually a different value.

Change-Id: I53e357c21b3f1090e4e396e292fcd193581d5bb8
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 83688b9..e0e8ac4 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1371,7 +1371,7 @@
var integer i;
for (i := 0; i < sizeof(si_per_tc); i := i + 1) {
if (sizeof(si_per_tc[i]) == 0) {
-   setverdict(fail, "No SI messages for TC=0!");
+   setverdict(fail, "No SI messages for TC=", i);
}
}
if (cfg.si1_present) {

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

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


[PATCH] osmo-ttcn3-hacks[master]: f_rach_toffs: Print toffs256 value in verdict when failing

2018-03-02 Thread Harald Welte

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

f_rach_toffs: Print toffs256 value in verdict when failing

Change-Id: I82a8f7c8dd3ce3327aa43bfb9f03795531718320
---
M bts/BTS_Tests.ttcn
M hlr/HLR_Tests.ttcn
2 files changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 890c216..83688b9 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -648,7 +648,7 @@
setverdict(pass);
}
[not expect_pass] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(ra, fn))) 
{
-   setverdict(fail, "RACH passed but was expected to be dropped");
+   setverdict(fail, "RACH passed but was expected to be dropped: 
", toffs256);
}
[] RSL_CCHAN.receive { repeat; }
[not expect_pass] T.timeout {
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index c1e29d8..eca4f4b 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -530,7 +530,6 @@
 /* TODO:
   * UL with ISD error
   * UL with ISD timeout
-  * PURGE MS
   * LOCATION CANCEL
   * AUTH FAIL REP
   * DELETE DATA after hlr_subscr_nam() change

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

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


[MERGED] osmo-bts[master]: pcu_if: move definition PCU_SOCK_DEFAULT into pcuif_proto.h

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

Change subject: pcu_if: move definition PCU_SOCK_DEFAULT into pcuif_proto.h
..


pcu_if: move definition PCU_SOCK_DEFAULT into pcuif_proto.h

PCU_SOCK_DEFAULT is defined in the pcu counterpart of the file pcuif_proto.h
To be consistent with the pcu move the definition pcuif_proto.h
The pcuif_proto.h will be exact the same in the pcu repo and bts repo.

Change-Id: I67f8ec036e219994cc296d0ed5409da7f3ec681e
---
M include/osmo-bts/pcu_if.h
M include/osmo-bts/pcuif_proto.h
M src/common/bts.c
M src/common/vty.c
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index 4377833..98efb57 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -1,8 +1,6 @@
 #ifndef _PCU_IF_H
 #define _PCU_IF_H
 
-#define PCU_SOCK_DEFAULT   "/tmp/pcu_bts"
-
 extern int pcu_direct;
 
 int pcu_tx_info_ind(void);
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index 224e310..be63f1a 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -3,6 +3,8 @@
 
 #include 
 
+#define PCU_SOCK_DEFAULT   "/tmp/pcu_bts"
+
 #define PCU_IF_VERSION 0x07
 #define TXT_MAX_LEN128
 
diff --git a/src/common/bts.c b/src/common/bts.c
index 15b92d7..32ec556 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -43,7 +43,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/src/common/vty.c b/src/common/vty.c
index b57e019..5c5ac6e 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -49,7 +49,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67f8ec036e219994cc296d0ed5409da7f3ec681e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-bts[master]: cosmetic: avoid direct state assignment

2018-03-02 Thread Harald Welte
Harald Welte has abandoned this change.

Change subject: cosmetic: avoid direct state assignment
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Idcfbf36746cf988afb2e55741b4a3e1eda70194b
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] libosmocore[master]: Apply fixes suggested by shellcheck

2018-03-02 Thread Harald Welte
Harald Welte has abandoned this change.

Change subject: Apply fixes suggested by shellcheck
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic33fcc707a2913dbc4c7c23ee35ba4c8bc8a3a89
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] libosmocore[master]: Add generic configure step

2018-03-02 Thread Harald Welte
Harald Welte has abandoned this change.

Change subject: Add generic configure step
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ibb2f018780c82d798ff0e8a0a836d1aa8d0d7670
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-msc[master]: VLR tests: add simple LU generator

2018-03-02 Thread Harald Welte
Harald Welte has abandoned this change.

Change subject: VLR tests: add simple LU generator
..


Abandoned

we want this in the ttcn3 testsuite

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Iab8b07b3276b6f6ac0387df14abb98355ea0e99a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 


[ABANDON] osmo-msc[master]: VLR tests: expand ID RESP generator

2018-03-02 Thread Harald Welte
Harald Welte has abandoned this change.

Change subject: VLR tests: expand ID RESP generator
..


Abandoned

we want this in the ttcn3 testsuite

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ibb6cdf652ff48a5b74a89925fd67f147cedf30b7
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-msc[master]: VLR tests: add function to generate ID RESP

2018-03-02 Thread Harald Welte
Harald Welte has abandoned this change.

Change subject: VLR tests: add function to generate ID RESP
..


Abandoned

we want this in the ttcn3 testsuite

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ifc43b4b9b1595e14c353771edbcdd1ad46974895
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


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

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

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


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

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

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

Approvals:
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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

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

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


[MERGED] osmo-ttcn3-hacks[master]: hlr: Add testcases for PURGE_MS procedure

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

Change subject: hlr: Add testcases for PURGE_MS procedure
..


hlr: Add testcases for PURGE_MS procedure

Change-Id: I9d54d5e4b6fe24d3ee710b57e0c69a30b89d3450
---
M hlr/HLR_Tests.ttcn
M library/GSUP_Types.ttcn
2 files changed, 114 insertions(+), 0 deletions(-)

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



diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 7efc2b7..c1e29d8 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -313,6 +313,45 @@
return ret;
 }
 
+/* perform PurgeMS for given imsi, return the GSUP response/error */
+function f_perform_PURGE(hexstring imsi, GSUP_CnDomain cn_dom,
+template (omit) integer exp_err_cause := omit)
+runs on test_CT return GSUP_PDU {
+   var GSUP_PDU ret;
+   timer T := 3.0;
+   var boolean exp_fail := false;
+   if (not istemplatekind(exp_err_cause, "omit")) {
+   exp_fail := true;
+   }
+
+   GSUP.send(valueof(ts_GSUP_PURGE_MS_REQ(imsi, cn_dom)));
+   T.start;
+   alt {
+   [exp_fail] GSUP.receive(tr_GSUP_PURGE_MS_ERR(imsi, exp_err_cause)) -> 
value ret {
+   setverdict(pass);
+   }
+   [exp_fail] GSUP.receive(tr_GSUP_PURGE_MS_ERR(imsi, ?)) -> value ret {
+   setverdict(fail, "Unexpected PURGE ERROR Cause");
+   }
+   [exp_fail] GSUP.receive(tr_GSUP_PURGE_MS_RES(imsi)) -> value ret {
+   setverdict(fail, "Unexpected PURGE.res for unknown IMSI");
+   }
+   [not exp_fail] GSUP.receive(tr_GSUP_PURGE_MS_ERR(imsi, ?)) -> value ret 
{
+   setverdict(fail, "Unexpected PURGE ERROR");
+   }
+   [not exp_fail] GSUP.receive(tr_GSUP_PURGE_MS_RES(imsi)) -> value ret {
+   setverdict(pass);
+   }
+   [] GSUP.receive { repeat; }
+   [] T.timeout {
+   setverdict(fail, "Timeout waiting for PURGE response");
+   self.stop;
+   }
+   }
+   return ret;
+}
+
+
 testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT {
var hexstring imsi := '01234'H;
var GSUP_PDU res;
@@ -435,6 +474,59 @@
}
 }
 
+/* Test PURGE MS for CS services */
+testcase TC_gsup_purge_cs() runs on test_CT {
+   var HlrSubscriberList sl;
+   var GSUP_PDU res;
+
+   f_init();
+
+   sl := f_gen_subs();
+   for (var integer i := 0; i < sizeof(sl); i := i+1) {
+   var HlrSubscriber sub := sl[i];
+   log("Testing CS Purge for ", sub);
+   f_vty_subscr_create(sub);
+   res := f_perform_UL(sub.imsi, sub.msisdn);
+   res := f_perform_PURGE(sub.imsi, OSMO_GSUP_CN_DOMAIN_CS);
+   f_vty_subscr_delete(sub);
+   }
+
+   setverdict(pass);
+}
+
+/* Test PURGE MS for PS services */
+testcase TC_gsup_purge_ps() runs on test_CT {
+   var HlrSubscriberList sl;
+   var GSUP_PDU res;
+
+   f_init();
+
+   sl := f_gen_subs();
+   for (var integer i := 0; i < sizeof(sl); i := i+1) {
+   var HlrSubscriber sub := sl[i];
+   log("Testing PS Purge for ", sub);
+   f_vty_subscr_create(sub);
+   res := f_perform_UL(sub.imsi, sub.msisdn);
+   res := f_perform_PURGE(sub.imsi, OSMO_GSUP_CN_DOMAIN_PS);
+   f_vty_subscr_delete(sub);
+   }
+
+   setverdict(pass);
+}
+
+/* Test PURGEG MS procedure for unknown IMSI */
+testcase TC_gsup_purge_unknown() runs on test_CT {
+   var hexstring imsi := '2345743413463'H;
+   var GSUP_PDU res;
+
+   f_init();
+
+   res := f_perform_PURGE(imsi, OSMO_GSUP_CN_DOMAIN_CS, 2);
+
+   setverdict(pass);
+}
+
+
 /* TODO:
   * UL with ISD error
   * UL with ISD timeout
@@ -457,6 +549,9 @@
execute( TC_gsup_ul() );
execute( TC_vty() );
execute( TC_vty_msisdn_isd() );
+   execute( TC_gsup_purge_cs() );
+   execute( TC_gsup_purge_ps() );
+   execute( TC_gsup_purge_unknown() );
 };
 
 };
diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 3fb8d8e..57c0a39 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -343,6 +343,10 @@
tr_GSUP(OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR, {
tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) });
 
+template (value) GSUP_PDU ts_GSUP_PURGE_MS_REQ(hexstring imsi, GSUP_CnDomain 
dom) :=
+   ts_GSUP(OSMO_GSUP_MSGT_PURGE_MS_REQUEST, {
+   valueof(ts_GSUP_IE_IMSI(imsi)), 
valueof(ts_GSUP_IE_CnDomain(dom)) });
+
 template GSUP_PDU tr_GSUP_PURGE_MS_REQ(template hexstring imsi, template 
GSUP_CnDomain dom := ?) :=
tr_GSUP(OSMO_GSUP_MSGT_PURGE_MS_REQUEST, {
tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE_CnDomain(dom) });
@@ -350,6 +354,14 @@
 template (value) GSUP_PDU 

osmo-ttcn3-hacks[master]: hlr: Add testcases for PURGE_MS procedure

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-ttcn3-hacks[master]: hlr: Fix test of UL+ISD state machine

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

Change subject: hlr: Fix test of UL+ISD state machine
..


hlr: Fix test of UL+ISD state machine

Don't exit too early: After sending ISD.resp we still need to wait
for the UL.res from the HLR before continuing processing.

Change-Id: Iab42a397cbca83b86fc8a6b26ae2d66abb81c187
---
M hlr/HLR_Tests.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index bb417a5..7efc2b7 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -299,6 +299,7 @@
[not exp_fail and not isd_done] GSUP.receive(tr_GSUP_ISD_REQ(imsi, 
msisdn)) -> value ret {
GSUP.send(ts_GSUP_ISD_RES(imsi));
isd_done := true;
+   repeat;
}
[not exp_fail and isd_done] GSUP.receive(tr_GSUP_UL_RES(imsi)) -> value 
ret {
setverdict(pass);

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

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


osmo-ttcn3-hacks[master]: hlr: Fix test of UL+ISD state machine

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-ttcn3-hacks[master]: Makefile: use -j8, allow manual PARALLEL_MAKE val

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

Change subject: Makefile: use -j8, allow manual PARALLEL_MAKE val
..


Makefile: use -j8, allow manual PARALLEL_MAKE val

Set default -j to 8: even on a machine with less cores, using -j8 isn't really
going to slow down the build. On a machine with eight cores, -j8 is going to
speed up significantly.

By using '?=', allow passing a different -jN as PARALLEL_MAKE from the
enviroment.

Change-Id: Idf6a5505742b30d3cb8b80ae98b4e2ad4a4a38e7
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Makefile b/Makefile
index 3b5995a..8cdbbec 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 SUBDIRS=bsc bsc-nat bts ggsn_tests gprs_gb hlr lapdm mgw msc selftest sgsn 
sysinfo
 
-PARALLEL_MAKE:=-j4
+PARALLEL_MAKE ?= -j8
 
 # This master makefile allows you to do things like
 #  make clean  (remove all generated binary, c++ and symlinks)

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

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


osmo-ttcn3-hacks[master]: .gitignore: aggressively ignore everything

2018-03-02 Thread Harald Welte

Patch Set 1:

I'm not sure if this really is an improvement.

You can always execute "../rmlinks.sh", then do a "git status", check the list 
and do a "./gen_links.sh" afterwards before compiling again.

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

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


[MERGED] osmo-ttcn3-hacks[master]: msc: cosmetic: f_start_handler(): drop the id arg, use testc...

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

Change subject: msc: cosmetic: f_start_handler(): drop the id arg, use 
testcasename()
..


msc: cosmetic: f_start_handler(): drop the id arg, use testcasename()

Change-Id: Id4efe8cd00f44ea744996efe04802c5107f2a191
---
M msc/MSC_Tests.ttcn
1 file changed, 42 insertions(+), 41 deletions(-)

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



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index c9cd8d7..4bf385a 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -338,8 +338,9 @@
 type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr;
 
 /* FIXME: move into BSC_ConnectionHandler? */
-function f_start_handler(void_fn fn, charstring id, integer imsi_suffix) runs 
on MTC_CT return BSC_ConnHdlr {
+function f_start_handler(void_fn fn, integer imsi_suffix) runs on MTC_CT 
return BSC_ConnHdlr {
var BSC_ConnHdlr vc_conn;
+   var charstring id := testcasename();
var BSC_ConnHdlrNetworkPars net_pars := {
kc_support := '0A'O,/* A5/1 and A5/3 enabled */
expect_tmsi := true,
@@ -389,7 +390,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_imsi_noauth_tmsi), 
testcasename(), 1);
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_noauth_tmsi), 1);
vc_conn.done;
 }
 
@@ -403,7 +404,7 @@
f_init();
f_vty_config(MSCVTY, "msc", "no assign-tmsi");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_imsi_noauth_notmsi), 
testcasename(), 2);
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_noauth_notmsi), 2);
vc_conn.done;
 }
 
@@ -429,7 +430,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_imsi_reject), testcasename(), 
3);
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_reject), 3);
vc_conn.done;
 }
 
@@ -456,7 +457,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_gsup), 
testcasename(), 4);
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_gsup), 4);
vc_conn.done;
 }
 
@@ -470,7 +471,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi), 
testcasename(), 5);
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi), 5);
vc_conn.done;
 }
 
@@ -506,7 +507,7 @@
 testcase TC_cmserv_imsi_unknown() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
-   vc_conn := f_start_handler(refers(f_tc_cmserv_imsi_unknown), 
testcasename(), 6);
+   vc_conn := f_start_handler(refers(f_tc_cmserv_imsi_unknown), 6);
vc_conn.done;
 }
 
@@ -524,7 +525,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), testcasename(), 
7);
+   vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), 7);
vc_conn.done;
 }
 
@@ -555,7 +556,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 
testcasename(), 8);
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 8);
vc_conn.done;
 }
 
@@ -586,7 +587,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 
testcasename(), 9);
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 9);
vc_conn.done;
 }
 
@@ -622,7 +623,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_clear_request), 
testcasename(), 10);
+   vc_conn := f_start_handler(refers(f_tc_lu_clear_request), 10);
vc_conn.done;
 }
 
@@ -651,7 +652,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_disconnect), testcasename(), 
11);
+   vc_conn := f_start_handler(refers(f_tc_lu_disconnect), 11);
vc_conn.done;
 }
 
@@ -683,7 +684,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_by_imei), testcasename(), 12);
+   vc_conn := f_start_handler(refers(f_tc_lu_by_imei), 12);
vc_conn.done;
 }
 
@@ -729,7 +730,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_tmsi_noauth_unknown), 
testcasename(), 13);
+   vc_conn := f_start_handler(refers(f_tc_lu_tmsi_noauth_unknown), 13);
vc_conn.done;
 }
 
@@ -753,7 +754,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_imsi), 
testcasename(), 14);
+   vc_conn := 

[MERGED] osmo-ttcn3-hacks[master]: msc: cosmetic: f_perform_lu() / pars: move send_early_cm to ...

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

Change subject: msc: cosmetic: f_perform_lu() / pars: move send_early_cm to 
BSC_ConnHdlrPars
..


msc: cosmetic: f_perform_lu() / pars: move send_early_cm to BSC_ConnHdlrPars

By moving to the BSC_ConnHdlrPars, also the tests that expect a LU failure able
to indicate a send_cm_update flag.

All current callers of f_perform_lu() pass send_early_cm as 'true', all are
covered by a default of 'true'.

Change-Id: Ic882293f199a33133a171bff14ff433f99cc8576
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
2 files changed, 27 insertions(+), 25 deletions(-)

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



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 6cacff7..1189112 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -53,7 +53,8 @@
BSSMAP_IE_ClassmarkInformationType2 cm2,
BSSMAP_IE_ClassmarkInformationType3 cm3 optional,
AuthVector vec optional,
-   BSC_ConnHdlrNetworkPars net
+   BSC_ConnHdlrNetworkPars net,
+   boolean send_early_cm
 };
 
 /* get a one-octet bitmaks of supported algorithms based on Classmark 
information */
@@ -278,7 +279,7 @@
}
 }
 
-function f_perform_lu(boolean send_early_cm)
+function f_perform_lu()
 runs on BSC_ConnHdlr {
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
var PDU_DTAP_MT dtap_mt;
@@ -289,7 +290,7 @@
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
f_bssap_compl_l3(l3_lu);
 
-   if (send_early_cm) {
+   if (g_pars.send_early_cm) {
BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
}
 
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 4bf385a..7347caf 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -359,7 +359,8 @@
cm2 := valueof(ts_CM2_default),
cm3 := omit,
vec := omit,
-   net := net_pars
+   net := net_pars,
+   send_early_cm := true
};
 
vc_conn := BSC_ConnHdlr.create(id);
@@ -384,7 +385,7 @@
 
 private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
f_init_handler(pars);
-   f_perform_lu(true);
+   f_perform_lu();
 }
 testcase TC_lu_imsi_noauth_tmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
@@ -397,7 +398,7 @@
 private function f_tc_lu_imsi_noauth_notmsi(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
pars.net.expect_tmsi := false;
f_init_handler(pars);
-   f_perform_lu(true);
+   f_perform_lu();
 }
 testcase TC_lu_imsi_noauth_notmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
@@ -464,7 +465,7 @@
 private function f_tc_lu_imsi_auth_tmsi(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
pars.net.expect_auth := true;
f_init_handler(pars);
-   f_perform_lu(true);
+   f_perform_lu();
 }
 testcase TC_lu_imsi_auth_tmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
@@ -518,7 +519,7 @@
cpars.mgcp_connection_id_bss := '2'H;
cpars.mgcp_connection_id_mss := '3'H;
 
-   f_perform_lu(true);
+   f_perform_lu();
f_mo_call(cpars);
 }
 testcase TC_lu_and_mo_call() runs on MTC_CT {
@@ -835,7 +836,7 @@
 private function f_tc_emerg_call_imsi(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
f_init_handler(pars);
/* First perform location update to ensure subscriber is known */
-   f_perform_lu(true);
+   f_perform_lu();
/* Then issue emergency call identified by IMSI */
f_emerg_call(valueof(ts_MI_IMSI_LV(g_pars.imsi)));
 }
@@ -852,7 +853,7 @@
f_init_handler(pars);
 
/* First perform location update to ensure subscriber is known */
-   f_perform_lu(true);
+   f_perform_lu();
 
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VGCS, mi));
@@ -873,7 +874,7 @@
f_init_handler(pars);
 
/* First perform location update to ensure subscriber is known */
-   f_perform_lu(true);
+   f_perform_lu();
 
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VBS, mi));
@@ -894,7 +895,7 @@
f_init_handler(pars);
 
/* First perform location update to ensure subscriber is known */
-   f_perform_lu(true);
+   f_perform_lu();
 
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_LCS, mi));
@@ -915,7 +916,7 @@
f_init_handler(pars);
 
/* First perform location update to ensure subscriber is known */
-   f_perform_lu(true);
+   

osmo-ttcn3-hacks[master]: Makefile: use -j8, allow manual PARALLEL_MAKE val

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-ttcn3-hacks[master]: msc: add TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug (OS#2947)

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

Change subject: msc: add TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug (OS#2947)
..


msc: add TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug (OS#2947)

To trigger the segfault described in OS#2947, run TC_lu_imsi_auth_tmsi_encr_3_1
with logging category for MSC to set to debug.

Change-Id: I72a1dbb30e0a39dbf4b81c7e378d5607b62e10d3
---
M msc/MSC_Tests.ttcn
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index daadc2b..976cf0d 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1484,6 +1484,19 @@
vc_conn := 
f_start_handler_with_pars(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), pars);
vc_conn.done;
 }
+testcase TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+   f_vty_config(MSCVTY, "network", "authentication required");
+   f_vty_config(MSCVTY, "network", "encryption a5 3");
+
+   /* Make sure the MSC category is on DEBUG level to trigger the log
+* message that is reported in OS#2947 to trigger the segfault */
+   f_vty_config(MSCVTY, "log stderr", "logging level msc debug");
+
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 
362);
+   vc_conn.done;
+}
 
 /* A5/1 + A5/3 only permitted on network side, and MS with only A5/2 support */
 private function f_tc_lu_imsi_auth_tmsi_encr_13_2(charstring id, 
BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
@@ -1646,6 +1659,8 @@
 
execute( TC_lu_and_mt_call() );
 
+   /* Run this last: at the time of writing this test crashes the MSC */
+   execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() );
 }
 
 

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

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


[MERGED] osmo-ttcn3-hacks[master]: msc: cosmetic: pass BSC_ConnHdlrPars to f_start_handler() as...

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

Change subject: msc: cosmetic: pass BSC_ConnHdlrPars to f_start_handler() as 
argument
..


msc: cosmetic: pass BSC_ConnHdlrPars to f_start_handler() as argument

Previously, f_start_handler() would initialize the BSC_ConnHdlrPars instance,
making it impossible to change those parameters before the test function was
invoked.

Add separate f_init_pars() function that sets the default parameters.

Change f_start_handler() to take a BSC_ConnHdlrPars argument; i.e. that
f_init_pars() can be called first, the parameters can then be modified and
finally fed into f_start_handler().

Change-Id: I46de36a032c2473025d0eb01e5909dbcdaf394f7
---
M msc/MSC_Tests.ttcn
1 file changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 7347caf..517afe0 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -338,9 +338,7 @@
 type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr;
 
 /* FIXME: move into BSC_ConnectionHandler? */
-function f_start_handler(void_fn fn, integer imsi_suffix) runs on MTC_CT 
return BSC_ConnHdlr {
-   var BSC_ConnHdlr vc_conn;
-   var charstring id := testcasename();
+function f_init_pars(integer imsi_suffix) runs on MTC_CT return 
BSC_ConnHdlrPars {
var BSC_ConnHdlrNetworkPars net_pars := {
kc_support := '0A'O,/* A5/1 and A5/3 enabled */
expect_tmsi := true,
@@ -362,6 +360,12 @@
net := net_pars,
send_early_cm := true
};
+   return pars;
+}
+
+function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on 
MTC_CT return BSC_ConnHdlr {
+   var BSC_ConnHdlr vc_conn;
+   var charstring id := testcasename();
 
vc_conn := BSC_ConnHdlr.create(id);
/* BSSMAP part / A interface */
@@ -383,6 +387,10 @@
return vc_conn;
 }
 
+function f_start_handler(void_fn fn, integer imsi_suffix) runs on MTC_CT 
return BSC_ConnHdlr {
+   return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix));
+}
+
 private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
f_init_handler(pars);
f_perform_lu();

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

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


[MERGED] osmo-ttcn3-hacks[master]: msc: add TC_lu_imsi_auth_tmsi_encr_3_1_no_cm

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

Change subject: msc: add TC_lu_imsi_auth_tmsi_encr_3_1_no_cm
..


msc: add TC_lu_imsi_auth_tmsi_encr_3_1_no_cm

This is a variation on TC_lu_imsi_auth_tmsi_encr_3_1 that "indicates" inability
of A5/3 by completely omitting a Classmark2.

Add flag send_cm_update to f_tc_lu_imsi_auth_tmsi_encr_3_1() so that we can
easily omit the classmark update. Set this flag to true in existing
TC_lu_imsi_auth_tmsi_encr_3_1, and add pass false from the new test.

Change-Id: I903136d5acbd88f2e0e26fee22e3878258e04786
---
M msc/MSC_Tests.ttcn
1 file changed, 19 insertions(+), 2 deletions(-)

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



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 517afe0..daadc2b 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1444,7 +1444,11 @@
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi);
f_create_gsup_expect(hex2str(g_pars.imsi));
f_bssap_compl_l3(l3_lu);
-   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+   if (pars.send_early_cm) {
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+   } else {
+   pars.cm1.esind := '0'B;
+   }
f_mm_auth();
alt {
[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej)) { }
@@ -1465,7 +1469,19 @@
f_vty_config(MSCVTY, "network", "authentication required");
f_vty_config(MSCVTY, "network", "encryption a5 3");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 36);
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), 
360);
+   vc_conn.done;
+}
+testcase TC_lu_imsi_auth_tmsi_encr_3_1_no_cm() runs on MTC_CT {
+   var BSC_ConnHdlrPars pars;
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+   f_vty_config(MSCVTY, "network", "authentication required");
+   f_vty_config(MSCVTY, "network", "encryption a5 3");
+
+   pars := f_init_pars(361);
+   pars.send_early_cm := false;
+   vc_conn := 
f_start_handler_with_pars(refers(f_tc_lu_imsi_auth_tmsi_encr_3_1), pars);
vc_conn.done;
 }
 
@@ -1624,6 +1640,7 @@
execute( TC_lu_imsi_auth_tmsi_encr_1_13() );
execute( TC_lu_imsi_auth_tmsi_encr_3_13() );
execute( TC_lu_imsi_auth_tmsi_encr_3_1() );
+   execute( TC_lu_imsi_auth_tmsi_encr_3_1_no_cm() );
execute( TC_lu_imsi_auth_tmsi_encr_13_2() );
execute( TC_lu_imsi_auth_tmsi_encr_013_2() );
 

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

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


osmo-ttcn3-hacks[master]: msc: cosmetic: ts_CM1 template: parameterize esind (Early cl...

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-ttcn3-hacks[master]: msc: cosmetic: ts_CM1 template: parameterize esind (Early cl...

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

Change subject: msc: cosmetic: ts_CM1 template: parameterize esind (Early 
classmark Sending)
..


msc: cosmetic: ts_CM1 template: parameterize esind (Early classmark Sending)

Change-Id: If841fc2c9996bef5b962519a325e18f1c13d2b0f
---
M library/L3_Templates.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index c2825a6..a2b872c 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -676,10 +676,10 @@

ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
 
 
-template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, 
BIT2 rev := '10'B) := {
+template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, 
BIT2 rev := '10'B, BIT1 esind := '1'B) := {
rf_PowerCapability := '010'B,
a5_1 := a5_1_unavail,
-   esind := '1'B,
+   esind := esind,
revisionLevel := rev,
spare1_1 := '0'B
 }

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

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


osmo-ttcn3-hacks[master]: msc: add TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug (OS#2947)

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: msc: add TC_lu_imsi_auth_tmsi_encr_3_1_no_cm

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: msc: cosmetic: pass BSC_ConnHdlrPars to f_start_handler() as...

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: msc: cosmetic: f_start_handler(): drop the id arg, use testc...

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: msc: cosmetic: f_perform_lu() / pars: move send_early_cm to ...

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmocom-bb[fixeria/trx]: fake_trx/ctrl_if_(bb|bts).py: log link info at start-up

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

Change subject: fake_trx/ctrl_if_(bb|bts).py: log link info at start-up
..


fake_trx/ctrl_if_(bb|bts).py: log link info at start-up

Change-Id: I4ebeed7271d91ab2e45199e0fb59776c00ad833c
---
M src/target/fake_trx/ctrl_if_bb.py
M src/target/fake_trx/ctrl_if_bts.py
M src/target/fake_trx/udp_link.py
3 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/src/target/fake_trx/ctrl_if_bb.py 
b/src/target/fake_trx/ctrl_if_bb.py
index c0c2fb7..33263e5 100644
--- a/src/target/fake_trx/ctrl_if_bb.py
+++ b/src/target/fake_trx/ctrl_if_bb.py
@@ -33,8 +33,8 @@
pm = None
 
def __init__(self, remote_addr, remote_port, bind_port):
-   print("[i] Init CTRL interface for BB")
CTRLInterface.__init__(self, remote_addr, remote_port, 
bind_port)
+   print("[i] Init CTRL interface for BB (%s)" % self.desc_link())
 
def parse_cmd(self, request):
# Power control
diff --git a/src/target/fake_trx/ctrl_if_bts.py 
b/src/target/fake_trx/ctrl_if_bts.py
index e0a6ada..449df45 100644
--- a/src/target/fake_trx/ctrl_if_bts.py
+++ b/src/target/fake_trx/ctrl_if_bts.py
@@ -34,8 +34,8 @@
pm = None
 
def __init__(self, remote_addr, remote_port, bind_port):
-   print("[i] Init CTRL interface for BTS")
CTRLInterface.__init__(self, remote_addr, remote_port, 
bind_port)
+   print("[i] Init CTRL interface for BTS (%s)" % self.desc_link())
 
def parse_cmd(self, request):
# Power control
diff --git a/src/target/fake_trx/udp_link.py b/src/target/fake_trx/udp_link.py
index dda901c..0174ae3 100644
--- a/src/target/fake_trx/udp_link.py
+++ b/src/target/fake_trx/udp_link.py
@@ -34,10 +34,15 @@
# Save remote info
self.remote_addr = remote_addr
self.remote_port = remote_port
+   self.bind_port = bind_port
 
def __del__(self):
self.sock.close()
 
+   def desc_link(self):
+   return "L:%u <-> R:%s:%u" \
+   % (self.bind_port, self.remote_addr, self.remote_port)
+
def send(self, data):
if type(data) not in [bytearray, bytes]:
data = data.encode()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ebeed7271d91ab2e45199e0fb59776c00ad833c
Gerrit-PatchSet: 5
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


[MERGED] osmo-hlr[master]: Fix responses to PURGE MS

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

Change subject: Fix responses to PURGE MS
..


Fix responses to PURGE MS

When performing PURGE MS, OsmoHLR before this patch used toreturn
an error even in the successful case.  The reasone for this is some
wrong assumptions about the return values of db_subscr_purge().

Change-Id: Ie3005e2eeb424715fd77f202e9fe18464ba211b7
---
M src/hlr.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/hlr.c b/src/hlr.c
index f3a6864..838b1bc 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -238,9 +238,9 @@
/* Perform the actual update of the DB */
rc = db_subscr_purge(g_hlr->dbc, gsup->imsi, true, is_ps);
 
-   if (rc == 1)
+   if (rc == 0)
gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_RESULT;
-   else if (rc == 0) {
+   else if (rc == -ENOENT) {
gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_ERROR;
gsup_reply.cause = GMM_CAUSE_IMSI_UNKNOWN;
} else {

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

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


osmocom-bb[fixeria/trx]: fake_trx/ctrl_if_(bb|bts).py: log link info at start-up

2018-03-02 Thread Harald Welte

Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4ebeed7271d91ab2e45199e0fb59776c00ad833c
Gerrit-PatchSet: 5
Gerrit-Project: osmocom-bb
Gerrit-Branch: fixeria/trx
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: msc_vlr_test_gsm_ciph: drop unused function

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

Change subject: msc_vlr_test_gsm_ciph: drop unused function
..


msc_vlr_test_gsm_ciph: drop unused function

This test is actually in msc_vlr_test_rest.c, shouldn't be copied here, and was
anyway unused.

Change-Id: I9bba10a05d43f7f94aa2cd6dcb63dd8f2f644d35
---
M tests/msc_vlr/msc_vlr_test_gsm_ciph.c
1 file changed, 0 insertions(+), 41 deletions(-)

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



diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c 
b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
index 42e620a..9809108 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
@@ -794,47 +794,6 @@
comment_end();
 }
 
-void test_lu_unknown_tmsi()
-{
-   comment_start();
-
-   btw("Location Update request with unknown TMSI sends ID Request for 
IMSI");
-   lu_result_sent = RES_NONE;
-   dtap_expect_tx("051801");
-   ms_sends_msg("050802008168000130" "05f4" "23422342");
-   VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
-
-   EXPECT_ACCEPTED(false);
-   thwart_rx_non_initial_requests();
-
-   btw("MS tells us the IMSI, causes a GSUP LU request to HLR");
-   gsup_expect_tx("0401080971004026f0");
-   ms_sends_msg("055908991007006402");
-   OSMO_ASSERT(gsup_tx_confirmed);
-   VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
-
-   btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with 
_INSERT_DATA_RESULT");
-   gsup_rx("1001080971004026f00804036470f1",
-   "1201080971004026f0");
-   VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
-
-   btw("having received subscriber data does not mean acceptance");
-   EXPECT_ACCEPTED(false);
-   thwart_rx_non_initial_requests();
-   VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");
-
-   btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT");
-   expect_bssap_clear();
-   gsup_rx("0601080971004026f0", NULL);
-   VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
-
-   btw("LU was successful, and the conn has already been closed");
-   VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
-   EXPECT_CONN_COUNT(0);
-   clear_vlr();
-   comment_end();
-}
-
 msc_vlr_test_func_t msc_vlr_tests[] = {
test_ciph,
test_ciph_tmsi,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bba10a05d43f7f94aa2cd6dcb63dd8f2f644d35
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-hlr[master]: Fix responses to PURGE MS

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-msc[master]: vlr_lu_fsm: guard against using the wrong fi

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

Change subject: vlr_lu_fsm: guard against using the wrong fi
..


vlr_lu_fsm: guard against using the wrong fi

Various functions in vlr_lu_fsm.c belong to one of the four FSMs defined in
that file. After the recent error was uncovered where the lu_fsm called
lu_compl_fsm()'s termination function, I want to make sure it's correct.

Introduce distinct inline functions to dereference the respective fi->priv
pointers, each asserting that the fi indeed belongs to the proper FSM. Use
those *everywhere* to dereference fi->priv.

>From this patch on, we are sure beyond doubt that we are not inadvertently
passing an fi pointer to the wrong FSM's handling functions, though we will
only catch this at runtime -- but then will immediately know the reason.

vlr_lu_fsm.c is the only file defining more than one FSM, so the other FSM
definitions are already reasonably safe.

Change-Id: I7419a780ff2d8b02efc4195bb1702818e4df181c
---
M src/libvlr/vlr_lu_fsm.c
1 file changed, 68 insertions(+), 34 deletions(-)

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



diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index d0500c4..b36e4e3 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -68,10 +68,12 @@
{ 0, NULL }
 };
 
+static inline struct vlr_subscr *upd_hlr_vlr_fi_priv(struct osmo_fsm_inst *fi);
+
 static void upd_hlr_vlr_fsm_init(struct osmo_fsm_inst *fi, uint32_t event,
 void *data)
 {
-   struct vlr_subscr *vsub = fi->priv;
+   struct vlr_subscr *vsub = upd_hlr_vlr_fi_priv(fi);
int rc;
 
OSMO_ASSERT(event == UPD_HLR_VLR_E_START);
@@ -87,7 +89,7 @@
 static void upd_hlr_vlr_fsm_wait_data(struct osmo_fsm_inst *fi, uint32_t event,
  void *data)
 {
-   struct vlr_subscr *vsub = fi->priv;
+   struct vlr_subscr *vsub = upd_hlr_vlr_fi_priv(fi);
 
switch (event) {
case UPD_HLR_VLR_E_INS_SUB_DATA:
@@ -151,6 +153,12 @@
.event_names = upd_hlr_vlr_event_names,
 };
 
+static inline struct vlr_subscr *upd_hlr_vlr_fi_priv(struct osmo_fsm_inst *fi)
+{
+   OSMO_ASSERT(fi->fsm == _hlr_vlr_fsm);
+   return (struct vlr_subscr*)fi->priv;
+}
+
 struct osmo_fsm_inst *
 upd_hlr_vlr_proc_start(struct osmo_fsm_inst *parent,
   struct vlr_subscr *vsub,
@@ -193,10 +201,12 @@
{ 0, NULL }
 };
 
+static inline struct vlr_subscr *sub_pres_vlr_fi_priv(struct osmo_fsm_inst 
*fi);
+
 static void sub_pres_vlr_fsm_init(struct osmo_fsm_inst *fi, uint32_t event,
  void *data)
 {
-   struct vlr_subscr *vsub = fi->priv;
+   struct vlr_subscr *vsub = sub_pres_vlr_fi_priv(fi);
OSMO_ASSERT(event == SUB_PRES_VLR_E_START);
 
if (!vsub->ms_not_reachable_flag) {
@@ -212,7 +222,7 @@
 static void sub_pres_vlr_fsm_wait_hlr(struct osmo_fsm_inst *fi, uint32_t event,
  void *data)
 {
-   struct vlr_subscr *vsub = fi->priv;
+   struct vlr_subscr *vsub = sub_pres_vlr_fi_priv(fi);
 
switch (event) {
case SUB_PRES_VLR_E_READY_SM_CNF:
@@ -254,6 +264,12 @@
.log_subsys = DVLR,
.event_names = sub_pres_vlr_event_names,
 };
+
+static inline struct vlr_subscr *sub_pres_vlr_fi_priv(struct osmo_fsm_inst *fi)
+{
+   OSMO_ASSERT(fi->fsm == _pres_vlr_fsm);
+   return (struct vlr_subscr*)fi->priv;
+}
 
 /* Note that the start event is dispatched right away, so in case the FSM 
immediately concludes from that
  * event, the created FSM struct may no longer be valid as it already 
deallocated again, and it may
@@ -322,11 +338,13 @@
bool assign_tmsi;
 };
 
+static inline struct lu_compl_vlr_priv *lu_compl_vlr_fi_priv(struct 
osmo_fsm_inst *fi);
+
 static void _vlr_lu_compl_fsm_done(struct osmo_fsm_inst *fi,
   enum vlr_fsm_result result,
   uint8_t cause)
 {
-   struct lu_compl_vlr_priv *lcvp = fi->priv;
+   struct lu_compl_vlr_priv *lcvp = lu_compl_vlr_fi_priv(fi);
lcvp->result = result;
lcvp->cause = cause;
osmo_fsm_inst_state_chg(fi, LU_COMPL_VLR_S_DONE, 0, 0);
@@ -334,7 +352,7 @@
 
 static void vlr_lu_compl_fsm_success(struct osmo_fsm_inst *fi)
 {
-   struct lu_compl_vlr_priv *lcvp = fi->priv;
+   struct lu_compl_vlr_priv *lcvp = lu_compl_vlr_fi_priv(fi);
struct vlr_subscr *vsub = lcvp->vsub;
if (!vsub->lu_complete) {
vsub->lu_complete = true;
@@ -346,7 +364,7 @@
 
 static void vlr_lu_compl_fsm_failure(struct osmo_fsm_inst *fi, uint8_t cause)
 {
-   struct lu_compl_vlr_priv *lcvp = fi->priv;
+   struct lu_compl_vlr_priv *lcvp = lu_compl_vlr_fi_priv(fi);
lcvp->vsub->vlr->ops.tx_lu_rej(lcvp->msc_conn_ref, cause);

[MERGED] osmo-msc[master]: vlr: fix post-auth LU failure handling

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

Change subject: vlr: fix post-auth LU failure handling
..


vlr: fix post-auth LU failure handling

>From the vlr_loc_update() FSM, don't call the vlr_lu_compl_fsm_failure()
function. These are two distinct FSMs with distinct priv pointers, but they are
defined in the same .c file.

In vlr_loc_upd_post_auth(), change two erratic calls of
vlr_lu_compl_fsm_failure() to lu_fsm_failure(), so that the proper fi and priv
struct are used.

Fixes: OS#2947
Change-Id: I7fd2c6fa23254fffd0d526e53541f4068153929f
---
M src/libvlr/vlr_lu_fsm.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index 25deeb6..d0500c4 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -830,7 +830,7 @@
 
if (!vsub->last_tuple) {
LOGPFSML(fi, LOGL_ERROR, "No auth tuple available\n");
-   vlr_lu_compl_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE);
+   lu_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE);
return;
}
 
@@ -840,7 +840,7 @@
  vsub->vlr->cfg.retrieve_imeisv_ciphered)) {
LOGPFSML(fi, LOGL_ERROR,
 "Failed to send Ciphering Mode Command\n");
-   vlr_lu_compl_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE);
+   lu_fsm_failure(fi, GSM48_REJECT_NETWORK_FAILURE);
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fd2c6fa23254fffd0d526e53541f4068153929f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: msc_vlr_tests: make all test functions static

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

Change subject: msc_vlr_tests: make all test functions static
..


msc_vlr_tests: make all test functions static

All functions in the individual msc_vlr_test_*.c files should be static; hence
we would be warned if one of them were unused (forgotten to add to the tests
array).

Change-Id: Ia169c6a1443a48879ab4777e09c2040c48810bf6
---
M tests/msc_vlr/msc_vlr_test_authen_reuse.c
M tests/msc_vlr/msc_vlr_test_call.c
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_hlr_reject.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_no_authen.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_umts_authen.c
11 files changed, 71 insertions(+), 71 deletions(-)

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



diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.c 
b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
index 103c904..e78ab06 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.c
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.c
@@ -38,10 +38,10 @@
break; \
}
 
-void _test_auth_reuse(enum ran_type via_ran,
- int set_max_reuse_count,
- int loop_requests_without_hlr,
- bool final_request_with_hlr)
+static void _test_auth_reuse(enum ran_type via_ran,
+int set_max_reuse_count,
+int loop_requests_without_hlr,
+bool final_request_with_hlr)
 {
struct vlr_subscr *vsub;
const char *imsi = "90170010650";
@@ -284,42 +284,42 @@
clear_vlr();
 }
 
-void test_auth_use_twice_geran()
+static void test_auth_use_twice_geran()
 {
comment_start();
_test_auth_reuse(RAN_GERAN_A, 1, 1, true);
comment_end();
 }
 
-void test_auth_use_twice_utran()
+static void test_auth_use_twice_utran()
 {
comment_start();
_test_auth_reuse(RAN_UTRAN_IU, 1, 1, true);
comment_end();
 }
 
-void test_auth_use_infinitely_geran()
+static void test_auth_use_infinitely_geran()
 {
comment_start();
_test_auth_reuse(RAN_GERAN_A, -1, 3, false);
comment_end();
 }
 
-void test_auth_use_infinitely_utran()
+static void test_auth_use_infinitely_utran()
 {
comment_start();
_test_auth_reuse(RAN_UTRAN_IU, -1, 3, false);
comment_end();
 }
 
-void test_no_auth_reuse_geran()
+static void test_no_auth_reuse_geran()
 {
comment_start();
_test_auth_reuse(RAN_GERAN_A, 0, 0, true);
comment_end();
 }
 
-void test_no_auth_reuse_utran()
+static void test_no_auth_reuse_utran()
 {
comment_start();
_test_auth_reuse(RAN_UTRAN_IU, 0, 0, true);
diff --git a/tests/msc_vlr/msc_vlr_test_call.c 
b/tests/msc_vlr/msc_vlr_test_call.c
index cc120c8..28540b1 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -25,7 +25,7 @@
 
 #include 
 
-void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc)
+static void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc)
 {
mncc->msg_type = msg_type;
mncc_tx_to_cc(net, msg_type, mncc);
@@ -151,7 +151,7 @@
vlr_subscr_put(vsub);
 }
 
-void test_call_mo()
+static void test_call_mo()
 {
struct gsm_mncc mncc = {
.imsi = IMSI,
@@ -251,7 +251,7 @@
comment_end();
 }
 
-void test_call_mt()
+static void test_call_mt()
 {
struct gsm_mncc mncc = {
.imsi = IMSI,
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c 
b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 70b7614..9c09aa4 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -23,7 +23,7 @@
 
 #include "msc_vlr_tests.h"
 
-void test_gsm_authen()
+static void test_gsm_authen()
 {
struct vlr_subscr *vsub;
const char *imsi = "90170004620";
@@ -213,7 +213,7 @@
comment_end();
 }
 
-void test_gsm_authen_tmsi()
+static void test_gsm_authen_tmsi()
 {
struct vlr_subscr *vsub;
const char *imsi = "90170004620";
@@ -490,7 +490,7 @@
comment_end();
 }
 
-void test_gsm_authen_imei()
+static void test_gsm_authen_imei()
 {
struct vlr_subscr *vsub;
const char *imsi = "90170004620";
@@ -586,7 +586,7 @@
comment_end();
 }
 
-void test_gsm_authen_tmsi_imei()
+static void test_gsm_authen_tmsi_imei()
 {
struct vlr_subscr *vsub;
const char *imsi = "90170004620";
@@ -702,7 +702,7 @@
comment_end();
 }
 
-void test_gsm_milenage_authen()
+static void test_gsm_milenage_authen()
 {
struct vlr_subscr *vsub;
const char *imsi = "90170010650";
diff --git 

osmo-msc[master]: msc_vlr_tests: revert IMSI parameter and test nr output

2018-03-02 Thread Harald Welte

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1b49237746751021da88f6f07bbb9f780d077c9
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: msc_vlr_test_gsm_ciph: drop unused function

2018-03-02 Thread Harald Welte

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9bba10a05d43f7f94aa2cd6dcb63dd8f2f644d35
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: msc_vlr_tests: make all test functions static

2018-03-02 Thread Harald Welte

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia169c6a1443a48879ab4777e09c2040c48810bf6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: vlr_lu_fsm: guard against using the wrong fi

2018-03-02 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7419a780ff2d8b02efc4195bb1702818e4df181c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No