Change in osmo-msc[master]: A5/n Ciph: request Classmark Update if missing

2018-09-16 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/10987 )

Change subject: A5/n Ciph: request Classmark Update if missing
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/10987/1/tests/msc_vlr/msc_vlr_test_gsm_ciph.c
File tests/msc_vlr/msc_vlr_test_gsm_ciph.c:

https://gerrit.osmocom.org/#/c/10987/1/tests/msc_vlr/msc_vlr_test_gsm_ciph.c@1424
PS1, Line 1424:
ws



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I73c7cb6a86624695bd9c0f59abb72e2fdc655131
Gerrit-Change-Number: 10987
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 17 Sep 2018 05:37:58 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-msc[master]: store classmark in vlr_subscr, not conn

2018-09-16 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/10985 )

Change subject: store classmark in vlr_subscr, not conn
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I27081bf6e9e017923b2d02607f7ea06beddad82a
Gerrit-Change-Number: 10985
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 17 Sep 2018 05:38:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: msc_vlr_tests: cosmetically tweak perm algo printing

2018-09-16 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/10986 )

Change subject: msc_vlr_tests: cosmetically tweak perm algo printing
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic00f1e54490650bcb40170647b8ffd52ede23fd3
Gerrit-Change-Number: 10986
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 17 Sep 2018 05:31:58 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sgsn[master]: sgsn: use gtp_clear_queues() when reset sgsn state

2018-09-16 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10988


Change subject: sgsn: use gtp_clear_queues() when reset sgsn state
..

sgsn: use gtp_clear_queues() when reset sgsn state

Allow ttcn3 to flush the gtp queue between each test.
Fixes ttcn3 test SGSN_Tests.TC_attach_pdp_act_deact_mt_t3395_expire

Change-Id: I49d70cb7abe5cbe92ea68882fa68eccec0e79586
---
M src/gprs/sgsn_vty.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/88/10988/1

diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 057be9f..154e576 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -823,6 +823,9 @@
bssgp_flush_all_queues();
vty_out(vty, "Flushed all BSSGPs queues.%s", VTY_NEWLINE);

+   gtp_clear_queues(sgsn->gsn);
+   vty_out(vty, "Restarted connection to GGSN.%s", VTY_NEWLINE);
+
/* remove all queues to bssgp */
return CMD_SUCCESS;
 }

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49d70cb7abe5cbe92ea68882fa68eccec0e79586
Gerrit-Change-Number: 10988
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-msc[master]: store classmark in vlr_subscr, not conn

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/10985


Change subject: store classmark in vlr_subscr, not conn
..

store classmark in vlr_subscr, not conn

Store all Classmark information in the VLR.

So, we now always know the Classmark 1 (mandatory IE for LU). This is visible
in the msc_vlr_tests -- they no longer indicate "assuming A5/1 is supported"
because classmark 1 is missing, because we now know the Classmark 1.

Rationale:

During Location Updating, we receive Classmark 1; during CM Service Request and
Paging Response, we receive Classmark 2. So far we stored these only for the
duration of the conn, so as soon as a LU is complete, we would forget CM1.

In other words, for anything else than a LU Request, we had no Classmark 1
available at all.

During Ciphering Mode Command, we rely on Classmark 1 to determine whether A5/1
is supported. That is moot if we don't even have a Classmark 1 for any CM
Service Request or Paging Response initiated connections.

The only reason that A5/1 worked is that we assume A5/1 to work if Classmark 1
is missing. To add to the confusion, if a phone indicated that it did *not*
support A5/1 in the Classmark 1, according to spec we're supposed to not
service it at all. A code comment however says that we instead want to heed the
flag -- which so far was only present in a Location Updating initiated
connection. Now we can make this decision without assuming things.

This got my attention while hacking on sending a BSSMAP Classmark Request from
the MSC if it finds missing Classmark information, and was surprised to see it
it lacking CM1 to decide about A5/1.

Change-Id: I27081bf6e9e017923b2d02607f7ea06beddad82a
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/osmo_msc.c
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_rest.err
6 files changed, 75 insertions(+), 69 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 27f7fc5..ffe3afc 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -127,8 +127,6 @@
/* connected via 2G or 3G? */
enum ran_type via_ran;

-   struct gsm_classmark classmark;
-
uint16_t lac;
struct gsm_encr encr;

diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 386a548..d52713c 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -174,6 +174,8 @@
uint8_t lac;
enum ran_type attached_via_ran;
} cs;
+
+   struct gsm_classmark classmark;
 };

 enum vlr_ciph {
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 19b0572..b942a03 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -98,14 +98,25 @@
return gsm48_conn_sendmsg(msg, conn, NULL);
 }

+static bool classmark1_is_r99(const struct gsm48_classmark1 *cm1)
+{
+   return cm1->rev_lev >= 2;
+}
+
+static bool classmark2_is_r99(const uint8_t *cm2, uint8_t cm2_len)
+{
+   uint8_t rev_lev;
+   if (!cm2_len)
+   return false;
+   rev_lev = (cm2[0] >> 5) & 0x3;
+   return rev_lev >= 2;
+}
+
 static bool classmark_is_r99(struct gsm_classmark *cm)
 {
-   int rev_lev = 0;
if (cm->classmark1_set)
-   rev_lev = cm->classmark1.rev_lev;
-   else if (cm->classmark2_len > 0)
-   rev_lev = (cm->classmark2[0] >> 5) & 0x3;
-   return rev_lev >= 2;
+   return classmark1_is_r99(>classmark1);
+   return classmark2_is_r99(cm->classmark2, cm->classmark2_len);
 }

 /* Determine if the given CLASSMARK (1/2/3) value permits a given A5/n cipher 
*/
@@ -345,9 +356,6 @@

msc_subscr_conn_update_id(conn, COMPLETE_LAYER3_LU, mi_string);

-   conn->classmark.classmark1 = lu->classmark1;
-   conn->classmark.classmark1_set = true;
-
DEBUGP(DMM, "LOCATION UPDATING REQUEST: MI(%s)=%s type=%s\n",
   gsm48_mi_type_name(mi_type), mi_string,
   get_value_string(lupd_names, lu->type));
@@ -402,7 +410,7 @@
_lai, _lai,
is_utran || 
conn->network->authentication_required,
is_utran || conn->network->a5_encryption_mask > 
0x01,
-   classmark_is_r99(>classmark),
+   classmark1_is_r99(>classmark1),
is_utran,
net->vlr->cfg.assign_tmsi);
if (!lu_fsm) {
@@ -421,6 +429,9 @@
return -EIO;
}

+   conn->vsub->classmark.classmark1 = lu->classmark1;
+   conn->vsub->classmark.classmark1_set = true;
+
msc_subscr_conn_complete_layer_3(conn);
return 0;
 }
@@ -773,8 +784,6 @@

Change in osmo-msc[master]: msc_vlr_tests: cosmetically tweak perm algo printing

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/10986


Change subject: msc_vlr_tests: cosmetically tweak perm algo printing
..

msc_vlr_tests: cosmetically tweak perm algo printing

In the msc_vlr_tests, instead of printing the algo IDs, rather print the
corresponding A5/n name, for clarity.

Change-Id: Ic00f1e54490650bcb40170647b8ffd52ede23fd3
---
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_tests.c
2 files changed, 13 insertions(+), 13 deletions(-)



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

diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err 
b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
index 71e34a8..6a00669 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err
@@ -68,7 +68,7 @@
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND IMSI:90170004620
 - sending Ciphering Mode Command for IMSI:90170004620: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 61855fb81fc2a800
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: state_chg to 
VLR_ULA_S_WAIT_CIPH
 DREF IMSI:90170004620: MSC conn use - dtap == 0 (0x0: )
@@ -238,7 +238,7 @@
 DVLR 
Process_Access_Request_VLR(CM_SERVICE_REQ:90170004620){PR_ARQ_S_WAIT_AUTH}: 
Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND MSISDN:46071
 - sending Ciphering Mode Command for MSISDN:46071: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 07fa7502e07e1c00
 DVLR 
Process_Access_Request_VLR(CM_SERVICE_REQ:90170004620){PR_ARQ_S_WAIT_AUTH}: 
state_chg to PR_ARQ_S_WAIT_CIPH
 DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
@@ -376,7 +376,7 @@
 DVLR 
Process_Access_Request_VLR(PAGING_RESP:90170004620){PR_ARQ_S_WAIT_AUTH}: 
Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND MSISDN:46071
 - sending Ciphering Mode Command for MSISDN:46071: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: e2b234f807886400
 DVLR 
Process_Access_Request_VLR(PAGING_RESP:90170004620){PR_ARQ_S_WAIT_AUTH}: 
state_chg to PR_ARQ_S_WAIT_CIPH
 DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
@@ -571,7 +571,7 @@
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND IMSI:90170004620
 - sending Ciphering Mode Command for IMSI:90170004620: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 61855fb81fc2a800
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: state_chg to 
VLR_ULA_S_WAIT_CIPH
 DREF IMSI:90170004620: MSC conn use - dtap == 0 (0x0: )
@@ -778,7 +778,7 @@
 DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:50462976){PR_ARQ_S_WAIT_AUTH}: 
Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND MSISDN:46071
 - sending Ciphering Mode Command for MSISDN:46071: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 07fa7502e07e1c00
 DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:50462976){PR_ARQ_S_WAIT_AUTH}: 
state_chg to PR_ARQ_S_WAIT_CIPH
 DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
@@ -916,7 +916,7 @@
 DVLR Process_Access_Request_VLR(PAGING_RESP:50462976){PR_ARQ_S_WAIT_AUTH}: Set 
Ciphering Mode
 DMM -> CIPHER MODE COMMAND MSISDN:46071
 - sending Ciphering Mode Command for MSISDN:46071: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: e2b234f807886400
 DVLR Process_Access_Request_VLR(PAGING_RESP:50462976){PR_ARQ_S_WAIT_AUTH}: 
state_chg to PR_ARQ_S_WAIT_CIPH
 DREF MSISDN:46071: MSC conn use - dtap == 0 (0x0: )
@@ -,7 +,7 @@
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND IMSI:90170004620
 - sending Ciphering Mode Command for IMSI:90170004620: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 61855fb81fc2a800
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: state_chg to 
VLR_ULA_S_WAIT_CIPH
 DREF IMSI:90170004620: MSC conn use - dtap == 0 (0x0: )
@@ -1352,7 +1352,7 @@
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND IMSI:90170004620
 - sending Ciphering Mode Command for IMSI:90170004620: include_imeisv=1
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 61855fb81fc2a800
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: state_chg to 
VLR_ULA_S_WAIT_CIPH
 DREF IMSI:90170004620: MSC conn use - dtap == 0 (0x0: )
@@ -1582,7 +1582,7 @@
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode
 DMM -> CIPHER MODE COMMAND IMSI:90170004620
 - sending Ciphering Mode Command for IMSI:90170004620: include_imeisv=0
-- ...perm algo: 2
+- ...perm algo: A5/1
 - ...key: 61855fb81fc2a800
 DVLR vlr_lu_fsm(LU:90170004620){VLR_ULA_S_WAIT_AUTH}: state_chg to 
VLR_ULA_S_WAIT_CIPH
 DREF IMSI:90170004620: MSC conn use - dtap == 0 (0x0: )
@@ -1856,7 

Change in libosmocore[master]: logging vty: add 'logging level set-all '

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10889 )

Change subject: logging vty: add 'logging level set-all '
..

logging vty: add 'logging level set-all '

Add new command to once-off set each and every category to the given log level,
as discussed at length on the openbsc@ mailing list.

Show that it works in logging_vty_test.vty.

Change-Id: I4c3e4f786476cb813fdc0a7c64f30ee04758309d
---
M src/vty/logging_vty.c
M tests/logging/logging_vty_test.vty
2 files changed, 185 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve



diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 3b1d8c6..b2637a5 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -354,6 +354,28 @@
return CMD_SUCCESS;
 }

+DEFUN(logging_level_set_all, logging_level_set_all_cmd,
+  "logging level set-all " LOG_LEVEL_ARGS,
+  LOGGING_STR LEVEL_STR
+  "Once-off set all categories to the given log level. There is no single 
command"
+  " to take back these changes -- each category is set to the given level, 
period.\n"
+  LOG_LEVEL_STRS)
+{
+   struct log_target *tgt = osmo_log_vty2tgt(vty);
+   int level = log_parse_level(argv[0]);
+   int i;
+   for (i = 0; i < osmo_log_info->num_cat; i++) {
+   struct log_category *cat = >categories[i];
+   /* skip empty entries in the array */
+   if (!osmo_log_info->cat[i].name)
+   continue;
+
+   cat->enabled = 1;
+   cat->loglevel = level;
+   }
+   return CMD_SUCCESS;
+}
+
 /* logging level () everything */
 DEFUN_DEPRECATED(deprecated_logging_level_everything, 
deprecated_logging_level_everything_cmd,
 NULL, /* cmdstr is dynamically set in logging_vty_add_cmds(). 
*/
@@ -983,6 +1005,7 @@
   "everything", EVERYTHING_STR);

install_element_ve(_level_cmd);
+   install_element_ve(_level_set_all_cmd);
install_element_ve(_level_force_all_cmd);
install_element_ve(_logging_level_force_all_cmd);
install_element_ve(_logging_level_everything_cmd);
@@ -1001,6 +1024,7 @@
install_element(CFG_LOG_NODE, _prnt_level_cmd);
install_element(CFG_LOG_NODE, _prnt_file_cmd);
install_element(CFG_LOG_NODE, _level_cmd);
+   install_element(CFG_LOG_NODE, _level_set_all_cmd);
install_element(CFG_LOG_NODE, _level_force_all_cmd);
install_element(CFG_LOG_NODE, _logging_level_force_all_cmd);
install_element(CFG_LOG_NODE, _logging_level_everything_cmd);
diff --git a/tests/logging/logging_vty_test.vty 
b/tests/logging/logging_vty_test.vty
index 03b0c4a..0c552a5 100644
--- a/tests/logging/logging_vty_test.vty
+++ b/tests/logging/logging_vty_test.vty
@@ -51,6 +51,7 @@
   logging print file (0|1|basename) [last]
   logging set-log-mask MASK
   logging level 
(aa|bb|ccc||eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf)
 (debug|info|notice|error|fatal)
+  logging level set-all (debug|info|notice|error|fatal)
   logging level force-all (debug|info|notice|error|fatal)
   no logging level force-all
 ... !^  logging
@@ -74,6 +75,7 @@
   eeeExhaustive Entropy Extraction (EEE)
   lglobalLibrary-internal global log family
 ... ! all
+  set-allOnce-off set all categories to the given log level. There is no 
single command to take back these changes -- each category is set to the given 
level, period.
   force-all  Globally force all logging categories to a specific level. This 
is released by the 'no logging level force-all' command. Note: any 'logging 
level  ' commands will have no visible effect after this, 
until the forced level is released.

 logging_vty_test# logging level aa ?
@@ -96,6 +98,13 @@
 logging_vty_test# no logging level ?
   force-all  Release any globally forced log level set with 'logging level 
force-all '

+logging_vty_test# logging level set-all ?
+  debug   Log debug messages and higher levels
+  infoLog informational messages and higher levels
+  notice  Log noticeable messages and higher levels
+  error   Log error messages and higher levels
+  fatal   Log only fatal messages
+

 logging_vty_test# log-sweep
 DAA DEBUG Log message for DAA on level LOGL_DEBUG
@@ -304,3 +313,155 @@
 D ERROR Log message for D on level LOGL_ERROR
 D FATAL Log message for D on level LOGL_FATAL
 DEEE FATAL Log message for DEEE on level LOGL_FATAL
+
+
+logging_vty_test# ! test 'set-all'
+logging_vty_test# logging level set-all fatal
+logging_vty_test# log-sweep
+DAA FATAL Log message for DAA on level LOGL_FATAL
+DBB FATAL Log message for DBB on level LOGL_FATAL
+DCCC FATAL Log message for DCCC on level LOGL_FATAL
+D FATAL 

Change in libosmocore[master]: logging vty: add 'logging level set-all '

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/10889 )

Change subject: logging vty: add 'logging level set-all '
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c3e4f786476cb813fdc0a7c64f30ee04758309d
Gerrit-Change-Number: 10889
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Sun, 16 Sep 2018 21:14:40 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Jenkins build is back to normal : master-libosmocore » a2=default,a3=default,amd64,osmocom-master-debian9 #477

2018-09-16 Thread jenkins
See 




Change in libosmocore[master]: Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/10984 )

Change subject: Revert "gsm0808: add function to convert amr gsm0408 setings to 
gsm0808"
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9e0d405e303ed86d23703ca6362e958dddb2f861
Gerrit-Change-Number: 10984
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Sun, 16 Sep 2018 21:06:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10984 )

Change subject: Revert "gsm0808: add function to convert amr gsm0408 setings to 
gsm0808"
..

Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"

This reverts commit 2fd4fe6aa109c8df50baac465f0393a303a64dd2.

As shown in 
https://jenkins.osmocom.org/jenkins/view/master/job/master-libosmocore/475/a2=default,a3=default,arch=amd64,label=osmocom-master-debian9/console

This commit breaks gsm0808_test with:

stderr:
--- expout  2018-09-16 22:37:31.382280438 +0200
+++ /n/s/dev/make/libosmocore/tests/testsuite.dir/at-groups/21/stdout   
2018-09-16 22:37:31.426281372 +0200
@@ -78,9 +78,9 @@
 Input:
  m4_75= 0   smod=  0
  m5_15= 0   spare= 0
- m5_90= 0   icmi=  0
+ m5_90= 0   icmi=  1
  m6_70= 0   nscb=  0
- m7_40= 0   ver=   0
+ m7_40= 0   ver=   6
  m7_95= 0
  m10_2= 0
  m12_2= 0
@@ -92,9 +92,9 @@
 Input:
  m4_75= 1   smod=  0
  m5_15= 0   spare= 0
- m5_90= 0   icmi=  0
+ m5_90= 0   icmi=  1
  m6_70= 0   nscb=  0
- m7_40= 0   ver=   0
+ m7_40= 0   ver=   6
  m7_95= 0
  m10_2= 0
  m12_2= 0
@@ -106,9 +106,9 @@
 Input:
  m4_75= 0   smod=  0
  m5_15= 1   spare= 0
- m5_90= 0   icmi=  0
+ m5_90= 0   icmi=  1
[...]

Change-Id: I9e0d405e303ed86d23703ca6362e958dddb2f861
---
M include/osmocom/gsm/gsm0808_utils.h
M include/osmocom/gsm/protocol/gsm_08_08.h
M src/gsm/gsm0808_utils.c
M src/gsm/libosmogsm.map
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
6 files changed, 0 insertions(+), 480 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Neels Hofmeyr: Looks good to me, approved



diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index 0a7429e..242bce9 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -104,7 +104,6 @@
 int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
 int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
uint8_t perm_spch);
-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg, 
bool fr);

 /*! Return 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum 
gsm_chan_t. */
 static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h 
b/include/osmocom/gsm/protocol/gsm_08_08.h
index 8431ace..9433817 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -503,20 +503,6 @@
GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB   = 0x01,
 };

-/*! Default speech codec configurations broken down by reate.
- *  See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for
- *  the Adaptive Multi-Rate Codec Types. */
-enum gsm0808_speech_codec_rate_defaults {
-   GSM0808_SC_CFG_DEFAULT_AMR_4_75 = 0xff03,
-   GSM0808_SC_CFG_DEFAULT_AMR_5_15 = 0x,
-   GSM0808_SC_CFG_DEFAULT_AMR_5_90 = 0xff06,
-   GSM0808_SC_CFG_DEFAULT_AMR_6_70 = 0x3e08,
-   GSM0808_SC_CFG_DEFAULT_AMR_7_40 = 0x0c12,
-   GSM0808_SC_CFG_DEFAULT_AMR_7_95 = 0xc020,
-   GSM0808_SC_CFG_DEFAULT_AMR_10_2 = 0x3040,
-   GSM0808_SC_CFG_DEFAULT_AMR_12_2 = 0xc082
-};
-
 /* 3GPP TS 48.008 3.2.2.103 Speech Codec List */
 #define SPEECH_CODEC_MAXLEN 255
 struct gsm0808_speech_codec_list {
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 4b2a5f5..73f0234 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -1161,49 +1161,6 @@
return 0;
 }

-/*! Determine a set of AMR speech codec configuration bits (S0-S15) from a
- *  given GSM 04.08 AMR configuration struct.
- *  \param[in] cfg AMR configuration in GSM 04.08 format.
- *  \param[in] hint if the resulting configuration shall be used with a FR or 
HR TCH.
- *  \returns configuration bits (S0-S15) */
-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg,
- bool fr)
-{
-   uint16_t s15_s0 = 0;
-
-   /* Check each rate bit in the AMR multirate configuration and pick the
-* matching default configuration as specified in 3GPP TS 28.062,
-* Table 7.11.3.1.3-2. */
-   if (cfg->m4_75)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_4_75;
-   if (cfg->m5_15)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_5_15;
-   if (cfg->m5_90)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_5_90;
-   if (cfg->m6_70)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_6_70;
-   if (cfg->m7_40)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_7_40;
-   if (cfg->m7_95)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_7_95;
-   if (cfg->m10_2)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_10_2;
-   if (cfg->m12_2)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_12_2;
-
-   /* Note: 3GPP TS 48.008, chapter 

Change in libosmocore[master]: gsm0808: add function to convert amr gsm0408 setings to gsm0808

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has created a revert of this change. ( 
https://gerrit.osmocom.org/10961 )

Change subject: gsm0808: add function to convert amr gsm0408 setings to gsm0808
..
--
To view, visit https://gerrit.osmocom.org/10961
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: revert
Gerrit-Change-Id: I4e656731b16621736c7a2f4e64d9ce63b1064e98
Gerrit-Change-Number: 10961
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 


Change in libosmocore[master]: Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"

2018-09-16 Thread Neels Hofmeyr
Hello dexter, Harald Welte, Jenkins Builder,

I'd like you to do a code review. Please visit

https://gerrit.osmocom.org/10984

to review the following change.


Change subject: Revert "gsm0808: add function to convert amr gsm0408 setings to 
gsm0808"
..

Revert "gsm0808: add function to convert amr gsm0408 setings to gsm0808"

This reverts commit 2fd4fe6aa109c8df50baac465f0393a303a64dd2.

As shown in 
https://jenkins.osmocom.org/jenkins/view/master/job/master-libosmocore/475/a2=default,a3=default,arch=amd64,label=osmocom-master-debian9/console

This commit breaks gsm0808_test with:

stderr:
--- expout  2018-09-16 22:37:31.382280438 +0200
+++ /n/s/dev/make/libosmocore/tests/testsuite.dir/at-groups/21/stdout   
2018-09-16 22:37:31.426281372 +0200
@@ -78,9 +78,9 @@
 Input:
  m4_75= 0   smod=  0
  m5_15= 0   spare= 0
- m5_90= 0   icmi=  0
+ m5_90= 0   icmi=  1
  m6_70= 0   nscb=  0
- m7_40= 0   ver=   0
+ m7_40= 0   ver=   6
  m7_95= 0
  m10_2= 0
  m12_2= 0
@@ -92,9 +92,9 @@
 Input:
  m4_75= 1   smod=  0
  m5_15= 0   spare= 0
- m5_90= 0   icmi=  0
+ m5_90= 0   icmi=  1
  m6_70= 0   nscb=  0
- m7_40= 0   ver=   0
+ m7_40= 0   ver=   6
  m7_95= 0
  m10_2= 0
  m12_2= 0
@@ -106,9 +106,9 @@
 Input:
  m4_75= 0   smod=  0
  m5_15= 1   spare= 0
- m5_90= 0   icmi=  0
+ m5_90= 0   icmi=  1
[...]

Change-Id: I9e0d405e303ed86d23703ca6362e958dddb2f861
---
M include/osmocom/gsm/gsm0808_utils.h
M include/osmocom/gsm/protocol/gsm_08_08.h
M src/gsm/gsm0808_utils.c
M src/gsm/libosmogsm.map
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
6 files changed, 0 insertions(+), 480 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/10984/1

diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index 0a7429e..242bce9 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -104,7 +104,6 @@
 int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
 int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc,
uint8_t perm_spch);
-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg, 
bool fr);

 /*! Return 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum 
gsm_chan_t. */
 static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type)
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h 
b/include/osmocom/gsm/protocol/gsm_08_08.h
index 8431ace..9433817 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -503,20 +503,6 @@
GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB   = 0x01,
 };

-/*! Default speech codec configurations broken down by reate.
- *  See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for
- *  the Adaptive Multi-Rate Codec Types. */
-enum gsm0808_speech_codec_rate_defaults {
-   GSM0808_SC_CFG_DEFAULT_AMR_4_75 = 0xff03,
-   GSM0808_SC_CFG_DEFAULT_AMR_5_15 = 0x,
-   GSM0808_SC_CFG_DEFAULT_AMR_5_90 = 0xff06,
-   GSM0808_SC_CFG_DEFAULT_AMR_6_70 = 0x3e08,
-   GSM0808_SC_CFG_DEFAULT_AMR_7_40 = 0x0c12,
-   GSM0808_SC_CFG_DEFAULT_AMR_7_95 = 0xc020,
-   GSM0808_SC_CFG_DEFAULT_AMR_10_2 = 0x3040,
-   GSM0808_SC_CFG_DEFAULT_AMR_12_2 = 0xc082
-};
-
 /* 3GPP TS 48.008 3.2.2.103 Speech Codec List */
 #define SPEECH_CODEC_MAXLEN 255
 struct gsm0808_speech_codec_list {
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 4b2a5f5..73f0234 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -1161,49 +1161,6 @@
return 0;
 }

-/*! Determine a set of AMR speech codec configuration bits (S0-S15) from a
- *  given GSM 04.08 AMR configuration struct.
- *  \param[in] cfg AMR configuration in GSM 04.08 format.
- *  \param[in] hint if the resulting configuration shall be used with a FR or 
HR TCH.
- *  \returns configuration bits (S0-S15) */
-uint16_t gsm0808_sc_cfg_from_gsm48_mr_cfg(struct gsm48_multi_rate_conf *cfg,
- bool fr)
-{
-   uint16_t s15_s0 = 0;
-
-   /* Check each rate bit in the AMR multirate configuration and pick the
-* matching default configuration as specified in 3GPP TS 28.062,
-* Table 7.11.3.1.3-2. */
-   if (cfg->m4_75)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_4_75;
-   if (cfg->m5_15)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_5_15;
-   if (cfg->m5_90)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_5_90;
-   if (cfg->m6_70)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_6_70;
-   if (cfg->m7_40)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_7_40;
-   if (cfg->m7_95)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_7_95;
-   if (cfg->m10_2)
-   s15_s0 |= GSM0808_SC_CFG_DEFAULT_AMR_10_2;
-   if (cfg->m12_2)
-   s15_s0 |= 

Change in libosmocore[master]: gsm0808: add function to convert amr gsm0408 setings to gsm0808

2018-09-16 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/10961 )

Change subject: gsm0808: add function to convert amr gsm0408 setings to gsm0808
..


Patch Set 1:

I'm not sure how it passed the jenkins job, but this commit breaks libosmocore 
master. Reverting.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4e656731b16621736c7a2f4e64d9ce63b1064e98
Gerrit-Change-Number: 10961
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Sun, 16 Sep 2018 21:00:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


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

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/Debian_9.0/armv7l

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

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

Last lines of build log:
[  525s] No package 'libpcsclite' found
[  525s] simtrace2-remsim.o: In function `main':
[  525s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  525s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  525s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:772: undefined 
reference to `osim_uicc_sim_cic_profile'
[  525s] apdu_dispatch.o: In function `apdu_segment_in':
[  525s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  525s] /usr/src/packages/BUILD/host/apdu_dispatch.c:173: undefined reference 
to `osim_uicc_sim_cic_profile'
[  525s] collect2: error: ld returned 1 exit status
[  525s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  525s] make[2]: *** [simtrace2-remsim] Error 1
[  525s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  525s] Makefile:20: recipe for target 'utils' failed
[  525s] make[1]: *** [utils] Error 2
[  525s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  525s] dh_auto_build: make -j1 returned exit code 2
[  525s] debian/rules:4: recipe for target 'build' failed
[  525s] make: *** [build] Error 2
[  525s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  525s] 
[  525s] armbuild26 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
20:42:46 UTC 2018.
[  525s] 
[  525s] ### VM INTERACTION START ###
[  528s] [  439.713207] SysRq : Power Off
[  528s] [  439.770917] reboot: Power down
[  529s] ### VM INTERACTION END ###
[  529s] 
[  529s] armbuild26 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
20:42:50 UTC 2018.
[  529s] 

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


Change in osmo-ttcn3-hacks[master]: GSM_Types: Add CBCH_Block definition of TS 04.12

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10982 )

Change subject: GSM_Types: Add CBCH_Block definition of TS 04.12
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib034aba11a0219959c4224238e559ba36e95cacf
Gerrit-Change-Number: 10982
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 16 Sep 2018 20:03:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: WIP: CBCH related tests for BTS

2018-09-16 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10983


Change subject: WIP: CBCH related tests for BTS
..

WIP: CBCH related tests for BTS

This introduces a set of CBCH related tests for osmo-bts.

Warning: Those tests currently require a patched trxcon to work.

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



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index aa402d1..4fafe0e 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4079,7 +4079,261 @@
 /* receptiom of SABM in multi-frame established state */


+/***
+ * Cell Broadcast related tests
+ ***/

+type record CbchTestPars {
+   boolean use_sdcch4,
+   CbchTestMsgsmsgs
+};
+
+type record CbchTestMsg {
+   /* config / input data */
+   RSL_CbCommand   rsl_cb_cmd,
+   uint2_t last_block, /* 0..3 */
+   octetstring payload,
+   /* computed / result data */
+   CbchBlocks  blocks optional
+};
+type record of CbchTestMsg CbchTestMsgs;
+
+/* a single 22byte block within a CbchTestMsg */
+type record CbchBlock {
+   uint4_t seq_nr, /* as per TS 04.12 */
+   boolean is_last,
+   OCT22   payload,
+   boolean seen_once
+};
+type record of CbchBlock CbchBlocks;
+
+/* compute the expected blocks for given test parameters */
+private function f_cbch_compute_exp_blocks(inout CbchTestPars pars) {
+   var integer i;
+
+   for (i := 0; i < lengthof(pars.msgs); i := i+1) {
+   pars.msgs[i].blocks := f_comp_blocks(pars.msgs[i]);
+   }
+}
+private function f_comp_blocks(in CbchTestMsg msg) return CbchBlocks {
+   var CbchBlocks blocks := {};
+   var integer i;
+
+   for (i := 0; i <= msg.last_block; i := i+1) {
+   var CbchBlock block := {
+   seq_nr := i,
+   is_last := false,
+   payload := substr(msg.payload, 22*i, 22),
+   seen_once := false
+   };
+   if (msg.rsl_cb_cmd == RSL_CB_CMD_SCHEDULE and i == 0) {
+   block.seq_nr := 8;
+   }
+   if (i == msg.last_block) {
+   block.is_last := true;
+   }
+   blocks := blocks & {block};
+   }
+
+   return blocks;
+};
+
+/* TS 48.058 Section 9.3.41 */
+private function f_cbch_block_nr2rsl(uint2_t nr) return uint2_t {
+   select (nr) {
+   case (0) { return 1; }
+   case (1) { return 2; }
+   case (2) { return 3; }
+   case (3) { return 0; }
+   }
+   setverdict(fail, "Invalid block number");
+   mtc.stop;
+}
+
+/* Verify the CBCH TB scheduling rules of TS 05.02 Section 6.5.4 */
+private function f_cbch_fn_verify(uint32_t fn, CBCH_Block cb)
+{
+   var integer tb := (fn/51) mod 8; /* TS 05.02 Section 6.5.4 */
+   if (cb.block_type.seq_nr == 15 /* null */) {
+   /* always permitted */
+   return;
+   } else if (cb.block_type.seq_nr == 8 /* schedule */) {
+   if (tb != 0) {
+   setverdict(fail, "Schedule block at TB=", tb);
+   }
+   } else if (cb.block_type.seq_nr < 4) {
+   if (cb.block_type.seq_nr != tb and cb.block_type.seq_nr+4 != 
tb) {
+   setverdict(fail, "Normal block at wrong TB=", tb, ": ", 
cb);
+   }
+   }
+}
+
+/* shared function doing the heavy lifting for most CBCH tests */
+private function f_TC_smscb(CbchTestPars pars) runs on test_CT {
+   var L1ctlDlMessage dl;
+   var boolean cmd_seen_once := false;
+   var integer i, j;
+   timer T := 5.0;
+
+   f_cbch_compute_exp_blocks(pars);
+
+   f_init_vty_bsc();
+   /* ensure that a CBCH is present in channel combination */
+   if (pars.use_sdcch4) {
+   f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 
0"},
+   "phys_chan_config CCCH+SDCCH4+CBCH");
+   f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 
6"},
+   "phys_chan_config SDCCH8");
+   } else {
+   f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 
0"},
+   "phys_chan_config CCCH+SDCCH4");
+   f_vty_config2(BSCVTY, {"network", "bts 0", "trx 0", "timeslot 
6"},
+   "phys_chan_config SDCCH8+CBCH");
+   }
+   f_vty_transceive(BSCVTY, "drop bts connection 0 oml");
+   f_sleep(2.0);
+   

Change in osmo-ttcn3-hacks[master]: rsl: Add SMSCB related RSL types / templates

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10980 )

Change subject: rsl: Add SMSCB related RSL types / templates
..

rsl: Add SMSCB related RSL types / templates

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

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



diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 95a7b1f..7992132 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -577,6 +577,28 @@
RSL_ChanNeeded  chan_needed
}

+   /* 9.3.41 CB Command Type */
+   type enumerated RSL_CbCommand {
+   RSL_CB_CMD_NORMAL   (''B),
+   RSL_CB_CMD_SCHEDULE ('1000'B),
+   RSL_CB_CMD_DEFAULT  ('1110'B),
+   RSL_CB_CMD_NULL (''B)
+   } with { variant "FIELDLENGTH(4)" };
+   type record RSL_IE_CbCommandType {
+   RSL_CbCommand   command,
+   boolean default_bcast_null,
+   BIT1spare,
+   uint2_t last_block
+   };
+   template (value) RSL_IE_CbCommandType ts_RSL_IE_CbCmdType(RSL_CbCommand 
cmd := RSL_CB_CMD_NORMAL,
+ uint2_t 
last_block := 1,
+ boolean 
def_bcast_null := true) := {
+   command := cmd,
+   default_bcast_null := def_bcast_null,
+   spare := '0'B,
+   last_block := last_block
+   }
+
/* 9.3.53 */
type record RSL_IE_MultirateCtrl {
uint3_t spare,
@@ -678,6 +700,9 @@
uint16_tpaging_load,
uint8_t paging_group,
RSL_IE_ChanNeeded   chan_needed,
+   RSL_IE_CbCommandTypecb_cmd_type,
+   RSL_LV  smscb_message,
+
RSL_IE_StartingTime starting_time,
RSL_IE_EncryptionInfo   encr_info,
RSL_IE_RequestRef   req_ref,
@@ -726,6 +751,8 @@
paging_load, iei = RSL_IE_PAGING_LOAD;
paging_group, iei = RSL_IE_PAGING_GROUP;
chan_needed, iei = RSL_IE_CHAN_NEEDED;
+   cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE;
+   smscb_message, iei = RSL_IE_SMSCB_MSG;
starting_time, iei = 
RSL_IE_STARTNG_TIME;
encr_info, iei = RSL_IE_ENCR_INFO;

@@ -1467,6 +1494,33 @@
ies := *
}

+   /* 8.5.8 BTS <- BSC SMS BROADCAST COMMAND */
+   template RSL_Message tr_RSL_SMSCB_CMD(template RSL_IE_CbCommandType 
cb_cmd := ?,
+ template octetstring msg := ?,
+ template RslChannelNr chan_nr := 
?) := {
+   msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
+   msg_type := RSL_MT_SMS_BC_CMD,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+   tr_RSL_IE(RSL_IE_Body:{cb_cmd_type := cb_cmd}),
+   tr_RSL_IE(RSL_IE_Body:{smscb_message := 
tr_RSL_LV(msg)}),
+   *
+   }
+   }
+   template (value) RSL_Message ts_RSL_SMSCB_CMD(template (value) 
RSL_IE_CbCommandType cb_cmd,
+ template (value) 
octetstring msg,
+ template (value) 
RslChannelNr chan_nr :=
+   
ts_RslChanNr_SDCCH4(0, 2)) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
+   msg_type := RSL_MT_SMS_BC_CMD,
+   ies := {
+   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr}),
+   t_RSL_IE(RSL_IE_CB_CMD_TYPE, RSL_IE_Body:{cb_cmd_type 
:= cb_cmd}),
+   t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message 
:= ts_RSL_LV(msg)})
+   /* optional channel type for extended CBCH */
+   }
+   }
+
/* 8.6.2 BTS <- BSC */
template (value) RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType 
si_type, octetstring l3_info) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false),

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: 

Change in osmo-ttcn3-hacks[master]: GSM_Types: Add CBCH_Block definition of TS 04.12

2018-09-16 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10982


Change subject: GSM_Types: Add CBCH_Block definition of TS 04.12
..

GSM_Types: Add CBCH_Block definition of TS 04.12

Change-Id: Ib034aba11a0219959c4224238e559ba36e95cacf
---
M library/GSM_Types.ttcn
M library/General_Types.ttcn
2 files changed, 43 insertions(+), 0 deletions(-)



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

diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 53208e5..88be975 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -207,6 +207,48 @@
}
}

+
+/* TS 04.12 Section 3.3.1 Block type */
+type record CBCH_BlockType {
+   BIT1spare,
+   BIT2lpd,
+   boolean last_block,
+   uint4_t seq_nr
+};
+template (value) CBCH_BlockType ts_CBCH_BlockType(template (value) uint4_t 
seq_nr, template (value) boolean last_block) := {
+   spare := '0'B,
+   lpd := '01'B,
+   last_block := last_block,
+   seq_nr := seq_nr
+};
+template CBCH_BlockType tr_CBCH_BlockType(template uint4_t seq_nr := ?, 
template boolean last_block := ?) := {
+   spare := '0'B,
+   lpd := '01'B,
+   last_block := last_block,
+   seq_nr := seq_nr
+};
+
+/* TS 04.12 Section 3.3 */
+type record CBCH_Block {
+   CBCH_BlockType  block_type,
+   OCT22   payload
+};
+template (value) CBCH_Block ts_CBCH_Block(template (value) uint4_t seq_nr, 
template (value) boolean last_block, template (value) OCT22 payload) := {
+   block_type := ts_CBCH_BlockType(seq_nr, last_block),
+   payload := payload
+};
+template CBCH_Block tr_CBCH_Block(template uint4_t seq_nr := ?, template 
boolean last_block := ?, template OCT22 payload := ?) := {
+   block_type := tr_CBCH_BlockType(seq_nr, last_block),
+   payload := payload
+};
+
+
+external function enc_CBCH_Block(in CBCH_Block msg) return octetstring
+   with { extension "prototype(convert) encode(RAW)" };
+external function dec_CBCH_Block(in octetstring stream) return CBCH_Block
+   with { extension "prototype(convert) decode(RAW)" };
+
+
 /* Convert RF signal level in dBm to RxLev (TS 45.008 Chapter 8.1.4) */
 function dbm2rxlev(integer dbm) return uint6_t {
var integer rxlev := dbm + 110;
diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn
index 83b2a42..612d5c7 100644
--- a/library/General_Types.ttcn
+++ b/library/General_Types.ttcn
@@ -233,6 +233,7 @@
   type octetstring OCT18 length(18) with { variant "FIELDLENGTH(18)" };
   type octetstring OCT19 length(19) with { variant "FIELDLENGTH(19)" };
   type octetstring OCT20 length(20) with { variant "FIELDLENGTH(20)" };
+  type octetstring OCT22 length(22) with { variant "FIELDLENGTH(22)" };
   type octetstring OCT32 length(32) with { variant "FIELDLENGTH(32)" };
   type octetstring OCT34 length(34) with { variant "FIELDLENGTH(34)" };
   type octetstring OCT46 length(46) with { variant "FIELDLENGTH(46)" };

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

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


Change in osmo-ttcn3-hacks[master]: Osmocom_VTY_Functions: Generalize to handle multiple VTY ports

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10978 )

Change subject: Osmocom_VTY_Functions: Generalize to handle multiple VTY ports
..

Osmocom_VTY_Functions: Generalize to handle multiple VTY ports

The existing Osmocom_VTY_Functions code was centered around a global
module parameter specifying the prompt prefix.  This prevented a
single test to use multiple VTY connections to different Osmocom
programs.

This patch generalize the code by widening the prompt matching
in f_vty_wait_for_prompt() and by allowing the caller to specify
the prompt prefix to override the modulepar.

Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 427bd5c..b822645 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -12,24 +12,24 @@
template charstring t_vty_unknown := pattern "*% Unknown command.";

/* configure prompts in TELNETasp module */
-   function f_vty_set_prompts(TELNETasp_PT pt) {
+   function f_vty_set_prompts(TELNETasp_PT pt, charstring prompt_prefix := 
mp_prompt_prefix) {
var ASP_TelnetDynamicConfig vty_prompt[3] := {
{
prompt := {
id := 1,
-   prompt := mp_prompt_prefix & 
VTY_VIEW_SUFFIX,
+   prompt := prompt_prefix & 
VTY_VIEW_SUFFIX,
has_wildcards := false
}
}, {
prompt := {
id := 2,
-   prompt := mp_prompt_prefix & 
VTY_ENABLE_SUFFIX,
+   prompt := prompt_prefix & 
VTY_ENABLE_SUFFIX,
has_wildcards := false
}
}, {
prompt := {
id := 3,
-   prompt := mp_prompt_prefix & 
VTY_CFG_SUFFIX,
+   prompt := prompt_prefix & 
VTY_CFG_SUFFIX,
has_wildcards := true
}
}
@@ -51,9 +51,9 @@

T.start;
alt {
-   [] pt.receive(mp_prompt_prefix & VTY_VIEW_SUFFIX) { };
-   [] pt.receive(mp_prompt_prefix & VTY_ENABLE_SUFFIX) { };
-   [] pt.receive(pattern mp_prompt_prefix & 
VTY_CFG_SUFFIX) { };
+   [] pt.receive(pattern "\w+" & VTY_VIEW_SUFFIX) { };
+   [] pt.receive(pattern "\w+\# ") { };
+   [] pt.receive(pattern "\w+" & VTY_CFG_SUFFIX) { };
[] pt.receive(t_vty_unknown) {
testcase.stop(fail, "VTY: Unknown Command");
};

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
Gerrit-Change-Number: 10978
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: GSM_Types: Add support for Osmocom RSL ChannelNr CBCH

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10981 )

Change subject: GSM_Types: Add support for Osmocom RSL ChannelNr CBCH
..

GSM_Types: Add support for Osmocom RSL ChannelNr CBCH

Osmocom uses 0xC8 as channel number for CBCH, this is an extension
to the 08.58 definitions.

Change-Id: I2203f4a9012c154c12ac9d8f9c448a9ed0f49197
---
M library/GSM_Types.ttcn
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 59ccb76..53208e5 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -60,7 +60,8 @@
RSL_CHAN_NR_BCCH('1'B),
RSL_CHAN_NR_RACH('10001'B),
RSL_CHAN_NR_PCH_AGCH('10010'B),
-   RSL_CHAN_NR_OSMO_PDCH   ('11000'B)
+   RSL_CHAN_NR_OSMO_PDCH   ('11000'B),
+   RSL_CHAN_NR_OSMO_CBCH   ('11001'B)
} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };

type record RslChanNr2 {
@@ -107,6 +108,7 @@
template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);
+   template RslChannelNr t_RslChanNr_CBCH(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH);
template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template 
uint1_t sub_slot) := {
u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
tn := tn
@@ -129,6 +131,7 @@
template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);
+   template (value) RslChannelNr ts_RslChanNr_CBCH(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH);
template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t 
sub_slot) := {
u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
tn := tn

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2203f4a9012c154c12ac9d8f9c448a9ed0f49197
Gerrit-Change-Number: 10981
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: bts: Add second VTY connection to BSC

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10979 )

Change subject: bts: Add second VTY connection to BSC
..

bts: Add second VTY connection to BSC

Change-Id: If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a
---
M bts/BTS_Tests.cfg
M bts/BTS_Tests.default
M bts/BTS_Tests.ttcn
3 files changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/bts/BTS_Tests.cfg b/bts/BTS_Tests.cfg
index 58eed2c..d365a06 100644
--- a/bts/BTS_Tests.cfg
+++ b/bts/BTS_Tests.cfg
@@ -13,6 +13,7 @@
 #*.BTSVTY.CTRL_HOSTNAME := "10.9.1.162" # sysmoBTS Pau
 #*.BTSVTY.CTRL_HOSTNAME := "192.168.100.130" # sysmoBTS home
 *.BTSVTY.CTRL_HOSTNAME := "127.0.0.1" # osmo-bts-trx
+*.BSCVTY.CTRL_HOSTNAME := "127.0.0.1" # osmo-bsc

 [MODULE_PARAMETERS]
 #BTS_Tests.mp_rsl_ip := "10.9.1.2" # office
diff --git a/bts/BTS_Tests.default b/bts/BTS_Tests.default
index f254993..920f5d0 100644
--- a/bts/BTS_Tests.default
+++ b/bts/BTS_Tests.default
@@ -14,6 +14,17 @@
 *.BTSVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
 *.BTSVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
 *.BTSVTY.PROMPT1 := "OsmoBTS> "
+
+*.BSCVTY.CTRL_MODE := "client"
+*.BSCVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.BSCVTY.CTRL_PORTNUM := "4242"
+*.BSCVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.BSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.BSCVTY.CTRL_READMODE := "buffered"
+*.BSCVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.BSCVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
+*.BSCVTY.PROMPT1 := "OsmoBSC> "
+
 *.PCU.socket_type := "SEQPACKET"

 [MODULE_PARAMETERS]
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 963a38d..aa402d1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -75,7 +75,9 @@
port TRXC_CODEC_PT BB_TRXC;
var integer g_bb_trxc_conn_id;

+   /* VTY connections to both BTS and BSC */
port TELNETasp_PT BTSVTY;
+   port TELNETasp_PT BSCVTY;

/* PCU Interface of BTS */
port PCUIF_CODEC_PT PCU;
@@ -248,6 +250,12 @@
f_vty_transceive(BTSVTY, "enable");
 }

+private function f_init_vty_bsc() runs on test_CT {
+   map(self:BSCVTY, system:BSCVTY);
+   f_vty_set_prompts(BSCVTY, "OsmoBSC");
+   f_vty_transceive(BSCVTY, "enable");
+}
+
 /* PCU socket may at any time receive a new INFO.ind */
 private altstep as_pcu_info_ind(PCUIF_CODEC_PT pt, integer pcu_conn_id,
out PCUIF_Message pcu_last_info) {

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a
Gerrit-Change-Number: 10979
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: bts: update TODO comments; remove tests already covered

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10977 )

Change subject: bts: update TODO comments; remove tests already covered
..

bts: update TODO comments; remove tests already covered

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

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0303a49..963a38d 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -4089,13 +4089,11 @@
 * MS Power Control
 * BS Power Control
 * Physical Context
-* SACCH info modify
-* CCCH Load Indication for PCH and RACH
-* Delete Indication on AGCH overflow
+* CCCH Load Indication for RACH
 * SMS Broadcast Req / Cmd / CBCH LOad Ind
 * RF resource ind
 * error handling
-* discriminator error
+** discriminator error
 ** type error
 ** sequence error
 ** IE duplicated?

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I35003e20b9b511e5d514549a9ad0acc32b243651
Gerrit-Change-Number: 10977
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_17.10/i586

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_17.10/i586

Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_17.10/i586

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

Last lines of build log:
[  184s] No package 'libpcsclite' found
[  184s] simtrace2-remsim.o: In function `main':
[  184s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  184s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  184s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  184s] apdu_dispatch.o: In function `apdu_segment_in':
[  184s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  184s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  184s] collect2: error: ld returned 1 exit status
[  184s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  184s] make[2]: *** [simtrace2-remsim] Error 1
[  184s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  184s] Makefile:20: recipe for target 'utils' failed
[  184s] make[1]: *** [utils] Error 2
[  184s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  184s] dh_auto_build: make -j1 returned exit code 2
[  184s] debian/rules:4: recipe for target 'build' failed
[  184s] make: *** [build] Error 2
[  184s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  184s] 
[  184s] cloud129 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:40 UTC 2018.
[  184s] 
[  184s] ### VM INTERACTION START ###
[  187s] [  161.099420] sysrq: SysRq : Power Off
[  187s] [  161.109023] reboot: Power down
[  188s] ### VM INTERACTION END ###
[  188s] 
[  188s] cloud129 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:44 UTC 2018.
[  188s] 

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


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

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/Debian_9.0/i586

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

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

Last lines of build log:
[  141s] No package 'libpcsclite' found
[  141s] simtrace2-remsim.o: In function `main':
[  141s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  141s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  141s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  141s] apdu_dispatch.o: In function `apdu_segment_in':
[  141s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  141s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  141s] collect2: error: ld returned 1 exit status
[  141s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  141s] make[2]: *** [simtrace2-remsim] Error 1
[  141s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  141s] Makefile:20: recipe for target 'utils' failed
[  141s] make[1]: *** [utils] Error 2
[  141s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  141s] dh_auto_build: make -j1 returned exit code 2
[  141s] debian/rules:4: recipe for target 'build' failed
[  141s] make: *** [build] Error 2
[  141s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  141s] 
[  141s] lamb11 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:51 UTC 2018.
[  141s] 
[  141s] ### VM INTERACTION START ###
[  144s] [  132.324374] sysrq: SysRq : Power Off
[  144s] [  132.332115] reboot: Power down
[  144s] ### VM INTERACTION END ###
[  144s] 
[  144s] lamb11 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:55 UTC 2018.
[  144s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_16.04/i586

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_16.04/i586

Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_16.04/i586

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

Last lines of build log:
[  174s] No package 'libpcsclite' found
[  174s] simtrace2-remsim.o: In function `main':
[  174s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  174s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  174s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  174s] apdu_dispatch.o: In function `apdu_segment_in':
[  174s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  174s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  174s] collect2: error: ld returned 1 exit status
[  174s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  174s] make[2]: *** [simtrace2-remsim] Error 1
[  174s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  174s] Makefile:20: recipe for target 'utils' failed
[  174s] make[1]: *** [utils] Error 2
[  174s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  174s] dh_auto_build: make -j1 returned exit code 2
[  174s] debian/rules:4: recipe for target 'build' failed
[  174s] make: *** [build] Error 2
[  174s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  174s] 
[  174s] cloud109 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:32 UTC 2018.
[  174s] 
[  174s] ### VM INTERACTION START ###
[  177s] [  153.481632] sysrq: SysRq : Power Off
[  177s] [  153.498524] reboot: Power down
[  179s] ### VM INTERACTION END ###
[  179s] 
[  179s] cloud109 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:38 UTC 2018.
[  179s] 

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


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

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_17.10/x86_64

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

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

Last lines of build log:
[  136s] No package 'libpcsclite' found
[  136s] simtrace2-remsim.o: In function `main':
[  136s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  136s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  136s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  136s] apdu_dispatch.o: In function `apdu_segment_in':
[  136s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  136s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  136s] collect2: error: ld returned 1 exit status
[  136s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  136s] make[2]: *** [simtrace2-remsim] Error 1
[  136s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  136s] Makefile:20: recipe for target 'utils' failed
[  136s] make[1]: *** [utils] Error 2
[  136s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  136s] dh_auto_build: make -j1 returned exit code 2
[  136s] debian/rules:4: recipe for target 'build' failed
[  136s] make: *** [build] Error 2
[  136s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  136s] 
[  136s] lamb07 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:35 UTC 2018.
[  136s] 
[  136s] ### VM INTERACTION START ###
[  139s] [  128.785855] sysrq: SysRq : Power Off
[  139s] [  128.792893] reboot: Power down
[  139s] ### VM INTERACTION END ###
[  139s] 
[  139s] lamb07 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:39 UTC 2018.
[  139s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_18.04/i586

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_18.04/i586

Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_18.04/i586

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

Last lines of build log:
[  162s] No package 'libpcsclite' found
[  163s] simtrace2-remsim.o: In function `main':
[  163s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  163s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  163s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  163s] apdu_dispatch.o: In function `apdu_segment_in':
[  163s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  163s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  163s] collect2: error: ld returned 1 exit status
[  163s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  163s] make[2]: *** [simtrace2-remsim] Error 1
[  163s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  163s] Makefile:20: recipe for target 'utils' failed
[  163s] make[1]: *** [utils] Error 2
[  163s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  163s] dh_auto_build: make -j1 returned exit code 2
[  163s] debian/rules:4: recipe for target 'build' failed
[  163s] make: *** [build] Error 2
[  163s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  163s] 
[  163s] lamb02 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:20 UTC 2018.
[  163s] 
[  163s] ### VM INTERACTION START ###
[  166s] [  154.735511] sysrq: SysRq : Power Off
[  166s] [  154.742524] reboot: Power down
[  166s] ### VM INTERACTION END ###
[  166s] 
[  166s] lamb02 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:24 UTC 2018.
[  166s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_16.04/x86_64

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in 
xUbuntu_16.04/x86_64

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

Last lines of build log:
[  135s] No package 'libpcsclite' found
[  135s] simtrace2-remsim.o: In function `main':
[  135s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  135s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  135s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  135s] apdu_dispatch.o: In function `apdu_segment_in':
[  135s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  135s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  135s] collect2: error: ld returned 1 exit status
[  135s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  135s] make[2]: *** [simtrace2-remsim] Error 1
[  135s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  135s] Makefile:20: recipe for target 'utils' failed
[  135s] make[1]: *** [utils] Error 2
[  135s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  135s] dh_auto_build: make -j1 returned exit code 2
[  135s] debian/rules:4: recipe for target 'build' failed
[  135s] make: *** [build] Error 2
[  135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  135s] 
[  135s] lamb27 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:56:58 UTC 2018.
[  135s] 
[  135s] ### VM INTERACTION START ###
[  138s] [  127.569525] sysrq: SysRq : Power Off
[  138s] [  127.574435] reboot: Power down
[  138s] ### VM INTERACTION END ###
[  138s] 
[  138s] lamb27 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:57:01 UTC 2018.
[  138s] 

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


Build failure of network:osmocom:nightly/simtrace2 in Debian_9.0/x86_64

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/Debian_9.0/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in Debian_9.0/x86_64

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

Last lines of build log:
[  104s] No package 'libpcsclite' found
[  104s] simtrace2-remsim.o: In function `main':
[  104s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[  104s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[  104s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[  104s] apdu_dispatch.o: In function `apdu_segment_in':
[  104s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[  104s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[  104s] collect2: error: ld returned 1 exit status
[  104s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[  104s] make[2]: *** [simtrace2-remsim] Error 1
[  104s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[  104s] Makefile:20: recipe for target 'utils' failed
[  104s] make[1]: *** [utils] Error 2
[  104s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  104s] dh_auto_build: make -j1 returned exit code 2
[  104s] debian/rules:4: recipe for target 'build' failed
[  104s] make: *** [build] Error 2
[  104s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  104s] 
[  104s] sheep82 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:56:25 UTC 2018.
[  104s] 
[  104s] ### VM INTERACTION START ###
[  107s] [   99.473115] sysrq: SysRq : Power Off
[  107s] [   99.478814] reboot: Power down
[  107s] ### VM INTERACTION END ###
[  107s] 
[  107s] sheep82 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:56:28 UTC 2018.
[  107s] 

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


Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_18.04/x86_64

2018-09-16 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_18.04/x86_64

Package network:osmocom:nightly/simtrace2 failed to build in 
xUbuntu_18.04/x86_64

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

Last lines of build log:
[   90s] No package 'libpcsclite' found
[   90s] simtrace2-remsim.o: In function `main':
[   90s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:664: undefined 
reference to `osim_uicc_sim_cic_profile'
[   90s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:689: undefined 
reference to `osim_reader_open'
[   90s] /usr/src/packages/BUILD/host/simtrace2-remsim.c:695: undefined 
reference to `osim_card_open'
[   90s] apdu_dispatch.o: In function `apdu_segment_in':
[   90s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_uicc_sim_cic_profile'
[   90s] /usr/src/packages/BUILD/host/apdu_dispatch.c:84: undefined reference 
to `osim_determine_apdu_case'
[   90s] collect2: error: ld returned 1 exit status
[   90s] Makefile:9: recipe for target 'simtrace2-remsim' failed
[   90s] make[2]: *** [simtrace2-remsim] Error 1
[   90s] make[2]: Leaving directory '/usr/src/packages/BUILD/host'
[   90s] Makefile:20: recipe for target 'utils' failed
[   90s] make[1]: *** [utils] Error 2
[   90s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[   90s] dh_auto_build: make -j1 returned exit code 2
[   90s] debian/rules:4: recipe for target 'build' failed
[   90s] make: *** [build] Error 2
[   90s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[   90s] 
[   90s] build78 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:56:11 UTC 2018.
[   90s] 
[   90s] ### VM INTERACTION START ###
[   93s] [   85.962610] sysrq: SysRq : Power Off
[   93s] [   85.964439] reboot: Power down
[   94s] ### VM INTERACTION END ###
[   94s] 
[   94s] build78 failed "build simtrace2_0.5.1.15.5b5d.dsc" at Sun Sep 16 
19:56:15 UTC 2018.
[   94s] 

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


Build failed in Jenkins: master-asn1c » a1=default,a2=default,a3=default,osmocom-master-debian9 #248

2018-09-16 Thread jenkins
See 


--
[...truncated 3.67 KB...]

+ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for autoconf... /usr/bin/autoconf
checking for autoheader... /usr/bin/autoheader
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking 

Change in osmocom-bb[master]: Add includes so the file can be included by itself

2018-09-16 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10968 )

Change subject: Add includes so the file can be included by itself
..

Add includes so the file can be included by itself

Add missing dependencies to make this file be includeable as the
only file.

Change-Id: I05b5f689f389b89deb5ff49507486b246111fc59
---
M src/host/layer23/include/osmocom/bb/mobile/gsm322.h
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm322.h 
b/src/host/layer23/include/osmocom/bb/mobile/gsm322.h
index 66bc852..d4caac9 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm322.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm322.h
@@ -1,6 +1,11 @@
 #ifndef _GSM322_H
 #define _GSM322_H

+#include 
+
+#include 
+#include 
+
 /* 4.3.1.1 List of states for PLMN slection process (automatic mode) */
 #define GSM322_A0_NULL 0
 #defineGSM322_A1_TRYING_RPLMN  1

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I05b5f689f389b89deb5ff49507486b246111fc59
Gerrit-Change-Number: 10968
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: lua: Expose API to trigger a network reselection

2018-09-16 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10688 )

Change subject: lua: Expose API to trigger a network reselection
..

lua: Expose API to trigger a network reselection

Same as the "network search" VTY command but implemented as primitive
and exposed to LUA.

Change-Id: I096233a2ca9dd7daa358cebed0523cb8c0dbf593
---
M src/host/layer23/include/osmocom/bb/mobile/primitives.h
M src/host/layer23/src/mobile/primitives.c
M src/host/layer23/src/mobile/script_lua.c
3 files changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h 
b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
index 034b202..f07ae24 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
@@ -20,6 +20,7 @@
PRIM_MOB_SHUTDOWN,
PRIM_MOB_SMS,
PRIM_MOB_MM,
+   PRIM_MOB_NETWORK_RESELECT,
 };

 struct mobile_prim_intf {
diff --git a/src/host/layer23/src/mobile/primitives.c 
b/src/host/layer23/src/mobile/primitives.c
index aa46712..f562466 100644
--- a/src/host/layer23/src/mobile/primitives.c
+++ b/src/host/layer23/src/mobile/primitives.c
@@ -20,6 +20,7 @@

 #include 

+#include 
 #include 
 #include 

@@ -191,6 +192,17 @@
return gsm411_tx_sms_submit(intf->ms, param->sca, sms);
 }

+static int network_reselect(struct mobile_prim_intf *intf)
+{
+   struct msgb *nmsg;
+
+   nmsg = gsm322_msgb_alloc(GSM322_EVENT_USER_RESEL);
+   if (!nmsg)
+   return -1;
+   gsm322_plmn_sendmsg(intf->ms, nmsg);
+   return 0;
+}
+
 int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct mobile_prim 
*prim)
 {
int rc = 0;
@@ -205,6 +217,9 @@
case OSMO_PRIM(PRIM_MOB_SMS, PRIM_OP_REQUEST):
rc = send_sms(intf, >u.sms);
break;
+   case OSMO_PRIM(PRIM_MOB_NETWORK_RESELECT, PRIM_OP_REQUEST):
+   rc = network_reselect(intf);
+   break;
default:
LOGP(DPRIM, LOGL_ERROR, "Unknown primitive: %d\n", 
OSMO_PRIM_HDR(>hdr));
break;
diff --git a/src/host/layer23/src/mobile/script_lua.c 
b/src/host/layer23/src/mobile/script_lua.c
index 924ed6e..9117cdd 100644
--- a/src/host/layer23/src/mobile/script_lua.c
+++ b/src/host/layer23/src/mobile/script_lua.c
@@ -425,6 +425,16 @@
return 1;
 }

+static int lua_reselect_network(lua_State *L)
+{
+   struct mobile_prim *prim;
+
+   prim = mobile_prim_alloc(PRIM_MOB_NETWORK_RESELECT, PRIM_OP_REQUEST);
+   mobile_prim_intf_req(get_primitive(L), prim);
+
+   return 1;
+}
+
 /* Expect a fd on the stack and enable SO_PASSCRED */
 static int lua_unix_passcred(lua_State *L)
 {
@@ -546,6 +556,7 @@
{ "stop", lua_ms_shutdown },
{ "sms_send_simple", lua_ms_sms_send_simple },
{ "number", lua_ms_name },
+   { "reselect_network", lua_reselect_network },
{ NULL, NULL },
 };


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I096233a2ca9dd7daa358cebed0523cb8c0dbf593
Gerrit-Change-Number: 10688
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 


Change in osmocom-bb[master]: lua: Expose API to trigger a network reselection

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10688 )

Change subject: lua: Expose API to trigger a network reselection
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I096233a2ca9dd7daa358cebed0523cb8c0dbf593
Gerrit-Change-Number: 10688
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Sun, 16 Sep 2018 11:48:02 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: Add includes so the file can be included by itself

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10968 )

Change subject: Add includes so the file can be included by itself
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I05b5f689f389b89deb5ff49507486b246111fc59
Gerrit-Change-Number: 10968
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Sun, 16 Sep 2018 11:47:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: Add includes so the file can be included by itself

2018-09-16 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/10968 )

Change subject: Add includes so the file can be included by itself
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I05b5f689f389b89deb5ff49507486b246111fc59
Gerrit-Change-Number: 10968
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Sun, 16 Sep 2018 11:18:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: lc15: fsync requires fd instead of file stream

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9535 )

Change subject: lc15: fsync requires fd instead of file stream
..

lc15: fsync requires fd instead of file stream

Change-Id: I7efb7280363b3a021b30c3b4eacb3aab70e9c8da
---
M src/osmo-bts-litecell15/misc/lc15bts_par.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/src/osmo-bts-litecell15/misc/lc15bts_par.c 
b/src/osmo-bts-litecell15/misc/lc15bts_par.c
index 75314a4..af9d030 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_par.c
+++ b/src/osmo-bts-litecell15/misc/lc15bts_par.c
@@ -144,7 +144,7 @@
return -EIO;
}

-   fsync(fp);
+   fsync(fileno(fp));
fclose(fp);
return 0;
 }
@@ -176,7 +176,7 @@

 rc = fwrite(buf, 1, size, fp);

-fsync(fp);
+fsync(fileno(fp));
 fclose(fp);

 return rc;
@@ -225,7 +225,7 @@
fclose(fp);
return -EIO;
}
-   fsync(fp);
+   fsync(fileno(fp));
fclose(fp);

return 0;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7efb7280363b3a021b30c3b4eacb3aab70e9c8da
Gerrit-Change-Number: 9535
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bts[master]: lc15: rewrite and refactor code to print hwversion description

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9533 )

Change subject: lc15: rewrite and refactor code to print hwversion description
..

lc15: rewrite and refactor code to print hwversion description

Also print a newline at the end of print_hwversion().

In the process of rewrite, fix several warnings in the few lines of this 
functions:
osmo-bts/src/osmo-bts-litecell15/main.c: In function ‘print_hwversion’:
osmo-bts/src/osmo-bts-litecell15/main.c:162:12: warning: passing argument 1 to 
restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   snprintf(model_name, sizeof(model_name), "%s Rev %c",
^~
model_name, (char)rev);
~~
osmo-bts/src/osmo-bts-litecell15/main.c:168:12: warning: passing argument 1 to 
restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   snprintf(model_name, sizeof(model_name), "%s (%05X)",
^~
model_name, model);
~~
osmo-bts/src/osmo-bts-litecell15/main.c:162:47: warning: ‘ Rev ’ directive 
output may be truncated writing 5 bytes into a region of size between 1 and 64 
[-Wformat-truncation=]
   snprintf(model_name, sizeof(model_name), "%s Rev %c",
   ^
osmo-bts/src/osmo-bts-litecell15/main.c:162:3: note: ‘snprintf’ output between 
7 and 70 bytes into a destination of size 64
   snprintf(model_name, sizeof(model_name), "%s Rev %c",
   ^
model_name, (char)rev);
~~
osmo-bts/src/osmo-bts-litecell15/main.c:168:47: warning: ‘ (’ directive output 
may be truncated writing 2 bytes into a region of size between 1 and 64 
[-Wformat-truncation=]
   snprintf(model_name, sizeof(model_name), "%s (%05X)",
   ^~
osmo-bts/src/osmo-bts-litecell15/main.c:168:44: note: using the range [0, 
4294967295] for directive argument
   snprintf(model_name, sizeof(model_name), "%s (%05X)",
^~~
osmo-bts/src/osmo-bts-litecell15/main.c:168:3: note: ‘snprintf’ output between 
9 and 75 bytes into a destination of size 64
   snprintf(model_name, sizeof(model_name), "%s (%05X)",
   ^
model_name, model);
~~

Change-Id: I079b056a04fe77d2f7f361ff5899232cb70b5a93
---
M src/osmo-bts-litecell15/main.c
M src/osmo-bts-litecell15/misc/lc15bts_bid.c
M src/osmo-bts-litecell15/misc/lc15bts_bid.h
M src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c
4 files changed, 26 insertions(+), 35 deletions(-)

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



diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c
index 030c3ef..de175e3 100644
--- a/src/osmo-bts-litecell15/main.c
+++ b/src/osmo-bts-litecell15/main.c
@@ -151,25 +151,8 @@

 static void print_hwversion()
 {
-   int rev;
-   int model;
-   static char model_name[64] = {0, };
-
-   snprintf(model_name, sizeof(model_name), "NuRAN Litecell 1.5 BTS");
-
-   rev = lc15bts_rev_get();
-   if (rev >= 0) {
-   snprintf(model_name, sizeof(model_name), "%s Rev %c",
-   model_name, (char)rev);
-   }
-
-   model = lc15bts_model_get();
-   if (model >= 0) {
-   snprintf(model_name, sizeof(model_name), "%s (%05X)",
-   model_name, model);
-   }
-
-   printf(model_name);
+   printf(get_hwversion_desc());
+   printf("\n");
 }

 int bts_model_handle_options(int argc, char **argv)
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_bid.c 
b/src/osmo-bts-litecell15/misc/lc15bts_bid.c
index 7f278bf..9284b62 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_bid.c
+++ b/src/osmo-bts-litecell15/misc/lc15bts_bid.c
@@ -138,3 +138,25 @@

return option;
 }
+
+const char* get_hwversion_desc()
+{
+int rev;
+int model;
+size_t len;
+static char model_name[64] = {0, };
+len = snprintf(model_name, sizeof(model_name), "NuRAN Litecell 1.5 
BTS");
+
+rev = lc15bts_rev_get();
+if (rev >= 0) {
+len += snprintf(model_name + len, sizeof(model_name) - len,
+" Rev %c", (char)rev);
+}
+
+model = lc15bts_model_get();
+if (model >= 0) {
+snprintf(model_name + len, sizeof(model_name) - len,
+ "%s (%05X)", model_name, model);
+}
+return model_name;
+}
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_bid.h 
b/src/osmo-bts-litecell15/misc/lc15bts_bid.h
index b320e11..a71fdd7 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_bid.h
+++ b/src/osmo-bts-litecell15/misc/lc15bts_bid.h
@@ -47,5 +47,6 @@
 int lc15bts_rev_get(void);
 int lc15bts_model_get(void);
 int lc15bts_option_get(enum 

Change in osmo-ttcn3-hacks[master]: GSM_Types: Add support for Osmocom RSL ChannelNr CBCH

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10981 )

Change subject: GSM_Types: Add support for Osmocom RSL ChannelNr CBCH
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2203f4a9012c154c12ac9d8f9c448a9ed0f49197
Gerrit-Change-Number: 10981
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:44:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: rsl: Add SMSCB related RSL types / templates

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10980 )

Change subject: rsl: Add SMSCB related RSL types / templates
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I203e72a203ffa7538aadc7b96e1ae7e21956c160
Gerrit-Change-Number: 10980
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:44:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: bts: Add second VTY connection to BSC

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10979 )

Change subject: bts: Add second VTY connection to BSC
..


Set Ready For Review


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a
Gerrit-Change-Number: 10979
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:44:15 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: bts: Add second VTY connection to BSC

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10979 )

Change subject: bts: Add second VTY connection to BSC
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a
Gerrit-Change-Number: 10979
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:44:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Osmocom_VTY_Functions: Generalize to handle multiple VTY ports

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10978 )

Change subject: Osmocom_VTY_Functions: Generalize to handle multiple VTY ports
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
Gerrit-Change-Number: 10978
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:43:41 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: bts: update TODO comments; remove tests already covered

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10977 )

Change subject: bts: update TODO comments; remove tests already covered
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I35003e20b9b511e5d514549a9ad0acc32b243651
Gerrit-Change-Number: 10977
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-CC: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:43:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: Osmocom_VTY_Functions: Generalize to handle multiple VTY ports

2018-09-16 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10978


Change subject: Osmocom_VTY_Functions: Generalize to handle multiple VTY ports
..

Osmocom_VTY_Functions: Generalize to handle multiple VTY ports

The existing Osmocom_VTY_Functions code was centered around a global
module parameter specifying the prompt prefix.  This prevented a
single test to use multiple VTY connections to different Osmocom
programs.

This patch generalize the code by widening the prompt matching
in f_vty_wait_for_prompt() and by allowing the caller to specify
the prompt prefix to override the modulepar.

Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 7 insertions(+), 7 deletions(-)



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

diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 427bd5c..b822645 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -12,24 +12,24 @@
template charstring t_vty_unknown := pattern "*% Unknown command.";

/* configure prompts in TELNETasp module */
-   function f_vty_set_prompts(TELNETasp_PT pt) {
+   function f_vty_set_prompts(TELNETasp_PT pt, charstring prompt_prefix := 
mp_prompt_prefix) {
var ASP_TelnetDynamicConfig vty_prompt[3] := {
{
prompt := {
id := 1,
-   prompt := mp_prompt_prefix & 
VTY_VIEW_SUFFIX,
+   prompt := prompt_prefix & 
VTY_VIEW_SUFFIX,
has_wildcards := false
}
}, {
prompt := {
id := 2,
-   prompt := mp_prompt_prefix & 
VTY_ENABLE_SUFFIX,
+   prompt := prompt_prefix & 
VTY_ENABLE_SUFFIX,
has_wildcards := false
}
}, {
prompt := {
id := 3,
-   prompt := mp_prompt_prefix & 
VTY_CFG_SUFFIX,
+   prompt := prompt_prefix & 
VTY_CFG_SUFFIX,
has_wildcards := true
}
}
@@ -51,9 +51,9 @@

T.start;
alt {
-   [] pt.receive(mp_prompt_prefix & VTY_VIEW_SUFFIX) { };
-   [] pt.receive(mp_prompt_prefix & VTY_ENABLE_SUFFIX) { };
-   [] pt.receive(pattern mp_prompt_prefix & 
VTY_CFG_SUFFIX) { };
+   [] pt.receive(pattern "\w+" & VTY_VIEW_SUFFIX) { };
+   [] pt.receive(pattern "\w+\# ") { };
+   [] pt.receive(pattern "\w+" & VTY_CFG_SUFFIX) { };
[] pt.receive(t_vty_unknown) {
testcase.stop(fail, "VTY: Unknown Command");
};

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

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


Change in osmo-ttcn3-hacks[master]: bts: Add second VTY connection to BSC

2018-09-16 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10979


Change subject: bts: Add second VTY connection to BSC
..

bts: Add second VTY connection to BSC

Change-Id: If4b5a906a0841c0a8c3d7c4e9e5a3d1208ecf16a
---
M bts/BTS_Tests.cfg
M bts/BTS_Tests.default
M bts/BTS_Tests.ttcn
3 files changed, 20 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.cfg b/bts/BTS_Tests.cfg
index 58eed2c..d365a06 100644
--- a/bts/BTS_Tests.cfg
+++ b/bts/BTS_Tests.cfg
@@ -13,6 +13,7 @@
 #*.BTSVTY.CTRL_HOSTNAME := "10.9.1.162" # sysmoBTS Pau
 #*.BTSVTY.CTRL_HOSTNAME := "192.168.100.130" # sysmoBTS home
 *.BTSVTY.CTRL_HOSTNAME := "127.0.0.1" # osmo-bts-trx
+*.BSCVTY.CTRL_HOSTNAME := "127.0.0.1" # osmo-bsc

 [MODULE_PARAMETERS]
 #BTS_Tests.mp_rsl_ip := "10.9.1.2" # office
diff --git a/bts/BTS_Tests.default b/bts/BTS_Tests.default
index f254993..920f5d0 100644
--- a/bts/BTS_Tests.default
+++ b/bts/BTS_Tests.default
@@ -14,6 +14,17 @@
 *.BTSVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
 *.BTSVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
 *.BTSVTY.PROMPT1 := "OsmoBTS> "
+
+*.BSCVTY.CTRL_MODE := "client"
+*.BSCVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.BSCVTY.CTRL_PORTNUM := "4242"
+*.BSCVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.BSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.BSCVTY.CTRL_READMODE := "buffered"
+*.BSCVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.BSCVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
+*.BSCVTY.PROMPT1 := "OsmoBSC> "
+
 *.PCU.socket_type := "SEQPACKET"

 [MODULE_PARAMETERS]
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 963a38d..aa402d1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -75,7 +75,9 @@
port TRXC_CODEC_PT BB_TRXC;
var integer g_bb_trxc_conn_id;

+   /* VTY connections to both BTS and BSC */
port TELNETasp_PT BTSVTY;
+   port TELNETasp_PT BSCVTY;

/* PCU Interface of BTS */
port PCUIF_CODEC_PT PCU;
@@ -248,6 +250,12 @@
f_vty_transceive(BTSVTY, "enable");
 }

+private function f_init_vty_bsc() runs on test_CT {
+   map(self:BSCVTY, system:BSCVTY);
+   f_vty_set_prompts(BSCVTY, "OsmoBSC");
+   f_vty_transceive(BSCVTY, "enable");
+}
+
 /* PCU socket may at any time receive a new INFO.ind */
 private altstep as_pcu_info_ind(PCUIF_CODEC_PT pt, integer pcu_conn_id,
out PCUIF_Message pcu_last_info) {

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

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


Change in osmo-ttcn3-hacks[master]: rsl: Add SMSCB related RSL types / templates

2018-09-16 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10980


Change subject: rsl: Add SMSCB related RSL types / templates
..

rsl: Add SMSCB related RSL types / templates

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



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

diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index 95a7b1f..7992132 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -577,6 +577,28 @@
RSL_ChanNeeded  chan_needed
}

+   /* 9.3.41 CB Command Type */
+   type enumerated RSL_CbCommand {
+   RSL_CB_CMD_NORMAL   (''B),
+   RSL_CB_CMD_SCHEDULE ('1000'B),
+   RSL_CB_CMD_DEFAULT  ('1110'B),
+   RSL_CB_CMD_NULL (''B)
+   } with { variant "FIELDLENGTH(4)" };
+   type record RSL_IE_CbCommandType {
+   RSL_CbCommand   command,
+   boolean default_bcast_null,
+   BIT1spare,
+   uint2_t last_block
+   };
+   template (value) RSL_IE_CbCommandType ts_RSL_IE_CbCmdType(RSL_CbCommand 
cmd := RSL_CB_CMD_NORMAL,
+ uint2_t 
last_block := 1,
+ boolean 
def_bcast_null := true) := {
+   command := cmd,
+   default_bcast_null := def_bcast_null,
+   spare := '0'B,
+   last_block := last_block
+   }
+
/* 9.3.53 */
type record RSL_IE_MultirateCtrl {
uint3_t spare,
@@ -678,6 +700,9 @@
uint16_tpaging_load,
uint8_t paging_group,
RSL_IE_ChanNeeded   chan_needed,
+   RSL_IE_CbCommandTypecb_cmd_type,
+   RSL_LV  smscb_message,
+
RSL_IE_StartingTime starting_time,
RSL_IE_EncryptionInfo   encr_info,
RSL_IE_RequestRef   req_ref,
@@ -726,6 +751,8 @@
paging_load, iei = RSL_IE_PAGING_LOAD;
paging_group, iei = RSL_IE_PAGING_GROUP;
chan_needed, iei = RSL_IE_CHAN_NEEDED;
+   cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE;
+   smscb_message, iei = RSL_IE_SMSCB_MSG;
starting_time, iei = 
RSL_IE_STARTNG_TIME;
encr_info, iei = RSL_IE_ENCR_INFO;

@@ -1467,6 +1494,33 @@
ies := *
}

+   /* 8.5.8 BTS <- BSC SMS BROADCAST COMMAND */
+   template RSL_Message tr_RSL_SMSCB_CMD(template RSL_IE_CbCommandType 
cb_cmd := ?,
+ template octetstring msg := ?,
+ template RslChannelNr chan_nr := 
?) := {
+   msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
+   msg_type := RSL_MT_SMS_BC_CMD,
+   ies := {
+   tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
+   tr_RSL_IE(RSL_IE_Body:{cb_cmd_type := cb_cmd}),
+   tr_RSL_IE(RSL_IE_Body:{smscb_message := 
tr_RSL_LV(msg)}),
+   *
+   }
+   }
+   template (value) RSL_Message ts_RSL_SMSCB_CMD(template (value) 
RSL_IE_CbCommandType cb_cmd,
+ template (value) 
octetstring msg,
+ template (value) 
RslChannelNr chan_nr :=
+   
ts_RslChanNr_SDCCH4(0, 2)) := {
+   msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
+   msg_type := RSL_MT_SMS_BC_CMD,
+   ies := {
+   t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := 
chan_nr}),
+   t_RSL_IE(RSL_IE_CB_CMD_TYPE, RSL_IE_Body:{cb_cmd_type 
:= cb_cmd}),
+   t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message 
:= ts_RSL_LV(msg)})
+   /* optional channel type for extended CBCH */
+   }
+   }
+
/* 8.6.2 BTS <- BSC */
template (value) RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType 
si_type, octetstring l3_info) := {
msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false),

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange

Change in osmo-ttcn3-hacks[master]: add ttcn3 test suites slides from OsmoDevCon 2018

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10709 )

Change subject: add ttcn3 test suites slides from OsmoDevCon 2018
..

add ttcn3 test suites slides from OsmoDevCon 2018

Those slides are copied from 
http://git.gnumonks.org/laforge-slides/plain/2018/osmodevcon2018-ttcn3_test_suites/
to make sure they are more easily found.  It would be nice to convert
them into an actual asciidoc book with one chapter per test suite which
would be built from within this repository.   This way we can keep
documentation and code better in sync.

Change-Id: I8a0d66babc165678ec53a1ee1c673e93708b8b79
---
A doc/osmodevcon2018-ttcn3_test_suites.adoc
1 file changed, 296 insertions(+), 0 deletions(-)

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



diff --git a/doc/osmodevcon2018-ttcn3_test_suites.adoc 
b/doc/osmodevcon2018-ttcn3_test_suites.adoc
new file mode 100644
index 000..6eaee82
--- /dev/null
+++ b/doc/osmodevcon2018-ttcn3_test_suites.adoc
@@ -0,0 +1,296 @@
+Osmocom TTCN-3 Test Suites
+==
+:author:   Harald Welte 
+:copyright:2018 by Harald Welte (License: CC-BY-SA)
+:backend:  slidy
+:max-width:45em
+
+
+== Osmocom TTCN-3 Test Suites
+
+* developed in 2017+2018
+* compiled using Eclipse TITAN
+** uses just a command-line compiler + Makefiles
+** no IDE needed at all, don't let _Eclipse_ fool you
+* containerized in Docker
+* executed by Jenkins CI
+
+== Terminology
+
+ATS:: Abstract Test Suite
+MTC:: Main Test Component
+PTC:: Parallel Test Component
+IUT:: Implementation Under Test
+
+== Test Suite Philosophy
+
+* test one network element (our IUT)
+* test external behavior (3GPP and non-3GPP)
+* emulate entire environment from TTCN-3
+* don't reuse Osmocom C-code protocol implementations in the tests
+* test against independent TTCN-3 implementations!
+
+== What to test?
+
+* successful cases
+* erroneous cases (no answer, NACK, ...)
+** many difficult to reproduce with real phones/devices
+* load / resource exhaustion
+* spec compliance
+* focus on functionality actually relevant to IUT
+
+== Why TTCN-3 + TITAN
+
+* TTCN-3 specifically designed for telecom protocol testing
+* TITAN team released many telecom protocols in TTCN-3, such as
+** BSSAP, L3 (RR/MM/CC), SMS (CP/RP/TP), SS, M3UA, SCCP, GTP, NS, BSSGP, ...
+** shortens our test development cycle
+** permits us to test against known working industry implementations
+
+== Test suites for Osmocom CNI components
+
+* `osmo-bts`
+* `osmo-bsc`
+* `osmo-msc`
+* `osmo-mgw`
+* `osmo-hlr`
+* `osmo-sip-connector`
+* `osmo-sgsn`
+* `osmo-ggsn`
+
+== Test suites in progress
+
+* `osmo-pcu`
+* `osmo-bsc_nat`
+
+
+
+
+== BTS_Tests.ttcn
+
+* external interfaces
+** A-bis side: RSL (emulates BSC-side server)
+** Um side: L1CTL to control MS
+** PCU side: pcu_socket
+
+[graphviz]
+
+digraph G {
+  rankdir=LR;
+  { rank=same; BTS, BSC};
+  BTS [label="IUT\nosmo-bts-trx",shape="box"];
+  ATS [label="ATS\nBTS_Tests.ttcn"];
+  BSC [label="osmo-bsc\nOML only"];
+  BTS -> fake_trx [label="bursts"];
+  fake_trx -> trxcon [label="bursts"];
+  trxcon -> ATS [label="bursts"];
+
+  BTS -> BSC [label="A-bis OML"];
+  BTS -> ATS [label="A-bis RSL"];
+
+  ATS -> BTS [label="pcu_sock"];
+  ATS -> BSC [label="VTY"];
+  ATS -> BTS [label="CTRL"];
+}
+
+
+
+
+== BSC_Tests.ttcn
+
+* external interfaces
+** A-bis side: RSL (emulates BTS-side client)
+** A-side: BSSAP/SCCP/M3UA (emulates MSC-side)
+** MGW side: MGCP (emulates MGW side)
+
+[graphviz]
+
+digraph G {
+  rankdir=LR;
+  { rank=same; BTS; STP; };
+  BSC [label="IUT\nosmo-bsc",shape="box"];
+  ATS [label="ATS\nBSC_Tests.ttcn"];
+  BTS [label="osmo-bts-omldummy\nOML only"];
+
+  BTS -> BSC [label="A-bis OML"];
+  ATS -> BSC [label="A-bis RSL"];
+  ATS -> BSC [label="CTRL"];
+  ATS -> BSC [label="VTY"];
+  ATS -> STP [label="A BSSAP\nSCCP/M3UA"];
+  BSC -> STP [label="A BSSAP\nSCCP/M3UA"];
+}
+
+
+== MSC_Tests.ttcn
+
+* external interfaces
+** A: BSSAP/SCCP/M3UA (emulates BSC-side)
+** MNCC: MNCC/unix-domain (emulates ext. MNCC side)
+** MGW: MGCP (emulates MGW side)
+** GSUP (emulates HLR side)
+
+[graphviz]
+
+digraph G {
+  rankdir=LR;
+  MSC [label="IUT\nosmo-msc",shape="box"];
+  ATS [label="ATS\nMSC_Tests.ttcn"];
+
+  ATS -> MSC [label="MNCC"];
+  ATS -> MSC [label="SMPP",style="dashed"];
+  ATS -> MSC [label="CTRL"];
+  ATS -> MSC [label="VTY"];
+  MSC -> ATS [label="GSUP"];
+  ATS -> STP [label="A BSSAP\nSCCP/M3UA"];
+  MSC -> STP [label="A BSSAP\nSCCP/M3UA"];
+}
+
+
+
+== MGCP_Test.ttcn
+
+* external interfaces
+** MGCP (emulates call agent)
+** RTP (stream source/sink)
+
+[graphviz]
+
+digraph G {
+  rankdir=LR;
+  MGW [label="IUT\nosmo-mgw",shape="box"];
+  ATS [label="ATS\nMGCP_Test.ttcn"];
+
+  ATS -> MGW [label="RTP"];
+  ATS -> MGW [label="MGCP"];
+  MGW -> ATS [label="RTP"];
+}
+
+
+== HLR_Tests.ttcn
+

Change in osmo-ttcn3-hacks[master]: GSM_Types: Add support for Osmocom RSL ChannelNr CBCH

2018-09-16 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/10981


Change subject: GSM_Types: Add support for Osmocom RSL ChannelNr CBCH
..

GSM_Types: Add support for Osmocom RSL ChannelNr CBCH

Osmocom uses 0xC8 as channel number for CBCH, this is an extension
to the 08.58 definitions.

Change-Id: I2203f4a9012c154c12ac9d8f9c448a9ed0f49197
---
M library/GSM_Types.ttcn
1 file changed, 4 insertions(+), 1 deletion(-)



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

diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 59ccb76..53208e5 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -60,7 +60,8 @@
RSL_CHAN_NR_BCCH('1'B),
RSL_CHAN_NR_RACH('10001'B),
RSL_CHAN_NR_PCH_AGCH('10010'B),
-   RSL_CHAN_NR_OSMO_PDCH   ('11000'B)
+   RSL_CHAN_NR_OSMO_PDCH   ('11000'B),
+   RSL_CHAN_NR_OSMO_CBCH   ('11001'B)
} with { variant "FIELDLENGTH(5)" variant "FIELDORDER(msb)" };

type record RslChanNr2 {
@@ -107,6 +108,7 @@
template RslChannelNr t_RslChanNr_PCH_AGCH(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
template RslChannelNr t_RslChanNr_Bm(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
template RslChannelNr t_RslChanNr_PDCH(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);
+   template RslChannelNr t_RslChanNr_CBCH(template uint3_t tn) := 
t_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH);
template RslChannelNr t_RslChanNr_Lm(template uint3_t tn, template 
uint1_t sub_slot) := {
u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
tn := tn
@@ -129,6 +131,7 @@
template (value) RslChannelNr ts_RslChanNr_PCH_AGCH(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_PCH_AGCH);
template (value) RslChannelNr ts_RslChanNr_Bm(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_Bm_ACCH);
template (value) RslChannelNr ts_RslChanNr_PDCH(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_PDCH);
+   template (value) RslChannelNr ts_RslChanNr_CBCH(uint3_t tn) := 
ts_RslChanNr0(tn, RSL_CHAN_NR_OSMO_CBCH);
template (value) RslChannelNr ts_RslChanNr_Lm(uint3_t tn, uint1_t 
sub_slot) := {
u := { lm := { tag := '0001'B, sub_chan := sub_slot } },
tn := tn

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

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


Change in osmo-ttcn3-hacks[master]: add ttcn3 test suites slides from OsmoDevCon 2018

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10709 )

Change subject: add ttcn3 test suites slides from OsmoDevCon 2018
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a0d66babc165678ec53a1ee1c673e93708b8b79
Gerrit-Change-Number: 10709
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:42:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: add ttcn3 test suites slides from OsmoDevCon 2018

2018-09-16 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/10709

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

Change subject: add ttcn3 test suites slides from OsmoDevCon 2018
..

add ttcn3 test suites slides from OsmoDevCon 2018

Those slides are copied from 
http://git.gnumonks.org/laforge-slides/plain/2018/osmodevcon2018-ttcn3_test_suites/
to make sure they are more easily found.  It would be nice to convert
them into an actual asciidoc book with one chapter per test suite which
would be built from within this repository.   This way we can keep
documentation and code better in sync.

Change-Id: I8a0d66babc165678ec53a1ee1c673e93708b8b79
---
A doc/osmodevcon2018-ttcn3_test_suites.adoc
1 file changed, 296 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a0d66babc165678ec53a1ee1c673e93708b8b79
Gerrit-Change-Number: 10709
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Vadim Yanitskiy 


Change in osmo-bts[master]: lc15: vty: Add missing include for lchan_deactivate

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9532 )

Change subject: lc15: vty: Add missing include for lchan_deactivate
..

lc15: vty: Add missing include for lchan_deactivate

Fixes following compilation warning:
osmo-bts/src/osmo-bts-litecell15/lc15bts_vty.c:244:3: warning: implicit 
declaration of function ‘lchan_deactivate’

Change-Id: Id9b144d068d53393e1c1887aad285ae757156ec6
---
M src/osmo-bts-litecell15/lc15bts_vty.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/src/osmo-bts-litecell15/lc15bts_vty.c 
b/src/osmo-bts-litecell15/lc15bts_vty.c
index 46f73ab..d0edc88 100644
--- a/src/osmo-bts-litecell15/lc15bts_vty.c
+++ b/src/osmo-bts-litecell15/lc15bts_vty.c
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 

 #include "lc15bts.h"
 #include "l1_if.h"

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id9b144d068d53393e1c1887aad285ae757156ec6
Gerrit-Change-Number: 9532
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ggsn[master]: libgtp: implement gtp_clear_queues to clear req/resp queue

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10975 )

Change subject: libgtp: implement gtp_clear_queues to clear req/resp queue
..

libgtp: implement gtp_clear_queues to clear req/resp queue

Clearing the request and response queue is useful for debugging
to reset "some" state. Otherwise some tests will get un-expected
packets.

Change-Id: I279d1d7cbf5d37dd5609c2b968f317fe9a0e348d
---
M gtp/gtp.c
M gtp/gtp.h
2 files changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/gtp/gtp.c b/gtp/gtp.c
index 1d58088..b98fba0 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -496,6 +496,24 @@
return 0;
 }

+
+/**
+ * @brief clear the request and response queue. Useful for debugging to reset 
"some" state.
+ * @param gsn The GGSN instance
+ */
+void gtp_clear_queues(struct gsn_t *gsn)
+{
+   struct qmsg_t *qmsg;
+
+   while (!queue_getfirst(gsn->queue_req, )) {
+   queue_freemsg(gsn->queue_req, qmsg);
+   }
+
+   while (!queue_getfirst(gsn->queue_resp, )) {
+   queue_freemsg(gsn->queue_resp, qmsg);
+   }
+}
+
 /* gtp_conf
  * Remove signalling packet from retransmission queue.
  * return 0 on success, EOF if packet was not found */
diff --git a/gtp/gtp.h b/gtp/gtp.h
index ed594f1..5f35ab5 100644
--- a/gtp/gtp.h
+++ b/gtp/gtp.h
@@ -369,6 +369,8 @@
   struct pdp_t * pdp,
   uint8_t recovery));

+void gtp_clear_queues(struct gsn_t *gsn);
+
 /* Internal functions (not part of the API */

 extern int gtp_echo_req(struct gsn_t *gsn, int version, void *cbp,

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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I279d1d7cbf5d37dd5609c2b968f317fe9a0e348d
Gerrit-Change-Number: 10975
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ggsn[master]: libgtp: implement gtp_clear_queues to clear req/resp queue

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10975 )

Change subject: libgtp: implement gtp_clear_queues to clear req/resp queue
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I279d1d7cbf5d37dd5609c2b968f317fe9a0e348d
Gerrit-Change-Number: 10975
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:30:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BTS: enable encryption + RLL tests for Lm (TCH/H) channels

2018-09-16 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10976 )

Change subject: BTS: enable encryption + RLL tests for Lm (TCH/H) channels
..

BTS: enable encryption + RLL tests for Lm (TCH/H) channels

Since OS#3419 is resolved and TCH/H channel is supported by
trxcon, both encryption and RLL tests can be finally enabled
on Lm (TCH/H) channels.

Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Related: OS#3256
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index bfa8988..0303a49 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -303,7 +303,7 @@
/* TS 1..4: TCH/F */
valueof(ts_RslChanNr_Bm(1)),
/* TS 5: TCH/H */
-   //valueof(ts_RslChanNr_Lm(5,1)),
+   valueof(ts_RslChanNr_Lm(5,1)),
/* TS 0: SDCCH/4 */
valueof(ts_RslChanNr_SDCCH4(0,2)),
/* TS 6: SDCCH/8 */

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Gerrit-Change-Number: 10976
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: BTS: enable encryption + RLL tests for Lm (TCH/H) channels

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10976 )

Change subject: BTS: enable encryption + RLL tests for Lm (TCH/H) channels
..


Patch Set 1: Code-Review+2

great to see this resolved!


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Gerrit-Change-Number: 10976
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:29:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sgsn[master]: Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlr

2018-09-16 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10284 )

Change subject: Remove local libgsupclient; Use libosmo-gsup-client from 
osmo-hlr
..


Set Ready For Review


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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6f542945403cf2e3ddac419186b09ec0e2d43b69
Gerrit-Change-Number: 10284
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Sun, 16 Sep 2018 10:00:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: BTS: enable encryption + RLL tests for Lm (TCH/H) channels

2018-09-16 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/10976


Change subject: BTS: enable encryption + RLL tests for Lm (TCH/H) channels
..

BTS: enable encryption + RLL tests for Lm (TCH/H) channels

Since OS#3419 is resolved and TCH/H channel is supported by
trxcon, both encryption and RLL tests can be finally enabled
on Lm (TCH/H) channels.

Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Related: OS#3256
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index bfa8988..0303a49 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -303,7 +303,7 @@
/* TS 1..4: TCH/F */
valueof(ts_RslChanNr_Bm(1)),
/* TS 5: TCH/H */
-   //valueof(ts_RslChanNr_Lm(5,1)),
+   valueof(ts_RslChanNr_Lm(5,1)),
/* TS 0: SDCCH/4 */
valueof(ts_RslChanNr_SDCCH4(0,2)),
/* TS 6: SDCCH/8 */

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78f82a5f2a7b21d91692b1c99a9ff125e65cab64
Gerrit-Change-Number: 10976
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmocom-bb[master]: Install to /bin as it doesn't require special privileges..

2018-09-16 Thread Holger Freyther
Holger Freyther has posted comments on this change. ( 
https://gerrit.osmocom.org/10967 )

Change subject: Install to /bin as it doesn't require special privileges..
..


Patch Set 2:

> It's actually not easier since we support using adding binaries
 > from /sbin in there, but it's fine :)

Ah I see:
 create_bin_tgz "" "osmocon"

So maybe:

 create_binary_tgz "bin1 bin2" "sbin1 sbin2"

But then we can't have spaces in binary names (yeah why would we) but that is a 
common problem of shell scripts.

Alternatively:

  create_binary_tgz "bin1" "bin2" "sbin1" "sbin2"

This makes it impossible to have an "osmocon" in both bin and sbin but then 
that would lead to oddities anyway. What do you think?


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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe572a4c17871785b623e70acc7f5da056f945e5
Gerrit-Change-Number: 10967
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 16 Sep 2018 06:56:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmocom-bb[master]: Install to /bin as it doesn't require special privileges..

2018-09-16 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10967 )

Change subject: Install to /bin as it doesn't require special privileges..
..

Install to /bin as it doesn't require special privileges..

This makes packaging the binary for the gsm tester more easy.

Change-Id: Ibe572a4c17871785b623e70acc7f5da056f945e5
---
M src/host/virt_phy/src/Makefile.am
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/host/virt_phy/src/Makefile.am 
b/src/host/virt_phy/src/Makefile.am
index 48f9de7..bfd0dfa 100644
--- a/src/host/virt_phy/src/Makefile.am
+++ b/src/host/virt_phy/src/Makefile.am
@@ -1,7 +1,7 @@
 AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include  
-I$(top_srcdir)/../layer23/include

-sbin_PROGRAMS = virtphy
+bin_PROGRAMS = virtphy
 virtphy_SOURCES = virtphy.c l1ctl_sock.c gsmtapl1_if.c l1ctl_sap.c 
virt_prim_pm.c virt_prim_fbsb.c virt_prim_rach.c virt_prim_data.c 
virt_prim_traffic.c virt_l1_sched_simple.c logging.c virt_l1_model.c 
shared/virtual_um.c shared/osmo_mcast_sock.c
 virtphy_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
 virtphy_LDFLAGS = -pthread

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe572a4c17871785b623e70acc7f5da056f945e5
Gerrit-Change-Number: 10967
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-ggsn[master]: libgtp: implement gtp_clear_queues to clear req/resp queue

2018-09-16 Thread lynxis lazus
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/10975

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

Change subject: libgtp: implement gtp_clear_queues to clear req/resp queue
..

libgtp: implement gtp_clear_queues to clear req/resp queue

Clearing the request and response queue is useful for debugging
to reset "some" state. Otherwise some tests will get un-expected
packets.

Change-Id: I279d1d7cbf5d37dd5609c2b968f317fe9a0e348d
---
M gtp/gtp.c
M gtp/gtp.h
2 files changed, 20 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I279d1d7cbf5d37dd5609c2b968f317fe9a0e348d
Gerrit-Change-Number: 10975
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)