Change in libosmocore[master]: vty list: fix deprecation/hidden bit logic

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

Change subject: vty list: fix deprecation/hidden bit logic
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I07ec15cab057a3e09064e0420a69121ee8eb4253
Gerrit-Change-Number: 11071
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 24 Sep 2018 05:46:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: vty reference: fix deprecation bit evaluation

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

Change subject: vty reference: fix deprecation bit evaluation
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1f18e0e41da4772d092d71261b9e489dc1598923
Gerrit-Change-Number: 11070
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Mon, 24 Sep 2018 05:45:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: vty list: fix deprecation/hidden bit logic

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


Change subject: vty list: fix deprecation/hidden bit logic
..

vty list: fix deprecation/hidden bit logic

If a command is both hidden and deprecated, still don't show it for the 'list'
command.

We currently have no such nodes, as it seems, though.

Related: OS#3584
Change-Id: I07ec15cab057a3e09064e0420a69121ee8eb4253
---
M src/vty/command.c
1 file changed, 1 insertion(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/11071/1

diff --git a/src/vty/command.c b/src/vty/command.c
index 900680f..1e77d13 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2728,8 +2728,7 @@

for (i = 0; i < vector_active(cnode->cmd_vector); i++)
if ((cmd = vector_slot(cnode->cmd_vector, i)) != NULL
-   && !(cmd->attr == CMD_ATTR_DEPRECATED
-|| cmd->attr == CMD_ATTR_HIDDEN))
+   && !(cmd->attr & (CMD_ATTR_DEPRECATED | CMD_ATTR_HIDDEN)))
vty_out(vty, "  %s%s", cmd->string, VTY_NEWLINE);
return CMD_SUCCESS;
 }

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

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


Change in libosmocore[master]: vty reference: fix deprecation bit evaluation

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


Change subject: vty reference: fix deprecation bit evaluation
..

vty reference: fix deprecation bit evaluation

In vty_dump_nodes(), make sure the bitwise & is evaluated first.

For the deprecation flag (0x1), the practical effect is most likely identical,
assuming that the boolean ! operator flips the first bit, so I expect no
visible functional difference. It still was confusing and wrong to look at.

Related: OS#3584
Change-Id: I1f18e0e41da4772d092d71261b9e489dc1598923
---
M src/vty/command.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/11070/1

diff --git a/src/vty/command.c b/src/vty/command.c
index 43f974c..900680f 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -679,7 +679,7 @@
elem = vector_slot(cnode->cmd_vector, j);
if (!vty_command_is_common(elem))
continue;
-   if (!elem->attr & CMD_ATTR_DEPRECATED)
+   if (!(elem->attr & CMD_ATTR_DEPRECATED))
vty_dump_element(elem, vty);
}
}
@@ -717,7 +717,7 @@
elem = vector_slot(cnode->cmd_vector, j);
if (vty_command_is_common(elem))
continue;
-   if (!elem->attr & CMD_ATTR_DEPRECATED)
+   if (!(elem->attr & CMD_ATTR_DEPRECATED))
vty_dump_element(elem, vty);
}


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

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


Jenkins build is back to normal : master-osmo-iuh » a1=default,a2=default,a3=default,osmocom-master-debian9 #2083

2018-09-23 Thread jenkins
See 




Build failed in Jenkins: master-osmo-iuh » a1=default,a2=default,a3=default,osmocom-master-debian9 #2082

2018-09-23 Thread jenkins
See 


--
[...truncated 714.59 KB...]
  A_SEQUENCE_OF(struct MemberJ {
   ^
:17:16:
 note: in definition of macro ‘A_SET_OF’
   void (*free)(type *);   \
^~~~
../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:27:2: note: in expansion 
of macro ‘A_SEQUENCE_OF’
  A_SEQUENCE_OF(struct MemberJ {
  ^
In file included from 
:8:0,
 from ../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:14,
 from 
../../include/osmocom/ranap/RANAP_IRATmeasurementParameters.h:15,
 from RANAP_IRATmeasurementParameters.c:7:
../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:27:23: warning: ‘struct 
MemberJ’ declared inside parameter list will not be visible outside of this 
definition or declaration
  A_SEQUENCE_OF(struct MemberJ {
   ^
:17:16:
 note: in definition of macro ‘A_SET_OF’
   void (*free)(type *);   \
^~~~
../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:27:2: note: in expansion 
of macro ‘A_SEQUENCE_OF’
  A_SEQUENCE_OF(struct MemberJ {
  ^
  CC   RANAP_SourceStatisticsDescriptor.lo
  CC   RANAP_SupportedRAB-ParameterBitrateList.lo
  CC   RANAP_SupportedBitrate.lo
In file included from 
:8:0,
 from ../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:14,
 from RANAP_EUTRANFrequencies.c:7:
../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:27:23: warning: ‘struct 
MemberJ’ declared inside parameter list will not be visible outside of this 
definition or declaration
  A_SEQUENCE_OF(struct MemberJ {
   ^
:17:16:
 note: in definition of macro ‘A_SET_OF’
   void (*free)(type *);   \
^~~~
../../include/osmocom/ranap/RANAP_EUTRANFrequencies.h:27:2: note: in expansion 
of macro ‘A_SEQUENCE_OF’
  A_SEQUENCE_OF(struct MemberJ {
  ^
  CC   RANAP_SourceUTRANCellID.lo
  CC   RANAP_SRB-ID.lo
  CC   RANAP_SRB-TrCH-Mapping.lo
  CC   RANAP_SRB-TrCH-MappingItem.lo
  CC   RANAP_SRVCC-HO-Indication.lo
  CC   RANAP_SRVCC-Information.lo
  CC   RANAP_SRVCC-Operation-Possible.lo
  CC   RANAP_SubflowSDU-Size.lo
  CC   RANAP_TAC.lo
  CC   RANAP_TAI.lo
  CC   RANAP_Target-ToSource-TransparentContainer.lo
  CC   RANAP_TargeteNodeB-ToSourceeNodeB-TransparentContainer.lo
  CC   RANAP_TargetBSS-ToSourceBSS-TransparentContainer.lo
  CC   RANAP_TargetCellId.lo
  CC   RANAP_TargetID.lo
  CC   RANAP_TargetENB-ID.lo
  CC   RANAP_TargetRNC-ID.lo
  CC   RANAP_TargetRNC-ToSourceRNC-TransparentContainer.lo
  CC   RANAP_TBCD-STRING.lo
  CC   RANAP_TemporaryUE-ID.lo
  CC   RANAP_Time-UE-StayedInCell.lo
  CC   RANAP_Time-UE-StayedInCell-EnhancedGranularity.lo
  CC   RANAP_TimeToMBMSDataTransfer.lo
  CC   RANAP_TimingDifferenceULDL.lo
  CC   RANAP_TMGI.lo
  CC   RANAP_TMSI.lo
  CC   RANAP_TraceDepth.lo
  CC   RANAP_TraceInformation.lo
  CC   RANAP_TracePropagationParameters.lo
  CC   RANAP_TraceRecordingSessionInformation.lo
  CC   RANAP_TraceRecordingSessionReference.lo
  CC   RANAP_TraceReference.lo
  CC   RANAP_TraceType.lo
  CC   RANAP_TrafficClass.lo
  CC   RANAP_TrafficHandlingPriority.lo
  CC   RANAP_TransferDelay.lo
  CC   RANAP_UnsuccessfullyTransmittedDataVolume.lo
  CC   RANAP_TransportLayerAddress.lo
  CC   RANAP_TrCH-ID.lo
  CC   RANAP_TrCH-ID-List.lo
  CC   RANAP_TriggerID.lo
  CC   RANAP_TunnelInformation.lo
  CC   RANAP_TypeOfError.lo
  CC   RANAP_UE-AggregateMaximumBitRate.lo
  CC   RANAP_UE-AggregateMaximumBitRateDownlink.lo
  CC   RANAP_UE-AggregateMaximumBitRateUplink.lo
  CC   RANAP_UE-History-Information.lo
  CC   RANAP_UE-ID.lo
  CC   RANAP_UESBI-Iu.lo
  CC   RANAP_UESBI-IuA.lo
  CC   RANAP_UESBI-IuB.lo
  CC   

Change in libosmocore[master]: GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages

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


Change subject: GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages
..

GSUP/SM: (WIP) introduce MO/MT FORWARD_SM messages

According to 3GPP TS 29.002, sections 12.2 and 12.9 the FORWARD_SM
messages (a.k.a MAP-*-FORWARD-SHORT-MESSAGE) are used to forward
MO/MT SMS messages.

Please note that only the 'must-have' fields of of both message
types are introduced by this change, in particular:

  - OSMO_GSUP_MSGT_{MO|MT}_FORWARD_SM_REQUEST (MAP Request)
- OSMO_GSUP_SM_RP_DA_IE
- OSMO_GSUP_SM_RP_OA_IE
- OSMO_GSUP_SM_RP_UI_IE

  - OSMO_GSUP_MSGT_{MO|MT}_FORWARD_SM_RESULT (MAP ACK)
- OSMO_GSUP_SM_RP_UI_IE

  - OSMO_GSUP_MSGT_{MO|MT}_FORWARD_SM_ERROR (MAP Response)
- GSUP_CAUSE_IE (MAP User Error, see 7.6.1)

Since there is no TCAP layer in GSUP, the context is emulated
using the session management IEs (see GSUP_SESSION_*_IE).

Change-Id: Ibe325c64ae2d6c626b232533bb4cbc65fc2b5d71
---
M include/osmocom/gsm/gsup.h
M src/gsm/gsup.c
M tests/gsup/gsup_test.err
3 files changed, 96 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/11069/1

diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index bed61ae..3f9a3f9 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -93,6 +93,9 @@
OSMO_GSUP_SMSC_ADDR_IE  = 0x40,
OSMO_GSUP_NODE_ADDR_IE  = 0x41,
OSMO_GSUP_SM_RP_RPI_IE  = 0x42,
+   OSMO_GSUP_SM_RP_DA_IE   = 0x43,
+   OSMO_GSUP_SM_RP_OA_IE   = 0x44,
+   OSMO_GSUP_SM_RP_UI_IE   = 0x45,
 };

 /*! GSUP message type */
@@ -131,6 +134,14 @@
OSMO_GSUP_MSGT_SRI_FOR_SM_REQUEST   = 0b00100100,
OSMO_GSUP_MSGT_SRI_FOR_SM_ERROR = 0b00100101,
OSMO_GSUP_MSGT_SRI_FOR_SM_RESULT= 0b00100110,
+
+   OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST= 0b00101000,
+   OSMO_GSUP_MSGT_MO_FORWARD_SM_ERROR  = 0b00101001,
+   OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT = 0b00101010,
+
+   OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST= 0b0011,
+   OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR  = 0b00110001,
+   OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT = 0b00110010,
 };

 #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b0011) == 0b00)
@@ -231,6 +242,25 @@
size_t  node_addr_len;
/*! HACK: SM-RP-RPI is (<0 / 0 / >0) => (false / omited / true) */
int sm_rp_rpi;
+
+   /*! SM Destination Address, see 7.6.8.1. It can be of the following:
+** IMSI, LMSI, MSISDN, roaming number, or service centre address.
+** The values from 'osmo_gsup_iei' enum are used for 'sm_rp_da_type'.
+** NOTE: LMSI, roaming number are not implemented */
+   const uint8_t   *sm_rp_da;
+   uint8_t sm_rp_da_type;
+   size_t  sm_rp_da_len;
+
+   /*! SM Originating Address, see 7.6.8.2. It can be of the following:
+** MSISDN or service centre address. ** The values from 'osmo_gsup_iei'
+** enum are used for 'sm_rp_da_type'. */
+   const uint8_t   *sm_rp_oa;
+   uint8_t sm_rp_oa_type;
+   size_t  sm_rp_oa_len;
+
+   /*! SM TPDU (Transport Protocol Data Unit), see 7.6.8.4 */
+   const uint8_t   *sm_rp_ui;
+   size_t  sm_rp_ui_len;
 };

 int osmo_gsup_decode(const uint8_t *data, size_t data_len,
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 22e26f1..752cfca 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -71,6 +71,14 @@
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_SRI_FOR_SM_ERROR),
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_SRI_FOR_SM_RESULT),

+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST),
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MO_FORWARD_SM_ERROR),
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT),
+
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST),
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR),
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT),
+
{ 0, NULL }
 };

@@ -452,6 +460,37 @@
gsup_msg->sm_rp_rpi = (*value) ? 1 : -1;
break;

+   case OSMO_GSUP_SM_RP_DA_IE:
+   /* First octet contains type of address */
+   if (value_len < 1) {
+   LOGP(DLGSUP, LOGL_ERROR, "Short read of "
+   "SM_RP_DA_IE (missing address type)\n");
+   return -GMM_CAUSE_COND_IE_ERR;
+   }
+
+   gsup_msg->sm_rp_da = value + 1; /* 

Change in libosmocore[master]: GSUP/SM: (WIP) introduce new SRI_FOR_SM message

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


Change subject: GSUP/SM: (WIP) introduce new SRI_FOR_SM message
..

GSUP/SM: (WIP) introduce new SRI_FOR_SM message

According to 3GPP TS 29.002, section 12.1 the SRI_FOR_SM message
(a.k.a MAP-SEND-ROUTING-INFO-FOR-SM) is used to retrieve the
routing information needed for routing a short message to
the servicing node of subscriber.

Please note that only the 'must-have' fields of SRI_FOR_SM
are introduced by this change, in particular:

  - GSUP_MSGT_SRI_FOR_SM_REQUEST (MAP Request)
- GSUP_MSISDN_IE
- GSUP_SM_RP_RPI_IE
- GSUP_SMSC_ADDR_IE

  - GSUP_MSGT_SRI_FOR_SM_RESULT (MAP Response)
- GSUP_IMSI_IE
- GSUP_NODE_ADDR_IE

  - GSUP_MSGT_SRI_FOR_SM_ERROR (MAP Response)
- GSUP_CAUSE_IE (MAP User Error, see 7.6.1)

Since there is no TCAP layer in GSUP, the context is emulated
using the session management IEs (see GSUP_SESSION_*_IE).

Change-Id: I4303dc817a5f8ee97b78d840672c443a6eddb332
---
M include/osmocom/gsm/gsup.h
M src/gsm/gsup.c
2 files changed, 51 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/11068/1

diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index 0ef5a75..bed61ae 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -88,6 +88,11 @@

/*! Supplementary Services payload */
OSMO_GSUP_SS_INFO_IE= 0x35,
+
+   /* SM related IEs (see 3GPP TS 29.002, section 7.6.8) */
+   OSMO_GSUP_SMSC_ADDR_IE  = 0x40,
+   OSMO_GSUP_NODE_ADDR_IE  = 0x41,
+   OSMO_GSUP_SM_RP_RPI_IE  = 0x42,
 };

 /*! GSUP message type */
@@ -121,6 +126,11 @@
OSMO_GSUP_MSGT_PROC_SS_REQUEST  = 0b0010,
OSMO_GSUP_MSGT_PROC_SS_ERROR= 0b0011,
OSMO_GSUP_MSGT_PROC_SS_RESULT   = 0b00100010,
+
+   /* FIXME: 0b001001? any ideas? */
+   OSMO_GSUP_MSGT_SRI_FOR_SM_REQUEST   = 0b00100100,
+   OSMO_GSUP_MSGT_SRI_FOR_SM_ERROR = 0b00100101,
+   OSMO_GSUP_MSGT_SRI_FOR_SM_RESULT= 0b00100110,
 };

 #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b0011) == 0b00)
@@ -213,6 +223,14 @@
/*! ASN.1 encoded MAP payload for Supplementary Services */
uint8_t *ss_info;
size_t  ss_info_len;
+
+   /*! SMS (Short Message Service) parameters */
+   const uint8_t   *smsc_addr;
+   size_t  smsc_addr_len;
+   const uint8_t   *node_addr;
+   size_t  node_addr_len;
+   /*! HACK: SM-RP-RPI is (<0 / 0 / >0) => (false / omited / true) */
+   int sm_rp_rpi;
 };

 int osmo_gsup_decode(const uint8_t *data, size_t data_len,
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 9c2f817..22e26f1 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -67,6 +67,10 @@
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_PROC_SS_ERROR),
OSMO_VALUE_STRING(OSMO_GSUP_MSGT_PROC_SS_RESULT),

+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_SRI_FOR_SM_REQUEST),
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_SRI_FOR_SM_ERROR),
+   OSMO_VALUE_STRING(OSMO_GSUP_MSGT_SRI_FOR_SM_RESULT),
+
{ 0, NULL }
 };

@@ -434,6 +438,20 @@
gsup_msg->ss_info_len = value_len;
break;

+   case OSMO_GSUP_SMSC_ADDR_IE:
+   gsup_msg->smsc_addr = value;
+   gsup_msg->smsc_addr_len = value_len;
+   break;
+
+   case OSMO_GSUP_NODE_ADDR_IE:
+   gsup_msg->node_addr = value;
+   gsup_msg->node_addr_len = value_len;
+   break;
+
+   case OSMO_GSUP_SM_RP_RPI_IE:
+   gsup_msg->sm_rp_rpi = (*value) ? 1 : -1;
+   break;
+
default:
LOGP(DLGSUP, LOGL_NOTICE,
 "GSUP IE type %d unknown\n", iei);
@@ -626,6 +644,21 @@
gsup_msg->ss_info_len, gsup_msg->ss_info);
}

+   if (gsup_msg->smsc_addr) {
+   msgb_tlv_put(msg, OSMO_GSUP_SMSC_ADDR_IE,
+   gsup_msg->smsc_addr_len, gsup_msg->smsc_addr);
+   }
+
+   if (gsup_msg->node_addr) {
+   msgb_tlv_put(msg, OSMO_GSUP_NODE_ADDR_IE,
+   gsup_msg->node_addr_len, gsup_msg->node_addr);
+   }
+
+   if (gsup_msg->sm_rp_rpi != 0) {
+   u8 = gsup_msg->sm_rp_rpi > 0 ? 1 : 0;
+   msgb_tlv_put(msg, OSMO_GSUP_SM_RP_RPI_IE, sizeof(u8), );
+   }
+
return 0;
 }


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

Change in osmo-gsm-tester[master]: Create a "ms_driver" stub for the testsuite

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

Change subject: Create a "ms_driver" stub for the testsuite
..


Patch Set 2:

(6 comments)

I prefer not to spend the next weeks in trying to test/make the other event 
loop work for starting 20k processes in time but focus on getting to run a 
simple test running on Jenkins.

https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py
File src/osmo_gsm_tester/ms_driver.py:

https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@68
PS1, Line 68: def prepare(self):
> We usually used "configure()" for most object for this kind of action.
Done


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@73
PS1, Line 73: # TODO: That needs some re-factoring
> This temporary socket files needs to go into the run dir. […]
I think I followed the pattern. I am not sure how self._run_dir get's passed 
into it? What do you think of a mix-in to:
  * Create the directory (use the dir= option for the tempfile.mkdtem call)
  * Use shutil.rmtree to recursively delete its contents?


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@81
PS1, Line 81: self._suite_run.remember_to_stop(self)
> That's actually aimed at (sub)classes of process.py:Process. […]
Done


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@97
PS1, Line 97: def run_test(self):
> We usually used "start()" for most object for this kind of action. […]
As you point out this method behaves differently to the rest of the test and I 
think for the next few weeks/months we have to cope with it.

The mass test is fundamentally different to running with a handful of 
subscribers. and python and the current architecture/code didn't scale well (at 
least on my laptop and I didn't retest since then).

The immediate goal is:

* Start BTS/NITB, configure subs to be used by mass test.


The long-term goal is:

* Be able to use the "ms_driver" as a drop-in replacement for a modem.


At this point I don't think switching an event loop helps us to gain any 
immediate benefit and I would prefer not to do it. Let's get a mass test going 
first and then iterate on it.

What do you think of finding a more compatible name? start_and_wait? 
start_blocking?


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/ms_driver.py@113
PS1, Line 113: def terminate(self):
> This should then be "cleanup(self)".
Done


https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/suite.py
File src/osmo_gsm_tester/suite.py:

https://gerrit.osmocom.org/#/c/10686/1/src/osmo_gsm_tester/suite.py@311
PS1, Line 311: ip_address = self.ip_address()
> You want to call self.register_for_cleanup(ms_driver) here.
Done



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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d
Gerrit-Change-Number: 10686
Gerrit-PatchSet: 2
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Sun, 23 Sep 2018 17:25:31 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: First round of clean-ups of imports and unused variables

2018-09-23 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/11067


Change subject: First round of clean-ups of imports and unused variables
..

First round of clean-ups of imports and unused variables

Run pyflakes src/osmo_gsm_tester and then address the first
round of problems.

Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
---
M src/osmo_gsm_tester/bts.py
M src/osmo_gsm_tester/bts_nanobts.py
M src/osmo_gsm_tester/bts_octphy.py
M src/osmo_gsm_tester/bts_osmo.py
M src/osmo_gsm_tester/bts_osmotrx.py
M src/osmo_gsm_tester/esme.py
M src/osmo_gsm_tester/modem.py
M src/osmo_gsm_tester/pcu_osmo.py
M src/osmo_gsm_tester/report.py
M src/osmo_gsm_tester/smsc.py
M src/osmo_gsm_tester/suite.py
11 files changed, 11 insertions(+), 25 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/67/11067/1

diff --git a/src/osmo_gsm_tester/bts.py b/src/osmo_gsm_tester/bts.py
index 041b2bc..3c22fb6 100644
--- a/src/osmo_gsm_tester/bts.py
+++ b/src/osmo_gsm_tester/bts.py
@@ -17,12 +17,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see .

-import os
-import pprint
-import tempfile
 import copy
 from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, schema, pcu_osmo
+from . import log, config, schema

 class Bts(log.Origin, metaclass=ABCMeta):

diff --git a/src/osmo_gsm_tester/bts_nanobts.py 
b/src/osmo_gsm_tester/bts_nanobts.py
index a18f205..bec2433 100644
--- a/src/osmo_gsm_tester/bts_nanobts.py
+++ b/src/osmo_gsm_tester/bts_nanobts.py
@@ -18,11 +18,8 @@
 # along with this program.  If not, see .

 import os
-import pprint
-import tempfile
 import re
-from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, pcap_recorder, bts, pcu
+from . import log, config, util, process, pcap_recorder, bts, pcu
 from . import powersupply
 from .event_loop import MainLoop

diff --git a/src/osmo_gsm_tester/bts_octphy.py 
b/src/osmo_gsm_tester/bts_octphy.py
index f1a0ce8..a1dd494 100644
--- a/src/osmo_gsm_tester/bts_octphy.py
+++ b/src/osmo_gsm_tester/bts_octphy.py
@@ -19,8 +19,7 @@

 import os
 import pprint
-import tempfile
-from . import log, config, util, template, process, pcu_osmo, bts_osmo
+from . import log, config, util, template, process, bts_osmo

 class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit):

diff --git a/src/osmo_gsm_tester/bts_osmo.py b/src/osmo_gsm_tester/bts_osmo.py
index 32784bd..361eb20 100644
--- a/src/osmo_gsm_tester/bts_osmo.py
+++ b/src/osmo_gsm_tester/bts_osmo.py
@@ -18,10 +18,9 @@
 # along with this program.  If not, see .

 import os
-import pprint
 import tempfile
 from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, bts, pcu_osmo
+from . import log, bts, pcu_osmo

 class OsmoBts(bts.Bts, metaclass=ABCMeta):

diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index e7e3542..910f4a1 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -19,9 +19,8 @@

 import os
 import pprint
-import tempfile
 from abc import ABCMeta, abstractmethod
-from . import log, config, util, template, process, pcu_osmo, bts_osmo
+from . import log, config, util, template, process, bts_osmo
 from .event_loop import MainLoop

 class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit):
diff --git a/src/osmo_gsm_tester/esme.py b/src/osmo_gsm_tester/esme.py
index 9653fbf..de3ac16 100644
--- a/src/osmo_gsm_tester/esme.py
+++ b/src/osmo_gsm_tester/esme.py
@@ -23,7 +23,7 @@
 import smpplib.consts
 import smpplib.exceptions

-from . import log, util, sms
+from . import log
 from .event_loop import MainLoop

 # if you want to know what's happening inside python-smpplib
diff --git a/src/osmo_gsm_tester/modem.py b/src/osmo_gsm_tester/modem.py
index d0bbf23..21b208c 100644
--- a/src/osmo_gsm_tester/modem.py
+++ b/src/osmo_gsm_tester/modem.py
@@ -21,9 +21,6 @@
 from .event_loop import MainLoop

 from pydbus import SystemBus, Variant
-import time
-import pprint
-import sys

 # Required for Gio.Cancellable.
 # See 
https://lazka.github.io/pgi-docs/Gio-2.0/classes/Cancellable.html#Gio.Cancellable
diff --git a/src/osmo_gsm_tester/pcu_osmo.py b/src/osmo_gsm_tester/pcu_osmo.py
index ad8ebce..767264c 100644
--- a/src/osmo_gsm_tester/pcu_osmo.py
+++ b/src/osmo_gsm_tester/pcu_osmo.py
@@ -19,8 +19,7 @@
 
 import os
 import pprint
-import tempfile
-from . import log, config, util, template, process, pcu
+from . import config, util, template, process, pcu

 class OsmoPcu(pcu.Pcu):

diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py
index a53504b..224cc46 100644
--- a/src/osmo_gsm_tester/report.py
+++ b/src/osmo_gsm_tester/report.py
@@ -17,11 +17,10 @@
 # You should have received a copy of the 

Change in osmo-gsm-tester[master]: Create a "ms_driver" stub for the testsuite

2018-09-23 Thread Holger Freyther
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/10686

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

Change subject: Create a "ms_driver" stub for the testsuite
..

Create a "ms_driver" stub for the testsuite

All config parameters are hardcoded for now and it should push
subscribers into the test (which should be a base class but not
a specific test).

Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d
---
A src/osmo_gsm_tester/ms_driver.py
M src/osmo_gsm_tester/suite.py
2 files changed, 137 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/86/10686/3
--
To view, visit https://gerrit.osmocom.org/10686
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I586b6d532c6e6395b4e6f2cf2128372237d05a7d
Gerrit-Change-Number: 10686
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 


Change in osmo-gsm-tester[master]: Add an initial test for the ms_driver

2018-09-23 Thread Holger Freyther
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/10687

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

Change subject: Add an initial test for the ms_driver
..

Add an initial test for the ms_driver

Some points to discuss:

* Should modems==0 be allowed to be set?
* I should compile/package the mobile and virtphy as well
* When executing suites shall we have a way to select only the
  virtual/non-virtual ones? A different suites directory?

Things to make configurable:
* IMSI and matching MSISDN ranges (start + count)
* Timeouts and number of MS (which should be related)

Change-Id: I5be2a6b4d3d21bf48625624b9e2cccb33765fe39
---
A suites/netreg_mass/register_default_mass.py
A suites/netreg_mass/suite.conf
2 files changed, 35 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/87/10687/3
--
To view, visit https://gerrit.osmocom.org/10687
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5be2a6b4d3d21bf48625624b9e2cccb33765fe39
Gerrit-Change-Number: 10687
Gerrit-PatchSet: 3
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Pau Espin Pedrol 


Change in simtrace2[master]: debian/control: Add dependency to libpcsclite-dev

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

Change subject: debian/control: Add dependency to libpcsclite-dev
..

debian/control: Add dependency to libpcsclite-dev

The host utilities use libpcsclite, and the missing build dependency
causes build failures in our nightly OBS builds since commit
faf1e88e48c216456bdea6060a623b7c31f07c70 was merged:

[  131s] cc -o simtrace2-remsim simtrace2-remsim.o apdu_dispatch.o 
simtrace2-discovery.o libusb_util.o -Wl,-z,relro `pkg-config --libs libusb-1.0 
libosmocore` -pthread `pkg-config --libs libosmosim libpcsclite`
[  131s] Package libpcsclite was not found in the pkg-config search path.
[  131s] Perhaps you should add the directory containing `libpcsclite.pc'
[  131s] to the PKG_CONFIG_PATH environment variable
[  131s] No package 'libpcsclite' found

Change-Id: I29adfc629e5e4ffd0bf8b9035ef9138fe7693d96
---
M debian/control
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/debian/control b/debian/control
index 490ed85..f30b1d3 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@
 Priority: optional
 Build-Depends: debhelper (>= 9),
libosmocore-dev,
+   libpcsclite-dev,
libnewlib-arm-none-eabi,
libusb-1.0-0-dev,
gcc-arm-none-eabi

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I29adfc629e5e4ffd0bf8b9035ef9138fe7693d96
Gerrit-Change-Number: 11066
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in simtrace2[master]: debian/control: Add dependency to libpcsclite-dev

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

Change subject: debian/control: Add dependency to libpcsclite-dev
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I29adfc629e5e4ffd0bf8b9035ef9138fe7693d96
Gerrit-Change-Number: 11066
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 23 Sep 2018 15:15:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


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

2018-09-23 Thread jenkins
See 


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

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

Change in simtrace2[master]: debian/control: Add dependency to libpcsclite-dev

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


Change subject: debian/control: Add dependency to libpcsclite-dev
..

debian/control: Add dependency to libpcsclite-dev

The host utilities use libpcsclite, and the missing build dependency
causes build failures in our nightly OBS builds since commit
faf1e88e48c216456bdea6060a623b7c31f07c70 was merged:

[  131s] cc -o simtrace2-remsim simtrace2-remsim.o apdu_dispatch.o 
simtrace2-discovery.o libusb_util.o -Wl,-z,relro `pkg-config --libs libusb-1.0 
libosmocore` -pthread `pkg-config --libs libosmosim libpcsclite`
[  131s] Package libpcsclite was not found in the pkg-config search path.
[  131s] Perhaps you should add the directory containing `libpcsclite.pc'
[  131s] to the PKG_CONFIG_PATH environment variable
[  131s] No package 'libpcsclite' found

Change-Id: I29adfc629e5e4ffd0bf8b9035ef9138fe7693d96
---
M debian/control
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/66/11066/1

diff --git a/debian/control b/debian/control
index 490ed85..f30b1d3 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@
 Priority: optional
 Build-Depends: debhelper (>= 9),
libosmocore-dev,
+   libpcsclite-dev,
libnewlib-arm-none-eabi,
libusb-1.0-0-dev,
gcc-arm-none-eabi

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

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29adfc629e5e4ffd0bf8b9035ef9138fe7693d96
Gerrit-Change-Number: 11066
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-gsm-tester[master]: Optimize and re-use an existing repository

2018-09-23 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/11063


Change subject: Optimize and re-use an existing repository
..

Optimize and re-use an existing repository

Instead of cloning osmocom-bb three times this will allow us to
re-use the repository. Simply change the directory, set the new
origin and fetch.

Change-Id: I63f103b2f70559e969e8c66477ab9ee7f2886832
---
M contrib/jenkins-build-common.sh
1 file changed, 8 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/63/11063/1

diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh
index c2ffbb4..f4198d0 100644
--- a/contrib/jenkins-build-common.sh
+++ b/contrib/jenkins-build-common.sh
@@ -75,10 +75,14 @@
   fi

   cd "$base"
-  rm -rf "$repo"
-  git clone "$git_url/$repo" "$repo"
+  if [ -d "$repo" ]; then
+cd "$repo"
+git fetch
+  else
+git clone "$git_url/$repo" "$repo"
+cd "$repo"
+  fi

-  cd "$repo"

   # Figure out whether we need to prepend origin/ to find branches in upstream.
   # Doing this allows using git hashes instead of a branch name.
@@ -86,7 +90,7 @@
 branch="origin/$branch"
   fi

-  git checkout -b build_branch "$branch"
+  git checkout -B build_branch "$branch"
   rm -rf *
   git reset --hard "$branch"


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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63f103b2f70559e969e8c66477ab9ee7f2886832
Gerrit-Change-Number: 11063
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 


Change in osmo-gsm-tester[master]: Be able to switch-off ASAN builds of our binaries.

2018-09-23 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/11065


Change subject: Be able to switch-off ASAN builds of our binaries.
..

Be able to switch-off ASAN builds of our binaries.

Inroduce a way to not take a 2x performance hit when testing. It
is of importance if we run with hundreds of BTSes and 10k+ subscribers.
In the absence of using getops or shflags use an environment for it.

Change-Id: I540ba1c35e8fb72abcee0d86e0bdc1136b47345c
---
M contrib/jenkins-build-common.sh
M contrib/jenkins-build-osmo-bsc.sh
M contrib/jenkins-build-osmo-bts.sh
M contrib/jenkins-build-osmo-ggsn.sh
M contrib/jenkins-build-osmo-hlr.sh
M contrib/jenkins-build-osmo-iuh.sh
M contrib/jenkins-build-osmo-mgw.sh
M contrib/jenkins-build-osmo-msc.sh
M contrib/jenkins-build-osmo-pcu.sh
M contrib/jenkins-build-osmo-sgsn.sh
M contrib/jenkins-build-osmo-stp.sh
M contrib/jenkins-build-osmocom-bb.sh
12 files changed, 55 insertions(+), 51 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/65/11065/1

diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh
index f4198d0..f9b9193 100644
--- a/contrib/jenkins-build-common.sh
+++ b/contrib/jenkins-build-common.sh
@@ -49,6 +49,10 @@
 # osmo-bts within the sysmoBTS SDK
 prefix_real="${prefix_real-"$prefix"}"

+# Flag to be used to enable ASAN in builds. Defaults to enable ASAN builds and
+# it can be disabled by passing SANITIZE_FLAGS="" to the build.
+SANITIZE_FLAGS="${SANITIZE_FLAGS---enable-sanitize}"
+
 export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$prefix_real/lib:$LD_LIBRARY_PATH"

diff --git a/contrib/jenkins-build-osmo-bsc.sh 
b/contrib/jenkins-build-osmo-bsc.sh
index 4081a00..5d4d333 100755
--- a/contrib/jenkins-build-osmo-bsc.sh
+++ b/contrib/jenkins-build-osmo-bsc.sh
@@ -4,11 +4,11 @@
 name="osmo-bsc"
 . "$(dirname "$0")/jenkins-build-common.sh"

-build_repo libosmocore --enable-sanitize --disable-doxygen
-build_repo libosmo-abis --enable-sanitize
-build_repo libosmo-netif --enable-sanitize --disable-doxygen
-build_repo libosmo-sccp --enable-sanitize
-build_repo osmo-mgw --enable-sanitize
-build_repo osmo-bsc --enable-sanitize
+build_repo libosmocore ${SANITIZE_FLAGS} --disable-doxygen
+build_repo libosmo-abis ${SANITIZE_FLAGS}
+build_repo libosmo-netif ${SANITIZE_FLAGS} --disable-doxygen
+build_repo libosmo-sccp ${SANITIZE_FLAGS}
+build_repo osmo-mgw ${SANITIZE_FLAGS}
+build_repo osmo-bsc ${SANITIZE_FLAGS}

 create_bin_tgz "osmo-bsc abisip-find ipaccess-config"
diff --git a/contrib/jenkins-build-osmo-bts.sh 
b/contrib/jenkins-build-osmo-bts.sh
index e5fab5d..46a1c11 100755
--- a/contrib/jenkins-build-osmo-bts.sh
+++ b/contrib/jenkins-build-osmo-bts.sh
@@ -6,8 +6,8 @@

 have_repo octphy-2g-headers

-build_repo libosmocore --enable-sanitize --disable-doxygen
-build_repo libosmo-abis --enable-sanitize
-build_repo osmo-bts --enable-sanitize --enable-trx 
--with-openbsc=$base/openbsc/openbsc/include --enable-octphy 
--with-octsdr-2g=$base/octphy-2g-headers
+build_repo libosmocore ${SANITIZE_FLAGS} --disable-doxygen
+build_repo libosmo-abis ${SANITIZE_FLAGS}
+build_repo osmo-bts ${SANITIZE_FLAGS} --enable-trx 
--with-openbsc=$base/openbsc/openbsc/include --enable-octphy 
--with-octsdr-2g=$base/octphy-2g-headers

 create_bin_tgz "osmo-bts-trx osmo-bts-octphy"
diff --git a/contrib/jenkins-build-osmo-ggsn.sh 
b/contrib/jenkins-build-osmo-ggsn.sh
index a2cf952..fec2633 100755
--- a/contrib/jenkins-build-osmo-ggsn.sh
+++ b/contrib/jenkins-build-osmo-ggsn.sh
@@ -4,7 +4,7 @@
 name="osmo-ggsn"
 . "$(dirname "$0")/jenkins-build-common.sh"

-build_repo libosmocore --enable-sanitize --disable-doxygen
-build_repo osmo-ggsn --enable-sanitize
+build_repo libosmocore ${SANITIZE_FLAGS} --disable-doxygen
+build_repo osmo-ggsn ${SANITIZE_FLAGS}

 create_bin_tgz osmo-ggsn
diff --git a/contrib/jenkins-build-osmo-hlr.sh 
b/contrib/jenkins-build-osmo-hlr.sh
index 3229e52..0b60955 100755
--- a/contrib/jenkins-build-osmo-hlr.sh
+++ b/contrib/jenkins-build-osmo-hlr.sh
@@ -4,8 +4,8 @@
 name="osmo-hlr"
 . "$(dirname "$0")/jenkins-build-common.sh"

-build_repo libosmocore --enable-sanitize --disable-doxygen
-build_repo libosmo-abis --enable-sanitize
-build_repo osmo-hlr --enable-sanitize
+build_repo libosmocore ${SANITIZE_FLAGS} --disable-doxygen
+build_repo libosmo-abis ${SANITIZE_FLAGS}
+build_repo osmo-hlr ${SANITIZE_FLAGS}

 create_bin_tgz osmo-hlr
diff --git a/contrib/jenkins-build-osmo-iuh.sh 
b/contrib/jenkins-build-osmo-iuh.sh
index 03295f9..e8e7fa8 100755
--- a/contrib/jenkins-build-osmo-iuh.sh
+++ b/contrib/jenkins-build-osmo-iuh.sh
@@ -4,12 +4,12 @@
 name="osmo-iuh"
 . "$(dirname "$0")/jenkins-build-common.sh"

-build_repo libosmocore --enable-sanitize --disable-doxygen
-build_repo libosmo-abis --enable-sanitize
-build_repo libosmo-netif --enable-sanitize --disable-doxygen
-build_repo libosmo-sccp 

Change in osmo-gsm-tester[master]: Package mobile and virtphy as part of osmocom-bb as well

2018-09-23 Thread Holger Freyther
Holger Freyther has uploaded this change for review. ( 
https://gerrit.osmocom.org/11064


Change subject: Package mobile and virtphy as part of osmocom-bb as well
..

Package mobile and virtphy as part of osmocom-bb as well

Change-Id: Ie44dca72327e928073b00cde434d1cf2de574d9c
---
M contrib/jenkins-build-osmocom-bb.sh
1 file changed, 4 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester 
refs/changes/64/11064/1

diff --git a/contrib/jenkins-build-osmocom-bb.sh 
b/contrib/jenkins-build-osmocom-bb.sh
index d5eec1e..e968a1a 100755
--- a/contrib/jenkins-build-osmocom-bb.sh
+++ b/contrib/jenkins-build-osmocom-bb.sh
@@ -8,19 +8,9 @@
 
FW_RPM_URL="http://download.opensuse.org/repositories/home:/mnhauke:/osmocom:/nightly/SLE_15/x86_64/;

 build_repo libosmocore --disable-doxygen
-
-have_repo osmocom-bb
-cd osmocom-bb/
-
-cd src/host/osmocon/
-set +x; echo; echo; set -x
-autoreconf -fi
-set +x; echo; echo; set -x
-./configure --prefix="$prefix" $CONFIGURE_FLAGS $configure_opts
-set +x; echo; echo; set -x
-make -j4
-set +x; echo; echo; set -x
-make install
+build_repo_dir osmocom-bb src/host/virt_phy --enable-sanitize
+build_repo_dir osmocom-bb src/host/osmocon --enable-sanitize
+build_repo_dir osmocom-bb src/host/layer23 --enable-sanitize

 mkdir -p "$prefix"
 cd "$prefix"
@@ -30,4 +20,4 @@
 rpm2cpio osmocom-bb-firmware.rpm  | cpio -idmv
 rm osmocom-bb-firmware.rpm

-create_bin_tgz "" "osmocon"
+create_bin_tgz "virtphy mobile" "osmocon"

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

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie44dca72327e928073b00cde434d1cf2de574d9c
Gerrit-Change-Number: 11064
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: add MO/MT FORWARD_SM messages

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


Change subject: library/GSUP_Types.ttcn: add MO/MT FORWARD_SM messages
..

library/GSUP_Types.ttcn: add MO/MT FORWARD_SM messages

According to 3GPP TS 29.002, sections 12.2 and 12.9 the FORWARD_SM
messages (a.k.a MAP-*-FORWARD-SHORT-MESSAGE) are used to forward
MO/MT SMS messages.

Please note that only the 'must-have' fields of both message
types are introduced by this change, in particular:

  - OSMO_GSUP_MSGT_{MO|MT}_FORWARD_SM_REQUEST (MAP Request)
- OSMO_GSUP_SM_RP_DA_IE
- OSMO_GSUP_SM_RP_OA_IE
- OSMO_GSUP_SM_RP_UI_IE

  - OSMO_GSUP_MSGT_{MO|MT}_FORWARD_SM_RESULT (MAP ACK)
- OSMO_GSUP_SM_RP_UI_IE

  - OSMO_GSUP_MSGT_{MO|MT}_FORWARD_SM_ERROR (MAP Response)
- GSUP_CAUSE_IE (MAP User Error, see 7.6.1)

Since there is no TCAP layer in GSUP, the context is emulated
using the session management IEs, in particular using the
GSUP_SESSION_ID_IE. The session state IE isn't used due to
the 'REQ-RSP' nature of this message.

Change-Id: Ibf49474a81235096c032ea21f217170f523bd94e
---
M library/GSUP_Types.ttcn
1 file changed, 310 insertions(+), 3 deletions(-)



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

diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index fed13bf..a7c4732 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -48,7 +48,10 @@
/* SM related IEs (see 3GPP TS 29.002, section 7.6.8) */
OSMO_GSUP_SMSC_ADDR_IE  ('40'O),
OSMO_GSUP_NODE_ADDR_IE  ('41'O),
-   OSMO_GSUP_SM_RP_RPI_IE  ('42'O)
+   OSMO_GSUP_SM_RP_RPI_IE  ('42'O),
+   OSMO_GSUP_SM_RP_DA_IE   ('43'O),
+   OSMO_GSUP_SM_RP_OA_IE   ('44'O),
+   OSMO_GSUP_SM_RP_UI_IE   ('45'O)
 } with { variant "FIELDLENGTH(8)" };

 type enumerated GSUP_MessageType {
@@ -85,7 +88,15 @@
/* FIXME: 0b001001? any ideas? */
OSMO_GSUP_MSGT_SRI_FOR_SM_REQUEST   ('00100100'B),
OSMO_GSUP_MSGT_SRI_FOR_SM_ERROR ('00100101'B),
-   OSMO_GSUP_MSGT_SRI_FOR_SM_RESULT('00100110'B)
+   OSMO_GSUP_MSGT_SRI_FOR_SM_RESULT('00100110'B),
+
+   OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST('00101000'B),
+   OSMO_GSUP_MSGT_MO_FORWARD_SM_ERROR  ('00101001'B),
+   OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT ('00101010'B),
+
+   OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST('0011'B),
+   OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR  ('00110001'B),
+   OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT ('00110010'B)
 } with { variant "FIELDLENGTH(8)" };

 type enumerated GSUP_CancelType {
@@ -141,6 +152,9 @@
 smsc_addr, tag = OSMO_GSUP_SMSC_ADDR_IE;
 node_addr, tag = OSMO_GSUP_NODE_ADDR_IE;
 sm_rp_rpi, tag = OSMO_GSUP_SM_RP_RPI_IE;
+sm_rp_da, tag = OSMO_GSUP_SM_RP_DA_IE;
+sm_rp_oa, tag = OSMO_GSUP_SM_RP_OA_IE;
+sm_rp_ui, tag = OSMO_GSUP_SM_RP_UI_IE;
)"
 };

@@ -178,7 +192,10 @@
/* Short Message Service */
octetstring smsc_addr, /* FIXME: octetstring? */
octetstring node_addr, /* FIXME: octetstring? */
-   boolean sm_rp_rpi /* FIXME: boolean? */
+   boolean sm_rp_rpi, /* FIXME: boolean? */
+   GSUP_SM_RP_DA   sm_rp_da,
+   GSUP_SM_RP_OA   sm_rp_oa,
+   octetstring sm_rp_ui
 };

 type record GSUP_PDU {
@@ -655,6 +672,140 @@
}
 }

+/**
+ * SM-RP-DA represents the SM Destination Address, see 7.6.8.1.
+ * It can be either of the following:
+ *  - IMSI
+ *  - LMSI (not implemented)
+ *  - MSISDN
+ *  - roaming number (not implemented)
+ *  - service centre address
+ */
+type union GSUP_SM_RP_DA_IeValue {
+   hexstring   imsi,
+   hexstring   msisdn,
+   octetstring smsc_addr
+};
+
+type record GSUP_SM_RP_DA {
+   GSUP_IEItag,
+   GSUP_SM_RP_DA_IeValue   val
+} with { variant (val) "CROSSTAG(imsi, tag = OSMO_GSUP_IMSI_IE;
+msisdn, tag = OSMO_GSUP_MSISDN_IE;
+smsc_addr, tag = OSMO_GSUP_SMSC_ADDR_IE;
+   )"
+};
+
+template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_IMSI(hexstring imsi) := {
+   tag := OSMO_GSUP_IMSI_IE,
+   val := { imsi := imsi }
+}
+template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_IMSI(template hexstring imsi) := {
+   tag := OSMO_GSUP_IMSI_IE,
+   val := { imsi := imsi }
+}
+
+template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_MSISDN(hexstring msisdn) := {
+   tag := OSMO_GSUP_MSISDN_IE,
+   val := { msisdn := msisdn }
+}
+template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_MSISDN(template hexstring msisdn) 

Change in osmo-ci[master]: Add building for "mobile" and "virt_phy" as well

2018-09-23 Thread Holger Freyther
Holger Freyther has abandoned this change. ( https://gerrit.osmocom.org/10973 )

Change subject: Add building for "mobile" and "virt_phy" as well
..


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I7b2e6111f8b41219e9b2621be5720b9a738c69de
Gerrit-Change-Number: 10973
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte