[PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m...

2017-12-18 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5381

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

iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC

Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than
one LAC per OsmoHNBGW.

iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page
successfully in a setup with multiple LACs (read: multiple hNodeB) connected to
an OsmoHNBGW.

Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC
shows up on a different RNC Id than before, move it over to the new RNC Id.

Future patches should probably add:

* timeouts of RNC Id / LAC,RAC validity, to remove unused entries.
* VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed.
* VTY/CTRL commands to remove RNC Id / LAC,RAC entries.

Change-Id: I189f8e2663353276b1c615d2f78455dafe568045
---
M src/iu_client.c
1 file changed, 127 insertions(+), 82 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/4

diff --git a/src/iu_client.c b/src/iu_client.c
index 3ee900c..0724220 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -47,6 +47,15 @@
uint16_t rnc_id;
 };
 
+struct iu_lac_rac_entry {
+   struct llist_head entry;
+
+   /* LAC: Location Area Code (for CS and PS) */
+   uint16_t lac;
+   /* RAC: Routing Area Code (for PS only) */
+   uint8_t rac;
+};
+
 /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has
  * called us and is currently reachable at the given osmo_sccp_addr. So, when 
we
  * know a LAC for a subscriber, we can page it at the RNC matching that LAC or
@@ -58,9 +67,10 @@
struct llist_head entry;
 
uint16_t rnc_id;
-   uint16_t lac; /* Location Area Code (used for CS and PS) */
-   uint8_t rac; /* Routing Area Code (used for PS only) */
struct osmo_sccp_addr sccp_addr;
+
+   /* A list of struct iu_lac_rac_entry */
+   struct llist_head lac_rac_list;
 };
 
 void *talloc_iu_ctx;
@@ -81,6 +91,9 @@
 
 #define LOGPIU(level, fmt, args...) \
LOGP(iu_log_subsystem, level, fmt, ## args)
+
+#define LOGPIUC(level, fmt, args...) \
+   LOGPC(iu_log_subsystem, level, fmt, ## args)
 
 static LLIST_HEAD(ue_conn_ctx_list);
 static LLIST_HEAD(rnc_list);
@@ -119,53 +132,109 @@
return NULL;
 }
 
-static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, 
uint8_t rac,
-struct osmo_sccp_addr *addr)
+static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct 
osmo_sccp_addr *addr)
 {
struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct 
ranap_iu_rnc);
+   OSMO_ASSERT(rnc);
+
+   INIT_LLIST_HEAD(>lac_rac_list);
 
rnc->rnc_id = rnc_id;
-   rnc->lac = lac;
-   rnc->rac = rac;
rnc->sccp_addr = *addr;
llist_add(>entry, _list);
 
-   LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n",
-  rnc->rnc_id, rnc->lac, rnc->rac);
+   LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, 
osmo_sccp_addr_dump(addr));
 
return rnc;
+}
+
+/* Find a match for the given LAC (and RAC). For CS, pass rac as 0.
+ * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no 
match is found, or to the
+ * match if a match is found.  Return true if a match is found. */
+static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct 
iu_lac_rac_entry **lre,
+   uint16_t lac, uint8_t rac)
+{
+   struct ranap_iu_rnc *r;
+   struct iu_lac_rac_entry *e;
+
+   if (rnc)
+   *rnc = NULL;
+   if (lre)
+   *lre = NULL;
+
+   llist_for_each_entry(r, _list, entry) {
+   llist_for_each_entry(e, >lac_rac_list, entry) {
+   if (e->lac == lac && e->rac == rac) {
+   if (rnc)
+   *rnc = r;
+   if (lre)
+   *lre = e;
+   return true;
+   }
+   }
+   }
+   return false;
+}
+
+static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id)
+{
+   struct ranap_iu_rnc *rnc;
+   llist_for_each_entry(rnc, _list, entry) {
+   if (rnc->rnc_id == rnc_id)
+   return rnc;
+   }
+   return NULL;
+}
+
+static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b)
+{
+   char buf[256];
+   osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf));
+   return !strcmp(buf, osmo_sccp_addr_dump(b));
 }
 
 static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac,
uint8_t rac, struct osmo_sccp_addr 
*addr)
 {
struct ranap_iu_rnc *rnc;
-   llist_for_each_entry(rnc, _list, entry) {
-   if (rnc->rnc_id != 

[PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m...

2017-12-18 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5381

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

iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC

Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than
one LAC per OsmoHNBGW.

iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page
successfully in a setup with multiple LACs (read: multiple hNodeB) connected to
an OsmoHNBGW.

Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC
shows up on a different RNC Id than before, move it over to the new RNC Id.

Future patches should probably add:

* timeouts of RNC Id / LAC,RAC validity, to remove unused entries.
* VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed.
* VTY/CTRL commands to remove RNC Id / LAC,RAC entries.

Change-Id: I189f8e2663353276b1c615d2f78455dafe568045
---
M src/iu_client.c
1 file changed, 127 insertions(+), 81 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/3

diff --git a/src/iu_client.c b/src/iu_client.c
index 3ee900c..25914cb 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -47,6 +47,15 @@
uint16_t rnc_id;
 };
 
+struct iu_lac_rac_entry {
+   struct llist_head entry;
+
+   /* LAC: Location Area Code (for CS and PS) */
+   uint16_t lac;
+   /* RAC: Routing Area Code (for PS only) */
+   uint8_t rac;
+};
+
 /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has
  * called us and is currently reachable at the given osmo_sccp_addr. So, when 
we
  * know a LAC for a subscriber, we can page it at the RNC matching that LAC or
@@ -58,9 +67,10 @@
struct llist_head entry;
 
uint16_t rnc_id;
-   uint16_t lac; /* Location Area Code (used for CS and PS) */
-   uint8_t rac; /* Routing Area Code (used for PS only) */
struct osmo_sccp_addr sccp_addr;
+
+   /* A list of struct iu_lac_rac_entry */
+   struct llist_head lac_rac_list;
 };
 
 void *talloc_iu_ctx;
@@ -81,6 +91,9 @@
 
 #define LOGPIU(level, fmt, args...) \
LOGP(iu_log_subsystem, level, fmt, ## args)
+
+#define LOGPIUC(level, fmt, args...) \
+   LOGPC(iu_log_subsystem, level, fmt, ## args)
 
 static LLIST_HEAD(ue_conn_ctx_list);
 static LLIST_HEAD(rnc_list);
@@ -119,53 +132,109 @@
return NULL;
 }
 
-static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, 
uint8_t rac,
-struct osmo_sccp_addr *addr)
+static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct 
osmo_sccp_addr *addr)
 {
struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct 
ranap_iu_rnc);
+   OSMO_ASSERT(rnc);
+
+   INIT_LLIST_HEAD(>lac_rac_list);
 
rnc->rnc_id = rnc_id;
-   rnc->lac = lac;
-   rnc->rac = rac;
rnc->sccp_addr = *addr;
llist_add(>entry, _list);
 
-   LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n",
-  rnc->rnc_id, rnc->lac, rnc->rac);
+   LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, 
osmo_sccp_addr_dump(addr));
 
return rnc;
+}
+
+/* Find a match for the given LAC (and RAC). For CS, pass rac as 0.
+ * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no 
match is found, or to the
+ * match if a match is found.  Return true if a match is found. */
+static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct 
iu_lac_rac_entry **lre,
+   uint16_t lac, uint8_t rac)
+{
+   struct ranap_iu_rnc *r;
+   struct iu_lac_rac_entry *e;
+
+   if (rnc)
+   *rnc = NULL;
+   if (lre)
+   *lre = NULL;
+
+   llist_for_each_entry(r, _list, entry) {
+   llist_for_each_entry(e, >lac_rac_list, entry) {
+   if (e->lac == lac && e->rac == rac) {
+   if (rnc)
+   *rnc = r;
+   if (lre)
+   *lre = e;
+   return true;
+   }
+   }
+   }
+   return false;
+}
+
+static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id)
+{
+   struct ranap_iu_rnc *rnc;
+   llist_for_each_entry(rnc, _list, entry) {
+   if (rnc->rnc_id == rnc_id)
+   return rnc;
+   }
+   return NULL;
+}
+
+static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b)
+{
+   char buf[256];
+   osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf));
+   return !strcmp(buf, osmo_sccp_addr_dump(b));
 }
 
 static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac,
uint8_t rac, struct osmo_sccp_addr 
*addr)
 {
struct ranap_iu_rnc *rnc;
-   llist_for_each_entry(rnc, _list, entry) {
-   if (rnc->rnc_id != 

osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m...

2017-12-18 Thread Neels Hofmeyr

Patch Set 2: Code-Review-2

I still need to test this, will remove my -2 when done. Feel free to review in 
the meantime

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

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


[PATCH] osmo-iuh[master]: iu client: store multiple LAC, RAC per RNC = fix paging for m...

2017-12-18 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5381

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

iu client: store multiple LAC,RAC per RNC = fix paging for multiple RNC

Introduce a list of LAC+RAC entries for each RNC, hence allow serving more than
one LAC per OsmoHNBGW.

iu_client is used by OsmoMSC and OsmoSGSN, both will be able to page
successfully in a setup with multiple LACs (read: multiple hNodeB) connected to
an OsmoHNBGW.

Ensure that each LAC,RAC is registered with at most one RNC Id. If a LAC,RAC
shows up on a different RNC Id than before, move it over to the new RNC Id.

Future patches should probably add:

* timeouts of RNC Id / LAC,RAC validity, to remove unused entries.
* VTY/CTRL commands to introspect which RNCs and LAC,RACs are listed.
* VTY/CTRL commands to remove RNC Id / LAC,RAC entries.

Change-Id: I189f8e2663353276b1c615d2f78455dafe568045
---
M src/iu_client.c
1 file changed, 127 insertions(+), 81 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/81/5381/2

diff --git a/src/iu_client.c b/src/iu_client.c
index 3ee900c..0f19181 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -47,6 +47,15 @@
uint16_t rnc_id;
 };
 
+struct iu_lac_rac_entry {
+   struct llist_head entry;
+
+   /* LAC: Location Area Code (for CS and PS) */
+   uint16_t lac;
+   /* RAC: Routing Area Code (for PS only) */
+   uint8_t rac;
+};
+
 /* A remote RNC (Radio Network Controller, like BSC but for UMTS) that has
  * called us and is currently reachable at the given osmo_sccp_addr. So, when 
we
  * know a LAC for a subscriber, we can page it at the RNC matching that LAC or
@@ -58,9 +67,10 @@
struct llist_head entry;
 
uint16_t rnc_id;
-   uint16_t lac; /* Location Area Code (used for CS and PS) */
-   uint8_t rac; /* Routing Area Code (used for PS only) */
struct osmo_sccp_addr sccp_addr;
+
+   /* A list of struct iu_lac_rac_entry */
+   struct llist_head lac_rac_list;
 };
 
 void *talloc_iu_ctx;
@@ -81,6 +91,9 @@
 
 #define LOGPIU(level, fmt, args...) \
LOGP(iu_log_subsystem, level, fmt, ## args)
+
+#define LOGPIUC(level, fmt, args...) \
+   LOGPC(iu_log_subsystem, level, fmt, ## args)
 
 static LLIST_HEAD(ue_conn_ctx_list);
 static LLIST_HEAD(rnc_list);
@@ -119,53 +132,109 @@
return NULL;
 }
 
-static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, uint16_t lac, 
uint8_t rac,
-struct osmo_sccp_addr *addr)
+static struct ranap_iu_rnc *iu_rnc_alloc(uint16_t rnc_id, struct 
osmo_sccp_addr *addr)
 {
struct ranap_iu_rnc *rnc = talloc_zero(talloc_iu_ctx, struct 
ranap_iu_rnc);
+   OSMO_ASSERT(rnc);
+
+   INIT_LLIST_HEAD(>lac_rac_list);
 
rnc->rnc_id = rnc_id;
-   rnc->lac = lac;
-   rnc->rac = rac;
rnc->sccp_addr = *addr;
llist_add(>entry, _list);
 
-   LOGPIU(LOGL_NOTICE, "New RNC %d (LAC=%d RAC=%d)\n",
-  rnc->rnc_id, rnc->lac, rnc->rac);
+   LOGPIU(LOGL_NOTICE, "New RNC %d at %s\n", rnc->rnc_id, 
osmo_sccp_addr_dump(addr));
 
return rnc;
+}
+
+/* Find a match for the given LAC (and RAC). For CS, pass rac as 0.
+ * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no 
match is found, or to the
+ * match if a match is found.  Return true if a match is found. */
+static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct 
iu_lac_rac_entry **lre,
+   uint16_t lac, uint8_t rac)
+{
+   struct ranap_iu_rnc *r;
+   struct iu_lac_rac_entry *e;
+
+   if (rnc)
+   *rnc = NULL;
+   if (lre)
+   *lre = NULL;
+
+   llist_for_each_entry(r, _list, entry) {
+   llist_for_each_entry(e, >lac_rac_list, entry) {
+   if (e->lac == lac && e->rac == rac) {
+   if (rnc)
+   *rnc = r;
+   if (lre)
+   *lre = e;
+   return true;
+   }
+   }
+   }
+   return false;
+}
+
+static struct ranap_iu_rnc *iu_rnc_id_find(uint16_t rnc_id)
+{
+   struct ranap_iu_rnc *rnc;
+   llist_for_each_entry(rnc, _list, entry) {
+   if (rnc->rnc_id == rnc_id)
+   return rnc;
+   }
+   return NULL;
+}
+
+static bool same_sccp_addr(struct osmo_sccp_addr *a, struct osmo_sccp_addr *b)
+{
+   char buf[256];
+   osmo_strlcpy(buf, osmo_sccp_addr_dump(a), sizeof(buf));
+   return !strcmp(buf, osmo_sccp_addr_dump(b));
 }
 
 static struct ranap_iu_rnc *iu_rnc_register(uint16_t rnc_id, uint16_t lac,
uint8_t rac, struct osmo_sccp_addr 
*addr)
 {
struct ranap_iu_rnc *rnc;
-   llist_for_each_entry(rnc, _list, entry) {
-   if (rnc->rnc_id != 

[PATCH] osmo-iuh[master]: fix 3 compiler warnings in ranap_common.c

2017-12-18 Thread Neels Hofmeyr

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

fix 3 compiler warnings in ranap_common.c

ranap_common.c:282 col 45: warning: format ‘%u’ expects argument of type 
‘unsigned int’, but argument 4 has type ‘RANAP_CauseNon_Standard_t {aka const 
long int}’ [-Wformat=]
ranap_common.c:527 col 15: warning: implicit declaration of function 
‘asn1str_to_u16’; did you mean ‘asn_strtol’? [-Wimplicit-function-declaration]
ranap_common.c:546 col 11: warning: unused variable ‘addr’ [-Wunused-variable]

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


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/89/5489/1

diff --git a/src/ranap_common.c b/src/ranap_common.c
index 13c913f..46203e0 100644
--- a/src/ranap_common.c
+++ b/src/ranap_common.c
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 
 
 extern int asn1_xer_print;
 int _ranap_DRANAP = 0;
@@ -278,7 +279,7 @@
cause->choice.misc));
break;
case RANAP_Cause_PR_non_Standard:
-   snprintf(buf, sizeof(buf), "non-standard(%u)",
+   snprintf(buf, sizeof(buf), "non-standard(%ld)",
cause->choice.non_Standard);
break;
default:
@@ -542,7 +543,6 @@
 
 int ranap_ip_from_transp_layer_addr(const BIT_STRING_t *in, uint32_t *ip)
 {
-   uint32_t addr;
uint8_t x213[] = {0x35, 0x00, 0x01};
 
/* Only support IPv4 for now - plain and with x213 encapsulation */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b399e78fa7b202a36e5e4be86f338c0ceb9823e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


libosmocore[master]: jenkins: add 'make V=1' for more verbose build logs

2017-12-18 Thread Neels Hofmeyr

Patch Set 5:

there's a rationale now; By now I don't care much about this, will abandon in a 
few days if nothing happens

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

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


[ABANDON] osmo-gsm-tester[master]: msc cfg: apply mgcp_client vty rename from 'mgcpgw' to 'mgw'

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: msc cfg: apply mgcp_client vty rename from 'mgcpgw' to 'mgw'
..


Abandoned

this already seems to be merged from another patch

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Idd970917e84f923d229b0c3de43f3e964a0a20c2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-gsm-tester[master]: cosmetic: use name 'mgw' instead of 'mgcpgw'

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: cosmetic: use name 'mgw' instead of 'mgcpgw'
..


Abandoned

the code has moved forward and it is too much effort to fix the merge conflicts

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: Icf65bd1daa52b280d73e56b6267b3c81ed1c5487
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[ABANDON] osmo-msc[master]: db: wrap dbi querying to log actual SQL on debug and error

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: db: wrap dbi querying to log actual SQL on debug and error
..


Abandoned

I don't want to spend time on this, maybe I'll come back to it when the next 
SQL error happens

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

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


[PATCH] libosmocore[master]: cosmetic: logging: simplify logging level VTY cmd doc compos...

2017-12-18 Thread Neels Hofmeyr

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

cosmetic: logging: simplify logging level VTY cmd doc composition

In log_vty_command_description(), which composes a VTY command doc string, use
talloc_asprintf_append() to compose the doc string instead of the strangely
convoluted way the function worked before this patch.

Looking at LOGGING_STR, I came across this function and "by accident" started
to refactor it, to understand what it is doing. I considered dropping the patch
but since it is already here I might as well submit it.

Change-Id: Ib818e2d524c750f07bea2aa585011f40e3ee82e8
---
M src/logging.c
1 file changed, 15 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/88/5488/1

diff --git a/src/logging.c b/src/logging.c
index 20ec443..8e65208 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -904,59 +904,34 @@
 {
struct log_info *info = osmo_log_info;
char *str;
-   int i, ret, len = 0, offset = 0, rem;
-   unsigned int size =
-   strlen(LOGGING_STR
-  "Set the log level for a specified category\n") + 1;
+   int i;
 
assert_loginfo();
 
-   for (i = 0; i < info->num_cat; i++) {
-   if (info->cat[i].name == NULL)
-   continue;
-   size += strlen(info->cat[i].description) + 1;
-   }
-
-   for (i = 0; i < LOGLEVEL_DEFS; i++)
-   size += strlen(loglevel_descriptions[i]) + 1;
-
-   size += strlen("Global setting for all subsystems") + 1;
-   rem = size;
-   str = talloc_zero_size(tall_log_ctx, size);
+   str = talloc_zero_size(tall_log_ctx, 4096);
if (!str)
return NULL;
 
-   ret = snprintf(str + offset, rem, LOGGING_STR
-   "Set the log level for a specified category\n");
-   if (ret < 0)
-   goto err;
-   OSMO_SNPRINTF_RET(ret, rem, offset, len);
+#define SPRINTF(fmt, args...) \
+   do {\
+   str = talloc_asprintf_append(str, fmt, ## args); \
+   if (!str) \
+   return NULL; \
+   } while(0)
 
-   ret = snprintf(str + offset, rem,
-   "Global setting for all subsystems\n");
-   if (ret < 0)
-   goto err;
-   OSMO_SNPRINTF_RET(ret, rem, offset, len);
+   SPRINTF(LOGGING_STR "Set the log level for a specified category\n");
+   SPRINTF("Global setting for all subsystems\n");
 
for (i = 0; i < info->num_cat; i++) {
if (info->cat[i].name == NULL)
continue;
-   ret = snprintf(str + offset, rem, "%s\n",
-   info->cat[i].description);
-   if (ret < 0)
-   goto err;
-   OSMO_SNPRINTF_RET(ret, rem, offset, len);
+   SPRINTF("%s\n", info->cat[i].description);
}
-   for (i = 0; i < LOGLEVEL_DEFS; i++) {
-   ret = snprintf(str + offset, rem, "%s\n",
-   loglevel_descriptions[i]);
-   if (ret < 0)
-   goto err;
-   OSMO_SNPRINTF_RET(ret, rem, offset, len);
-   }
-err:
-   str[size-1] = '\0';
+   for (i = 0; i < LOGLEVEL_DEFS; i++)
+   SPRINTF("%s\n", loglevel_descriptions[i]);
+
return str;
+#undef SPRINTF
 }
 
 /*! Initialize the Osmocom logging core

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib818e2d524c750f07bea2aa585011f40e3ee82e8
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[ABANDON] osmo-bsc[master]: HO prep: introduce per-BTS handover config, with defaults on...

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: HO prep: introduce per-BTS handover config, with defaults on 
net node
..


Abandoned

I'll abandon this for now until the HO branch is ready

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I00870a5828703cf397776668d3301c0c3a4e033a
Gerrit-PatchSet: 7
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[ABANDON] python/osmo-python-tests[master]: Revert "Add osmo_ipa.py to setup's install"

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change.

Change subject: Revert "Add osmo_ipa.py to setup's install"
..


Abandoned

merged as part of I30cdf0f85b2a60a235960911c9827f4129da40db

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I20d6374fa62e71bc6de7cddad21362a2dee0f4d4
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging

2017-12-18 Thread Neels Hofmeyr

Patch Set 3:

> > are we sure there's no GSM timer number/name for this?
 > 
 > not sure. I can try to have a look...

So far all "Paging" chapters I have found talk merely of initiating a Paging; 
closest match would be the 48.008 "3.1.10 Paging", which doesn't mention any 
timeouts. The T3113 timer is mentioned for the RR layer in 44.018 "3.3.2.1 
Paging initiation by the network", but I'm looking at the MSC, i.e. BSSMAP and 
IuCS. I feel like I'm searching the needle in the hay stack.

On another note, I personally find "paging timeout" much easier to understand 
than "T1234"...

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

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


libosmocore[master]: ctrl: tighten CTRL input parsing

2017-12-18 Thread Max

Patch Set 5: -Code-Review

It does improve situation but I still think it's better to be paranoid about 
string parsing even if ATM we explicitly null-terminate it.

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

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


osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging

2017-12-18 Thread Neels Hofmeyr

Patch Set 3:

> are we sure there's no GSM timer number/name for this?

not sure. I can try to have a look...

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

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


libosmocore[master]: ctrl: tighten CTRL input parsing

2017-12-18 Thread Neels Hofmeyr

Patch Set 5:

IMO Max's comments do not hold.

However, this patch *does* make CTRL input parsing stricter and, I don't know 
of any, but this might break sloppy CTRL interface clients. E.g. trailing 
spaces or characters after a GET   lead to a parsing error; before, we 
ignored any data following the cmds.

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

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


[MERGED] osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va...

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: a_iface_bssap: compiler warning: cast const away from TLV val 
for l2h
..


a_iface_bssap: compiler warning: cast const away from TLV val for l2h

Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a
---
M src/libmsc/a_iface_bssap.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 922dca9..8a1e39b 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -325,7 +325,7 @@
 
/* Parse Layer 3 Information element */
/* FIXME: This is probably to hackish, compiler also complains 
"assignment discards ‘const’ qualifier..." */
-   msg->l3h = TLVP_VAL(, GSM0808_IE_LAYER_3_INFORMATION);
+   msg->l3h = (uint8_t*)TLVP_VAL(, GSM0808_IE_LAYER_3_INFORMATION);
msg->tail = msg->l3h + TLVP_LEN(, GSM0808_IE_LAYER_3_INFORMATION);
 
/* Create new subscriber context */
@@ -421,7 +421,7 @@
}
 
if (TLVP_PRESENT(, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS)) {
-   msg->l3h = TLVP_VAL(, GSM0808_IE_LAYER_3_MESSAGE_CONTENTS);
+   msg->l3h = (uint8_t*)TLVP_VAL(, 
GSM0808_IE_LAYER_3_MESSAGE_CONTENTS);
msg->tail = msg->l3h + TLVP_LEN(, 
GSM0808_IE_LAYER_3_MESSAGE_CONTENTS);
} else {
msgb_free(msg);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-msc[master]: compiler warning: extend #if 0 to include unused array

2017-12-18 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: compiler warning: extend #if 0 to include unused array
..


compiler warning: extend #if 0 to include unused array

Change-Id: I5157d6c6d0aab469011ea648369f8e743e2cb085
---
M src/libmsc/silent_call.c
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c
index b9a8ed9..a99f218 100644
--- a/src/libmsc/silent_call.c
+++ b/src/libmsc/silent_call.c
@@ -85,7 +85,6 @@
LOGP(DLSMS, LOGL_NOTICE, "Discarding L3 message from a silent call.\n");
return 0;
 }
-#endif
 
 struct msg_match {
uint8_t pdisc;
@@ -98,7 +97,6 @@
{ GSM48_PDISC_MM, GSM48_MT_MM_CM_SERV_REQ },
 };
 
-#if 0
 /* decide if we need to reroute a message as part of a silent call */
 int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb 
*msg)
 {

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

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


[MERGED] libosmocore[master]: ctrl_test: add two more current parsing bugs to prep for fix

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl_test: add two more current parsing bugs to prep for fix
..


ctrl_test: add two more current parsing bugs to prep for fix

Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7
---
M tests/ctrl/ctrl_test.c
M tests/ctrl/ctrl_test.ok
2 files changed, 34 insertions(+), 0 deletions(-)

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



diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index e25929c..b1d4f23 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -154,6 +154,22 @@
"ERROR 1 Command not found",
 
},
+   { "GET 1 var\ti\table",
+   {
+   .type = CTRL_TYPE_GET,
+   .id = "1",
+   .variable = "var\ti\table", /* current bug */
+   },
+   "ERROR 1 Command not found",
+   },
+   { "GET 1 var\ri\rable",
+   {
+   .type = CTRL_TYPE_GET,
+   .id = "1",
+   .variable = "var\ri\rable", /* current bug */
+   },
+   "ERROR 1 Command not found",
+   },
{ "GET 1 variable value",
{
.type = CTRL_TYPE_GET,
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index 210c599..4a3a169 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -34,6 +34,24 @@
 handling:
 replied: 'ERROR 1 Command not found'
 ok
+test: 'GET 1 var\ti\table'
+parsing:
+id = '1'
+variable = 'var\ti\table'
+value = '(null)'
+reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
+ok
+test: 'GET 1 var\ri\rable'
+parsing:
+id = '1'
+variable = 'var\ri\rable'
+value = '(null)'
+reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
+ok
 test: 'GET 1 variable value'
 parsing:
 id = '1'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] libosmocore[master]: utils: add osmo_escape_str()

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: utils: add osmo_escape_str()
..


utils: add osmo_escape_str()

To report invalid characters in identifiers, it is desirable to escape any
weird characters. Otherwise we might print stray newlines or control characters
in the log output.

ctrl_test.c already uses a print_escaped() function, which will be replaced by
osmo_escape_str() in a subsequent patch.

control_cmd.c will use osmo_escape_str() to log invalid identifiers.

Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a
---
M include/osmocom/core/utils.h
M src/utils.c
M tests/utils/utils_test.c
M tests/utils/utils_test.ok
4 files changed, 167 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index 0973b4c..72266ae 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -120,4 +120,7 @@
 bool osmo_identifier_valid(const char *str);
 bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars);
 
+const char *osmo_escape_str(const char *str, int len);
+const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize);
+
 /*! @} */
diff --git a/src/utils.c b/src/utils.c
index 6cc823e..109aac0 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -467,4 +467,91 @@
return osmo_separated_identifiers_valid(str, NULL);
 }
 
+/*! Return the string with all non-printable characters escaped.
+ * \param[in] str  A string that may contain any characters.
+ * \param[in] len  Pass -1 to print until nul char, or >= 0 to force a length.
+ * \param[inout] buf  string buffer to write escaped characters to.
+ * \param[in] bufsize  size of \a buf.
+ * \returns buf containing an escaped representation, possibly truncated, or 
str itself.
+ */
+const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t 
bufsize)
+{
+   int in_pos = 0;
+   int next_unprintable = 0;
+   int out_pos = 0;
+   char *out = buf;
+   /* -1 to leave space for a final \0 */
+   int out_len = bufsize-1;
+
+   if (!str)
+   return "(null)";
+
+   if (in_len < 0)
+   in_len = strlen(str);
+
+   while (in_pos < in_len) {
+   for (next_unprintable = in_pos;
+next_unprintable < in_len && 
isprint((int)str[next_unprintable])
+&& str[next_unprintable] != '"'
+&& str[next_unprintable] != '\\';
+next_unprintable++);
+
+   if (next_unprintable == in_len
+   && in_pos == 0)
+   return str;
+
+   while (in_pos < next_unprintable && out_pos < out_len)
+   out[out_pos++] = str[in_pos++];
+
+   if (out_pos == out_len || in_pos == in_len)
+   goto done;
+
+   switch (str[next_unprintable]) {
+#define BACKSLASH_CASE(c, repr) \
+   case c: \
+   if (out_pos > out_len-2) \
+   goto done; \
+   out[out_pos++] = '\\'; \
+   out[out_pos++] = repr; \
+   break
+
+   BACKSLASH_CASE('\n', 'n');
+   BACKSLASH_CASE('\r', 'r');
+   BACKSLASH_CASE('\t', 't');
+   BACKSLASH_CASE('\0', '0');
+   BACKSLASH_CASE('\a', 'a');
+   BACKSLASH_CASE('\b', 'b');
+   BACKSLASH_CASE('\v', 'v');
+   BACKSLASH_CASE('\f', 'f');
+   BACKSLASH_CASE('\\', '\\');
+   BACKSLASH_CASE('"', '"');
+#undef BACKSLASH_CASE
+
+   default:
+   out_pos += snprintf([out_pos], out_len - out_pos, 
"\\%u", (unsigned char)str[in_pos]);
+   if (out_pos > out_len) {
+   out_pos = out_len;
+   goto done;
+   }
+   break;
+   }
+   in_pos ++;
+   }
+
+done:
+   out[out_pos] = '\0';
+   return out;
+}
+
+/*! Return the string with all non-printable characters escaped.
+ * Call osmo_escape_str_buf() with a static buffer.
+ * \param[in] str  A string that may contain any characters.
+ * \param[in] len  Pass -1 to print until nul char, or >= 0 to force a length.
+ * \returns buf containing an escaped representation, possibly truncated, or 
str itself.
+ */
+const char *osmo_escape_str(const char *str, int in_len)
+{
+   return osmo_escape_str_buf(str, in_len, namebuf, sizeof(namebuf));
+}
+
 /*! @} */
diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c
index e6d7ae8..b4f7cd3 100644
--- a/tests/utils/utils_test.c
+++ b/tests/utils/utils_test.c
@@ -323,6 +323,53 @@
}
 }
 
+static void 

[MERGED] libosmocore[master]: ctrl: on parse errors, return a detailed message to sender

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl: on parse errors, return a detailed message to sender
..


ctrl: on parse errors, return a detailed message to sender

The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages
upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send
those back to the CTRL command sender as reply.

Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2()
should return NULL, which shouldn't actually happen at all.

Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d
---
M src/ctrl/control_if.c
M tests/ctrl/ctrl_test.c
2 files changed, 25 insertions(+), 13 deletions(-)

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



diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 5c73b63..17a012a 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -381,14 +381,10 @@
 
msg->l2h = iph_ext->data;
 
-   cmd = ctrl_cmd_parse(ccon, msg);
+   cmd = ctrl_cmd_parse2(ccon, msg);
 
-   if (cmd) {
-   cmd->ccon = ccon;
-   if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) 
{
-   ctrl_cmd_send(>write_queue, cmd);
-   }
-   } else {
+   if (!cmd) {
+   /* should never happen */
cmd = talloc_zero(ccon, struct ctrl_cmd);
if (!cmd)
return -ENOMEM;
@@ -396,10 +392,23 @@
cmd->type = CTRL_TYPE_ERROR;
cmd->id = "err";
cmd->reply = "Command parser error.";
-   ctrl_cmd_send(>write_queue, cmd);
}
 
-   talloc_free(cmd);
+   if (cmd->type != CTRL_TYPE_ERROR) {
+   cmd->ccon = ccon;
+   if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) == CTRL_CMD_HANDLED) 
{
+   /* On CTRL_CMD_HANDLED, no reply needs to be sent back. 
*/
+   talloc_free(cmd);
+   cmd = NULL;
+   }
+   }
+
+   if (cmd) {
+   /* There is a reply or error that should be reported back to 
the sender. */
+   ctrl_cmd_send(>write_queue, cmd);
+   talloc_free(cmd);
+   }
+
return 0;
 }
 
@@ -894,13 +903,16 @@
osmo_strlcpy((char *)msg->data, cmdstr, msgb_tailroom(msg));
msgb_put(msg, strlen(cmdstr));
 
-   cmd = ctrl_cmd_parse(ch, msg);
+   cmd = ctrl_cmd_parse2(ch, msg);
msgb_free(msg);
if (!cmd)
return NULL;
-   if (ctrl_cmd_handle(ch, cmd, NULL) < 0) {
+   if (cmd->type == CTRL_TYPE_ERROR)
+   return cmd;
+   if (ctrl_cmd_handle(ch, cmd, NULL) == CTRL_CMD_HANDLED) {
+   /* No reply should be sent back. */
talloc_free(cmd);
-   return NULL;
+   cmd = NULL;
}
return cmd;
 }
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index b1d4f23..39ec61a 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -76,7 +76,7 @@
printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1));
printf("parsing:\n");
 
-   cmd = ctrl_cmd_parse(ctx, msg);
+   cmd = ctrl_cmd_parse2(ctx, msg);
OSMO_ASSERT(cmd);
 
OSMO_ASSERT(t->expect_parsed.type == cmd->type);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] libosmocore[master]: add ctrl_cmd_parse2() to return parsing errors

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: add ctrl_cmd_parse2() to return parsing errors
..


add ctrl_cmd_parse2() to return parsing errors

If a control command fails to parse, we so far discard specific error messages
and instead send just "Command parser error".

In ctrl_cmd_parse() we actually compose detailed error replies, but in the end
simply talloc_free() them and return NULL.

A first step to report these errors to the ctrl command issuer is to not return
NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add
ctrl_cmd_parse2() to return such instead of NULL.

To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors.
ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper
around ctrl_cmd_parse2() which discards the cmd on error.

No need really to deprecate ctrl_cmd_parse() yet; especially as long as
compiler warnings might break jenkins builds.

Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880
---
M include/osmocom/ctrl/control_cmd.h
M src/ctrl/control_cmd.c
2 files changed, 17 insertions(+), 2 deletions(-)

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



diff --git a/include/osmocom/ctrl/control_cmd.h 
b/include/osmocom/ctrl/control_cmd.h
index 4372e25..865b006 100644
--- a/include/osmocom/ctrl/control_cmd.h
+++ b/include/osmocom/ctrl/control_cmd.h
@@ -103,6 +103,7 @@
 int ctrl_cmd_install(enum ctrl_node_type node, struct ctrl_cmd_element *cmd);
 int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd);
 int ctrl_cmd_send_to_all(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd);
+struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg);
 struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg);
 struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd);
 struct ctrl_cmd *ctrl_cmd_cpy(void *ctx, struct ctrl_cmd *cmd);
diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index f616479..c2ce2be 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -269,7 +269,22 @@
return NULL;
 }
 
+/*! Parse CTRL command struct from msgb, return NULL on any error.
+ * The caller is responsible to talloc_free() the returned struct pointer. */
 struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg)
+{
+   struct ctrl_cmd *res = ctrl_cmd_parse2(ctx, msg);
+   if (res->type == CTRL_TYPE_ERROR) {
+   talloc_free(res);
+   return NULL;
+   }
+   return res;
+}
+
+/*! Parse CTRL command struct from msgb, return ctrl->type == CTRL_TYPE_ERROR 
and an error message in
+ * ctrl->reply on any error.
+ * The caller is responsible to talloc_free() the returned struct pointer. */
+struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg)
 {
char *str, *tmp, *saveptr = NULL;
char *var, *val;
@@ -382,8 +397,7 @@
cmd->id = "err";
cmd->reply = "OOM";
 err:
-   talloc_free(cmd);
-   return NULL;
+   return cmd;
 }
 
 struct msgb *ctrl_cmd_make(struct ctrl_cmd *cmd)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY
..


ctrl: fix mem leak when handling GET_REPLY and SET_REPLY

In ctrl_handle_msg() (code recently propagated from handle_control_read()),
talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was
missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED.

CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by
ctrl_test.c. With the memleak fixed, adjust expected test output and make a
detected mem leak abort the test immediately.

Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381
---
M src/ctrl/control_if.c
M tests/ctrl/ctrl_test.c
M tests/ctrl/ctrl_test.ok
3 files changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 7c1d81a..5c73b63 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -387,7 +387,6 @@
cmd->ccon = ccon;
if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) 
{
ctrl_cmd_send(>write_queue, cmd);
-   talloc_free(cmd);
}
} else {
cmd = talloc_zero(ccon, struct ctrl_cmd);
@@ -398,9 +397,9 @@
cmd->id = "err";
cmd->reply = "Command parser error.";
ctrl_cmd_send(>write_queue, cmd);
-   talloc_free(cmd);
}
 
+   talloc_free(cmd);
return 0;
 }
 
diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index 9c7316f..e25929c 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -120,9 +120,8 @@
 
if (talloc_total_size(ctx) != ctx_size_was) {
printf("mem leak!\n");
-   // hide mem leak to be fixed in subsequent patch
-   //talloc_report_full(ctx, stdout);
-   //OSMO_ASSERT(false);
+   talloc_report_full(ctx, stdout);
+   OSMO_ASSERT(false);
}
 
printf("ok\n");
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index 9ddcfdb..210c599 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -167,7 +167,6 @@
 value = '(null)'
 reply = 'OK'
 handling:
-mem leak!
 ok
 test: 'SET_REPLY 1 variable OK'
 parsing:
@@ -176,5 +175,4 @@
 value = '(null)'
 reply = 'OK'
 handling:
-mem leak!
 ok

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[MERGED] libosmocore[master]: ctrl_test.c: replace print_escaped() with new osmo_escape_str()

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl_test.c: replace print_escaped() with new osmo_escape_str()
..


ctrl_test.c: replace print_escaped() with new osmo_escape_str()

Change-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b
---
M tests/ctrl/ctrl_test.c
M tests/ctrl/ctrl_test.ok
2 files changed, 28 insertions(+), 60 deletions(-)

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



diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index b8425c7..2bc3128 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -37,45 +37,15 @@
 
 static void *ctx = NULL;
 
-void print_escaped(const char *str)
-{
-   if (!str) {
-   printf("NULL");
-   return;
-   }
-
-   printf("'");
-   for (;*str; str++) {
-   switch (*str) {
-   case '\n':
-   printf("\\n");
-   break;
-   case '\r':
-   printf("\\r");
-   break;
-   case '\t':
-   printf("\\t");
-   break;
-   default:
-   printf("%c", *str);
-   break;
-   }
-   }
-   printf("'");
-}
-
 void assert_same_str(const char *label, const char *expect, const char *got)
 {
if ((expect == got) || (expect && got && (strcmp(expect, got) == 0))) {
-   printf("%s = ", label);
-   print_escaped(got);
-   printf("\n");
+   printf("%s = '%s'\n", label, osmo_escape_str(got, -1));
return;
}
 
-   printf("MISMATCH for '%s':\ngot:  ", label); print_escaped(got);
-   printf("\nexpected: "); print_escaped(expect);
-   printf("\n");
+   printf("MISMATCH for '%s':\ngot:  %s\n", label, 
osmo_escape_str(got, -1));
+   printf("expected: %s\n", osmo_escape_str(expect, -1));
OSMO_ASSERT(expect == got);
 }
 
@@ -84,9 +54,7 @@
struct ctrl_cmd *cmd;
struct msgb *msg = msgb_from_string(str);
 
-   printf("test parsing: ");
-   print_escaped(str);
-   printf("\n");
+   printf("test parsing: '%s'\n", osmo_escape_str(str, -1));
 
cmd = ctrl_cmd_parse(ctx, msg);
OSMO_ASSERT(cmd);
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index 9c8877b..5775eb2 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -10,102 +10,102 @@
 test parsing: 'GET 1 variable'
 id = '1'
 variable = 'variable'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'GET 1 variable\n'
 id = '1'
 variable = 'variable\n'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'GET 1 var\ni\nable'
 id = '1'
 variable = 'var\ni\nable'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'GET 1 variable value'
 id = '1'
 variable = 'variable'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'GET 1 variable value\n'
 id = '1'
 variable = 'variable'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'GET 1 variable multiple value tokens'
 id = '1'
 variable = 'variable'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'GET 1 variable multiple value tokens\n'
 id = '1'
 variable = 'variable'
-value = NULL
-reply = NULL
+value = '(null)'
+reply = '(null)'
 ok
 test parsing: 'SET 1 variable value'
 id = '1'
 variable = 'variable'
 value = 'value'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET 1 variable value\n'
 id = '1'
 variable = 'variable'
 value = 'value'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET weird_id variable value'
 id = 'weird_id'
 variable = 'variable'
 value = 'value'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET weird_id variable value\n'
 id = 'weird_id'
 variable = 'variable'
 value = 'value'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET 1 variable multiple value tokens'
 id = '1'
 variable = 'variable'
 value = 'multiple value tokens'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET 1 variable multiple value tokens\n'
 id = '1'
 variable = 'variable'
 value = 'multiple value tokens'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET 1 variable value_with_trailing_spaces  '
 id = '1'
 variable = 'variable'
 value = 'value_with_trailing_spaces  '
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET 1 variable value_with_trailing_spaces  \n'
 id = '1'
 variable = 'variable'
 value = 'value_with_trailing_spaces  '
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET \n special_char_id value'
 id = '\n'
 variable = 'special_char_id'
 value = 'value'
-reply = NULL
+reply = '(null)'
 ok
 test parsing: 'SET \t special_char_id value'
 id = '\t'
 variable = 

[MERGED] libosmocore[master]: ctrl_test: show memleak when receiving GET_REPLY and SET_REP...

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY 
commands
..


ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands

The "memleak!" output shows messages that lack a talloc_free() of the parsed
ctrl command buffer. The leak shall be fixed in a subsequent patch.

Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042
---
M tests/ctrl/ctrl_test.c
M tests/ctrl/ctrl_test.ok
2 files changed, 40 insertions(+), 2 deletions(-)

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



diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index b3fa05e..9c7316f 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -120,8 +120,9 @@
 
if (talloc_total_size(ctx) != ctx_size_was) {
printf("mem leak!\n");
-   talloc_report_full(ctx, stdout);
-   OSMO_ASSERT(false);
+   // hide mem leak to be fixed in subsequent patch
+   //talloc_report_full(ctx, stdout);
+   //OSMO_ASSERT(false);
}
 
printf("ok\n");
@@ -294,6 +295,25 @@
"ERROR \t Command not found",
 
},
+   { "GET_REPLY 1 variable OK",
+   {
+   .type = CTRL_TYPE_GET_REPLY,
+   .id = "1",
+   .variable = "variable",
+   .reply = "OK",
+   },
+   .reply_str = NULL,
+   },
+   { "SET_REPLY 1 variable OK",
+   {
+   .type = CTRL_TYPE_SET_REPLY,
+   .id = "1",
+   .variable = "variable",
+   .reply = "OK",
+   },
+   .reply_str = NULL,
+   },
+
 };
 
 static void test_messages()
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index edf97ea..9ddcfdb 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -160,3 +160,21 @@
 handling:
 replied: 'ERROR \t Command not found'
 ok
+test: 'GET_REPLY 1 variable OK'
+parsing:
+id = '1'
+variable = 'variable'
+value = '(null)'
+reply = 'OK'
+handling:
+mem leak!
+ok
+test: 'SET_REPLY 1 variable OK'
+parsing:
+id = '1'
+variable = 'variable'
+value = '(null)'
+reply = 'OK'
+handling:
+mem leak!
+ok

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] libosmocore[master]: ctrl: prep test: separate new ctrl_handle_msg() from handle_...

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl: prep test: separate new ctrl_handle_msg() from 
handle_control_read()
..


ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read()

In order to allow unit testing the ctrl iface msgb handling, have a separate
msgb entry point function from the actual fd read function.

An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test
that needs this separation.

Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3
---
M include/osmocom/ctrl/control_if.h
M src/ctrl/control_if.c
2 files changed, 28 insertions(+), 17 deletions(-)

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



diff --git a/include/osmocom/ctrl/control_if.h 
b/include/osmocom/ctrl/control_if.h
index d444328..5fa9588 100644
--- a/include/osmocom/ctrl/control_if.h
+++ b/include/osmocom/ctrl/control_if.h
@@ -43,3 +43,5 @@
 struct ctrl_cmd *ctrl_cmd_exec_from_string(struct ctrl_handle *ch, const char 
*cmdstr);
 
 int ctrl_lookup_register(ctrl_cmd_lookup lookup);
+
+int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, 
struct msgb *msg);
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 015c55e..7c1d81a 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -326,10 +326,7 @@
int ret = -1;
struct osmo_wqueue *queue;
struct ctrl_connection *ccon;
-   struct ipaccess_head *iph;
-   struct ipaccess_head_ext *iph_ext;
struct msgb *msg = NULL;
-   struct ctrl_cmd *cmd;
struct ctrl_handle *ctrl = bfd->data;
 
queue = container_of(bfd, struct osmo_wqueue, bfd);
@@ -338,30 +335,48 @@
ret = ipa_msg_recv_buffered(bfd->fd, , >pending_msg);
if (ret <= 0) {
if (ret == -EAGAIN)
+   /* received part of a message, it is stored in 
ccon->pending_msg and there's
+* nothing left to do now. */
return 0;
-   if (ret == 0)
+   /* msg was already discarded. */
+   if (ret == 0) {
LOGP(DLCTRL, LOGL_INFO, "The control connection was 
closed\n");
+   ret = -EIO;
+   }
else
LOGP(DLCTRL, LOGL_ERROR, "Failed to parse ip access 
message: %d\n", ret);
 
-   goto err;
+   return ret;
}
+
+   ret = ctrl_handle_msg(ctrl, ccon, msg);
+   msgb_free(msg);
+   if (ret)
+   control_close_conn(ccon);
+   return ret;
+}
+
+int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, 
struct msgb *msg)
+{
+   struct ctrl_cmd *cmd;
+   struct ipaccess_head *iph;
+   struct ipaccess_head_ext *iph_ext;
 
if (msg->len < sizeof(*iph) + sizeof(*iph_ext)) {
LOGP(DLCTRL, LOGL_ERROR, "The message is too short.\n");
-   goto err;
+   return -EINVAL;
}
 
iph = (struct ipaccess_head *) msg->data;
if (iph->proto != IPAC_PROTO_OSMO) {
LOGP(DLCTRL, LOGL_ERROR, "Protocol mismatch. We got 0x%x\n", 
iph->proto);
-   goto err;
+   return -EINVAL;
}
 
iph_ext = (struct ipaccess_head_ext *) iph->data;
if (iph_ext->proto != IPAC_PROTO_EXT_CTRL) {
LOGP(DLCTRL, LOGL_ERROR, "Extended protocol mismatch. We got 
0x%x\n", iph_ext->proto);
-   goto err;
+   return -EINVAL;
}
 
msg->l2h = iph_ext->data;
@@ -371,28 +386,22 @@
if (cmd) {
cmd->ccon = ccon;
if (ctrl_cmd_handle(ctrl, cmd, ctrl->data) != CTRL_CMD_HANDLED) 
{
-   ctrl_cmd_send(queue, cmd);
+   ctrl_cmd_send(>write_queue, cmd);
talloc_free(cmd);
}
} else {
cmd = talloc_zero(ccon, struct ctrl_cmd);
if (!cmd)
-   goto err;
+   return -ENOMEM;
LOGP(DLCTRL, LOGL_ERROR, "Command parser error.\n");
cmd->type = CTRL_TYPE_ERROR;
cmd->id = "err";
cmd->reply = "Command parser error.";
-   ctrl_cmd_send(queue, cmd);
+   ctrl_cmd_send(>write_queue, cmd);
talloc_free(cmd);
}
 
-   msgb_free(msg);
return 0;
-
-err:
-   control_close_conn(ccon);
-   msgb_free(msg);
-   return ret;
 }
 
 static int control_write_cb(struct osmo_fd *bfd, struct msgb *msg)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master

[MERGED] libosmocore[master]: ctrl_test: expand to test message handling and detect mem leaks

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: ctrl_test: expand to test message handling and detect mem leaks
..


ctrl_test: expand to test message handling and detect mem leaks

Subsequent patches that tighten CTRL input validation will make the results
more interesting.

Change-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f
---
M tests/ctrl/ctrl_test.c
M tests/ctrl/ctrl_test.ok
2 files changed, 197 insertions(+), 57 deletions(-)

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



diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index 2bc3128..b3fa05e 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -9,6 +9,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 static void check_type(enum ctrl_type c)
 {
@@ -24,18 +26,34 @@
 
 struct msgb *msgb_from_string(const char *str)
 {
-   char *rc;
+   struct ipaccess_head *iph;
+   struct ipaccess_head_ext *ipx;
+   char *str_msg;
size_t len = strlen(str) + 1;
-   /* ctrl_cmd_parse() appends a '\0' to the msgb, allow one more byte. */
-   struct msgb *msg = msgb_alloc(len + 1, str);
-   msg->l2h = msg->head;
-   rc = (char*)msgb_put(msg, len);
-   OSMO_ASSERT(rc == (char*)msg->l2h);
-   strcpy(rc, str);
+
+   struct msgb *msg = msgb_alloc(1024, str);
+
+   iph = (void*)msgb_put(msg, sizeof(*iph));
+   iph->proto = IPAC_PROTO_OSMO;
+
+   ipx = (void*)msgb_put(msg, sizeof(*ipx));
+   ipx->proto = IPAC_PROTO_EXT_CTRL;
+
+   str_msg = (char*)msgb_put(msg, len);
+   msg->l2h = (void*)str_msg;
+   osmo_strlcpy(str_msg, str, len);
+
+   iph->len = msgb_length(msg);
return msg;
 }
 
 static void *ctx = NULL;
+
+struct one_test {
+   const char *cmd_str;
+   struct ctrl_cmd expect_parsed;
+   const char *reply_str;
+};
 
 void assert_same_str(const char *label, const char *expect, const char *got)
 {
@@ -49,20 +67,22 @@
OSMO_ASSERT(expect == got);
 }
 
-static void assert_parsing(const char *str, const struct ctrl_cmd *expect)
+static void assert_test(struct ctrl_handle *ctrl, struct ctrl_connection 
*ccon, const struct one_test *t)
 {
struct ctrl_cmd *cmd;
-   struct msgb *msg = msgb_from_string(str);
+   struct msgb *msg = msgb_from_string(t->cmd_str);
+   int ctx_size_was;
 
-   printf("test parsing: '%s'\n", osmo_escape_str(str, -1));
+   printf("test: '%s'\n", osmo_escape_str(t->cmd_str, -1));
+   printf("parsing:\n");
 
cmd = ctrl_cmd_parse(ctx, msg);
OSMO_ASSERT(cmd);
 
-   OSMO_ASSERT(expect->type == cmd->type);
+   OSMO_ASSERT(t->expect_parsed.type == cmd->type);
 
 #define ASSERT_SAME_STR(field) \
-   assert_same_str(#field, expect->field, cmd->field)
+   assert_same_str(#field, t->expect_parsed.field, cmd->field)
 
ASSERT_SAME_STR(id);
ASSERT_SAME_STR(variable);
@@ -72,35 +92,67 @@
talloc_free(cmd);
msgb_free(msg);
 
+   printf("handling:\n");
+
+   ctx_size_was = talloc_total_size(ctx);
+
+   msg = msgb_from_string(t->cmd_str);
+   ctrl_handle_msg(ctrl, ccon, msg);
+
+   if (llist_empty(>write_queue.msg_queue)) {
+   if (t->reply_str) {
+   printf("Got no reply, but expected \"%s\"\n", 
osmo_escape_str(t->reply_str, -1));
+   OSMO_ASSERT(!t->reply_str);
+   }
+   } else {
+   struct msgb *sent_msg = 
msgb_dequeue(>write_queue.msg_queue);
+   OSMO_ASSERT(sent_msg);
+   msgb_put_u8(sent_msg, 0);
+
+   printf("replied: '%s'\n", 
osmo_escape_str((char*)msgb_l2(sent_msg), -1));
+   OSMO_ASSERT(t->reply_str);
+   OSMO_ASSERT(!strcmp(t->reply_str, (char*)msgb_l2(sent_msg)))
+   msgb_free(sent_msg);
+   }
+   osmo_wqueue_clear(>write_queue);
+
+   msgb_free(msg);
+
+   if (talloc_total_size(ctx) != ctx_size_was) {
+   printf("mem leak!\n");
+   talloc_report_full(ctx, stdout);
+   OSMO_ASSERT(false);
+   }
+
printf("ok\n");
 }
 
-struct one_parsing_test {
-   const char *cmd_str;
-   struct ctrl_cmd expect;
-};
-
-static const struct one_parsing_test test_parsing_list[] = {
+static const struct one_test test_messages_list[] = {
{ "GET 1 variable",
{
.type = CTRL_TYPE_GET,
.id = "1",
.variable = "variable",
-   }
+   },
+   "ERROR 1 Command not found",
},
{ "GET 1 variable\n",
{
.type = CTRL_TYPE_GET,
.id = "1",
.variable = "variable\n", /* current bug */
-   }
+   },
+   "ERROR 1 Command 

[MERGED] libosmocore[master]: add osmo_auth_c3() (separate from gsm_milenage())

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: add osmo_auth_c3() (separate from gsm_milenage())
..


add osmo_auth_c3() (separate from gsm_milenage())

To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA
tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES.
For SRES, it requires an OPC, which may need to be derived from OP first. All
we need is a Kc, so we could feed a zero OPC ...  but to simplify the function
call for cases where just a Kc is required, separate the c3 function out from
gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from
gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover
exactly that implementation).

Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc)
Related: OS#2745
Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa
---
M include/osmocom/crypt/auth.h
M src/gsm/auth_core.c
M src/gsm/libosmogsm.map
M src/gsm/milenage/milenage.c
4 files changed, 18 insertions(+), 3 deletions(-)

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



diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h
index 4dbc6a4..e544126 100644
--- a/include/osmocom/crypt/auth.h
+++ b/include/osmocom/crypt/auth.h
@@ -105,4 +105,6 @@
 const char *osmo_auth_alg_name(enum osmo_auth_algo alg);
 enum osmo_auth_algo osmo_auth_alg_parse(const char *name);
 
+void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[]);
+
 /* @} */
diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c
index 400708f..f171ed4 100644
--- a/src/gsm/auth_core.c
+++ b/src/gsm/auth_core.c
@@ -236,4 +236,17 @@
{ 0, NULL }
 };
 
+/* Derive GSM AKA ciphering key Kc from UMTS AKA CK and IK (auth function c3 
from 3GPP TS 33.103 §
+ * 4.6.1).
+ * \param[out] kc  GSM AKA Kc, 8 byte target buffer.
+ * \param[in] ck  UMTS AKA CK, 16 byte input buffer.
+ * \param[in] ik  UMTS AKA IK, 16 byte input buffer.
+ */
+void osmo_auth_c3(uint8_t kc[], const uint8_t ck[], const uint8_t ik[])
+{
+   int i;
+   for (i = 0; i < 8; i++)
+   kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8];
+}
+
 /*! @} */
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 6e6638a..d915234 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -340,6 +340,7 @@
 osmo_auth_load;
 osmo_auth_register;
 osmo_auth_supported;
+osmo_auth_c3;
 osmo_sub_auth_type_names;
 
 osmo_rsl2sitype;
diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c
index 7cf3312..3c14ab9 100644
--- a/src/gsm/milenage/milenage.c
+++ b/src/gsm/milenage/milenage.c
@@ -29,7 +29,7 @@
 #include "common.h"
 #include "aes_wrap.h"
 #include "milenage.h"
-
+#include 
 
 /**
  * milenage_f1 - Milenage f1 and f1* algorithms
@@ -249,8 +249,7 @@
if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL))
return -1;
 
-   for (i = 0; i < 8; i++)
-   kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8];
+   osmo_auth_c3(kc, ck, ik);
 
 #ifdef GSM_MILENAGE_ALT_SRES
os_memcpy(sres, res, 4);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


libosmocore[master]: add osmo_auth_c3() (separate from gsm_milenage())

2017-12-18 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


libosmocore[master]: ctrl_test: show memleak when receiving GET_REPLY and SET_REP...

2017-12-18 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


libosmocore[master]: ctrl: fix mem leak when handling GET_REPLY and SET_REPLY

2017-12-18 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


libosmocore[master]: ctrl_test: expand to test message handling and detect mem leaks

2017-12-18 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


libosmocore[master]: ctrl: prep test: separate new ctrl_handle_msg() from handle_...

2017-12-18 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-msc[master]: compiler warning: extend #if 0 to include unused array

2017-12-18 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP

2017-12-18 Thread Harald Welte

Patch Set 5: Code-Review+2

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

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


osmo-msc[master]: cosmetic: rename sccp_rx_udt and sccp_rx_dt to a_*

2017-12-18 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va...

2017-12-18 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: utils: add osmo_escape_str()

2017-12-18 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


libosmocore[master]: ctrl_test.c: replace print_escaped() with new osmo_escape_str()

2017-12-18 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


meta-telephony[201705]: osmo-sgsn: no longer depend on libpcap

2017-12-18 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I284c16c1f7abd3b24525b824baca357576f16675
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: drop unused T* timers (BSC land, not MSC)

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: drop unused T* timers (BSC land, not MSC)
..


drop unused T* timers (BSC land, not MSC)

Change-Id: If27899c90b7c79f25cd5fd5e2429cb3012d69744
---
M include/osmocom/msc/gsm_data.h
1 file changed, 0 insertions(+), 25 deletions(-)

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



diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 696cef1..6349fe0 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -344,18 +344,6 @@
GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
 };
 
-#define GSM_T3101_DEFAULT 10   /* s */
-#define GSM_T3103_DEFAULT 5/* s */
-#define GSM_T3105_DEFAULT 100  /* ms */
-#define GSM_T3107_DEFAULT 5/* s */
-#define GSM_T3109_DEFAULT 19   /* s, must be 2s + radio_link_timeout*0.48 */
-#define GSM_T3111_DEFAULT 2/* s */
-#define GSM_T3113_DEFAULT 60
-#define GSM_T3115_DEFAULT 10
-#define GSM_T3117_DEFAULT 10
-#define GSM_T3119_DEFAULT 10
-#define GSM_T3122_DEFAULT 10
-#define GSM_T3141_DEFAULT 10
 
 struct gsm_tz {
int override; /* if 0, use system's time zone instead. */
@@ -420,19 +408,6 @@
unsigned int num_bts;
struct llist_head bts_list;
 
-   /* timer values */
-   int T3101;
-   int T3103;
-   int T3105;
-   int T3107;
-   int T3109;
-   int T3111;
-   int T3113;
-   int T3115;
-   int T3117;
-   int T3119;
-   int T3122;
-   int T3141;
 
/* timer to expire old location updates */
struct osmo_timer_list subscr_expire_timer;

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

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


osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging

2017-12-18 Thread Harald Welte

Patch Set 3:

are we sure there's no GSM timer number/name for this?

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

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


[MERGED] osmo-msc[master]: cosmetic: msc_paging_request: drop obsolete comment

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: msc_paging_request: drop obsolete comment
..


cosmetic: msc_paging_request: drop obsolete comment

Change-Id: Icb5b7dbbca3ca0db3d80a4b693c57c6d67fd823e
---
M src/libmsc/gsm_subscriber.c
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c
index 8bc060f..a013e0e 100644
--- a/src/libmsc/gsm_subscriber.c
+++ b/src/libmsc/gsm_subscriber.c
@@ -109,8 +109,6 @@
/* The subscriber was last seen in subscr->lac. Find out which
 * BSCs/RNCs are responsible and send them a paging request via open
 * SCCP connections (if any). */
-   /* TODO Implementing only RNC paging, since this is code on the iu 
branch.
-* Need to add BSC paging at some point. */
switch (vsub->cs.attached_via_ran) {
case RAN_GERAN_A:
return a_iface_tx_paging(vsub->imsi, vsub->tmsi, vsub->lac);

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

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


osmo-msc[master]: fix: properly cancel all Paging on IMSI Detach

2017-12-18 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


python/osmo-python-tests[master]: Add rate counter dumper

2017-12-18 Thread Harald Welte

Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2
Gerrit-PatchSet: 5
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-pcu[master]: Fix tests after rate_ctr change

2017-12-18 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-pcu[master]: Fix tests after rate_ctr change

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Fix tests after rate_ctr change
..


Fix tests after rate_ctr change

Recent change lin libosmocore disallow registering rate_ctr with the
same name and indexing multiple times. To accommodate to this check if
rate counters arealready allocated (by static allocator of BTS singleton
for example) and register rate counter with different index.

This fixes the tests for now but eventually we'll remove the BTS singleton
which will allow us to remove this hack.

Change-Id: I7c552ce653b44ec3a31049641728926adc07361d
Related: OS#2757
---
M src/bts.cpp
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/src/bts.cpp b/src/bts.cpp
index 341c9d4..e17399a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -218,8 +218,16 @@
}
}
 
-   m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 0);
+   /* The static allocator might have already registered the counter group.
+  If this happens and we still called explicitly (in tests/* for 
example)
+  than just allocate the group with different index.
+  This shall be removed once weget rid of BTS singleton */
+   if (rate_ctr_get_group_by_name_idx(bts_ctrg_desc.group_name_prefix, 0))
+   m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 
1);
+   else
+   m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 
0);
OSMO_ASSERT(m_ratectrs);
+
m_statg = osmo_stat_item_group_alloc(tall_pcu_ctx, _statg_desc, 0);
OSMO_ASSERT(m_statg);
 }

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

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/armv7l

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

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

Last lines of build log:
[  340s] # -*- compilation -*-
[  340s] 1. testsuite.at:4: testing gsm0408 ...
[  340s] ./testsuite.at:7: $abs_top_builddir/tests/gsm0408/gsm0408_test
[  340s] stderr:
[  340s] range=511, arfcns_used=11, f0=1, f0_included=1
[  340s] range=511, arfcns_used=16, f0=1, f0_included=1
[  340s] range=511, arfcns_used=17, f0=1, f0_included=1
[  340s] range=511, arfcns_used=17, f0=1, f0_included=1
[  340s] range=511, arfcns_used=5, f0=1, f0_included=1
[  340s] range=511, arfcns_used=5, f0=10, f0_included=1
[  340s] range=1023, arfcns_used=16, f0=0, f0_included=1
[  340s] range=1023, arfcns_used=16, f0=0, f0_included=0
[  340s] <0021> rate_ctr.c:195 counter group 'bsc' already exists for index 0
[  340s] --- expout2017-12-18 22:20:25.20830 +
[  340s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/1/stdout 
2017-12-18 22:20:26.48834 +
[  340s] @@ -66,146 +66,3 @@
[  340s]  generating SI2quater for 0 EARFCNs and 2 UARFCNs...
[  340s]  generated valid SI2quater [00/00]: [23] 59 06 07 40 00 25 52 88 0a 7f 
52 e8 0a 7e 0b 2b 2b 2b 2b 2b 2b 2b 2b 
[  340s]  Testing SYSINFO_TYPE_2quater EARFCN generation:
[  340s] -generating SI2quater for 0 EARFCNs and 0 UARFCNs...
[  340s] -generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  340s] -added EARFCN 1917 - generating SI2quater for 1 EARFCNs and 0 
UARFCNs...
[  341s] -generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be 
e8 50 0b 2/var/run/obs/worker/3/build/build-vm: line 428: warning: command 
substitution: ignored null byte in input
[  342s] [  285.931061] SysRq : Power Off
[  342s] [  285.932593] reboot: Power down
[  343s] ### VM INTERACTION END ###
[  344s] 
[  344s] armbuild17 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
22:20:32 UTC 2017.
[  344s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l

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

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

Last lines of build log:
[  429s] -generating SI2quater for 17 EARFCNs and 2 UARFCNs...
[  429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 14 4d 
e7 00 44 b3 07 82 41 e0 8e 5d 95 83 2b 
[  429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c2 
6c 1e 0f 60 f0 bb 08 3f d7 2e ca c1 2b 
[  429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 20 
64 21 06 e1 08 55 08 53 d7 2e ca c1 2b 
[  429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 2a 
64 21 56 e1 0a d5 08 49 d7 2e ca c1 2b 
[  429s] -generated valid SI2quater [04/04]: [23] 59 06 07 48 80 04 86 59 84 25 
64 21 2e e1 09 94 e5 d9 58 2b 2b 2b 2b 
[  429s] -generating SI2quater for 17 EARFCNs and 3 UARFCNs...
[  429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 1c 4d 
e7 03 04 86 59 83 c1 20 f0 47 2e ca c1 
[  429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c2 
6c 1e 0f 60 f0 bb 08 3f d7 2e ca c1 2b 
[  429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 20 
64 21 06 e1 08 55 08 53 d7 2e ca c1 2b 
[  429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 2a 
64 21 56 e1 0a d5 08 49 d7 2e ca c1 2b 
[  429s] -generated valid SI2quater [04/04]: [23] 59 06 07 48 80 04 86 59 84 25 
64 21 2e e1 09 94 e5 d9 58 2b 2b 2b 2b 
[  429s] -generating SI2quater for 17 EARFCNs and 4 UARFCNs...
[  429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 24 59 
fa 26 73 84 86 59 83 c1 1c bb 2b 03 2b 
[  429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c1 
20 f0 9b 07 83 d8 3c 2e b9 76 56 0b 2b 
[  429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 1f 
ec 21 03 21 08 37 08 42 a7 2e ca c1 2b 
[  429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 29 
ec 21 53 21 0a b7 08 56 a7 2e ca c1 2b 
[  429s] -generated valid SI2quater [04/04]: [23] 59 06 07 48 80 04 86 59 84 24 
ec 21 2b 21 09 77 08 4c a7 2e ca c1 2b 
[  429s] -generating SI2quater for 17 EARFCNs and 5 UARFCNs...
[  429s] -generated valid SI2quater [00/04]: [23] 59 06 07 40 80 25 0f 70 2c 59 
fa 30 73 f6 04 86 59 83 c1 1c bb 2b 03 
[  429s] -generated valid SI2quater [01/04]: [23] 59 06 07 42 80 04 86 59 83 c1 
20 f0 9b 07 83 d8 3c 2e b9 76 56 0b 2b 
[  429s] -generated valid SI2quater [02/04]: [23] 59 06 07 44 80 04 86 59 84 1f 
ec 21 03 21 08 37 08 42 a7 2e ca c1 2b 
[  429s] -generated valid SI2quater [03/04]: [23] 59 06 07 46 80 04 86 59 84 29 
ec 21 53 21 0a b7 08 56 a7 2e ca c1 2b 
[  431s] -generated valid SI2quater [0[  373.850028] SysRq : Power Off
[  431s] [  373.851364] reboot: Power down
[  431s] ### VM INTERACTION END ###
[  431s] 
[  431s] armbuild18 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
22:07:31 UTC 2017.
[  431s] 

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


[MERGED] osmo-pcu[master]: Remove unused includes and forward declarations

2017-12-18 Thread Max
Max has submitted this change and it was merged.

Change subject: Remove unused includes and forward declarations
..


Remove unused includes and forward declarations

Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
---
M src/gprs_bssgp_pcu.cpp
M src/gprs_debug.cpp
M src/gprs_debug.h
M src/gprs_ms.h
M src/gprs_rlcmac.cpp
M src/gprs_rlcmac.h
M src/llc.cpp
M src/llc.h
M src/rlc.cpp
M src/rlc.h
M src/sba.h
M src/tbf.h
12 files changed, 0 insertions(+), 24 deletions(-)

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



diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 7b78e2f..a86e09d 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #define BSSGP_TIMER_T1 30  /* Guards the (un)blocking procedures */
 #define BSSGP_TIMER_T2 30  /* Guards the reset procedure */
diff --git a/src/gprs_debug.cpp b/src/gprs_debug.cpp
index c35eafa..283962f 100644
--- a/src/gprs_debug.cpp
+++ b/src/gprs_debug.cpp
@@ -16,16 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
- 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/src/gprs_debug.h b/src/gprs_debug.h
index 863d76b..747465b 100644
--- a/src/gprs_debug.h
+++ b/src/gprs_debug.h
@@ -19,11 +19,9 @@
 
 #pragma once
 
-#include 
 #ifdef __cplusplus
 extern "C" {
 #endif
-#include 
 #include 
 #ifdef __cplusplus
 };
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 72a86c9..f094e96 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -20,9 +20,6 @@
 
 #pragma once
 
-struct gprs_rlcmac_tbf;
-struct gprs_rlcmac_dl_tbf;
-struct gprs_rlcmac_ul_tbf;
 struct gprs_codel;
 
 #include "cxx_linuxlist.h"
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index 16870c3..06c5479 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -19,7 +19,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
  
-#include 
 #include 
 #include 
 #include 
diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h
index be1e686..aa773fc 100644
--- a/src/gprs_rlcmac.h
+++ b/src/gprs_rlcmac.h
@@ -41,7 +41,6 @@
 
 struct gprs_rlcmac_tbf;
 struct gprs_rlcmac_bts;
-struct BTS;
 struct GprsMs;
 
 #ifdef __cplusplus
diff --git a/src/llc.cpp b/src/llc.cpp
index 79afc37..b155063 100644
--- a/src/llc.cpp
+++ b/src/llc.cpp
@@ -19,7 +19,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-#include 
 #include 
 
 #include 
diff --git a/src/llc.h b/src/llc.h
index 4883624..9d402c3 100644
--- a/src/llc.h
+++ b/src/llc.h
@@ -29,7 +29,6 @@
 #define LLC_MAX_LEN 1543
 
 struct BTS;
-struct timeval;
 struct msgb;
 
 /**
diff --git a/src/rlc.cpp b/src/rlc.cpp
index c52417d..37e83cd 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -16,7 +16,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-#include "tbf.h"
 #include "bts.h"
 #include "gprs_debug.h"
 
diff --git a/src/rlc.h b/src/rlc.h
index 14d2082..b62e3ac 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -36,7 +36,6 @@
 #define RLC_MAX_LEN 74 /* MCS-9 data unit */
 
 struct BTS;
-struct gprs_rlc_v_n;
 
 /* The state of a BSN in the send/receive window */
 enum gprs_rlc_ul_bsn_state {
diff --git a/src/sba.h b/src/sba.h
index 9047f1a..d2d3106 100644
--- a/src/sba.h
+++ b/src/sba.h
@@ -28,7 +28,6 @@
 
 struct BTS;
 class PollController;
-struct gprs_rlcmac_sba;
 struct gprs_rlcmac_pdch;
 
 /*
diff --git a/src/tbf.h b/src/tbf.h
index 518bd9b..9a1b4c7 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -32,8 +32,6 @@
 }
 
 struct bssgp_bvc_ctx;
-struct rlc_ul_header;
-struct msgb;
 struct pcu_l1_meas;
 class GprsMs;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 


osmo-pcu[master]: Remove unused includes and forward declarations

2017-12-18 Thread Max

Patch Set 1:

I've used (iwyu) include-what-you-use but unfortunatelyit seems to works with 
c++ only and gives plenty of false positives. Nevertheless, better than nothing.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64

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

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

Last lines of build log:
[ 1311s] | configure:14186: checking for SQLITE3
[ 1311s] | configure:14193: $PKG_CONFIG --exists --print-errors "sqlite3"
[ 1311s] | Package sqlite3 was not found in the pkg-config search path.
[ 1311s] | Perhaps you should add the directory containing `sqlite3.pc'
[ 1311s] | to the PKG_CONFIG_PATH environment variable
[ 1311s] | No package 'sqlite3' found
[ 1311s] | configure:14196: $? = 1
[ 1311s] | configure:14210: $PKG_CONFIG --exists --print-errors "sqlite3"
[ 1311s] | Package sqlite3 was not found in the pkg-config search path.
[ 1311s] | Perhaps you should add the directory containing `sqlite3.pc'
[ 1311s] | to the PKG_CONFIG_PATH environment variable
[ 1311s] | No package 'sqlite3' found
[ 1311s] | configure:14213: $? = 1
[ 1311s] | configure:14227: result: no
[ 1311s] | No package 'sqlite3' found
[ 1311s] | configure:14270: checking if gcc supports -fvisibility=hidden
[ 1311s] | configure:14276: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -fvisibility=hidden  -Wdate-time -D_FORTIFY_SOURCE=2 
conftest.c >&5
[ 1311s] | configure:14276: $? = 0
[ 1311s] | configure:14277: result: yes
[ 1311s] | configure:14288: checking whether C compiler accepts -Werror=implicit
[ 1311s] | configure:14307: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security  -Werror=implicit -Wdate-time -D_FORTIFY_SOURCE=2 
conftest.c >&5
[ 1311s] | configure:14307: $? = 0
[ 1311s] | configure:14315: result: yes
[ 1313s] | configure:14323: checking whether C[ 1237.631648] sysrq: SysRq : 
Power Off
[ 1313s] [ 1237.654226] reboot: Power down
[ 1314s] ### VM INTERACTION END ###
[ 1314s] 
[ 1314s] obs-arm-3 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
21:59:33 UTC 2017.
[ 1314s] 

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


[PATCH] osmo-pcu[master]: Fix tests after rate_ctr change

2017-12-18 Thread Max

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

Fix tests after rate_ctr change

Recent change lin libosmocore disallow registering rate_ctr with the
same name and indexing multiple times. To accommodate to this check if
rate counters arealready allocated (by static allocator of BTS singleton
for example) and register rate counter with different index.

This fixes the tests for now but eventually we'll remove the BTS singleton
which will allow us to remove this hack.

Change-Id: I7c552ce653b44ec3a31049641728926adc07361d
Related: OS#2757
---
M src/bts.cpp
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/5487/1

diff --git a/src/bts.cpp b/src/bts.cpp
index 341c9d4..e17399a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -218,8 +218,16 @@
}
}
 
-   m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 0);
+   /* The static allocator might have already registered the counter group.
+  If this happens and we still called explicitly (in tests/* for 
example)
+  than just allocate the group with different index.
+  This shall be removed once weget rid of BTS singleton */
+   if (rate_ctr_get_group_by_name_idx(bts_ctrg_desc.group_name_prefix, 0))
+   m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 
1);
+   else
+   m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, _ctrg_desc, 
0);
OSMO_ASSERT(m_ratectrs);
+
m_statg = osmo_stat_item_group_alloc(tall_pcu_ctx, _statg_desc, 0);
OSMO_ASSERT(m_statg);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c552ce653b44ec3a31049641728926adc07361d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/aarch64

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

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

Last lines of build log:
[  863s] | configure:5010: result: 1572864
[  863s] | configure:5058: checking how to convert aarch64-unknown-linux-gnu 
file names to aarch64-unknown-linux-gnu format
[  863s] | configure:5098: result: func_convert_file_noop
[  863s] | configure:5105: checking how to convert aarch64-unknown-linux-gnu 
file names to toolchain format
[  863s] | configure:5125: result: func_convert_file_noop
[  863s] | configure:5132: checking for /usr/bin/ld option to reload object 
files
[  863s] | configure:5139: result: -r
[  863s] | configure:5213: checking for objdump
[  863s] | configure:5229: found /usr/bin/objdump
[  863s] | configure:5240: result: objdump
[  863s] | configure:5272: checking how to recognize dependent libraries
[  863s] | configure:5472: result: pass_all
[  863s] | configure:5557: checking for dlltool
[  863s] | configure:5587: result: no
[  863s] | configure:5617: checking how to associate runtime and link libraries
[  863s] | configure:5644: result: printf %s\n
[  863s] | configure:5705: checking for ar
[  863s] | configure:5721: found /usr/bin/ar
[  863s] | configure:5732: result: ar
[  863s] | configure:5769: checking for archiver @FILE support
[  863s] | configure:5786: gcc -c -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 conftest.c >&5
[  863s] | configure:5786: $? = 0
[  863s] | configure:5789: ar cru libconftest.a @conftest.lst >&5
[  865s] | ar: `u' modifier ignored since `D' is the default (see `U[  
807.127856] sysrq: SysRq : Power Off
[  865s] [  807.144807] reboot: Power down
[  866s] ### VM INTERACTION END ###
[  866s] 
[  866s] obs-arm-2 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
21:56:07 UTC 2017.
[  866s] 

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


osmo-msc[master]: cosmetic: msc_paging_request: drop obsolete comment

2017-12-18 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-msc[master]: drop unused T* timers (BSC land, not MSC)

2017-12-18 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: Fix tests after rate_ctr change

2017-12-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Fix tests after rate_ctr change
..


Fix tests after rate_ctr change

Recent change lin libosmocore disallow registering rate_ctr with the
same name and indexing multiple times. To accommodate to this:

* allocate network struct once and use it for all tests
* deregister rate_ctr group after each test
* free bts struct after each test

Related: OS#2757
Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 62 insertions(+), 48 deletions(-)

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



diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 72a1772..d2085a9 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -144,30 +144,37 @@
}
 }
 
-static inline void test_si2q_segfault(void)
+static inline struct gsm_bts *bts_init(void *ctx, struct gsm_network *net, 
const char *msg)
 {
-   struct gsm_bts *bts;
-   struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, 
NULL);
-   printf("Test SI2quater UARFCN (same scrambling code and diversity):\n");
-
-   if (!network)
+   struct gsm_bts *bts = gsm_bts_alloc(net, 0);
+   if (!bts) {
+   printf("BTS allocation failure in %s()\n", msg);
exit(1);
-   bts = gsm_bts_alloc(network, 0);
+   }
+   printf("BTS allocation OK in %s()\n", msg);
+
+   bts->network = net;
+
+   return bts;
+}
+
+static inline void test_si2q_segfault(struct gsm_network *net)
+{
+   struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+   printf("Test SI2quater UARFCN (same scrambling code and diversity):\n");
 
_bts_uarfcn_add(bts, 10564, 319, 0);
_bts_uarfcn_add(bts, 10612, 319, 0);
gen(bts, __func__);
+
+   rate_ctr_group_free(bts->bts_ctrs);
+   talloc_free(bts);
 }
 
-static inline void test_si2q_mu(void)
+static inline void test_si2q_mu(struct gsm_network *net)
 {
-   struct gsm_bts *bts;
-   struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, 
NULL);
+   struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
printf("Test SI2quater multiple UARFCNs:\n");
-
-   if (!network)
-   exit(1);
-   bts = gsm_bts_alloc(network, 0);
 
_bts_uarfcn_add(bts, 10564, 318, 0);
_bts_uarfcn_add(bts, 10612, 319, 0);
@@ -176,18 +183,15 @@
_bts_uarfcn_add(bts, 10613, 64, 0);
_bts_uarfcn_add(bts, 10613, 164, 0);
_bts_uarfcn_add(bts, 10613, 14, 0);
+
+   rate_ctr_group_free(bts->bts_ctrs);
+   talloc_free(bts);
 }
 
-static inline void test_si2q_u(void)
+static inline void test_si2q_u(struct gsm_network *net)
 {
-   struct gsm_bts *bts;
-   struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL);
+   struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n");
-
-   if (!network)
-   exit(1);
-
-   bts = gsm_bts_alloc(network, 0);
 
/* first generate invalid SI as no UARFCN added */
gen(bts, __func__);
@@ -204,18 +208,15 @@
_bts_uarfcn_add(bts, 1982, 223, 1);
_bts_uarfcn_add(bts, 1982, 14, 0);
_bts_uarfcn_add(bts, 1982, 88, 0);
+
+   rate_ctr_group_free(bts->bts_ctrs);
+   talloc_free(bts);
 }
 
-static inline void test_si2q_e(void)
+static inline void test_si2q_e(struct gsm_network *net)
 {
-   struct gsm_bts *bts;
-   struct gsm_network *network = bsc_network_init(NULL, 1, 1, NULL);
+   struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n");
-
-   if (!network)
-   exit(1);
-
-   bts = gsm_bts_alloc(network, 0);
 
bts->si_common.si2quater_neigh_list.arfcn = 
bts->si_common.data.earfcn_list;
bts->si_common.si2quater_neigh_list.meas_bw = 
bts->si_common.data.meas_bw_list;
@@ -237,18 +238,15 @@
add_earfcn_b(bts, 1965, OSMO_EARFCN_MEAS_INVALID);
add_earfcn_b(bts, 1967, 4);
add_earfcn_b(bts, 1982, 3);
+
+   rate_ctr_group_free(bts->bts_ctrs);
+   talloc_free(bts);
 }
 
-static inline void test_si2q_long(void)
+static inline void test_si2q_long(struct gsm_network *net)
 {
-   struct gsm_bts *bts;
-   struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, 
NULL);
+   struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN 
generation:\n");
-
-   if (!network)
-   exit(1);
-
-   bts = gsm_bts_alloc(network, 0);
 
bts->si_common.si2quater_neigh_list.arfcn = 
bts->si_common.data.earfcn_list;

osmo-bsc[master]: Fix tests after rate_ctr change

2017-12-18 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/x86_64

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

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

Last lines of build log:
[  152s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  152s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  152s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  152s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  152s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  152s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  152s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  152s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  152s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -Done.
[  152s] ./testsuite.at:7: exit code was 1, expected 0
[  152s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  152s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  152s] make[1]: *** [override_dh_auto_test] Error 1
[  152s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  152s] debian/rules:45: recipe for target 'build' failed
[  152s] make: *** [build] Error 2
[  152s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  152s] 
[  152s] lamb58 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:37:51 UTC 2017.
[  152s] 
[  152s] ### VM INTERACTION START ###
[  155s] [  146.099761] reboot: Power down
[  155s] ### VM INTERACTION END ###
[  155s] 
[  155s] lamb58 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:37:54 UTC 2017.
[  155s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/x86_64

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

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

Last lines of build log:
[  222s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  222s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  222s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  222s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  222s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  222s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  222s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  222s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  222s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  222s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  222s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  222s] -Done.
[  222s] ./testsuite.at:7: exit code was 139, expected 0
[  222s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  222s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  222s] make[1]: *** [override_dh_auto_test] Error 1
[  222s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  222s] debian/rules:13: recipe for target 'build' failed
[  222s] make: *** [build] Error 2
[  222s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  222s] 
[  222s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:37:16 UTC 2017.
[  222s] 
[  222s] ### VM INTERACTION START ###
[  224s] [  215.326633] reboot: Power down
[  224s] ### VM INTERACTION END ###
[  224s] 
[  224s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:37:20 UTC 2017.
[  224s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/x86_64

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

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

Last lines of build log:
[  147s] 5. testsuite.at:31: testing channel ...
[  147s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test
[  147s] stderr:
[  147s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0
[  147s] 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source:
 line 25: 21601 Segmentation fault  
$abs_top_builddir/tests/channel/channel_test
[  147s] --- expout 2017-12-18 20:36:03.44000 +
[  147s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 
2017-12-18 20:36:03.44000 +
[  147s] @@ -1,4 +0,0 @@
[  147s] -Testing the gsm_subscriber chan logic
[  147s] -Reached, didn't crash, test passed
[  147s] -Testing subslot numbers for pchan types
[  147s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) 
(bts=45,trx=1,ts=3,ss=4)
[  147s] ./testsuite.at:34: exit code was 139, expected 0
[  147s] 5. testsuite.at:31: 5. channel (testsuite.at:31): FAILED 
(testsuite.at:34)
[  147s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  147s] make[1]: *** [override_dh_auto_test] Error 1
[  147s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  147s] debian/rules:13: recipe for target 'build' failed
[  147s] make: *** [build] Error 2
[  147s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  147s] 
[  147s] lamb27 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:36:04 UTC 2017.
[  147s] 
[  147s] ### VM INTERACTION START ###
[  150s] [  141.937139] reboot: Power down
[  150s] ### VM INTERACTION END ###
[  150s] 
[  150s] lamb27 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:36:08 UTC 2017.
[  150s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.04/x86_64

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

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

Last lines of build log:
[  394s] | #define HAVE_STRINGS_H 1
[  394s] | #define HAVE_INTTYPES_H 1
[  394s] | #define HAVE_STDINT_H 1
[  394s] | #define HAVE_UNISTD_H 1
[  394s] | #define HAVE_DLFCN_H 1
[  394s] | #define LT_OBJDIR ".libs/"
[  394s] | #define BUILD_SMPP 1
[  394s] | #define STDC_HEADERS 1
[  394s] | #define HAVE_DBI_DBD_H 1
[  394s] | #define HAVE_PCAP_PCAP_H 1
[  394s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  394s] | 
[  394s] | configure: exit 0
[  394s] 
[  394s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  394s] make[1]: *** [override_dh_auto_test] Error 1
[  394s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  394s] debian/rules:13: recipe for target 'build' failed
[  394s] make: *** [build] Error 2
[  394s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  394s] 
[  394s] wildcard2 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:36:03 UTC 2017.
[  394s] 
[  394s] ### VM INTERACTION START ###
[  397s] [  264.600691] reboot: Power down
[  412s] ### VM INTERACTION END ###
[  412s] 
[  412s] wildcard2 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:36:22 UTC 2017.
[  412s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/aarch64

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

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

Last lines of build log:
[  866s] | | #define PACKAGE_VERSION "0.4.0.20171218"
[  866s] | | #define PACKAGE_STRING "osmo-pcu 0.4.0.20171218"
[  866s] | | #define PACKAGE_BUGREPORT "osmocom-net-g...@lists.osmocom.org"
[  866s] | | #define PACKAGE_URL ""
[  866s] | | #define PACKAGE "osmo-pcu"
[  866s] | | #define VERSION "0.4.0.20171218"
[  866s] | | #define STDC_HEADERS 1
[  866s] | | #define HAVE_SYS_TYPES_H 1
[  866s] | | #define HAVE_SYS_STAT_H 1
[  866s] | | #define HAVE_STDLIB_H 1
[  866s] | | #define HAVE_STRING_H 1
[  866s] | | #define HAVE_MEMORY_H 1
[  866s] | | #define HAVE_STRINGS_H 1
[  866s] | | #define HAVE_INTTYPES_H 1
[  866s] | | #define HAVE_STDINT_H 1
[  866s] | | #define HAVE_UNISTD_H 1
[  866s] | | #define HAVE_DLFCN_H 1
[  866s] | | #define LT_OBJDIR ".libs/"
[  866s] | | /* end confdefs.h.  */
[  866s] | | #include 
[  866s] | configure:12598: result: g++ -E
[  866s] | configure:12618: g++ -E -Wdate-time -D_FORTIFY_SOURCE=2 conftest.cpp
[  866s] | configure:12618: $? = 0
[  868s] | configure:12632: g++ -E -[  839.258607] sysrq: SysRq : Power Off
[  868s] [  839.261916] reboot: Power down
[  869s] ### VM INTERACTION END ###
[  869s] 
[  869s] obs-arm-4 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:34:35 UTC 2017.
[  869s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/x86_64

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

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

Last lines of build log:
[  118s] [  110.848122] serial8250: too much work for irq4
[  118s] [  110.914872] serial8250: too much work for irq4
[  118s] 6 59 84 2b 54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  118s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  118s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  118s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  118s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  118s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  118s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  118s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  118s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  118s] -Done.
[  118s] ./testsuite.at:7: exit code was 1, expected 0
[  118s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  118s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  118s] make[1]: *** [override_dh_auto_test] Error 1
[  118s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  118s] debian/rules:45: recipe for target 'build' failed
[  118s] make: *** [build] Error 2
[  118s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  118s] 
[  118s] lamb07 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:33:44 UTC 2017.
[  118s] 
[  118s] ### VM INTERACTION START ###
[  120s] [  113.472145] reboot: Power down
[  120s] ### VM INTERACTION END ###
[  120s] 
[  120s] lamb07 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:33:48 UTC 2017.
[  120s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.04/x86_64

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

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

Last lines of build log:
[  187s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  187s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  187s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  187s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  187s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  187s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  187s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  187s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  187s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  187s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  187s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  187s] -Done.
[  187s] ./testsuite.at:7: exit code was 1, expected 0
[  187s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  187s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  187s] make[1]: *** [override_dh_auto_test] Error 1
[  187s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  187s] debian/rules:45: recipe for target 'build' failed
[  187s] make: *** [build] Error 2
[  187s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  187s] 
[  187s] lamb57 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:32:43 UTC 2017.
[  187s] 
[  187s] ### VM INTERACTION START ###
[  189s] [  181.282132] reboot: Power down
[  189s] ### VM INTERACTION END ###
[  189s] 
[  189s] lamb57 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:32:47 UTC 2017.
[  189s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/i586

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

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

Last lines of build log:
[  135s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  135s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  135s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  135s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  135s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  135s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  135s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  135s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  135s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  135s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  135s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  135s] -Done.
[  135s] ./testsuite.at:7: exit code was 1, expected 0
[  135s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  135s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  135s] make[1]: *** [override_dh_auto_test] Error 1
[  135s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  135s] debian/rules:45: recipe for target 'build' failed
[  135s] make: *** [build] Error 2
[  135s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  135s] 
[  135s] lamb51 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:31:00 UTC 2017.
[  135s] 
[  135s] ### VM INTERACTION START ###
[  138s] [  129.373884] reboot: Power down
[  138s] ### VM INTERACTION END ###
[  138s] 
[  138s] lamb51 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:31:04 UTC 2017.
[  138s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.10/x86_64

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

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

Last lines of build log:
[  120s] | #define HAVE_SYS_STAT_H 1
[  120s] | #define HAVE_STDLIB_H 1
[  120s] | #define HAVE_STRING_H 1
[  120s] | #define HAVE_MEMORY_H 1
[  120s] | #define HAVE_STRINGS_H 1
[  120s] | #define HAVE_INTTYPES_H 1
[  120s] | #define HAVE_STDINT_H 1
[  120s] | #define HAVE_UNISTD_H 1
[  120s] | #define HAVE_DLFCN_H 1
[  120s] | #define LT_OBJDIR ".libs/"
[  120s] | #define STDC_HEADERS 1
[  120s] | 
[  120s] | configure: exit 0
[  120s] 
[  120s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  120s] make[1]: *** [override_dh_auto_test] Error 1
[  120s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  120s] debian/rules:45: recipe for target 'build' failed
[  120s] make: *** [build] Error 2
[  120s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  120s] 
[  120s] lamb60 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:31:24 UTC 2017.
[  120s] 
[  120s] ### VM INTERACTION START ###
[  123s] [  115.768935] reboot: Power down
[  123s] ### VM INTERACTION END ###
[  123s] 
[  123s] lamb60 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:31:27 UTC 2017.
[  123s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.10/x86_64

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

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

Last lines of build log:
[  221s] | #define HAVE_STRINGS_H 1
[  221s] | #define HAVE_INTTYPES_H 1
[  221s] | #define HAVE_STDINT_H 1
[  221s] | #define HAVE_UNISTD_H 1
[  221s] | #define HAVE_DLFCN_H 1
[  221s] | #define LT_OBJDIR ".libs/"
[  221s] | #define BUILD_SMPP 1
[  221s] | #define STDC_HEADERS 1
[  221s] | #define HAVE_DBI_DBD_H 1
[  221s] | #define HAVE_PCAP_PCAP_H 1
[  221s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  221s] | 
[  221s] | configure: exit 0
[  221s] 
[  221s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  221s] make[1]: *** [override_dh_auto_test] Error 1
[  221s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  221s] debian/rules:13: recipe for target 'build' failed
[  221s] make: *** [build] Error 2
[  221s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  221s] 
[  221s] cloud129 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:31:29 UTC 2017.
[  221s] 
[  221s] ### VM INTERACTION START ###
[  224s] [  206.814821] reboot: Power down
[  225s] ### VM INTERACTION END ###
[  225s] 
[  225s] cloud129 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:31:32 UTC 2017.
[  225s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/x86_64

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

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

Last lines of build log:
[  131s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  131s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  131s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  131s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  131s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  131s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  131s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  131s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  131s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  131s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  131s] -Done.
[  131s] ./testsuite.at:7: exit code was 1, expected 0
[  131s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  131s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  131s] make[1]: *** [override_dh_auto_test] Error 1
[  131s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  131s] debian/rules:45: recipe for target 'build' failed
[  131s] make: *** [build] Error 2
[  131s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  131s] 
[  131s] lamb59 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:29:35 UTC 2017.
[  131s] 
[  131s] ### VM INTERACTION START ###
[  131s] Powering off.
[  131s] [  123.506160] reboot: Power down
[  131s] ### VM INTERACTION END ###
[  131s] 
[  131s] lamb59 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:29:37 UTC 2017.
[  131s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_17.04/i586

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

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

Last lines of build log:
[  211s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  211s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  211s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  211s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  211s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  211s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  211s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  211s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  211s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  211s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  211s] -Done.
[  211s] ./testsuite.at:7: exit code was 1, expected 0
[  211s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  211s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  211s] make[1]: *** [override_dh_auto_test] Error 1
[  211s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  211s] debian/rules:45: recipe for target 'build' failed
[  211s] make: *** [build] Error 2
[  211s] dpkg-buildpackage: error: debian/rul[  201.850634] serial8250: too 
much work for irq4
[  211s] es build gave error exit status 2
[  211s] 
[  211s] lamb52 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:30:37 UTC 2017.
[  211s] 
[  211s] ### VM INTERACTION START ###
[  213s] [  204.300672] reboot: Power down
[  213s] ### VM INTERACTION END ###
[  213s] 
[  213s] lamb52 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:30:41 UTC 2017.
[  213s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586

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

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

Last lines of build log:
[  282s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  282s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  282s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  282s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  282s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  282s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  282s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  282s] -Done.
[  282s] ./testsuite.at:7: exit code was 139, expected 0
[  282s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  282s] # -*- compilation -*-
[  282s] 5. testsuite.at:31: testing channel ...
[  282s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test
[  282s] stderr:
[  282s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0
[  282s] 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source:
 line 25: 20433 Segmentation fault  
$abs_top_builddir/tests/channel/channel_test
[  282s] --- expout 2017-12-18 20:30:12.97200 +
[  282s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 
2017-12-18 20:30:12.97600 +
[  282s] @@ -1,4 +0,0 @@
[  282s] -Testing the gsm_subscriber chan logic
[  282s] -Reached, didn't crash, test passed
[  282s] -Testing subslot numbers for pchan types
[  282s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) 
(bts=45,trx=1,ts=3,ss=4)
[  282s] ./testsuite.at:34: exit code was 139, expected 0
[  284s] 5. testsuite.a[  273.681076] reboot: Power down
[  284s] ### VM INTERACTION END ###
[  284s] 
[  284s] lamb70 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:30:18 UTC 2017.
[  284s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/xUbuntu_16.10/i586

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

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

Last lines of build log:
[  127s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  127s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  127s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  127s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  127s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  127s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  127s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  127s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  127s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  127s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  127s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  127s] -Done.
[  127s] ./testsuite.at:7: exit code was 1, expected 0
[  127s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  127s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  127s] make[1]: *** [override_dh_auto_test] Error 1
[  127s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  127s] debian/rules:45: recipe for target 'build' failed
[  127s] make: *** [build] Error 2
[  127s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  127s] 
[  127s] lamb27 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:29:14 UTC 2017.
[  127s] 
[  127s] ### VM INTERACTION START ###
[  130s] [  123.667547] reboot: Power down
[  130s] ### VM INTERACTION END ###
[  130s] 
[  130s] lamb27 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:29:18 UTC 2017.
[  130s] 

-- 
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_8.0/x86_64

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_8.0/x86_64

Package network:osmocom:nightly/openbsc failed to build in Debian_8.0/x86_64

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

Last lines of build log:
[  163s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test
[  163s] stderr:
[  163s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0
[  163s] 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source:
 line 25: 22865 Segmentation fault  
$abs_top_builddir/tests/channel/channel_test
[  163s] --- expout 2017-12-18 20:28:28.65200 +
[  163s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 
2017-12-18 20:28:28.65200 +
[  163s] @@ -1,4 +0,0 @@
[  163s] -Testing the gsm_subscriber chan logic
[  163s] -Reached, didn't crash, test passed
[  163s] -Testing subslot numbers for pchan types
[  163s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) 
(bts=45,trx=1,ts=3,ss=4)
[  163s] ./testsuite.at:34: exit code was 139, expected 0
[  163s] 5. testsuite.at:31: 5. channel (testsuite.at:31): FAILED 
(testsuite.at:34)
[  163s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  163s] make[1]: *** [override_dh_auto_test] Error 1
[  163s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  163s] debian/rules:13: recipe for target 'build' failed
[  163s] make: *** [build] Error 2
[  163s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  163s] 
[  163s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:28:30 UTC 2017.
[  163s] 
[  163s] ### VM INTERACTION START ###
[  163s] Powering off.
[  163s] [  156.485892] reboot: Power down
[  163s] ### VM INTERACTION END ###
[  163s] 
[  163s] lamb24 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:28:32 UTC 2017.
[  163s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/i586

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

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

Last lines of build log:
[  257s] | #define HAVE_STRINGS_H 1
[  257s] | #define HAVE_INTTYPES_H 1
[  257s] | #define HAVE_STDINT_H 1
[  257s] | #define HAVE_UNISTD_H 1
[  257s] | #define HAVE_DLFCN_H 1
[  257s] | #define LT_OBJDIR ".libs/"
[  257s] | #define BUILD_SMPP 1
[  257s] | #define STDC_HEADERS 1
[  257s] | #define HAVE_DBI_DBD_H 1
[  257s] | #define HAVE_PCAP_PCAP_H 1
[  257s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  257s] | 
[  257s] | configure: exit 0
[  257s] 
[  257s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  257s] make[1]: *** [override_dh_auto_test] Error 1
[  257s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  257s] debian/rules:13: recipe for target 'build' failed
[  257s] make: *** [build] Error 2
[  257s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  257s] 
[  257s] lamb52 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:28:39 UTC 2017.
[  257s] 
[  257s] ### VM INTERACTION START ###
[  260s] [  241.902043] sysrq: SysRq : [  241.929776] reboot: Power down
[  260s] ### VM INTERACTION END ###
[  260s] 
[  260s] lamb52 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:28:44 UTC 2017.
[  260s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/i586

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

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

Last lines of build log:
[  143s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  143s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  143s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  143s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  143s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  143s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  143s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  143s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  143s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  143s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  143s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  143s] -Done.
[  143s] ./testsuite.at:7: exit code was 139, expected 0
[  143s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  143s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  143s] make[1]: *** [override_dh_auto_test] Error 1
[  143s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  143s] debian/rules:13: recipe for target 'build' failed
[  143s] make: *** [build] Error 2
[  143s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  143s] 
[  143s] lamb01 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:27:42 UTC 2017.
[  143s] 
[  143s] ### VM INTERACTION START ###
[  145s] [  137.853865] reboot: Power down
[  145s] ### VM INTERACTION END ###
[  145s] 
[  145s] lamb01 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:27:45 UTC 2017.
[  145s] 

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


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

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

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

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

Last lines of build log:
[  173s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  173s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  173s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  173s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  173s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  173s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  173s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  173s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  173s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  173s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  173s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  173s] -Done.
[  173s] ./testsuite.at:7: exit code was 1, expected 0
[  173s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  173s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  173s] make[1]: *** [override_dh_auto_test] Error 1
[  173s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  173s] debian/rules:45: recipe for target 'build' failed
[  173s] make: *** [build] Error 2
[  173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  173s] 
[  173s] lamb03 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:27:12 UTC 2017.
[  173s] 
[  173s] ### VM INTERACTION START ###
[  176s] [  165.022658] reboot: Power down
[  176s] ### VM INTERACTION END ###
[  176s] 
[  176s] lamb03 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:27:17 UTC 2017.
[  176s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64

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

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

Last lines of build log:
[  152s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  152s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  152s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  152s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  152s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  152s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  152s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  152s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  152s] -Done.
[  152s] ./testsuite.at:7: exit code was 139, expected 0
[  152s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  152s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  152s] make[1]: *** [override_dh_auto_test] Error 1
[  152s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  152s] debian/rules:13: recipe for target 'build' failed
[  152s] make: *** [build] Error 2
[  152s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  152s] 
[  152s] lamb63 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:25:59 UTC 2017.
[  152s] 
[  152s] ### VM INTERACTION START ###
[  156s] [  148.041613] reboot: Power down
[  156s] ### VM INTERACTION END ###
[  156s] 
[  156s] lamb63 failed "build openbsc_1.0.0.20171218.dsc" at Mon Dec 18 
20:26:03 UTC 2017.
[  156s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_9.0/x86_64

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

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

Last lines of build log:
[  134s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  134s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  134s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  134s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  134s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  134s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  134s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 2b 
[  134s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 
2b 2b 2b 
[  134s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  134s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  134s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  134s] -Done.
[  134s] ./testsuite.at:7: exit code was 1, expected 0
[  134s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  134s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  134s] make[1]: *** [override_dh_auto_test] Error 1
[  134s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  134s] debian/rules:45: recipe for target 'build' failed
[  134s] make: *** [build] Error 2
[  134s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  134s] 
[  134s] lamb04 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:25:29 UTC 2017.
[  134s] 
[  134s] ### VM INTERACTION START ###
[  137s] [  129.313387] reboot: Power down
[  137s] ### VM INTERACTION END ###
[  137s] 
[  137s] lamb04 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:25:33 UTC 2017.
[  137s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bsc/Debian_8.0/i586

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

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

Last lines of build log:
[  162s] | #define HAVE_STDLIB_H 1
[  162s] | #define HAVE_STRING_H 1
[  162s] | #define HAVE_MEMORY_H 1
[  162s] | #define HAVE_STRINGS_H 1
[  162s] | #define HAVE_INTTYPES_H 1
[  162s] | #define HAVE_STDINT_H 1
[  162s] | #define HAVE_UNISTD_H 1
[  162s] | #define HAVE_DLFCN_H 1
[  162s] | #define LT_OBJDIR ".libs/"
[  162s] | #define STDC_HEADERS 1
[  162s] | 
[  162s] | configure: exit 0
[  162s] 
[  162s] debian/rules:60: recipe for target 'override_dh_auto_test' failed
[  162s] make[1]: *** [override_dh_auto_test] Error 1
[  162s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  162s] debian/rules:45: recipe for target 'build' failed
[  162s] make: *** [build] Error 2
[  162s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  162s] 
[  162s] cloud111 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:25:09 UTC 2017.
[  162s] 
[  162s] ### VM INTERACTION START ###
[  163s] Powering off.
[  163s] [  148.998005] reboot: Power down
[  165s] ### VM INTERACTION END ###
[  165s] 
[  165s] cloud111 failed "build osmo-bsc_1.1.2.20171218.dsc" at Mon Dec 18 
20:25:12 UTC 2017.
[  165s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.10/x86_64

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

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

Last lines of build log:
[  190s] -packet reject: 40 84 7f f7 6e e6 41 4b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 
2b 2b 2b 2b 2b 
[  190s] -=== end test_packet_access_rej_epdan ===
[  190s] -=== start test_packet_access_rej_prr ===
[  190s] -=== end test_packet_access_rej_prr ===
[  190s] -=== start test_packet_access_rej_prr_no_other_tbfs ===
[  190s] -=== end test_packet_access_rej_prr_no_other_tbfs ===
[  190s] +backtrace() returned 6 addresses
[  190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x38589) [0x559e94c94589]
[  190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x17c3b) [0x559e94c73c3b]
[  190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x1751f) [0x559e94c7351f]
[  190s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) 
[0x7f98890613f1]
[  190s] +/usr/src/packages/BUILD/tests/tbf/TbfTest(+0x17aba) [0x559e94c73aba]
[  190s] ./testsuite.at:23: exit code was 134, expected 0
[  190s] 3. testsuite.at:19: 3. tbf (testsuite.at:19): FAILED (testsuite.at:23)
[  190s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  190s] make[1]: *** [override_dh_auto_test] Error 1
[  190s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  190s] debian/rules:12: recipe for target 'build' failed
[  190s] make: *** [build] Error 2
[  190s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  190s] 
[  190s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:18:11 UTC 2017.
[  190s] 
[  190s] ### VM INTERACTION START ###
[  193s] [  185.876182] reboot: Power down
[  193s] ### VM INTERACTION END ###
[  193s] 
[  193s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:18:14 UTC 2017.
[  193s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.10/i586

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

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

Last lines of build log:
[  202s] | #define HAVE_SYS_STAT_H 1
[  202s] | #define HAVE_STDLIB_H 1
[  202s] | #define HAVE_STRING_H 1
[  202s] | #define HAVE_MEMORY_H 1
[  202s] | #define HAVE_STRINGS_H 1
[  202s] | #define HAVE_INTTYPES_H 1
[  202s] | #define HAVE_STDINT_H 1
[  202s] | #define HAVE_UNISTD_H 1
[  202s] | #define HAVE_DLFCN_H 1
[  202s] | #define LT_OBJDIR ".libs/"
[  202s] | #define STDC_HEADERS 1
[  202s] | 
[  202s] | configure: exit 0
[  202s] 
[  202s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  202s] make[1]: *** [override_dh_auto_test] Error 1
[  202s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  202s] debian/rules:12: recipe for target 'build' failed
[  202s] make: *** [build] Error 2
[  202s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  202s] 
[  202s] lamb20 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:16:01 UTC 2017.
[  202s] 
[  202s] ### VM INTERACTION START ###
[  205s] [  197.020188] reboot: Power down
[  205s] ### VM INTERACTION END ###
[  205s] 
[  205s] lamb20 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:16:05 UTC 2017.
[  205s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/x86_64

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

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

Last lines of build log:
[  197s] | #define HAVE_SYS_STAT_H 1
[  197s] | #define HAVE_STDLIB_H 1
[  197s] | #define HAVE_STRING_H 1
[  197s] | #define HAVE_MEMORY_H 1
[  197s] | #define HAVE_STRINGS_H 1
[  197s] | #define HAVE_INTTYPES_H 1
[  197s] | #define HAVE_STDINT_H 1
[  197s] | #define HAVE_UNISTD_H 1
[  197s] | #define HAVE_DLFCN_H 1
[  197s] | #define LT_OBJDIR ".libs/"
[  197s] | #define STDC_HEADERS 1
[  197s] | 
[  197s] | configure: exit 0
[  197s] 
[  197s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  197s] make[1]: *** [override_dh_auto_test] Error 1
[  197s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  197s] debian/rules:12: recipe for target 'build' failed
[  197s] make: *** [build] Error 2
[  197s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  197s] 
[  197s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:12:20 UTC 2017.
[  197s] 
[  197s] ### VM INTERACTION START ###
[  200s] [  192.955743] reboot: Power down
[  200s] ### VM INTERACTION END ###
[  200s] 
[  200s] lamb12 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:12:23 UTC 2017.
[  200s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/i586

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

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

Last lines of build log:
[  184s]  === start test_rlc_unit_encoder ===
[  184s]  === end test_rlc_unit_encoder ===
[  184s] -=== start uplink_header_type2_test ===
[  184s] -=== end uplink_header_type2_test ===
[  184s] -=== start uplink_header_type1_test ===
[  184s] -=== end uplink_header_type1_test ===
[  184s] +backtrace() returned 6 addresses
[  184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x229cb) [0x5664c9cb]
[  184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x10b36) [0x5663ab36]
[  184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(main+0x10f2) [0x566340c2]
[  184s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xf7328637]
[  184s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0xc599) [0x56636599]
[  184s] ./testsuite.at:37: exit code was 134, expected 0
[  184s] 5. testsuite.at:33: 5. edge (testsuite.at:33): FAILED (testsuite.at:37)
[  184s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  184s] make[1]: *** [override_dh_auto_test] Error 1
[  184s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  184s] debian/rules:12: recipe for target 'build' failed
[  184s] make: *** [build] Error 2
[  184s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  184s] 
[  184s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:12:20 UTC 2017.
[  184s] 
[  184s] ### VM INTERACTION START ###
[  187s] [  179.590314] reboot: Power down
[  187s] ### VM INTERACTION END ###
[  187s] 
[  187s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:12:23 UTC 2017.
[  187s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.04/x86_64

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

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

Last lines of build log:
[  173s]  rbb: 00 00 00 00 00 00 00 31 
[  173s]  rbb: 10 00 00 00 00 00 00 01 
[  173s] -show_rbb: RRR
[  173s] -show_rbb: IIRRIIIR
[  173s] -assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 
36 14 c0 2b 2b 
[  173s] -assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 
36 14 0b 2b 2b 
[  173s] +backtrace() returned 6 addresses
[  173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x181a9) 
[0x56204b2ca1a9]
[  173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x170b3) 
[0x56204b2c90b3]
[  173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x15dfd) 
[0x56204b2c7dfd]
[  173s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) 
[0x7f6a0f2e03f1]
[  173s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x1634a) 
[0x56204b2c834a]
[  173s] ./testsuite.at:44: exit code was 134, expected 0
[  173s] 6. testsuite.at:40: 6. types (testsuite.at:40): FAILED 
(testsuite.at:44)
[  173s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  173s] make[1]: *** [override_dh_auto_test] Error 1
[  173s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  173s] debian/rules:12: recipe for target 'build' failed
[  173s] make: *** [build] Error 2
[  173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  173s] 
[  173s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:11:29 UTC 2017.
[  173s] 
[  173s] ### VM INTERACTION START ###
[  176s] [  168.366079] reboot: Power down
[  176s] ### VM INTERACTION END ###
[  176s] 
[  176s] lamb02 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:11:32 UTC 2017.
[  176s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/x86_64

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

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

Last lines of build log:
[  189s]  === end test_rlc_unit_encoder ===
[  189s] -=== start uplink_header_type2_test ===
[  189s] -=== end uplink_header_type2_test ===
[  189s] -=== start uplink_header_type1_test ===
[  189s] -=== end uplink_header_type1_test ===
[  189s] +backtrace() returned 6 addresses
[  189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x310a9) [0x557405ef00a9]
[  189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x1f1ee) [0x557405ede1ee]
[  189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x18c1e) [0x557405ed7c1e]
[  189s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) 
[0x7ff666793b45]
[  189s] +/usr/src/packages/BUILD/tests/edge/EdgeTest(+0x1b177) [0x557405eda177]
[  189s] ./testsuite.at:37: exit code was 134, expected 0
[  189s] 5. testsuite.at:33: 5. edge (testsuite.at:33): FAILED (testsuite.at:37)
[  189s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  189s] make[1]: *** [override_dh_auto_test] Error 1
[  189s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  189s] debian/rules:12: recipe for target 'build' failed
[  189s] make: *** [build] Error 2
[  189s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  189s] 
[  189s] lamb10 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:10:18 UTC 2017.
[  189s] 
[  189s] ### VM INTERACTION START ###
[  190s] Powering off.
[  190s] [  182.370985] reboot: Power down
[  190s] ### VM INTERACTION END ###
[  190s] 
[  190s] lamb10 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:10:20 UTC 2017.
[  190s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_17.10/x86_64

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

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

Last lines of build log:
[  181s] | #define HAVE_SYS_STAT_H 1
[  181s] | #define HAVE_STDLIB_H 1
[  181s] | #define HAVE_STRING_H 1
[  181s] | #define HAVE_MEMORY_H 1
[  181s] | #define HAVE_STRINGS_H 1
[  181s] | #define HAVE_INTTYPES_H 1
[  181s] | #define HAVE_STDINT_H 1
[  181s] | #define HAVE_UNISTD_H 1
[  181s] | #define HAVE_DLFCN_H 1
[  181s] | #define LT_OBJDIR ".libs/"
[  181s] | #define STDC_HEADERS 1
[  181s] | 
[  181s] | configure: exit 0
[  181s] 
[  181s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  181s] make[1]: *** [override_dh_auto_test] Error 1
[  181s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  181s] debian/rules:12: recipe for target 'build' failed
[  181s] make: *** [build] Error 2
[  181s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  181s] 
[  181s] lamb06 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:10:11 UTC 2017.
[  181s] 
[  181s] ### VM INTERACTION START ###
[  184s] [  176.133975] reboot: Power down
[  184s] ### VM INTERACTION END ###
[  184s] 
[  184s] lamb06 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:10:15 UTC 2017.
[  184s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/x86_64

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

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

Last lines of build log:
[  242s] | #define HAVE_SYS_STAT_H 1
[  242s] | #define HAVE_STDLIB_H 1
[  242s] | #define HAVE_STRING_H 1
[  242s] | #define HAVE_MEMORY_H 1
[  242s] | #define HAVE_STRINGS_H 1
[  242s] | #define HAVE_INTTYPES_H 1
[  242s] | #define HAVE_STDINT_H 1
[  242s] | #define HAVE_UNISTD_H 1
[  242s] | #define HAVE_DLFCN_H 1
[  242s] | #define LT_OBJDIR ".libs/"
[  242s] | #define STDC_HEADERS 1
[  242s] | 
[  242s] | configure: exit 0
[  242s] 
[  242s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  242s] make[1]: *** [override_dh_auto_test] Error 1
[  242s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  242s] debian/rules:12: recipe for target 'build' failed
[  242s] make: *** [build] Error 2
[  242s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  242s] 
[  242s] cloud119 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:09:20 UTC 2017.
[  242s] 
[  242s] ### VM INTERACTION START ###
[  245s] [  228.182270] reboot: Power down
[  246s] ### VM INTERACTION END ###
[  246s] 
[  246s] cloud119 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:09:25 UTC 2017.
[  246s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/i586

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

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

Last lines of build log:
[  215s] | #define HAVE_SYS_STAT_H 1
[  215s] | #define HAVE_STDLIB_H 1
[  215s] | #define HAVE_STRING_H 1
[  215s] | #define HAVE_MEMORY_H 1
[  215s] | #define HAVE_STRINGS_H 1
[  215s] | #define HAVE_INTTYPES_H 1
[  215s] | #define HAVE_STDINT_H 1
[  215s] | #define HAVE_UNISTD_H 1
[  215s] | #define HAVE_DLFCN_H 1
[  215s] | #define LT_OBJDIR ".libs/"
[  215s] | #define STDC_HEADERS 1
[  215s] | 
[  215s] | configure: exit 0
[  215s] 
[  215s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  215s] make[1]: *** [override_dh_auto_test] Error 1
[  215s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  215s] debian/rules:12: recipe for target 'build' failed
[  215s] make: *** [build] Error 2
[  215s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  215s] 
[  215s] lamb22 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:08:04 UTC 2017.
[  215s] 
[  215s] ### VM INTERACTION START ###
[  218s] [  209.645211] reboot: Power down
[  218s] ### VM INTERACTION END ###
[  218s] 
[  218s] lamb22 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:08:07 UTC 2017.
[  218s] 

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


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

2017-12-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/i586

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

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

Last lines of build log:
[  175s] -show_rbb: RRR
[  175s] -show_rbb: IIRRIIIR
[  175s] -assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 
36 14 c0 2b 2b 
[  175s] -assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 
36 14 0b 2b 2b 
[  175s] +backtrace() returned 7 addresses
[  175s] 
+/usr/lib/i386-linux-gnu/libosmocore.so.9(osmo_generate_backtrace+0x11) 
[0xf76b85b1]
[  175s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0xb37b) [0x5663137b]
[  175s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0xa0ba) [0x566300ba]
[  175s] +/usr/src/packages/BUILD/tests/types/TypesTest(main+0xdb) [0x5662e93b]
[  175s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xf73c9723]
[  175s] +/usr/src/packages/BUILD/tests/types/TypesTest(+0x9289) [0x5662f289]
[  175s] ./testsuite.at:44: exit code was 134, expected 0
[  175s] 6. testsuite.at:40: 6. types (testsuite.at:40): FAILED 
(testsuite.at:44)
[  175s] debian/rules:28: recipe for target 'override_dh_auto_test' failed
[  175s] make[1]: *** [override_dh_auto_test] Error 1
[  175s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  175s] debian/rules:12: recipe for target 'build' failed
[  175s] make: *** [build] Error 2
[  175s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  175s] 
[  175s] lamb14 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:07:19 UTC 2017.
[  175s] 
[  175s] ### VM INTERACTION START ###
[  175s] Powering off.
[  175s] [  168.106983] reboot: Power down
[  175s] ### VM INTERACTION END ###
[  175s] 
[  175s] lamb14 failed "build osmo-pcu_0.4.0.20171218.dsc" at Mon Dec 18 
20:07:20 UTC 2017.
[  175s] 

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


[ABANDON] osmo-msc[master]: libmsc: a_iface: Remove duplicated 'const' keyword

2017-12-18 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change.

Change subject: libmsc: a_iface: Remove duplicated 'const' keyword
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I2ce27fcaad07fed7aa926b872f9c7ab638d4f316
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-msc[master]: a_iface_bssap: compiler warning: cast const away from TLV va...

2017-12-18 Thread Pau Espin Pedrol

Patch Set 1:

In case you didn't see it, I submitted related 
https://gerrit.osmocom.org/#/c/5424

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id91a4299391ff0d0e4e28ed05c2f755b9702146a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] meta-telephony[201705]: osmo-sgsn: no longer depend on libpcap

2017-12-18 Thread Pau Espin Pedrol

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

osmo-sgsn: no longer depend on libpcap

Since osmo-sgsn a801fba4d32825da044c3c713043e9e919a09fc6 the libcap
dependency is removed.

Change-Id: I284c16c1f7abd3b24525b824baca357576f16675
---
M recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/85/5485/1

diff --git a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc 
b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
index 25c6a25..84c4e41 100644
--- a/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
+++ b/recipes-osmocom/osmo-sgsn/osmo-sgsn.inc
@@ -3,7 +3,7 @@
 LICENSE = "AGPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
 
-DEPENDS = "c-ares libpcap libosmocore libosmo-netif osmo-ggsn"
+DEPENDS = "c-ares libosmocore libosmo-netif osmo-ggsn"
 
 INC_PR="r4.${META_TELEPHONY_OSMO_INC}"
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I284c16c1f7abd3b24525b824baca357576f16675
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging

2017-12-18 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5463

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

fix paging: add timeout to discard unsuccessful paging

Currently, if there is no reply from the BSS / RNC, a subscriber will remain as
"already paged" forever, and is never going to be paged again. Even on IMSI
Detach, the pending request will keep a ref count on the vlr_subscr.

Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the
'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' /
'T3113' in OsmoBSC, but to not confuse the two, give this a different name.)

Add test_ms_timeout_paging() test to verify the timeout works.

I hit this while testing Paging across multiple hNodeB, when a UE lost
connection to the hNodeB. I noticed that no matter how long I wait, no Paging
is sent out anymore, and found this embarrassing issue. Good grief...

The choice of 10 seconds is taken from https://osmocom.org/issues/2756

Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libcommon-cs/common_cs.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/msc_vty.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
7 files changed, 298 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/63/5463/3

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 6349fe0..1540524 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -344,6 +344,7 @@
GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
 };
 
+#define MSC_PAGING_TIMEOUT_DEFAULT 10
 
 struct gsm_tz {
int override; /* if 0, use system's time zone instead. */
@@ -408,6 +409,7 @@
unsigned int num_bts;
struct llist_head bts_list;
 
+   unsigned int paging_timeout;
 
/* timer to expire old location updates */
struct osmo_timer_list subscr_expire_timer;
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index b625608..76bb36c 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -157,6 +157,7 @@
struct {
/* pending requests */
bool is_paging;
+   struct osmo_timer_list paging_timeout;
/* list of struct subscr_request */
struct llist_head requests;
uint8_t lac;
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index bad8262..ef30aba 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -60,6 +60,8 @@
/* Use 30 min periodic update interval as sane default */
net->t3212 = 5;
 
+   net->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT;
+
INIT_LLIST_HEAD(>trans_list);
INIT_LLIST_HEAD(>upqueue);
INIT_LLIST_HEAD(>subscr_conns);
diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c
index a013e0e..b534b3f 100644
--- a/src/libmsc/gsm_subscriber.c
+++ b/src/libmsc/gsm_subscriber.c
@@ -76,7 +76,10 @@
return -EINVAL;
}
 
-   if (event == GSM_PAGING_SUCCEEDED)
+   osmo_timer_del(>cs.paging_timeout);
+
+   if (event == GSM_PAGING_SUCCEEDED
+   || event == GSM_PAGING_EXPIRED)
msc_stop_paging(vsub);
 
/* Inform parts of the system we don't know */
@@ -126,6 +129,12 @@
return -EINVAL;
 }
 
+static void paging_timeout_cb(void *data)
+{
+   struct vlr_subscr *vsub = data;
+   subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, 
NULL, vsub);
+}
+
 /*! \brief Start a paging request for vsub, call cbfn(param) when done.
  * \param vsub  subscriber to page.
  * \param cbfn  function to call when the conn is established.
@@ -138,6 +147,7 @@
 {
int rc;
struct subscr_request *request;
+   struct gsm_network *net = vsub->vlr->user_ctx;
 
/* Start paging.. we know it is async so we can do it before */
if (!vsub->cs.is_paging) {
@@ -152,6 +162,8 @@
/* reduced on the first paging callback */
vlr_subscr_get(vsub);
vsub->cs.is_paging = true;
+   osmo_timer_setup(>cs.paging_timeout, paging_timeout_cb, 
vsub);
+   osmo_timer_schedule(>cs.paging_timeout, 
net->paging_timeout, 0);
} else {
LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n",
vlr_subscr_name(vsub));
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 14ad19e..a4d4a39 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -109,6 +109,22 @@
return CMD_SUCCESS;
 }
 
+DEFUN(cfg_msc_paging_timeout, cfg_msc_paging_timeout_cmd,
+  "paging timeout (default|<1-65535>)",
+  "Configure Paging\n"
+  "Set Paging timeout, the minimum time to pass between (unsuccessful) 
Pagings sent 

[PATCH] osmo-msc[master]: fix paging: add timeout to discard unsuccessful paging

2017-12-18 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5463

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

fix paging: add timeout to discard unsuccessful paging

Currently, if there is no reply from the BSS / RNC, a subscriber will remain as
"already paged" forever, and is never going to be paged again. Even on IMSI
Detach, the pending request will keep a ref count on the vlr_subscr.

Add a paging timeout, as gsm_network->paging_timeout and in the VTY on the
'msc' node as 'paging timeout (default|<1-65535>'. (There is a 'network' /
'T3113' in OsmoBSC, but to not confuse the two, give this a different name.)

Add test_ms_timeout_paging() test to verify the timeout works.

I hit this while testing Paging across multiple hNodeB, when a UE lost
connection to the hNodeB. I noticed that no matter how long I wait, no Paging
is sent out anymore, and found this embarrassing issue. Good grief...

The choice of 10 seconds is taken from https://osmocom.org/issues/2756

Change-Id: I2db6f1e2ad341cf9c2cc7a21ec2fca0bae5b2db5
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libcommon-cs/common_cs.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/msc_vty.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
7 files changed, 298 insertions(+), 1 deletion(-)


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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 6349fe0..1540524 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -344,6 +344,7 @@
GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
 };
 
+#define MSC_PAGING_TIMEOUT_DEFAULT 10
 
 struct gsm_tz {
int override; /* if 0, use system's time zone instead. */
@@ -408,6 +409,7 @@
unsigned int num_bts;
struct llist_head bts_list;
 
+   unsigned int paging_timeout;
 
/* timer to expire old location updates */
struct osmo_timer_list subscr_expire_timer;
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index b625608..76bb36c 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -157,6 +157,7 @@
struct {
/* pending requests */
bool is_paging;
+   struct osmo_timer_list paging_timeout;
/* list of struct subscr_request */
struct llist_head requests;
uint8_t lac;
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index bad8262..ef30aba 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -60,6 +60,8 @@
/* Use 30 min periodic update interval as sane default */
net->t3212 = 5;
 
+   net->paging_timeout = MSC_PAGING_TIMEOUT_DEFAULT;
+
INIT_LLIST_HEAD(>trans_list);
INIT_LLIST_HEAD(>upqueue);
INIT_LLIST_HEAD(>subscr_conns);
diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c
index a013e0e..b534b3f 100644
--- a/src/libmsc/gsm_subscriber.c
+++ b/src/libmsc/gsm_subscriber.c
@@ -76,7 +76,10 @@
return -EINVAL;
}
 
-   if (event == GSM_PAGING_SUCCEEDED)
+   osmo_timer_del(>cs.paging_timeout);
+
+   if (event == GSM_PAGING_SUCCEEDED
+   || event == GSM_PAGING_EXPIRED)
msc_stop_paging(vsub);
 
/* Inform parts of the system we don't know */
@@ -126,6 +129,12 @@
return -EINVAL;
 }
 
+static void paging_timeout_cb(void *data)
+{
+   struct vlr_subscr *vsub = data;
+   subscr_paging_dispatch(GSM_HOOK_RR_PAGING, GSM_PAGING_EXPIRED, NULL, 
NULL, vsub);
+}
+
 /*! \brief Start a paging request for vsub, call cbfn(param) when done.
  * \param vsub  subscriber to page.
  * \param cbfn  function to call when the conn is established.
@@ -138,6 +147,7 @@
 {
int rc;
struct subscr_request *request;
+   struct gsm_network *net = vsub->vlr->user_ctx;
 
/* Start paging.. we know it is async so we can do it before */
if (!vsub->cs.is_paging) {
@@ -152,6 +162,8 @@
/* reduced on the first paging callback */
vlr_subscr_get(vsub);
vsub->cs.is_paging = true;
+   osmo_timer_setup(>cs.paging_timeout, paging_timeout_cb, 
vsub);
+   osmo_timer_schedule(>cs.paging_timeout, 
net->paging_timeout, 0);
} else {
LOGP(DMM, LOGL_DEBUG, "Subscriber %s already paged.\n",
vlr_subscr_name(vsub));
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 14ad19e..a4d4a39 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -109,6 +109,22 @@
return CMD_SUCCESS;
 }
 
+DEFUN(cfg_msc_paging_timeout, cfg_msc_paging_timeout_cmd,
+  "paging timeout (default|<1-65535>)",
+  "Configure Paging\n"
+  "Set Paging timeout, the minimum time to pass between (unsuccessful) 
Pagings sent 

osmo-msc[master]: fix GSM-Milenage in presence of 2G keys

2017-12-18 Thread Neels Hofmeyr

Patch Set 4:

this still needs https://gerrit.osmocom.org/5466 to compile

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

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


[PATCH] libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP

2017-12-18 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5439

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

ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP

So far, error reporting just says "Trap/Reply", more accurately report 'GET
REPLY', 'SET REPLY' and 'TRAP' as appropriate.

Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01
---
M src/ctrl/control_cmd.c
1 file changed, 28 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/5439/5

diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index f32a200..c747e84 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -410,31 +410,34 @@
LOGP(DLCTRL, LOGL_DEBUG, "Command: SET %s = \"%s\"\n", 
cmd->variable,
 osmo_escape_str(cmd->value, -1));
break;
-   case CTRL_TYPE_GET_REPLY:
-   case CTRL_TYPE_SET_REPLY:
-   case CTRL_TYPE_TRAP:
-   var = strtok_r(NULL, " ", );
-   val = strtok_r(NULL, "", );
-   if (!var || !val) {
-   cmd->type = CTRL_TYPE_ERROR;
-   cmd->reply = "Trap/Reply incomplete";
-   LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply 
incomplete\n");
-   goto err;
-   }
-   if (!osmo_separated_identifiers_valid(var, ".")) {
-   cmd->type = CTRL_TYPE_ERROR;
-   cmd->reply = "Trap/Reply variable contains 
invalid characters";
-   LOGP(DLCTRL, LOGL_NOTICE, "Trap/Reply variable 
contains invalid characters: \"%s\"\n",
-osmo_escape_str(var, -1));
-   goto err;
-   }
-   cmd->variable = talloc_strdup(cmd, var);
-   cmd->reply = talloc_strdup(cmd, val);
-   if (!cmd->variable || !cmd->reply)
-   goto oom;
-   LOGP(DLCTRL, LOGL_DEBUG, "Command: TRAP/REPLY %s: 
\"%s\"\n", cmd->variable,
-osmo_escape_str(cmd->reply, -1));
-   break;
+#define REPLY_CASE(TYPE, NAME)  \
+   case TYPE: \
+   var = strtok_r(NULL, " ", ); \
+   val = strtok_r(NULL, "", ); \
+   if (!var) { \
+   cmd->type = CTRL_TYPE_ERROR; \
+   cmd->reply = NAME " incomplete"; \
+   LOGP(DLCTRL, LOGL_NOTICE, NAME " 
incomplete\n"); \
+   goto err; \
+   } \
+   if (!osmo_separated_identifiers_valid(var, ".")) { \
+   cmd->type = CTRL_TYPE_ERROR; \
+   cmd->reply = NAME " variable contains invalid 
characters"; \
+   LOGP(DLCTRL, LOGL_NOTICE, NAME " variable 
contains invalid characters: \"%s\"\n", \
+osmo_escape_str(var, -1)); \
+   goto err; \
+   } \
+   cmd->variable = talloc_strdup(cmd, var); \
+   cmd->reply = talloc_strdup(cmd, val); \
+   if (!cmd->variable || !cmd->reply) \
+   goto oom; \
+   LOGP(DLCTRL, LOGL_DEBUG, "Command: " NAME " %s: %s\n", 
cmd->variable, \
+osmo_escape_str(cmd->reply, -1)); \
+   break
+   REPLY_CASE(CTRL_TYPE_GET_REPLY, "GET REPLY");
+   REPLY_CASE(CTRL_TYPE_SET_REPLY, "SET REPLY");
+   REPLY_CASE(CTRL_TYPE_TRAP, "TRAP");
+#undef REPLY_CASE
case CTRL_TYPE_ERROR:
var = strtok_r(NULL, "", );
if (!var) {

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 


python/osmo-python-tests[master]: Improve python3 compatibility

2017-12-18 Thread Max

Patch Set 3:

> osmo_interact_vty.py --gen-xml-ref

That's cool, didn't know about it. Is there example use somewhere in osmo*? 
Also, is there equivalent counterpart for osmotestvty.py?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121
Gerrit-PatchSet: 3
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libosmocore[master]: ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP

2017-12-18 Thread Neels Hofmeyr

Patch Set 4:

> That looks like lot's of code duplication. Can we just set error
 > string and call some generic function with it as parameter? Smth
 > like
 > case CTRL_TRAP: handle_incoming("TRAP",...)...

yes, you're right. I thought about the same but in the end didn't get around to 
it... trying to find a reason why I didn't want to do that, but there doesn't 
seem to be any besides laziness on my side

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

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


libosmocore[master]: ctrl: tighten CTRL input parsing

2017-12-18 Thread Neels Hofmeyr

Patch Set 4:

(4 comments)

https://gerrit.osmocom.org/#/c/5438/4/src/ctrl/control_cmd.c
File src/ctrl/control_cmd.c:

Line 284: static bool id_str_valid(const char *str)
> Are we absolutely sure that all current and future users of this function a
yes, the strtok actually places a '\0' after each token (and overwrites the 
input string I think)


Line 296: struct ctrl_cmd *ctrl_cmd_parse2(void *ctx, struct msgb *msg)
> We take msgb as input so we know the length of data to process. This means 
the msgb length is the entire command's length, the id string is only the 
second token, separated out by strtok. And furthermore, the start of this 
function actually adds a '\0' to the end of the msgb to be sure that the string 
is nul terminated... Remaining issue could be that the msgb already contains a 
'\0' halfway thru and there might be more data following which would be ignored 
-- not related to this patch.


Line 331:   tmp = strtok_r(NULL, " ",  );
here the id string gets separated and terminated


Line 341:   if (!id_str_valid(tmp)) {
all i do here is validate the resulting string which is guaranteed to be 
terminated


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

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


osmo-msc[master]: libmsc: a_iface: Remove duplicated 'const' keyword

2017-12-18 Thread Neels Hofmeyr

Patch Set 1:

heh i did the same in https://gerrit.osmocom.org/5373 -- yours is nicer since 
it shows the actual warnings, but mine already got merged...

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

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


  1   2   >