Change in osmo-bsc[master]: chan_alloc: Don't include CBCH channels in load computation

2019-05-23 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/14152


Change subject: chan_alloc: Don't include CBCH channels in load computation
..

chan_alloc: Don't include CBCH channels in load computation

When displaying the channel (lchan) load, we are interested in the
dedicated channels as available for communication with mobile
stations.  If CBCH is enabled, it "steals" one of the SDCCH slots,
so we have to exclude this channel from the count of available
dedicated channels.

Before this patch, A CBCH would show up as "in use" dedicated channel
(so both the total and the in_use count were incremented).

After this patch, neither "total" nor "use" are affected; The CBCH
slot is completely excluded from load statistics.

Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0
---
M src/osmo-bsc/chan_alloc.c
1 file changed, 4 insertions(+), 0 deletions(-)



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

diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 9c43414..7f0aa31 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -59,6 +59,10 @@
continue;

ts_for_each_lchan(lchan, ts) {
+   /* don't even count CBCH slots in total */
+   if (lchan->type == GSM_LCHAN_CBCH)
+   continue;
+
pl->total++;

switch (lchan->fi->state) {

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

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


Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14113 )

Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting
..

cbch: Add counters; queue length limits and CBCH LOAD reporting

This adds the final missing part to full CBCH support:
* keep a tab on the current queue length for basic + extended CBCH
* keep rate counters about the number of sent / transmitted SMSCB
* send CBCH LOAD information via RSL to the BSC

Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f
---
M include/osmo-bts/cbch.h
M include/osmo-bts/gsm_data_shared.h
M include/osmo-bts/rsl.h
M src/common/bts.c
M src/common/cbch.c
M src/common/rsl.c
M src/common/vty.c
7 files changed, 137 insertions(+), 2 deletions(-)

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



diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h
index af5fd9a..6bba5fa 100644
--- a/include/osmo-bts/cbch.h
+++ b/include/osmo-bts/cbch.h
@@ -6,6 +6,14 @@
 #include 
 #include 

+enum {
+   CBCH_CTR_RCVD_QUEUED,
+   CBCH_CTR_RCVD_DROPPED,
+   CBCH_CTR_SENT_SINGLE,
+   CBCH_CTR_SENT_DEFAULT,
+   CBCH_CTR_SENT_NULL,
+};
+
 /* incoming SMS broadcast command from RSL */
 int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type 
cmd_type,
  bool extended_cbch, uint8_t msg_len, const uint8_t 
*msg);
diff --git a/include/osmo-bts/gsm_data_shared.h 
b/include/osmo-bts/gsm_data_shared.h
index 860c296..415e6bc 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -542,6 +542,7 @@
 struct bts_smscb_state {
struct llist_head queue; /* list of struct smscb_msg */
int queue_len;
+   struct rate_ctr_group *ctrs;
struct smscb_msg *cur_msg; /* current SMS-CB */
struct smscb_msg *default_msg; /* default broadcast message; NULL if 
none */
 };
@@ -744,6 +745,9 @@
/* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */
struct bts_smscb_state smscb_basic;
struct bts_smscb_state smscb_extended;
+   int smscb_queue_tgt_len; /* ideal/target queue length */
+   int smscb_queue_max_len; /* maximum queue length */
+   int smscb_queue_hyst; /* hysteresis for CBCH laod indications */
 
float min_qual_rach;/* minimum quality for RACH bursts */
float min_qual_norm;/* minimum quality for normal daata */
diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 0361841..186018e 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -43,4 +43,6 @@
 void cb_ts_connected(struct gsm_bts_trx_ts *ts, int rc);
 void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc);

+int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool 
overflow, uint8_t amount);
+
 #endif // _RSL_H */
diff --git a/src/common/bts.c b/src/common/bts.c
index 4af219b..5220406 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 

 #define MIN_QUAL_RACH5.0f   /* at least  5 dB C/I */
 #define MIN_QUAL_NORM   -0.5f   /* at least -1 dB C/I */
@@ -105,6 +106,22 @@
bts_ctr_desc
 };

+static const struct rate_ctr_desc cbch_ctr_desc[] = {
+   [CBCH_CTR_RCVD_QUEUED] ={"cbch:rcvd_queued", "Received + queued 
CBCH messages (Abis)" },
+   [CBCH_CTR_RCVD_DROPPED] =   {"cbch:rcvd_dropped", "Received + 
dropped CBCH messages (Abis)" },
+
+   [CBCH_CTR_SENT_SINGLE] ={"cbch:sent_single", "Sent single CBCH 
messages (Um)" },
+   [CBCH_CTR_SENT_DEFAULT] =   {"cbch:sent_default", "Sent default 
CBCH messages (Um)" },
+   [CBCH_CTR_SENT_NULL] =  {"cbch:sent_null", "Sent NULL CBCH 
messages (Um)" },
+};
+static const struct rate_ctr_group_desc cbch_ctrg_desc = {
+   "cbch",
+   "cell broadcast channel",
+   OSMO_STATS_CLASS_GLOBAL,
+   ARRAY_SIZE(cbch_ctr_desc),
+   cbch_ctr_desc
+};
+
 /* Initialize the BTS data structures, called before config
  * file reading */
 int bts_init(struct gsm_bts *bts)
@@ -191,7 +208,15 @@
}

INIT_LLIST_HEAD(>smscb_basic.queue);
+   bts->smscb_basic.ctrs = rate_ctr_group_alloc(bts, _ctrg_desc, 0);
+   OSMO_ASSERT(bts->smscb_basic.ctrs);
INIT_LLIST_HEAD(>smscb_extended.queue);
+   bts->smscb_extended.ctrs = rate_ctr_group_alloc(bts, _ctrg_desc, 
1);
+   OSMO_ASSERT(bts->smscb_extended.ctrs);
+   bts->smscb_queue_max_len = 15;
+   bts->smscb_queue_tgt_len = 2;
+   bts->smscb_queue_hyst = 2;
+
INIT_LLIST_HEAD(>oml_queue);

/* register DTX DL FSM */
diff --git a/src/common/cbch.c b/src/common/cbch.c
index 2107f11..6b65679 100644
--- a/src/common/cbch.c
+++ b/src/common/cbch.c
@@ -26,6 +26,7 @@

 #include 
 #include 
+#include 
 #include 

 /* 

Change in osmo-bts[master]: cbch: Add counters; queue length limits and CBCH LOAD reporting

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14113 )

Change subject: cbch: Add counters; queue length limits and CBCH LOAD reporting
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f
Gerrit-Change-Number: 14113
Gerrit-PatchSet: 4
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 23 May 2019 19:16:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXT...

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14117 )

Change subject: cbch: Improve verbosity and extend logging; Always indicate 
BASIC/EXTD CBCH
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096
Gerrit-Change-Number: 14117
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 23 May 2019 19:16:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: cbch: Improve verbosity and extend logging; Always indicate BASIC/EXT...

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14117 )

Change subject: cbch: Improve verbosity and extend logging; Always indicate 
BASIC/EXTD CBCH
..

cbch: Improve verbosity and extend logging; Always indicate BASIC/EXTD CBCH

Change-Id: I6c8f9fc6215b616371e46c1f4ca4e44b8c7ac096
---
M src/common/cbch.c
1 file changed, 35 insertions(+), 19 deletions(-)

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



diff --git a/src/common/cbch.c b/src/common/cbch.c
index 6b65679..7ed11c2 100644
--- a/src/common/cbch.c
+++ b/src/common/cbch.c
@@ -71,6 +71,14 @@
OSMO_ASSERT(0);
 }

+static const char *tb_to_chan_str(uint8_t tb)
+{
+   if (tb < 4)
+   return "CBCH-BASIC";
+   else
+   return "CBCH-EXTENDED";
+}
+
 /* construct a SMSCB NULL block in the user-provided output buffer at 'out' */
 static int get_smscb_null_block(uint8_t *out)
 {
@@ -86,24 +94,26 @@
 }

 /* get the next block of the current CB message */
-static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, 
uint8_t block_nr,
+static int get_smscb_block(struct bts_smscb_state *bts_ss, uint8_t *out, 
uint8_t tb,
   const struct gsm_time *g_time)
 {
int to_copy;
struct gsm412_block_type *block_type;
struct smscb_msg *msg = bts_ss->cur_msg;
+   uint8_t block_nr = tb % 4;
+   const char *chan_name = tb_to_chan_str(tb);

if (!msg) {
/* No message: Send NULL block */
-   DEBUGPGT(DLSMS, g_time, "No cur_msg; requesting NULL block\n");
+   DEBUGPGT(DLSMS, g_time, "%s: No cur_msg; requesting NULL 
block\n", chan_name);
return get_smscb_null_block(out);
}
OSMO_ASSERT(block_nr < 4);

if (block_nr >= msg->num_segs) {
/* Higher block number than this message has blocks: Send NULL 
block */
-   DEBUGPGT(DLSMS, g_time, "cur_msg has only %u blocks; requesting 
NULL block\n",
-msg->num_segs);
+   DEBUGPGT(DLSMS, g_time, "%s: cur_msg has only %u blocks; 
requesting NULL block\n",
+chan_name, msg->num_segs);
return get_smscb_null_block(out);
}

@@ -136,12 +146,14 @@

if (block_nr == 4) {
if (msg != bts_ss->default_msg) {
-   DEBUGPGT(DLSMS, g_time, "deleting fully-transmitted 
message %p\n", msg);
+   DEBUGPGT(DLSMS, g_time, "%s: deleting fully-transmitted 
message %p\n",
+chan_name, msg);
/* delete any fully-transmitted normal message (or 
superseded default) */
talloc_free(bts_ss->cur_msg);
bts_ss->cur_msg = NULL;
} else {
-   DEBUGPGT(DLSMS, g_time, "keeping fully-transmitted 
default message %p\n", msg);
+   DEBUGPGT(DLSMS, g_time, "%s: keeping fully-transmitted 
default message %p\n",
+chan_name, msg);
}
}

@@ -170,16 +182,19 @@
 {
struct smscb_msg *scm;
struct bts_smscb_state *bts_ss;
+   const char *chan_name;

-   if (extended_cbch)
+   if (extended_cbch) {
+   chan_name = tb_to_chan_str(4);
bts_ss = >smscb_extended;
-   else
+   } else {
+   chan_name = tb_to_chan_str(0);
bts_ss = >smscb_basic;
+   }

if (msg_len > sizeof(scm->msg)) {
-   LOGP(DLSMS, LOGL_ERROR,
-"Cannot process SMSCB of %u bytes (max %zu)\n",
-msg_len, sizeof(scm->msg));
+   LOGP(DLSMS, LOGL_ERROR, "%s: Cannot process SMSCB of %u bytes 
(max %zu)\n",
+chan_name, msg_len, sizeof(scm->msg));
return -EINVAL;
}

@@ -197,8 +212,7 @@
memcpy(scm->msg, msg, msg_len);

LOGP(DLSMS, LOGL_INFO, "RSL SMSCB COMMAND (chan=%s, type=%s, 
num_blocks=%u)\n",
-   extended_cbch ? "EXTENDED" : "BASIC",
-   get_value_string(rsl_cb_cmd_names, cmd_type.command), 
scm->num_segs);
+   chan_name, get_value_string(rsl_cb_cmd_names, 
cmd_type.command), scm->num_segs);

switch (cmd_type.command) {
case RSL_CB_CMD_TYPE_NORMAL:
@@ -207,6 +221,8 @@
/* def_bcast is ignored as per Section 9.3.41 of 3GPP TS 48.058 
*/
/* limit queue size and optionally send CBCH LOAD Information 
(overflow) via RSL */
if (bts_ss->queue_len >= bts->smscb_queue_max_len) {
+   LOGP(DLSMS, LOGL_NOTICE, "RSL SMSCB COMMAND (chan=%s, 
type=%s): OVERFLOW\n",
+chan_name, 

Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ...

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14151 )

Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation 
with TA from initial activation onwards
..


Patch Set 1: Code-Review+1

looks good.  More empty lines than we usually have in the code, but don't 
bother to spend time on reducing those ;)


--
To view, visit https://gerrit.osmocom.org/14151
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: I4b2eec223e961aeedfd8afa77cb671d2842910fb
Gerrit-Change-Number: 14151
Gerrit-PatchSet: 1
Gerrit-Owner: Eric Wild 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 19:13:38 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: bts: Extend BTS_Tests.ttcn with test for RSL channel activation with ...

2019-05-23 Thread Eric Wild
Eric Wild has uploaded this change for review. ( 
https://gerrit.osmocom.org/14151


Change subject: bts: Extend BTS_Tests.ttcn with test for RSL channel activation 
with TA from initial activation onwards
..

bts: Extend BTS_Tests.ttcn with test for RSL channel activation with TA from 
initial activation onwards

Change-Id: I4b2eec223e961aeedfd8afa77cb671d2842910fb
Related: OS##3750
---
M bts/BTS_Tests.ttcn
1 file changed, 50 insertions(+), 0 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 7912ff6..0eba242 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1783,6 +1783,55 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
 }

+/* establish DChan, verify that the BTS sets the TA in the first SACCH L1 
header.
+TA for the IMM ASS messages is still controlled by 
g_pars.l1_pars.ms_actual_ta! */
+function f_tc_rsl_chan_initial_ta(charstring id) runs on ConnHdlr {
+   var L1ctlDlMessage l1_dl;
+   var uint5_t ta_to_test := 16;
+
+
+   f_l1_tune(L1CTL);
+   RSL.clear;
+
+   /* tell fake_trx to use a given timing offset for all bursts */
+   f_trx_fake_toffs256(ta_to_test*256);
+
+   f_est_dchan(more_ies :={valueof(t_RSL_IE(RSL_IE_TIMING_ADVANCE, 
RSL_IE_Body:{timing_adv := ta_to_test}))} );
+
+
+   alt {
+
+   /* Pick all SACCH blocks for checking */
+   [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) 
-> value l1_dl {
+
+   /* The second byte of the L1 header contains the TA. */
+   if (not (l1_dl.payload.data_ind.payload[1] == 
int2oct(ta_to_test, 1))) {
+   setverdict(fail, "TA in L1 header does not match the 
signaled (RSL) TA.");
+   }
+
+   }
+
+   /* Ignore all other blocks */
+   [] L1CTL.receive { repeat; }
+
+   }
+
+   f_rsl_chan_deact();
+   f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
+
+   setverdict(pass);
+}
+
+testcase TC_rsl_chan_initial_ta() runs on test_CT {
+   var ConnHdlr vc_conn;
+   var ConnHdlrPars pars;
+   f_init(testcasename());
+   pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN));
+   vc_conn := f_start_handler(refers(f_tc_rsl_chan_initial_ta), pars);
+   vc_conn.done;
+   Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
 /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND 
(TS 48.058 4.10) */
 private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
@@ -4621,6 +4670,7 @@
execute( TC_meas_res_sign_sdcch8() );
execute( TC_meas_res_sign_tchh_toa256() );
execute( TC_rsl_ms_pwr_ctrl() );
+   execute( TC_rsl_chan_initial_ta() );
execute( TC_conn_fail_crit() );
execute( TC_paging_imsi_80percent() );
execute( TC_paging_tmsi_80percent() );

--
To view, visit https://gerrit.osmocom.org/14151
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: I4b2eec223e961aeedfd8afa77cb671d2842910fb
Gerrit-Change-Number: 14151
Gerrit-PatchSet: 1
Gerrit-Owner: Eric Wild 


Change in docker-playground[master]: ttcn3-bts-test: Fix BSC VTY access from test suite

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14150 )

Change subject: ttcn3-bts-test: Fix BSC VTY access from test suite
..


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


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146
Gerrit-Change-Number: 14150
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Thu, 23 May 2019 17:21:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: ttcn3-bts-test: Fix BSC VTY access from test suite

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14150 )

Change subject: ttcn3-bts-test: Fix BSC VTY access from test suite
..

ttcn3-bts-test: Fix BSC VTY access from test suite

Some tests, particularly those for SMSCB, want to access the BSC
VTY.  This was enabled in the ttcn3 code, but the configs we're
using in the docker environment didn't properly refelect that yet.

Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146
---
M ttcn3-bts-test/BTS_Tests.cfg
M ttcn3-bts-test/osmo-bsc.cfg
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/ttcn3-bts-test/BTS_Tests.cfg b/ttcn3-bts-test/BTS_Tests.cfg
index 37ddde0..9567845 100644
--- a/ttcn3-bts-test/BTS_Tests.cfg
+++ b/ttcn3-bts-test/BTS_Tests.cfg
@@ -6,6 +6,7 @@

 [TESTPORT_PARAMETERS]
 *.BTSVTY.CTRL_HOSTNAME := "172.18.9.20"
+*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11"

 [MODULE_PARAMETERS]
 BTS_Tests.mp_rsl_ip := "172.18.9.10"
diff --git a/ttcn3-bts-test/osmo-bsc.cfg b/ttcn3-bts-test/osmo-bsc.cfg
index 54264e8..e4edf50 100644
--- a/ttcn3-bts-test/osmo-bsc.cfg
+++ b/ttcn3-bts-test/osmo-bsc.cfg
@@ -49,6 +49,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 e1_input
  e1_line 0 driver ipa

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146
Gerrit-Change-Number: 14150
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


Change in docker-playground[master]: ttcn3-bts-test: Fix BSC VTY access from test suite

2019-05-23 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/14150


Change subject: ttcn3-bts-test: Fix BSC VTY access from test suite
..

ttcn3-bts-test: Fix BSC VTY access from test suite

Some tests, particularly those for SMSCB, want to access the BSC
VTY.  This was enabled in the ttcn3 code, but the configs we're
using in the docker environment didn't properly refelect that yet.

Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146
---
M ttcn3-bts-test/BTS_Tests.cfg
M ttcn3-bts-test/osmo-bsc.cfg
2 files changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/50/14150/1

diff --git a/ttcn3-bts-test/BTS_Tests.cfg b/ttcn3-bts-test/BTS_Tests.cfg
index 37ddde0..9567845 100644
--- a/ttcn3-bts-test/BTS_Tests.cfg
+++ b/ttcn3-bts-test/BTS_Tests.cfg
@@ -6,6 +6,7 @@

 [TESTPORT_PARAMETERS]
 *.BTSVTY.CTRL_HOSTNAME := "172.18.9.20"
+*.BSCVTY.CTRL_HOSTNAME := "172.18.9.11"

 [MODULE_PARAMETERS]
 BTS_Tests.mp_rsl_ip := "172.18.9.10"
diff --git a/ttcn3-bts-test/osmo-bsc.cfg b/ttcn3-bts-test/osmo-bsc.cfg
index 54264e8..e4edf50 100644
--- a/ttcn3-bts-test/osmo-bsc.cfg
+++ b/ttcn3-bts-test/osmo-bsc.cfg
@@ -49,6 +49,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 e1_input
  e1_line 0 driver ipa

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b6e8b47bfe85c15fb57a25b649029f872477146
Gerrit-Change-Number: 14150
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in libosmocore[master]: fix isdigit taking unsigned as input

2019-05-23 Thread Kévin Redon
Kévin Redon has uploaded this change for review. ( 
https://gerrit.osmocom.org/14149


Change subject: fix isdigit taking unsigned as input
..

fix isdigit taking unsigned as input

fixes the following error warnings when cross-compiling using:
./configure --enable-static --prefix=/usr/local/arm-none-eabi 
--host=arm-none-eabi --enable-embedded --disable-doxygen --disable-shared 
--disable-pseudotalloc --enable-external-tests CFLAGS="-Os -ffunction-sections 
-fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated 
-Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 
-mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -Wno-error=format"

utils.c:1002:18: error: array subscript has type 'char' 
[-Werror=char-subscripts]
 1002 |   if (!isdigit(in[i]))

gsm23003.c:414:34: error: array subscript has type 'char' 
[-Werror=char-subscripts]
  414 |  if (!mnc_str || !isdigit(mnc_str[0]) || strlen(mnc_str) > 3)

Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d
---
M src/gsm/gsm23003.c
M src/utils.c
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/14149/1

diff --git a/src/gsm/gsm23003.c b/src/gsm/gsm23003.c
index a97ed07..584654b 100644
--- a/src/gsm/gsm23003.c
+++ b/src/gsm/gsm23003.c
@@ -411,7 +411,7 @@
char *endptr;
int rc = 0;

-   if (!mnc_str || !isdigit(mnc_str[0]) || strlen(mnc_str) > 3)
+   if (!mnc_str || !isdigit((unsigned char)mnc_str[0]) || strlen(mnc_str) 
> 3)
return -EINVAL;

errno = 0;
diff --git a/src/utils.c b/src/utils.c
index 59dc816..6b871c8 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -999,7 +999,7 @@
 
/* All input must be numbers */
for (i = 0; i < in_len; i++) {
-   if (!isdigit(in[i]))
+   if (!isdigit((unsigned char)in[i]))
return -EINVAL;
}


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia13fd5ee79fc6dc3291c0b99958ab3c01afee17d
Gerrit-Change-Number: 14149
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 


Change in osmo-mgw[master]: mgcp-cli: Validate osmux cid value during mgcp_msg_gen

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14146 )

Change subject: mgcp-cli: Validate osmux cid value during mgcp_msg_gen
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df
Gerrit-Change-Number: 14146
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 16:34:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in simtrace2[master]: remove unused make define

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14148 )

Change subject: remove unused make define
..

remove unused make define

Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5
---
M firmware/Makefile
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/firmware/Makefile b/firmware/Makefile
index fa72bd3..0f70bf4 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -124,8 +124,6 @@
 # only applicable for qmod board
 ALLOW_PEER_ERASE?=0

-DEBUG_PHONE_SNIFF?=0
-
 #CFLAGS+=-DUSB_NO_DEBUG=1

 # Optimization level, put in comment for debugging
@@ -167,7 +165,7 @@
 #CFLAGS += -Wa,-a,-ad
 CFLAGS += -D__ARM
 CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # 
-mfix-cortex-m3-ldrd
-CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) 
-DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
+CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
 CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
 CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)
 CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5
Gerrit-Change-Number: 14148
Gerrit-PatchSet: 2
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in simtrace2[master]: make peer ERASE more robust

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14144 )

Change subject: make peer ERASE more robust
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac
Gerrit-Change-Number: 14144
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 16:34:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in simtrace2[master]: add make DEFINE to remove assert ERASE code

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14147 )

Change subject: add make DEFINE to remove assert ERASE code
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e
Gerrit-Change-Number: 14147
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 16:34:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/14130 )

Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support
..

ttcn3-bscnat: Prepare cfgs for VTY & Osmux support

* Adding "osmux on" for each BSC will be required to enable Osmux later
on, but still it doesn't change behavior now because Osmux must be
enabled globally too (will be done through VTY).

* Set up correct bind and remote IP addr to have VTY working later on.

* Use extended timestamp to have subsecond accuracy to match with pcap
easily.

Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645
---
M ttcn3-bscnat-test/BSCNAT_Tests.cfg
M ttcn3-bscnat-test/bscs.config
M ttcn3-bscnat-test/osmo-bsc-nat.cfg
3 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/30/14130/2
--
To view, visit https://gerrit.osmocom.org/14130
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645
Gerrit-Change-Number: 14130
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in simtrace2[master]: make peer ERASE more robust

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14144 )

Change subject: make peer ERASE more robust
..

make peer ERASE more robust

adds command 'a' to allow setting/asserting the peer SAM3S ERASE
line on the next command.
this prevents against accidental erase since only the command 'y'
was required, without confirmation.
this could happen not only through accidental user input, but
noise on the serial line (noise would still cause other issues,
but at least now it will not "brick" the device).
now the sequence 'ay' is required, as any other command following
'a' would clear the permission again.

note: since ERASE is only setting a GPIO within this command
parsing function, not accidental function pointer problem calling
'board_exec_dbg_cmd' should cause accidental ERASE since it would
need to be called two times with the exact sequence

Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac
---
M firmware/libboard/qmod/source/board_qmod.c
1 file changed, 22 insertions(+), 3 deletions(-)

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



diff --git a/firmware/libboard/qmod/source/board_qmod.c 
b/firmware/libboard/qmod/source/board_qmod.c
index ad1f6b7..cab5271 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -1,7 +1,7 @@
 /* sysmocom quad-modem sysmoQMOD application code
  *
  * (C) 2016-2017 by Harald Welte 
- * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon 
+ * (C) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon 

  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -184,6 +184,11 @@
 /* returns '1' in case we should break any endless loop */
 void board_exec_dbg_cmd(int ch)
 {
+   /* this variable controls if it is allowed to assert/release the ERASE 
line.
+  this is done to prevent accidental ERASE on noisy serial input since 
only one character can trigger the ERASE.
+*/
+   static bool allow_erase = false;
+
switch (ch) {
case '?':
printf("\t?\thelp\n\r");
@@ -205,6 +210,7 @@
printf("\tX\tRelease peer SAM3 from reset\n\r");
printf("\tx\tAssert peer SAM3 reset\n\r");
printf("\tY\tRelease peer SAM3 ERASE signal\n\r");
+   printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r");
printf("\ty\tAssert peer SAM3 ERASE signal\n\r");
printf("\tU\tProceed to USB Initialization\n\r");
printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r");
@@ -243,9 +249,17 @@
printf("Clearing SIMTRACExx_ERASE (inactive)\n\r");
PIO_Clear(_peer_erase);
break;
+   case 'a':
+   printf("Asserting SIMTRACExx_ERASE allowed on next 
command\n\r");
+   allow_erase = true;
+   break;
case 'y':
-   printf("Seetting SIMTRACExx_ERASE (active)\n\r");
-   PIO_Set(_peer_erase);
+   if (allow_erase) {
+   printf("Setting SIMTRACExx_ERASE (active)\n\r");
+   PIO_Set(_peer_erase);
+   } else {
+   printf("Please first allow setting 
SIMTRACExx_ERASE\n\r");
+   }
break;
case '1':
printf("Resetting Modem 1 (of this SAM3)\n\r");
@@ -268,6 +282,11 @@
board_exec_dbg_cmd_st12only(ch);
break;
}
+
+   // set protection back so it can only run for one command
+   if ('a' != ch) {
+   allow_erase = false;
+   }
 }

 void board_main_top(void)

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac
Gerrit-Change-Number: 14144
Gerrit-PatchSet: 2
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in simtrace2[master]: add make DEFINE to remove assert ERASE code

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14147 )

Change subject: add make DEFINE to remove assert ERASE code
..

add make DEFINE to remove assert ERASE code

remove code to assert peer ERASE line by default.
see README for more information.

Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e
---
M firmware/Makefile
M firmware/README.txt
M firmware/libboard/qmod/source/board_qmod.c
3 files changed, 17 insertions(+), 1 deletion(-)

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



diff --git a/firmware/Makefile b/firmware/Makefile
index c0f53f3..fa72bd3 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -120,6 +120,10 @@
 # TRACE_LEVEL_NO_TRACE   0
 TRACE_LEVEL ?= 4

+# allow asserting the peer SAM3S ERASE signal to completely erase the flash
+# only applicable for qmod board
+ALLOW_PEER_ERASE?=0
+
 DEBUG_PHONE_SNIFF?=0

 #CFLAGS+=-DUSB_NO_DEBUG=1
@@ -163,7 +167,7 @@
 #CFLAGS += -Wa,-a,-ad
 CFLAGS += -D__ARM
 CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # 
-mfix-cortex-m3-ldrd
-CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF)
+CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) 
-DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
 CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
 CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)
 CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)
diff --git a/firmware/README.txt b/firmware/README.txt
index dcbafb2..fa7f60a 100644
--- a/firmware/README.txt
+++ b/firmware/README.txt
@@ -76,6 +76,10 @@
 ```
 Accepted values: 0 (NO_TRACE) to 5 (DEBUG)

+The qmod specific option `ALLOW_PEER_ERASE` controls if the UART debug command 
to assert the peer SAM3S ERASE line is present in the code.
+Per default this is set to 0 to prevent accidentally erasing all firmware, 
including the DFU bootloader, which would then need to be flashed using SAM-BA 
or JTAG/SWD.
+Setting `ALLOW_PEER_ERASE` to 1 enables back the debug command and should be 
used only for debugging or development purposes.
+
 = Flashing

 To flash a firmware image follow the instructions provided in the 
[wiki](https://projects.osmocom.org/projects/simtrace2/wiki/).
diff --git a/firmware/libboard/qmod/source/board_qmod.c 
b/firmware/libboard/qmod/source/board_qmod.c
index cab5271..4d75b98 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -184,10 +184,12 @@
 /* returns '1' in case we should break any endless loop */
 void board_exec_dbg_cmd(int ch)
 {
+#if (ALLOW_PEER_ERASE > 0)
/* this variable controls if it is allowed to assert/release the ERASE 
line.
   this is done to prevent accidental ERASE on noisy serial input since 
only one character can trigger the ERASE.
 */
static bool allow_erase = false;
+#endif

switch (ch) {
case '?':
@@ -209,9 +211,11 @@
}
printf("\tX\tRelease peer SAM3 from reset\n\r");
printf("\tx\tAssert peer SAM3 reset\n\r");
+#if (ALLOW_PEER_ERASE > 0)
printf("\tY\tRelease peer SAM3 ERASE signal\n\r");
printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r");
printf("\ty\tAssert peer SAM3 ERASE signal\n\r");
+#endif
printf("\tU\tProceed to USB Initialization\n\r");
printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r");
printf("\t2\tGenerate 1ms reset pulse on WWAN2\n\r");
@@ -245,6 +249,7 @@
printf("Setting _SIMTRACExx_RST -> SIMTRACExx_RST low 
(active)\n\r");
PIO_Set(_peer_rst);
break;
+#if (ALLOW_PEER_ERASE > 0)
case 'Y':
printf("Clearing SIMTRACExx_ERASE (inactive)\n\r");
PIO_Clear(_peer_erase);
@@ -261,6 +266,7 @@
printf("Please first allow setting 
SIMTRACExx_ERASE\n\r");
}
break;
+#endif
case '1':
printf("Resetting Modem 1 (of this SAM3)\n\r");
wwan_perst_do_reset_pulse(0, 300);
@@ -283,10 +289,12 @@
break;
}

+#if (ALLOW_PEER_ERASE > 0)
// set protection back so it can only run for one command
if ('a' != ch) {
allow_erase = false;
}
+#endif
 }

 void board_main_top(void)

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e
Gerrit-Change-Number: 14147
Gerrit-PatchSet: 2
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 

Change in simtrace2[master]: remove unused make define

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14148 )

Change subject: remove unused make define
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5
Gerrit-Change-Number: 14148
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 16:34:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14137 )

Change subject: sysmo: Fix "nominal power" / BS power display in VTY
..

sysmo: Fix "nominal power" / BS power display in VTY

The function get_p_max_out_mdBm() returns a value in 1/1000th of dBm,
"milli-dBm", while trx->nominal_power is only whole dBm.  We were
missing the required divider of 1000 ever since Change-Id
Ieff75d5becaa80a2097b6e744c75c2d16259c9a4 was merged in February 2017.

The good news is that this really only affected the VTY output and
not any actual operational aspect of the system.

Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68
Closes: SYS#4570
---
M src/osmo-bts-sysmo/l1_if.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved
  roh: Looks good to me, approved



diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 87cf25a..6f61c67 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1883,7 +1883,7 @@
LOGP(DL1C, LOGL_NOTICE, "Cannot determine nominal "
 "transmit power. Assuming 23dBm.\n");
}
-   bts->c0->nominal_power = rc;
+   bts->c0->nominal_power = rc / 1000;
}

hdl = pinst->u.sysmobts.hdl;

--
To view, visit https://gerrit.osmocom.org/14137
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: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68
Gerrit-Change-Number: 14137
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: roh 


Change in simtrace2[master]: remove unused make define

2019-05-23 Thread Kévin Redon
Kévin Redon has uploaded this change for review. ( 
https://gerrit.osmocom.org/14148


Change subject: remove unused make define
..

remove unused make define

Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5
---
M firmware/Makefile
1 file changed, 1 insertion(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/48/14148/1

diff --git a/firmware/Makefile b/firmware/Makefile
index fa72bd3..0f70bf4 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -124,8 +124,6 @@
 # only applicable for qmod board
 ALLOW_PEER_ERASE?=0

-DEBUG_PHONE_SNIFF?=0
-
 #CFLAGS+=-DUSB_NO_DEBUG=1

 # Optimization level, put in comment for debugging
@@ -167,7 +165,7 @@
 #CFLAGS += -Wa,-a,-ad
 CFLAGS += -D__ARM
 CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # 
-mfix-cortex-m3-ldrd
-CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) 
-DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
+CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
 CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
 CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)
 CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9ef8ce705803df06cf1e4c3ac9731ce69e5e6c5
Gerrit-Change-Number: 14148
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 


Change in simtrace2[master]: add make DEFINE to remove assert ERASE code

2019-05-23 Thread Kévin Redon
Kévin Redon has uploaded this change for review. ( 
https://gerrit.osmocom.org/14147


Change subject: add make DEFINE to remove assert ERASE code
..

add make DEFINE to remove assert ERASE code

remove code to assert peer ERASE line by default.
see README for more information.

Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e
---
M firmware/Makefile
M firmware/README.txt
M firmware/libboard/qmod/source/board_qmod.c
3 files changed, 17 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/47/14147/1

diff --git a/firmware/Makefile b/firmware/Makefile
index c0f53f3..fa72bd3 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -120,6 +120,10 @@
 # TRACE_LEVEL_NO_TRACE   0
 TRACE_LEVEL ?= 4

+# allow asserting the peer SAM3S ERASE signal to completely erase the flash
+# only applicable for qmod board
+ALLOW_PEER_ERASE?=0
+
 DEBUG_PHONE_SNIFF?=0

 #CFLAGS+=-DUSB_NO_DEBUG=1
@@ -163,7 +167,7 @@
 #CFLAGS += -Wa,-a,-ad
 CFLAGS += -D__ARM
 CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb # 
-mfix-cortex-m3-ldrd
-CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF)
+CFLAGS += -ffunction-sections -g $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) 
-DTRACE_LEVEL=$(TRACE_LEVEL) -DDEBUG_PHONE_SNIFF=$(DEBUG_PHONE_SNIFF) 
-DALLOW_PEER_ERASE=$(ALLOW_PEER_ERASE)
 CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
 CFLAGS += -DBOARD=\"$(BOARD)\" -DBOARD_$(BOARD)
 CFLAGS += -DAPPLICATION=\"$(APP)\" -DAPPLICATION_$(APP)
diff --git a/firmware/README.txt b/firmware/README.txt
index dcbafb2..fa7f60a 100644
--- a/firmware/README.txt
+++ b/firmware/README.txt
@@ -76,6 +76,10 @@
 ```
 Accepted values: 0 (NO_TRACE) to 5 (DEBUG)

+The qmod specific option `ALLOW_PEER_ERASE` controls if the UART debug command 
to assert the peer SAM3S ERASE line is present in the code.
+Per default this is set to 0 to prevent accidentally erasing all firmware, 
including the DFU bootloader, which would then need to be flashed using SAM-BA 
or JTAG/SWD.
+Setting `ALLOW_PEER_ERASE` to 1 enables back the debug command and should be 
used only for debugging or development purposes.
+
 = Flashing

 To flash a firmware image follow the instructions provided in the 
[wiki](https://projects.osmocom.org/projects/simtrace2/wiki/).
diff --git a/firmware/libboard/qmod/source/board_qmod.c 
b/firmware/libboard/qmod/source/board_qmod.c
index cab5271..4d75b98 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -184,10 +184,12 @@
 /* returns '1' in case we should break any endless loop */
 void board_exec_dbg_cmd(int ch)
 {
+#if (ALLOW_PEER_ERASE > 0)
/* this variable controls if it is allowed to assert/release the ERASE 
line.
   this is done to prevent accidental ERASE on noisy serial input since 
only one character can trigger the ERASE.
 */
static bool allow_erase = false;
+#endif

switch (ch) {
case '?':
@@ -209,9 +211,11 @@
}
printf("\tX\tRelease peer SAM3 from reset\n\r");
printf("\tx\tAssert peer SAM3 reset\n\r");
+#if (ALLOW_PEER_ERASE > 0)
printf("\tY\tRelease peer SAM3 ERASE signal\n\r");
printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r");
printf("\ty\tAssert peer SAM3 ERASE signal\n\r");
+#endif
printf("\tU\tProceed to USB Initialization\n\r");
printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r");
printf("\t2\tGenerate 1ms reset pulse on WWAN2\n\r");
@@ -245,6 +249,7 @@
printf("Setting _SIMTRACExx_RST -> SIMTRACExx_RST low 
(active)\n\r");
PIO_Set(_peer_rst);
break;
+#if (ALLOW_PEER_ERASE > 0)
case 'Y':
printf("Clearing SIMTRACExx_ERASE (inactive)\n\r");
PIO_Clear(_peer_erase);
@@ -261,6 +266,7 @@
printf("Please first allow setting 
SIMTRACExx_ERASE\n\r");
}
break;
+#endif
case '1':
printf("Resetting Modem 1 (of this SAM3)\n\r");
wwan_perst_do_reset_pulse(0, 300);
@@ -283,10 +289,12 @@
break;
}

+#if (ALLOW_PEER_ERASE > 0)
// set protection back so it can only run for one command
if ('a' != ch) {
allow_erase = false;
}
+#endif
 }

 void board_main_top(void)

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f88ecf1e2dcf00c0297597f88dd361a6e088c1e
Gerrit-Change-Number: 14147
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 


Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY

2019-05-23 Thread roh
roh has posted comments on this change. ( https://gerrit.osmocom.org/14137 )

Change subject: sysmo: Fix "nominal power" / BS power display in VTY
..


Patch Set 1: Code-Review+2

looks good


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68
Gerrit-Change-Number: 14137
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: roh 
Gerrit-Comment-Date: Thu, 23 May 2019 15:19:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14145 )

Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24
..

ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

For some reason, the bscnat tests were using the same subnet as the
sip-connector tests, causing address clashes when trying to execute
both test suites simultaneously:

+ echo Creating network ttcn3-sip-test
Creating network ttcn3-sip-test
+ docker network create --internal --subnet 172.18.11.0/24 ttcn3-sip-test
Error response from daemon: Pool overlaps with other one on this address space

Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
---
M ttcn3-bscnat-test/BSCNAT_Tests.cfg
M ttcn3-bscnat-test/jenkins.sh
M ttcn3-bscnat-test/osmo-bsc-nat.cfg
3 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg 
b/ttcn3-bscnat-test/BSCNAT_Tests.cfg
index e45061d..d23178f 100644
--- a/ttcn3-bscnat-test/BSCNAT_Tests.cfg
+++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg
@@ -9,18 +9,18 @@

 [MODULE_PARAMETERS]
 mp_bsc_port := 4;
-mp_bsc_ip   := "172.18.11.203";
+mp_bsc_ip   := "172.18.15.203";
 mp_msc_port := 5100;
-mp_msc_ip   := "172.18.11.203";
+mp_msc_ip   := "172.18.15.203";
 mp_nat_port := 5000;
-mp_nat_ip   := "172.18.11.20";
+mp_nat_ip   := "172.18.15.20";

 #mp_ipa_mgcp_uses_osmo_ext := true;

 mp_mgcp_uses_udp := true;
-mp_callagent_ip := "172.18.11.203";
+mp_callagent_ip := "172.18.15.203";
 mp_callagent_udp_port := 2727;
-mp_mgw_ip := "172.18.11.20";
+mp_mgw_ip := "172.18.15.20";
 mp_mgw_udp_port := 2427;

 [MAIN_CONTROLLER]
diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh
index 10d7d62..61ea89b 100755
--- a/ttcn3-bscnat-test/jenkins.sh
+++ b/ttcn3-bscnat-test/jenkins.sh
@@ -16,18 +16,18 @@
 cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/
 cp bscs.config $VOL_BASE_DIR/bscnat/

-network_create 172.18.11.0/24
+network_create 172.18.15.0/24
 
 echo Starting container with BSCNAT
 docker run --rm \
-   --network $NET_NAME --ip 172.18.11.20 \
+   --network $NET_NAME --ip 172.18.15.20 \
-v $VOL_BASE_DIR/bscnat:/data \
--name ${BUILD_TAG}-bscnat -d \
$REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c 
/data/osmo-bsc-nat.cfg

 echo Starting container with BSCNAT testsuite
 docker run --rm \
-   --network $NET_NAME --ip 172.18.11.203 \
+   --network $NET_NAME --ip 172.18.15.203 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/bscnat-tester:/data \
--name ${BUILD_TAG}-ttcn3-bscnat-test \
diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg 
b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
index e3398b9..bca4628 100644
--- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg
+++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
@@ -13,7 +13,7 @@
  no login
 !
 mgcp
-  bind ip 172.18.11.20
+  bind ip 172.18.15.20
   bind port 2427
   rtp bts-base 4000
   rtp net-base 16000
@@ -23,11 +23,11 @@
   sdp audio-payload name AMR/8000
   loop 0
   number endpoints 32
-  call-agent ip 172.18.11.203
+  call-agent ip 172.18.15.203
   rtp transcoder-base 0
   transcoder-remote-base 4000
 nat
- msc ip 172.18.11.203
+ msc ip 172.18.15.203
  msc port 5100
  token foo
  timeout auth 2

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
Gerrit-Change-Number: 14145
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14145 )

Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
Gerrit-Change-Number: 14145
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 14:54:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14130 )

Change subject: ttcn3-bscnat: Prepare cfgs for VTY & Osmux support
..


Patch Set 1:

I think after https://gerrit.osmocom.org/#/c/docker-playground/+/14145/ is 
merged, this one needs to update the IP addr introduced here.


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I794a17bdeaff9ab9316d7a6acb1e58dfd815b645
Gerrit-Change-Number: 14130
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 14:50:42 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14145 )

Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
Gerrit-Change-Number: 14145
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Thu, 23 May 2019 14:48:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14145 )

Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24
..


Patch Set 1: Verified+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
Gerrit-Change-Number: 14145
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Daniel Willmann 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Thu, 23 May 2019 14:48:41 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: lcls: Fix MDCX with garbage on LCLS loop break

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14143 )

Change subject: lcls: Fix MDCX with garbage on LCLS loop break
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea
Gerrit-Change-Number: 14143
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 14:46:58 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: mgcp-cli: Validate osmux cid value during mgcp_msg_gen

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/14146


Change subject: mgcp-cli: Validate osmux cid value during mgcp_msg_gen
..

mgcp-cli: Validate osmux cid value during mgcp_msg_gen

Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 11 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/14146/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 7074328..f2204e1 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -36,6 +36,10 @@
 #include 
 #include 

+#ifndef OSMUX_CID_MAX
+#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */
+#endif
+
 /* Codec descripton for dynamic payload types (SDP) */
 const struct value_string osmo_mgcpc_codec_names[] = {
{ CODEC_PCMU_8000_1, "PCMU/8000/1" },
@@ -414,9 +418,6 @@
return -2;
}

-#ifndef OSMUX_CID_MAX
-#define OSMUX_CID_MAX 255 /* FIXME: use OSMUX_CID_MAX from libosmo-netif? */
-#endif
if (osmux_cid > OSMUX_CID_MAX) { /* OSMUX_CID_MAX from libosmo-netif */
LOGP(DLMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n",
 osmux_cid, OSMUX_CID_MAX);
@@ -1260,6 +1261,13 @@

/* Add X-Osmo-Osmux */
if ((mgcp_msg->presence & MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID)) {
+   if (mgcp_msg->x_osmo_osmux_cid < -1 || 
mgcp_msg->x_osmo_osmux_cid > OSMUX_CID_MAX) {
+   LOGP(DLMGCP, LOGL_ERROR,
+"Wrong Osmux CID %d, can not generate MGCP 
message\n",
+mgcp_msg->x_osmo_osmux_cid);
+   msgb_free(msg);
+   return NULL;
+   }
snprintf(buf, sizeof(buf), " %d", mgcp_msg->x_osmo_osmux_cid);
rc +=
msgb_printf(msg, MGCP_X_OSMO_OSMUX_HEADER "%s\r\n",

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c4d39b346b94de933f86200902c6c0ea2e1d5df
Gerrit-Change-Number: 14146
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in docker-playground[master]: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

2019-05-23 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/14145


Change subject: ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24
..

ttcn3-bscnat-test: Use unique sub-network 172.18.15.0/24

For some reason, the bscnat tests were using the same subnet as the
sip-connector tests, causing address clashes when trying to execute
both test suites simultaneously:

+ echo Creating network ttcn3-sip-test
Creating network ttcn3-sip-test
+ docker network create --internal --subnet 172.18.11.0/24 ttcn3-sip-test
Error response from daemon: Pool overlaps with other one on this address space

Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
---
M ttcn3-bscnat-test/BSCNAT_Tests.cfg
M ttcn3-bscnat-test/jenkins.sh
M ttcn3-bscnat-test/osmo-bsc-nat.cfg
3 files changed, 11 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/45/14145/1

diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg 
b/ttcn3-bscnat-test/BSCNAT_Tests.cfg
index e45061d..d23178f 100644
--- a/ttcn3-bscnat-test/BSCNAT_Tests.cfg
+++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg
@@ -9,18 +9,18 @@

 [MODULE_PARAMETERS]
 mp_bsc_port := 4;
-mp_bsc_ip   := "172.18.11.203";
+mp_bsc_ip   := "172.18.15.203";
 mp_msc_port := 5100;
-mp_msc_ip   := "172.18.11.203";
+mp_msc_ip   := "172.18.15.203";
 mp_nat_port := 5000;
-mp_nat_ip   := "172.18.11.20";
+mp_nat_ip   := "172.18.15.20";

 #mp_ipa_mgcp_uses_osmo_ext := true;

 mp_mgcp_uses_udp := true;
-mp_callagent_ip := "172.18.11.203";
+mp_callagent_ip := "172.18.15.203";
 mp_callagent_udp_port := 2727;
-mp_mgw_ip := "172.18.11.20";
+mp_mgw_ip := "172.18.15.20";
 mp_mgw_udp_port := 2427;

 [MAIN_CONTROLLER]
diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh
index 10d7d62..61ea89b 100755
--- a/ttcn3-bscnat-test/jenkins.sh
+++ b/ttcn3-bscnat-test/jenkins.sh
@@ -16,18 +16,18 @@
 cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/
 cp bscs.config $VOL_BASE_DIR/bscnat/

-network_create 172.18.11.0/24
+network_create 172.18.15.0/24

 echo Starting container with BSCNAT
 docker run --rm \
-   --network $NET_NAME --ip 172.18.11.20 \
+   --network $NET_NAME --ip 172.18.15.20 \
-v $VOL_BASE_DIR/bscnat:/data \
--name ${BUILD_TAG}-bscnat -d \
$REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c 
/data/osmo-bsc-nat.cfg

 echo Starting container with BSCNAT testsuite
 docker run --rm \
-   --network $NET_NAME --ip 172.18.11.203 \
+   --network $NET_NAME --ip 172.18.15.203 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/bscnat-tester:/data \
--name ${BUILD_TAG}-ttcn3-bscnat-test \
diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg 
b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
index e3398b9..bca4628 100644
--- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg
+++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
@@ -13,7 +13,7 @@
  no login
 !
 mgcp
-  bind ip 172.18.11.20
+  bind ip 172.18.15.20
   bind port 2427
   rtp bts-base 4000
   rtp net-base 16000
@@ -23,11 +23,11 @@
   sdp audio-payload name AMR/8000
   loop 0
   number endpoints 32
-  call-agent ip 172.18.11.203
+  call-agent ip 172.18.15.203
   rtp transcoder-base 0
   transcoder-remote-base 4000
 nat
- msc ip 172.18.11.203
+ msc ip 172.18.15.203
  msc port 5100
  token foo
  timeout auth 2

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62b01b4b291ed9d729139fcf9b0102459e7f5a6a
Gerrit-Change-Number: 14145
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-ttcn3-hacks[master]: MSC_Tests: Remove duplicated structures from BSSMAP_Templates

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14120 )

Change subject: MSC_Tests: Remove duplicated structures from BSSMAP_Templates
..

MSC_Tests: Remove duplicated structures from BSSMAP_Templates

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

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



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index f6ab439..b64b872 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -330,144 +330,6 @@
activate(as_Tguard_direct());
 }

-template PDU_BSSAP ts_BSSAP_BSSMAP := {
-   discriminator := '0'B,
-   spare := '000'B,
-   dlci := omit,
-   lengthIndicator := 0,   /* overwritten by codec */
-   pdu := ?
-}
-
-template PDU_BSSAP tr_BSSAP_BSSMAP := {
-   discriminator := '0'B,
-   spare := '000'B,
-   dlci := omit,
-   lengthIndicator := ?,
-   pdu := {
-   bssmap := ?
-   }
-}
-
-
-type integer BssmapCause;
-
-template (value) BSSMAP_IE_Cause ts_BSSMAP_IE_Cause(BssmapCause val) := {
-   elementIdentifier := '04'O,
-   lengthIndicator := 0,
-   causeValue := int2bit(val, 7),
-   extensionCauseValue := '0'B,
-   spare1 := omit
-}
-
-template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies 
ts_BSSAP_BSSMAP := {
-   pdu := {
-   bssmap := {
-   reset := {
-   messageType := '30'O,
-   cause := ts_BSSMAP_IE_Cause(cause),
-   a_InterfaceSelectorForReset := omit
-   }
-   }
-   }
-}
-
-template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := {
-   pdu := {
-   bssmap := {
-   resetAck := {
-   messageType := '31'O,
-   a_InterfaceSelectorForReset := omit
-   }
-   }
-   }
-}
-
-template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := {
-   pdu := {
-   bssmap := {
-   resetAck := {
-   messageType := '31'O,
-   a_InterfaceSelectorForReset := *
-   }
-   }
-   }
-}
-
-template BSSMAP_IE_CellIdentifier ts_BSSMAP_IE_CellID := {
-   elementIdentifier := '05'O,
-   lengthIndicator := 0,
-   cellIdentifierDiscriminator := ''B,
-   spare1_4 := ''B,
-   cellIdentification := ?
-}
-
-type uint16_t BssmapLAC;
-type uint16_t BssmapCI;
-
-/*
-template BSSMAP_IE_CellIdentifier ts_CellId_CGI(mcc, mnc, lac, ci)
-modifies ts_BSSMAP_IE_CellID := {
-   cellIdentification := {
-   cI_LAC_CGI := {
-   mnc_mcc := FIXME,
-   lac := int2oct(lac, 2),
-   ci := int2oct(ci, 2)
-   }
-   }
-}
-*/
-
-template BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci)
-modifies ts_BSSMAP_IE_CellID := {
-   cellIdentification := {
-   cI_LAC_CI := {
-   lac := int2oct(lac, 2),
-   ci := int2oct(ci, 2)
-   }
-   }
-}
-
-template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci)
-modifies ts_BSSMAP_IE_CellID := {
-   cellIdentification := {
-   cI_CI := int2oct(ci, 2)
-   }
-}
-
-template BSSMAP_IE_CellIdentifier ts_CellId_none
-modifies ts_BSSMAP_IE_CellID := {
-   cellIdentification := {
-   cI_noCell := ''O
-   }
-}
-
-
-template BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(octetstring l3info) 
:= {
-   elementIdentifier := '17'O,
-   lengthIndicator := 0,
-   layer3info := l3info
-}
-
-template PDU_BSSAP ts_BSSMAP_ComplL3(BSSMAP_IE_CellIdentifier cell_id, 
octetstring l3_info)
-modifies ts_BSSAP_BSSMAP := {
-   pdu := {
-   bssmap := {
-   completeLayer3Information := {
-   messageType := '57'O,
-   cellIdentifier := cell_id,
-   layer3Information := 
ts_BSSMAP_IE_L3Info(l3_info),
-   chosenChannel := omit,
-   lSAIdentifier := omit,
-   aPDU := omit,
-   codecList := omit,
-   redirectAttemptFlag := omit,
-   sendSequenceNumber := omit,
-   iMSI := omit
-   }
-   }
-   }
-}
-
 type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr;

 /* FIXME: move into BSC_ConnectionHandler? */

--
To view, visit 

Change in osmo-bsc[master]: lcls: Fix MDCX with garbage on LCLS loop break

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14143 )

Change subject: lcls: Fix MDCX with garbage on LCLS loop break
..

lcls: Fix MDCX with garbage on LCLS loop break

Commit c997ceb750a67baef1a05590febe1c678b287d8f which added initial code
did use memset(0) on the structure. However, later commit
b407a8aca45ba8f3426003c4960ca8bd5cfe60e5 modifying the code forgot to
initialize it, and as a result most of its fields contain garbage.

This results in an MDCX with strange/incorrect values sent when LCLS
loop breaks, breaking TTCN3 test BSC_Tests_LCLS.TC_lcls_connect_break.

Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea
---
M src/osmo-bsc/osmo_bsc_lcls.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index a01c02e..f0c62a1 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -283,7 +283,7 @@

 static void lcls_break_local_switching(struct gsm_subscriber_connection *conn)
 {
-   struct mgcp_conn_peer mdcx_info;
+   struct mgcp_conn_peer mdcx_info = {};

LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS(%s)\n",
bsc_lcls_mode_name(conn->sccp.msc->lcls_mode));

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea
Gerrit-Change-Number: 14143
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in simtrace2[master]: make peer ERASE more robust

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14144 )

Change subject: make peer ERASE more robust
..


Patch Set 1:

I would prefer to completely remove the code from normal production buidls.  We 
can always have a diffent build / makefile target for those rare casese where 
we actually want that functionality.


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac
Gerrit-Change-Number: 14144
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Thu, 23 May 2019 14:46:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in simtrace2[master]: make peer ERASE more robust

2019-05-23 Thread Kévin Redon
Kévin Redon has uploaded this change for review. ( 
https://gerrit.osmocom.org/14144


Change subject: make peer ERASE more robust
..

make peer ERASE more robust

adds command 'a' to allow setting/asserting the peer SAM3S ERASE
line on the next command.
this prevents against accidental erase since only the command 'y'
was required, without confirmation.
this could happen not only through accidental user input, but
noise on the serial line (noise would still cause other issues,
but at least now it will not "brick" the device).
now the sequence 'ay' is required, as any other command following
'a' would clear the permission again.

note: since ERASE is only setting a GPIO within this command
parsing function, not accidental function pointer problem calling
'board_exec_dbg_cmd' should cause accidental ERASE since it would
need to be called two times with the exact sequence

Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac
---
M firmware/libboard/qmod/source/board_qmod.c
1 file changed, 22 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/44/14144/1

diff --git a/firmware/libboard/qmod/source/board_qmod.c 
b/firmware/libboard/qmod/source/board_qmod.c
index ad1f6b7..cab5271 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -1,7 +1,7 @@
 /* sysmocom quad-modem sysmoQMOD application code
  *
  * (C) 2016-2017 by Harald Welte 
- * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon 
+ * (C) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon 

  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -184,6 +184,11 @@
 /* returns '1' in case we should break any endless loop */
 void board_exec_dbg_cmd(int ch)
 {
+   /* this variable controls if it is allowed to assert/release the ERASE 
line.
+  this is done to prevent accidental ERASE on noisy serial input since 
only one character can trigger the ERASE.
+*/
+   static bool allow_erase = false;
+
switch (ch) {
case '?':
printf("\t?\thelp\n\r");
@@ -205,6 +210,7 @@
printf("\tX\tRelease peer SAM3 from reset\n\r");
printf("\tx\tAssert peer SAM3 reset\n\r");
printf("\tY\tRelease peer SAM3 ERASE signal\n\r");
+   printf("\ta\tAllow asserting peer SAM3 ERASE signal\n\r");
printf("\ty\tAssert peer SAM3 ERASE signal\n\r");
printf("\tU\tProceed to USB Initialization\n\r");
printf("\t1\tGenerate 1ms reset pulse on WWAN1\n\r");
@@ -243,9 +249,17 @@
printf("Clearing SIMTRACExx_ERASE (inactive)\n\r");
PIO_Clear(_peer_erase);
break;
+   case 'a':
+   printf("Asserting SIMTRACExx_ERASE allowed on next 
command\n\r");
+   allow_erase = true;
+   break;
case 'y':
-   printf("Seetting SIMTRACExx_ERASE (active)\n\r");
-   PIO_Set(_peer_erase);
+   if (allow_erase) {
+   printf("Setting SIMTRACExx_ERASE (active)\n\r");
+   PIO_Set(_peer_erase);
+   } else {
+   printf("Please first allow setting 
SIMTRACExx_ERASE\n\r");
+   }
break;
case '1':
printf("Resetting Modem 1 (of this SAM3)\n\r");
@@ -268,6 +282,11 @@
board_exec_dbg_cmd_st12only(ch);
break;
}
+
+   // set protection back so it can only run for one command
+   if ('a' != ch) {
+   allow_erase = false;
+   }
 }

 void board_main_top(void)

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06bfeaef09a397bd554bec84321e0dd64ccc3aac
Gerrit-Change-Number: 14144
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon 


Change in osmo-bsc[master]: lcls: Fix MDCX with garbage on LCLS loop break

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/14143


Change subject: lcls: Fix MDCX with garbage on LCLS loop break
..

lcls: Fix MDCX with garbage on LCLS loop break

Commit c997ceb750a67baef1a05590febe1c678b287d8f which added initial code
did use memset(0) on the structure. However, later commit
b407a8aca45ba8f3426003c4960ca8bd5cfe60e5 modifying the code forgot to
initialize it, and as a result most of its fields contain garbage.

This results in an MDCX with strange/incorrect values sent when LCLS
loop breaks, breaking TTCN3 test BSC_Tests_LCLS.TC_lcls_connect_break.

Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea
---
M src/osmo-bsc/osmo_bsc_lcls.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index a01c02e..f0c62a1 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -283,7 +283,7 @@

 static void lcls_break_local_switching(struct gsm_subscriber_connection *conn)
 {
-   struct mgcp_conn_peer mdcx_info;
+   struct mgcp_conn_peer mdcx_info = {};

LOGPFSM(conn->lcls.fi, "=== HERE IS WHERE WE DISABLE LCLS(%s)\n",
bsc_lcls_mode_name(conn->sccp.msc->lcls_mode));

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea
Gerrit-Change-Number: 14143
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in osmo-ttcn3-hacks[master]: MSC_Tests: Remove duplicated structures from BSSMAP_Templates

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14120 )

Change subject: MSC_Tests: Remove duplicated structures from BSSMAP_Templates
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/14120
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: Ia82b65fe7e53cc0ab73df94b844b9b85aba9468b
Gerrit-Change-Number: 14120
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 14:08:36 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14141 )

Change subject: BSSMAP_templates: Update templates to set Osmux fields
..

BSSMAP_templates: Update templates to set Osmux fields

After new fields (osmux osmocom extensions) were added to BSSMAP Reset
and BSSMAP AssignReq/AssignCompl in titan.ProtocolModules.BSSMAP, we
need to set them in ts_* templates, otherwise TTCN3 runtimes fails with:
"""
BSC_Tests.ttcn:143 Dynamic test case error: Performing a valueof or send
operation on a non-specific template of type 
@BSSAP_Types.BSSMAP_IE_Osmo_OsmuxSupport.
"""

Fixes: fe0c6083bd7176b8375fafc6d6399772d85a70a3
Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd
---
M library/BSSMAP_Templates.ttcn
1 file changed, 44 insertions(+), 16 deletions(-)

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



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 02c84e2..ad314a3 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -164,47 +164,62 @@
oldToNewBSSIEs := val
 }

-template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies 
ts_BSSAP_BSSMAP := {
+template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := {
+   elementIdentifier := 'F0'O
+}
+
+private function f_enc_osmux_support(boolean osmux_enabled) return template 
BSSMAP_IE_Osmo_OsmuxSupport {
+   if (osmux_enabled) {
+   return tr_BSSMAP_IE_Osmo_OsmuxSupport;
+   }
+   return omit;
+}
+
+template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean 
osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
reset := {
messageType := '30'O,
cause := ts_BSSMAP_IE_Cause(cause),
-   a_InterfaceSelectorForReset := omit
+   a_InterfaceSelectorForReset := omit,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
 }

-template PDU_BSSAP tr_BSSMAP_Reset modifies tr_BSSAP_BSSMAP := {
+template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies 
tr_BSSAP_BSSMAP := {
pdu := {
bssmap := {
reset := {
messageType := '30'O,
cause := ?,
-   a_InterfaceSelectorForReset := *
+   a_InterfaceSelectorForReset := *,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
 }

-template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := {
+template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) 
modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
resetAck := {
messageType := '31'O,
-   a_InterfaceSelectorForReset := omit
+   a_InterfaceSelectorForReset := omit,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
 }

-template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := {
+template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies 
tr_BSSAP_BSSMAP := {
pdu := {
bssmap := {
resetAck := {
messageType := '31'O,
-   a_InterfaceSelectorForReset := *
+   a_InterfaceSelectorForReset := *,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
@@ -443,9 +458,15 @@
codecElements := valueof(elem)
 }

+template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := {
+   elementIdentifier := 'F1'O,
+   osmuxCID := cid
+}
+
 template PDU_BSSAP
 ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
-   template BSSMAP_IE_AoIP_TransportLayerAddress aoip := 
omit)
+   template BSSMAP_IE_AoIP_TransportLayerAddress aoip := 
omit,
+   template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
 modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
@@ -472,14 +493,16 @@
globalCallReference := omit,
lCLS_Configuration := omit,
lCLS_ConnectionStatusControl := omit,
-   lCLS_CorrelationNotNeeded := omit

Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14141 )

Change subject: BSSMAP_templates: Update templates to set Osmux fields
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/14141
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: I568100376cf8a47c01a33bada97bf8eaa7c07fcd
Gerrit-Change-Number: 14141
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 14:08:00 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: msc: Introduce Osmux infra and one test for osmo-msc

2019-05-23 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/14121

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

Change subject: msc: Introduce Osmux infra and one test for osmo-msc
..

msc: Introduce Osmux infra and one test for osmo-msc

Change-Id: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9
---
M library/MGCP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
3 files changed, 126 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/21/14121/4
--
To view, visit https://gerrit.osmocom.org/14121
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: Ibcb82d1a2d570c6c0ad0c3b6504bffe2244eccd9
Gerrit-Change-Number: 14121
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: bsc-nat: Introduce Osmux test

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/14142


Change subject: bsc-nat: Introduce Osmux test
..

bsc-nat: Introduce Osmux test

Depends: openbsc.git Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Change-Id: I35f206aab713ccf0a4e074872e291c349c903b9d
---
M bsc-nat/BSCNAT_Tests.default
M bsc-nat/BSCNAT_Tests.ttcn
M bsc-nat/BSC_MS_ConnectionHandler.ttcn
M bsc-nat/BSC_MS_Simulation.ttcn
M bsc-nat/gen_links.sh
M bsc-nat/regen_makefile.sh
6 files changed, 80 insertions(+), 12 deletions(-)



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

diff --git a/bsc-nat/BSCNAT_Tests.default b/bsc-nat/BSCNAT_Tests.default
index 37c1048..3374bcf 100644
--- a/bsc-nat/BSCNAT_Tests.default
+++ b/bsc-nat/BSCNAT_Tests.default
@@ -4,8 +4,19 @@

 [TESTPORT_PARAMETERS]
 #*.*.udpReuseAddress := "yes";
+*.BSCNATVTY.CTRL_MODE := "client"
+*.BSCNATVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.BSCNATVTY.CTRL_PORTNUM := "4244"
+*.BSCNATVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.BSCNATVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.BSCNATVTY.CTRL_READMODE := "buffered"
+*.BSCNATVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.BSCNATVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes"
+*.BSCNATVTY.PROMPT1 := "OsmoBSCNAT> "
+

 [MODULE_PARAMETERS]
+Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBSCNAT";
 mp_bsc_port := 4;
 mp_bsc_ip   := "127.0.0.1";
 mp_msc_port := 5100;
@@ -22,4 +33,3 @@
 mp_mgw_udp_port := 2427;

 [EXECUTE]
-
diff --git a/bsc-nat/BSCNAT_Tests.ttcn b/bsc-nat/BSCNAT_Tests.ttcn
index 993d668..104e89f 100644
--- a/bsc-nat/BSCNAT_Tests.ttcn
+++ b/bsc-nat/BSCNAT_Tests.ttcn
@@ -15,6 +15,9 @@
 import from MSC_Simulation all;
 import from BSC_MS_Simulation all;

+import from Osmocom_VTY_Functions all;
+import from TELNETasp_PortType all;
+
 const integer NUM_MSC := 1;
 const integer NUM_BSC := 1;

@@ -35,6 +38,8 @@
var MscState msc[NUM_MSC];
var BscState bsc[NUM_BSC];

+   port TELNETasp_PT BSCNATVTY;
+
var boolean g_initialized := false;
var octetstring g_sio := '83'O;
 }
@@ -101,10 +106,31 @@
msc_st.sccp_addr_own := valueof(ts_SccpAddr_PC_SSN(opc, local_ssn));
 }

-function f_init() runs on test_CT {
+function f_vty_allow_osmux(boolean allow) runs on test_CT {
+   if (allow) {
+   f_vty_config(BSCNATVTY, "mgcp", "osmux on");
+   } else {
+   f_vty_config(BSCNATVTY, "mgcp", "osmux off");
+   }
+}
+
+function f_init_vty(charstring id := "foo") runs on test_CT {
+   if (BSCNATVTY.checkstate("Mapped")) {
+   /* skip initialization if already executed once */
+   return;
+   }
+   map(self:BSCNATVTY, system:BSCNATVTY);
+   f_vty_set_prompts(BSCNATVTY);
+   f_vty_transceive(BSCNATVTY, "enable");
+}
+
+function f_init(boolean use_osmux) runs on test_CT {
var integer i;
var charstring id;

+   f_init_vty("VirtBSCNAT");
+   f_vty_allow_osmux(use_osmux);
+
for (i := 0; i < NUM_MSC; i := i+1) {
f_init_MscState(msc[i], mp_msc_pc +i, mp_bsc_pc, mp_msc_ssn, 
mp_bsc_ssn);
id := "MSC" & int2str(i);
@@ -114,22 +140,23 @@

/* Wait for bsc_nat to attach to MSC. Before that all BSC connections 
will be dropped */
f_sleep(5.0);
+
for (i := 0; i < NUM_BSC; i := i+1) {
f_init_BscState(bsc[i], mp_bsc_pc +i, mp_msc_pc, mp_bsc_ssn, 
mp_msc_ssn);
id := "BSC" & int2str(i);
bsc[i].BSC := BSC_CT.create(id);
bsc[i].BSC.start(BSC_MS_Simulation.main(mp_nat_ip, mp_nat_port, 
mp_bsc_ip, mp_bsc_port+i,
bsc[i].sccp_pars, 
bsc[i].sccp_addr_own,
-   bsc[i].sccp_addr_peer, 
id));
+   bsc[i].sccp_addr_peer, 
use_osmux, id));
}

 }

-testcase TC_recv_dump() runs on test_CT {
+function f_TC_recv_dump(boolean use_osmux := false) runs on test_CT {
var integer i;
timer T := 30.0;

-   f_init();
+   f_init(use_osmux);

alt {
/* wait for BSC to stop. The idea is that the BSC components 
terminate first */
@@ -144,8 +171,17 @@
}
 }

+testcase TC_recv_dump() runs on test_CT {
+   f_TC_recv_dump();
+}
+
+testcase TC_recv_dump_osmux() runs on test_CT {
+   f_TC_recv_dump(true);
+}
+
 control {
execute( TC_recv_dump() );
+   execute( TC_recv_dump_osmux() );
 }

 }
diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn 
b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
index 28ff349..eb376db 100644
--- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn
+++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
@@ -54,6 +54,7 @@
decode_dtap := false,
role_ms := true,
protocol := RAN_PROTOCOL_BSSAP,
+   /* Always false. We don't want to enable Osmux 

Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive

2019-05-23 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/14131

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

Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive
..

mgcp: Handle CI and X-Osmux param name as case insensitive

RFC3435 states most text (except SDP) must be handled as case
insensitive.

Since we are no longer using strstr(msg->l2h), we need to iterate per
line and call related extract/handle function for that line.

Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to
be called too in case no matching line is found. In that case, it will
release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci().

Related: OS#4001
Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
M openbsc/tests/bsc-nat/bsc_nat_test.c
2 files changed, 66 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/14131/5
--
To view, visit https://gerrit.osmocom.org/14131
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 


Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14131 )

Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive
..


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
File openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c:

https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c@695
PS4, Line 695:  if (sscanf(str + 9, "%u", _cid) != 1) {
I would suggest to use a variable, i.e. "x_osmux_len = strlen("X-Osmux: "); and 
then use it both in the strncasecmp avbove and here.  This should be optimized 
away by a good compiler, and it avoids either repeating oneself or magic 
numbers.  Or if you want to use "9", then at least have a #define somewhere



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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Thu, 23 May 2019 13:15:55 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/14141


Change subject: BSSMAP_templates: Update templates to set Osmux fields
..

BSSMAP_templates: Update templates to set Osmux fields

After new fields (osmux osmocom extensions) were added to BSSMAP Reset
and BSSMAP AssignReq/AssignCompl in titan.ProtocolModules.BSSMAP, we
need to set them in ts_* templates, otherwise TTCN3 runtimes fails with:
"""
BSC_Tests.ttcn:143 Dynamic test case error: Performing a valueof or send
operation on a non-specific template of type 
@BSSAP_Types.BSSMAP_IE_Osmo_OsmuxSupport.
"""

Fixes: fe0c6083bd7176b8375fafc6d6399772d85a70a3
Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd
---
M library/BSSMAP_Templates.ttcn
1 file changed, 44 insertions(+), 16 deletions(-)



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

diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 02c84e2..ad314a3 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -164,47 +164,62 @@
oldToNewBSSIEs := val
 }

-template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies 
ts_BSSAP_BSSMAP := {
+template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := {
+   elementIdentifier := 'F0'O
+}
+
+private function f_enc_osmux_support(boolean osmux_enabled) return template 
BSSMAP_IE_Osmo_OsmuxSupport {
+   if (osmux_enabled) {
+   return tr_BSSMAP_IE_Osmo_OsmuxSupport;
+   }
+   return omit;
+}
+
+template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean 
osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
reset := {
messageType := '30'O,
cause := ts_BSSMAP_IE_Cause(cause),
-   a_InterfaceSelectorForReset := omit
+   a_InterfaceSelectorForReset := omit,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
 }

-template PDU_BSSAP tr_BSSMAP_Reset modifies tr_BSSAP_BSSMAP := {
+template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies 
tr_BSSAP_BSSMAP := {
pdu := {
bssmap := {
reset := {
messageType := '30'O,
cause := ?,
-   a_InterfaceSelectorForReset := *
+   a_InterfaceSelectorForReset := *,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
 }

-template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := {
+template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) 
modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
resetAck := {
messageType := '31'O,
-   a_InterfaceSelectorForReset := omit
+   a_InterfaceSelectorForReset := omit,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
 }

-template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := {
+template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies 
tr_BSSAP_BSSMAP := {
pdu := {
bssmap := {
resetAck := {
messageType := '31'O,
-   a_InterfaceSelectorForReset := *
+   a_InterfaceSelectorForReset := *,
+   osmuxSupport := 
f_enc_osmux_support(osmux_enabled)
}
}
}
@@ -443,9 +458,15 @@
codecElements := valueof(elem)
 }

+template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := {
+   elementIdentifier := 'F1'O,
+   osmuxCID := cid
+}
+
 template PDU_BSSAP
 ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
-   template BSSMAP_IE_AoIP_TransportLayerAddress aoip := 
omit)
+   template BSSMAP_IE_AoIP_TransportLayerAddress aoip := 
omit,
+   template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
 modifies ts_BSSAP_BSSMAP := {
pdu := {
bssmap := {
@@ -472,14 +493,16 @@
globalCallReference := omit,
lCLS_Configuration := omit,
lCLS_ConnectionStatusControl := omit,
-   lCLS_CorrelationNotNeeded := omit
+  

Change in openbsc[master]: mgcp: Handle CI and X-Osmux param name as case insensitive

2019-05-23 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/14131

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

Change subject: mgcp: Handle CI and X-Osmux param name as case insensitive
..

mgcp: Handle CI and X-Osmux param name as case insensitive

RFC3435 states most text (except SDP) must be handled as case
insensitive.

Since we are no longer using strstr(msg->l2h), we need to iterate per
line and call related extract/handle function for that line.

Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to
be called too in case no matching line is found. In that case, it will
release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci().

Related: OS#4001
Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
M openbsc/tests/bsc-nat/bsc_nat_test.c
2 files changed, 62 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/14131/4
--
To view, visit https://gerrit.osmocom.org/14131
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in openbsc[master]: mgcp: Handle CI ad X-Osmux param name as case insensitive

2019-05-23 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/14131

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

Change subject: mgcp: Handle CI ad X-Osmux param name as case insensitive
..

mgcp: Handle CI ad X-Osmux param name as case insensitive

RFC3435 states most text (except SDP) must be handled as case
insensitive.

Since we are no longer using strstr(msg->l2h), we need to iterate per
line and call related extract/handle function for that line.

Call to bsc_mgcp_osmux_confirm() is left at the end because it needs to
be called too in case no matching line is found. In that case, it will
release the CID. Similar stuff ocurrs for bsc_mgcp_extract_ci().

Related: OS#4001
Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
---
M openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
M openbsc/tests/bsc-nat/bsc_nat_test.c
2 files changed, 62 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/14131/3
--
To view, visit https://gerrit.osmocom.org/14131
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script)

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14139 )

Change subject: gitignore: add nightly-3g_* (nightly OBS script)
..

gitignore: add nightly-3g_* (nightly OBS script)

Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
---
M .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 00fe73d..e101b84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,6 @@
 __pycache__/
 _temp/
 _deps/
+
+# osmocom-nightly-packages.sh
+nightly-3g_*

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in openbsc[master]: tests: Mute stdout during db_prepare()

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14140 )

Change subject: tests: Mute stdout during db_prepare()
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b
Gerrit-Change-Number: 14140
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 23 May 2019 11:47:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: tests: Mute stdout during db_prepare()

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14140 )

Change subject: tests: Mute stdout during db_prepare()
..

tests: Mute stdout during db_prepare()

libdbi on debian unstable (at least)
outputs: "no table in statement !"
breaking the db_test.

Redirect stdout to /dev/null and restore
after the function completes.

Closes OS#4016

Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b
---
M openbsc/tests/db/db_test.c
1 file changed, 21 insertions(+), 1 deletion(-)

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



diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index 755a6e9..5167185 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 

 static struct gsm_network dummy_net;
 static struct gsm_subscriber_group dummy_sgrp;
@@ -208,6 +209,8 @@

dummy_net.subscr_group = _sgrp;
dummy_sgrp.net = _net;
+   int rc;
+   fpos_t pos;

if (db_init("hlr.sqlite3")) {
printf("DB: Failed to init database. Please check the option 
settings.\n");
@@ -215,10 +218,27 @@
}
printf("DB: Database initialized.\n");

-   if (db_prepare()) {
+   /* Muting stdout here because libdbi
+* may output noise on some platforms */
+
+   fflush(stdout);
+   fgetpos(stdout, );
+   int old_stdout = dup(fileno(stdout));
+   freopen("/dev/null", "w", stdout);
+
+   rc = db_prepare();
+
+   fflush(stdout);
+   dup2(old_stdout, fileno(stdout));
+   close(old_stdout);
+   clearerr(stdout);
+   fsetpos(stdout, );
+
+   if (rc) {
printf("DB: Failed to prepare database.\n");
return 1;
}
+
printf("DB: Database prepared.\n");

struct gsm_subscriber *alice = NULL;

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b
Gerrit-Change-Number: 14140
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script)

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14139 )

Change subject: gitignore: add nightly-3g_* (nightly OBS script)
..


Patch Set 2: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 11:47:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script)

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14139 )

Change subject: gitignore: add nightly-3g_* (nightly OBS script)
..


Patch Set 2: -Verified Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 11:47:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script)

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14139 )

Change subject: gitignore: add nightly-3g_* (nightly OBS script)
..


Patch Set 2: Verified+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 11:47:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/14138 )

Change subject: jobs/osmocom-obs.yml: set default git branch
..

jobs/osmocom-obs.yml: set default git branch

I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage"
instead of "master" today [1]. Fix this randomness by adding a branch
parameter that defaults to "master".

Interestingly, we have to set the default branch to
"refs/remotes/origin/master". When using "*/master" (like we do in other
jobs), Jenkins would still chose my branch over "origin/master", even
though mine does not have "master" in the name. I have also tried
"chosing-strategy: 'default'", in case it was using the gerrit strategy
for some reason (like in [2]), and setting 'refspec:', but both did not
have any effect.

[1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/
[2] https://issues.jenkins-ci.org/browse/JENKINS-26981

Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
---
M jobs/osmocom-obs.yml
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml
index 84a4710..023ab0c 100644
--- a/jobs/osmocom-obs.yml
+++ b/jobs/osmocom-obs.yml
@@ -19,11 +19,18 @@
 
 (Generated by job-builder)
 node: obs
+parameters:
+  - string:
+  name: BRANCH
+  description: osmo-ci.git branch
+  default: 'refs/remotes/origin/master'
 builders:
   - shell:
   ./scripts/osmocom-{type}-packages.sh
 scm:
   - git:
+  branches:
+- '$BRANCH'
   url: git://git.osmocom.org/osmo-ci
   git-config-name: 'Jenkins Builder'
   git-config-email: 'jenk...@osmocom.org'

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/14138 )

Change subject: jobs/osmocom-obs.yml: set default git branch
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 23 May 2019 11:45:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/14138 )

Change subject: jobs/osmocom-obs.yml: set default git branch
..


Patch Set 4: Verified+1

(1 comment)

https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml
File jobs/osmocom-obs.yml:

https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml@25
PS3, Line 25:   description: osmo-ci.git branch
> why two lines here?
Copy paste from other jenkins-job-builder configs we have. Updated to be in one 
line.



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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 23 May 2019 11:09:09 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread osmith
Hello Pau Espin Pedrol, Harald Welte,

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

https://gerrit.osmocom.org/14138

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

Change subject: jobs/osmocom-obs.yml: set default git branch
..

jobs/osmocom-obs.yml: set default git branch

I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage"
instead of "master" today [1]. Fix this randomness by adding a branch
parameter that defaults to "master".

Interestingly, we have to set the default branch to
"refs/remotes/origin/master". When using "*/master" (like we do in other
jobs), Jenkins would still chose my branch over "origin/master", even
though mine does not have "master" in the name. I have also tried
"chosing-strategy: 'default'", in case it was using the gerrit strategy
for some reason (like in [2]), and setting 'refspec:', but both did not
have any effect.

[1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/
[2] https://issues.jenkins-ci.org/browse/JENKINS-26981

Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
---
M jobs/osmocom-obs.yml
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/38/14138/4
--
To view, visit https://gerrit.osmocom.org/14138
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 4
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in openbsc[master]: mgcp: Handle CI ad X-Osmux param name as case insensitive

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14131 )

Change subject: mgcp: Handle CI ad X-Osmux param name as case insensitive
..


Patch Set 2:

Issue is fixed now, ready to review. With this patch TTCN3 bsc-nat osmux test 
runs fine.


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 10:56:18 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in openbsc[master]: mgcp: Handle CI ad X-Osmux param name as case insensitive

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14131 )

Change subject: mgcp: Handle CI ad X-Osmux param name as case insensitive
..


Set Ready For Review


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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6
Gerrit-Change-Number: 14131
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 10:55:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script)

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14139 )

Change subject: gitignore: add nightly-3g_* (nightly OBS script)
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 09:54:19 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14138 )

Change subject: jobs/osmocom-obs.yml: set default git branch
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml
File jobs/osmocom-obs.yml:

https://gerrit.osmocom.org/#/c/14138/3/jobs/osmocom-obs.yml@25
PS3, Line 25:   description: |
why two lines here?



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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 23 May 2019 09:53:22 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: sysmo: Fix "nominal power" / BS power display in VTY

2019-05-23 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/14137 )

Change subject: sysmo: Fix "nominal power" / BS power display in VTY
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If92d0b15c48dafc63776b82c7ff5f3c2b3505f68
Gerrit-Change-Number: 14137
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: roh 
Gerrit-Comment-Date: Thu, 23 May 2019 09:47:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: tests: Mute stdout during db_prepare()

2019-05-23 Thread Keith Whyte
Keith Whyte has uploaded this change for review. ( 
https://gerrit.osmocom.org/14140


Change subject: tests: Mute stdout during db_prepare()
..

tests: Mute stdout during db_prepare()

libdbi on debian unstable (at least)
outputs: "no table in statement !"
breaking the db_test.

Redirect stdout to /dev/null and restore
after the function completes.

Closes OS#4016

Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b
---
M openbsc/tests/db/db_test.c
1 file changed, 21 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/14140/1

diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index 755a6e9..5167185 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 

 static struct gsm_network dummy_net;
 static struct gsm_subscriber_group dummy_sgrp;
@@ -208,6 +209,8 @@

dummy_net.subscr_group = _sgrp;
dummy_sgrp.net = _net;
+   int rc;
+   fpos_t pos;

if (db_init("hlr.sqlite3")) {
printf("DB: Failed to init database. Please check the option 
settings.\n");
@@ -215,10 +218,27 @@
}
printf("DB: Database initialized.\n");

-   if (db_prepare()) {
+   /* Muting stdout here because libdbi
+* may output noise on some platforms */
+
+   fflush(stdout);
+   fgetpos(stdout, );
+   int old_stdout = dup(fileno(stdout));
+   freopen("/dev/null", "w", stdout);
+
+   rc = db_prepare();
+
+   fflush(stdout);
+   dup2(old_stdout, fileno(stdout));
+   close(old_stdout);
+   clearerr(stdout);
+   fsetpos(stdout, );
+
+   if (rc) {
printf("DB: Failed to prepare database.\n");
return 1;
}
+
printf("DB: Database prepared.\n");

struct gsm_subscriber *alice = NULL;

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

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8227aa8fa44d3237019db52dd0825f827797261b
Gerrit-Change-Number: 14140
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 


Build failure of network:osmocom:nightly/openbsc in Debian_Testing/x86_64

2019-05-23 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Testing/x86_64

Package network:osmocom:nightly/openbsc failed to build in Debian_Testing/x86_64

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

Last lines of build log:
[  186s] | configure: exit 0
[  186s] 
[  186s] # -*- compilation -*-
[  186s] 4. testsuite.at:23: testing db ...
[  186s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test
[  186s] --- expout 2019-05-23 07:39:56.31200 +
[  186s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 
2019-05-23 07:39:56.47600 +
[  186s] @@ -1,4 +1,6 @@
[  186s]  Testing subscriber database code.
[  186s]  DB: Database initialized.
[  186s] +no tables in statement !
[  186s] +no tables in statement !
[  186s]  DB: Database prepared.
[  186s]  Done
[  186s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28)
[  186s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1
[  186s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  186s] make: *** [debian/rules:13: build] Error 2
[  186s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  186s] 
[  186s] lamb51 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 
07:39:57 UTC 2019.
[  186s] 
[  186s] ### VM INTERACTION START ###
[  189s] [  175.182098] sysrq: SysRq : Power Off
[  190s] [  175.187045] reboot: Power down
[  190s] ### VM INTERACTION END ###
[  190s] 
[  190s] lamb51 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 
07:40:01 UTC 2019.
[  190s] 

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


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

2019-05-23 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_Unstable/x86_64

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

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

Last lines of build log:
[  191s] | configure: exit 0
[  191s] 
[  191s] # -*- compilation -*-
[  191s] 4. testsuite.at:23: testing db ...
[  191s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test
[  191s] --- expout 2019-05-23 07:39:36.04800 +
[  191s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 
2019-05-23 07:39:36.20400 +
[  191s] @@ -1,4 +1,6 @@
[  191s]  Testing subscriber database code.
[  191s]  DB: Database initialized.
[  191s] +no tables in statement !
[  191s] +no tables in statement !
[  191s]  DB: Database prepared.
[  191s]  Done
[  191s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28)
[  191s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1
[  191s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  191s] make: *** [debian/rules:13: build] Error 2
[  191s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  191s] 
[  191s] lamb24 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 
07:39:36 UTC 2019.
[  191s] 
[  191s] ### VM INTERACTION START ###
[  194s] [  179.226418] sysrq: SysRq : Power Off
[  194s] [  179.233844] reboot: Power down
[  194s] ### VM INTERACTION END ###
[  194s] 
[  194s] lamb24 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 
07:39:41 UTC 2019.
[  194s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_19.04/x86_64

2019-05-23 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_19.04/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_19.04/x86_64

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

Last lines of build log:
[  166s] | configure: exit 0
[  166s] 
[  166s] # -*- compilation -*-
[  166s] 4. testsuite.at:23: testing db ...
[  166s] ./testsuite.at:28: $abs_top_builddir/tests/db/db_test
[  166s] --- expout 2019-05-23 07:35:24.31200 +
[  166s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/4/stdout 
2019-05-23 07:35:24.46800 +
[  166s] @@ -1,4 +1,6 @@
[  166s]  Testing subscriber database code.
[  166s]  DB: Database initialized.
[  166s] +no tables in statement !
[  166s] +no tables in statement !
[  166s]  DB: Database prepared.
[  166s]  Done
[  166s] 4. testsuite.at:23: 4. db (testsuite.at:23): FAILED (testsuite.at:28)
[  166s] make[1]: *** [debian/rules:30: override_dh_auto_test] Error 1
[  166s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  166s] make: *** [debian/rules:13: build] Error 2
[  166s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  166s] 
[  166s] lamb01 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 
07:35:25 UTC 2019.
[  166s] 
[  166s] ### VM INTERACTION START ###
[  169s] [  158.075798] sysrq: SysRq : Power Off
[  169s] [  158.082209] reboot: Power down
[  170s] ### VM INTERACTION END ###
[  170s] 
[  170s] lamb01 failed "build openbsc_1.2.0.20190523.dsc" at Thu May 23 
07:35:29 UTC 2019.
[  170s] 

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


Change in osmo-ci[master]: gitignore: add nightly-3g_* (nightly OBS script)

2019-05-23 Thread osmith
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/14139 )

Change subject: gitignore: add nightly-3g_* (nightly OBS script)
..

gitignore: add nightly-3g_* (nightly OBS script)

Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
---
M .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 


Change in osmo-ci[master]: gitignore: add nightly-rg_* (nightly OBS script)

2019-05-23 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14139


Change subject: gitignore: add nightly-rg_* (nightly OBS script)
..

gitignore: add nightly-rg_* (nightly OBS script)

Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
---
M .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)



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

diff --git a/.gitignore b/.gitignore
index 00fe73d..e101b84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,6 @@
 __pycache__/
 _temp/
 _deps/
+
+# osmocom-nightly-packages.sh
+nightly-3g_*

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
Gerrit-Change-Number: 14139
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/14138 )

Change subject: jobs/osmocom-obs.yml: set default git branch
..


Patch Set 3: Verified+1

Clicking on "git" of a previous job shows all the branches it has been building 
so far, when it should have always built master instead:

https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/97/git/


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 23 May 2019 07:19:53 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/14138 )

Change subject: jobs/osmocom-obs.yml: set default git branch
..


Set Ready For Review


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 3
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 23 May 2019 07:19:10 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ci[master]: jobs/osmocom-obs.yml: set default git branch

2019-05-23 Thread osmith
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/14138


Change subject: jobs/osmocom-obs.yml: set default git branch
..

jobs/osmocom-obs.yml: set default git branch

I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage"
instead of "master" today [1]. Fix this randomness by adding a branch
parameter that defaults to "master".

[1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/

Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
---
M jobs/osmocom-obs.yml
1 file changed, 8 insertions(+), 0 deletions(-)



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

diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml
index 84a4710..5ed67b4 100644
--- a/jobs/osmocom-obs.yml
+++ b/jobs/osmocom-obs.yml
@@ -19,11 +19,19 @@
 
 (Generated by job-builder)
 node: obs
+parameters:
+  - string:
+  name: BRANCH
+  description: |
+osmo-ci.git branch
+  default: '*/master'
 builders:
   - shell:
   ./scripts/osmocom-{type}-packages.sh
 scm:
   - git:
+  branches:
+- '$BRANCH'
   url: git://git.osmocom.org/osmo-ci
   git-config-name: 'Jenkins Builder'
   git-config-email: 'jenk...@osmocom.org'

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Gerrit-Change-Number: 14138
Gerrit-PatchSet: 1
Gerrit-Owner: osmith