osmo-gsm-tester[master]: ms: Create a cumulative distribution function class
Patch Set 7: Hmm.. So even with _prep missing the test should have been executed... I am retriggering the build and check if the workspace is updated.. https://jenkins.osmocom.org/jenkins/job/osmo-gsm-tester_gerrit/ws/osmo-gsm-tester/selftest/ doesn't contain a cdf_test.py... that's strange.. -- To view, visit https://gerrit.osmocom.org/6230 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Holger FreytherGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/armv7l
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: [ 193s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 193s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 193s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 193s] make[4]: Nothing to be done for 'install-exec-am'. [ 193s] make[4]: Nothing to be done for 'install-data-am'. [ 193s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 193s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 193s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 193s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 193s]dh_install [ 194s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 194s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 194s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 194s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 194s] dh_install: missing files, aborting [ 194s] debian/rules:45: recipe for target 'binary' failed [ 194s] make: *** [binary] Error 2 [ 194s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 194s] [ 194s] armbuild01 failed "build osmo-bsc_1.1.2.20180316.dsc" at Sat Mar 17 02:17:44 UTC 2018. [ 194s] [ 194s] ### VM INTERACTION START ### [ 197s] [ 179.202599] SysRq : Power Off [ 197s] [ 179.211535] reboot: Power down [ 197s] qemu-system-aarch64: Failed to unlink socket /var/cache/obs/worker/root_5/root.monitor: Permission denied [ 197s] ### VM INTERACTION END ### [ 197s] [ 197s] armbuild01 failed "build osmo-bsc_1.1.2.20180316.dsc" at Sat Mar 17 02:17:47 UTC 2018. [ 197s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
[PATCH] osmo-bsc[master]: pcu_sock.c: Avoid breaking strict-aliasing on ptr derreference
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7333 to look at the new patch set (#2). pcu_sock.c: Avoid breaking strict-aliasing on ptr derreference Fixes following warning: pcu_sock.c: In function 'pcu_rx_data_req': pcu_sock.c:406:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] tlli = *((uint32_t *)data_req->data); ^ Change-Id: I5c93487c72d15b061e73ed4f9acbf2e77dec967a --- M src/libbsc/pcu_sock.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/7333/2 diff --git a/src/libbsc/pcu_sock.c b/src/libbsc/pcu_sock.c index caec40d..64422c7 100644 --- a/src/libbsc/pcu_sock.c +++ b/src/libbsc/pcu_sock.c @@ -403,7 +403,7 @@ "invalid/small length %d\n", data_req->len); break; } - tlli = *((uint32_t *)data_req->data); + memcpy(, data_req->data, 4); msg = msgb_alloc(data_req->len - 4, "pcu_agch"); if (!msg) { -- To view, visit https://gerrit.osmocom.org/7333 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5c93487c72d15b061e73ed4f9acbf2e77dec967a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder
osmo-pcu[master]: contrib: jenkins.sh: Use flag --enable-werror
Patch Set 1: Still cannot be merged due to warnings in lc15 specific parts: osmo-bts-litecell15/lc15_l1_if.c: In function ‘prim_init’: osmo-bts-litecell15/lc15_l1_if.c:79:33: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphCloseReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:82:35: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphConnectReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:85:38: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphDisconnectReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:88:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphActivateReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:91:38: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphDeactivateReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:94:34: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphConfigReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:97:35: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.mphMeasureReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:113:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.phEmptyFrameReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c:116:31: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] prim->u.phDataReq.hLayer1 = (HANDLE)gl1->hLayer1; ^ osmo-bts-litecell15/lc15_l1_if.c: In function ‘handle_ph_data_ind’: osmo-bts-litecell15/lc15_l1_if.c:191:2: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 8 has type ‘HANDLE’ [-Werror=format=] DEBUGP(DL1IF, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", ^ osmo-bts-litecell15/lc15_l1_if.c:191:2: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 8 has type ‘HANDLE’ [-Werror=format=] osmo-bts-litecell15/lc15_l1_if.c: In function ‘l1if_pdch_req’: osmo-bts-litecell15/lc15_l1_if.c:321:22: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] data_req->hLayer1 = (HANDLE)fl1h->hLayer1; ^ cc1: all warnings being treated as errors -- To view, visit https://gerrit.osmocom.org/7331 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7023f3637df12d2483b745db9881d37c5b0aa91d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[ABANDON] osmo-sgsn[master]: contrib/jenkins.sh: Enable Werror
Pau Espin Pedrol has abandoned this change. Change subject: contrib/jenkins.sh: Enable Werror .. Abandoned Abandoning since it seems we will use --enable-werror configure flag anyway. -- To view, visit https://gerrit.osmocom.org/5672 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Idd110c4eaecab5268e1f87c11ba96460bda274ee Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: pcu_sock.c: Avoid breaking strict-aliasing on ptr derreference
Review at https://gerrit.osmocom.org/7333 pcu_sock.c: Avoid breaking strict-aliasing on ptr derreference Fixes following warning: pcu_sock.c: In function 'pcu_rx_data_req': pcu_sock.c:406:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] tlli = *((uint32_t *)data_req->data); ^ Change-Id: I5c93487c72d15b061e73ed4f9acbf2e77dec967a --- M src/libbsc/pcu_sock.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/7333/1 diff --git a/src/libbsc/pcu_sock.c b/src/libbsc/pcu_sock.c index caec40d..d366855 100644 --- a/src/libbsc/pcu_sock.c +++ b/src/libbsc/pcu_sock.c @@ -403,7 +403,7 @@ "invalid/small length %d\n", data_req->len); break; } - tlli = *((uint32_t *)data_req->data); + memcpy(, data_req->data, sizeof(uint32_t)); msg = msgb_alloc(data_req->len - 4, "pcu_agch"); if (!msg) { -- To view, visit https://gerrit.osmocom.org/7333 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c93487c72d15b061e73ed4f9acbf2e77dec967a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
osmo-bsc[master]: contrib: jenkins.sh: Add --enable-werror flag
Patch Set 1: This one cannot still be merged due to this warning still appearing: pcu_sock.c: In function 'pcu_rx_data_req': pcu_sock.c:406:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] tlli = *((uint32_t *)data_req->data); ^ -- To view, visit https://gerrit.osmocom.org/7329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife9ca2a5b835dfd6d03c981dcf0e48265eb861eb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] osmo-msc[master]: msc_mgcp.c: Fix several wrong ptr printf fmt
Review at https://gerrit.osmocom.org/7332 msc_mgcp.c: Fix several wrong ptr printf fmt Fixes several of these type of warnings: include/osmocom/core/fsm.h:123:38: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘char *’ [-Wformat=] LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \ ^ src/libmsc/msc_mgcp.c:277:71: note: format string is defined here "CRCX/RAN: creating connection for the RAN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); ~^ Change-Id: I17b7bed8fc39612286ba66f250b6b26da01d38c0 --- M src/libmsc/msc_mgcp.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/32/7332/1 diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c index 5c615a9..3cd02c2 100644 --- a/src/libmsc/msc_mgcp.c +++ b/src/libmsc/msc_mgcp.c @@ -274,7 +274,7 @@ OSMO_ASSERT(mgcp); LOGPFSML(fi, LOGL_DEBUG, -"CRCX/RAN: creating connection for the RAN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); +"CRCX/RAN: creating connection for the RAN side on MGW endpoint:%p...\n", mgcp_ctx->rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -370,7 +370,7 @@ } LOGPFSML(fi, LOGL_DEBUG, -"CRCX/CN creating connection for the CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); +"CRCX/CN creating connection for the CN side on MGW endpoint:%p...\n", mgcp_ctx->rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { @@ -528,7 +528,7 @@ } LOGPFSML(fi, LOGL_DEBUG, -"MDCX/CN: completing connection for the CN side on MGW endpoint:0x%x, remote leg expects RTP input on address %s:%u\n", +"MDCX/CN: completing connection for the CN side on MGW endpoint:%p, remote leg expects RTP input on address %s:%u\n", mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_cn, conn->rtp.remote_port_cn); /* Generate MGCP message string */ @@ -645,7 +645,7 @@ } LOGPFSML(fi, LOGL_DEBUG, -"MDCX/RAN: completing connection for the CN side on MGW endpoint:0x%x, RAN expects RTP input on address %s:%u\n", +"MDCX/RAN: completing connection for the CN side on MGW endpoint:%p, RAN expects RTP input on address %s:%u\n", mgcp_ctx->rtp_endpoint, conn->rtp.remote_addr_ran, conn->rtp.remote_port_ran); /* Generate MGCP message string */ @@ -733,7 +733,7 @@ OSMO_ASSERT(mgcp); LOGPFSML(fi, LOGL_DEBUG, -"DLCX: removing connection for the RAN and CN side on MGW endpoint:0x%x...\n", mgcp_ctx->rtp_endpoint); +"DLCX: removing connection for the RAN and CN side on MGW endpoint:%p...\n", mgcp_ctx->rtp_endpoint); /* Generate MGCP message string */ mgcp_msg = (struct mgcp_msg) { -- To view, visit https://gerrit.osmocom.org/7332 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17b7bed8fc39612286ba66f250b6b26da01d38c0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-pcu[master]: gprs_bssgp_pcu.cpp: Comment unused function parse_ra_cap
Review at https://gerrit.osmocom.org/7330 gprs_bssgp_pcu.cpp: Comment unused function parse_ra_cap Commit 741d25cb6f8c0c1522cf6d1be2fea49356ecd4bd commented the only user of the function but forgot to comment too the function itself. Change-Id: I8b291b45aaedfb0421cd28c0d9e24cefa5547b09 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/30/7330/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 6727735..1524fb3 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -77,6 +77,7 @@ return 0; } +#if 0 static int parse_ra_cap(struct tlv_parsed *tp, MS_Radio_Access_capability_t *rac) { bitvec *block; @@ -102,6 +103,7 @@ bitvec_free(block); return 0; } +#endif static int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp) { -- To view, visit https://gerrit.osmocom.org/7330 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b291b45aaedfb0421cd28c0d9e24cefa5547b09 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-pcu[master]: contrib: jenkins.sh: Use flag --enable-werror
Review at https://gerrit.osmocom.org/7331 contrib: jenkins.sh: Use flag --enable-werror Change-Id: I7023f3637df12d2483b745db9881d37c5b0aa91d --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/31/7331/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 2527127..8f6420a 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -24,7 +24,7 @@ mkdir "$deps" || true # Collect configure options for osmo-pcu -PCU_CONFIG="" +PCU_CONFIG="--enable-werror" if [ "$with_dsp" = sysmo ]; then PCU_CONFIG="$PCU_CONFIG --enable-sysmocom-dsp --with-sysmobts=$inst/include/" -- To view, visit https://gerrit.osmocom.org/7331 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7023f3637df12d2483b745db9881d37c5b0aa91d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 5: > interestingly, I don't get any such compiler warnings on debian > unstable, using gcc-7.3. I'm running archlinux with gcc-8.1. It seems the warnings were introduced by an earlier commit, not this one. I sent fixes for all warnings + a patch to enable werror in here: https://gerrit.osmocom.org/#/c/7329/ -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] osmo-bsc[master]: tests: handover_test.c: Add missing header
Review at https://gerrit.osmocom.org/7328 tests: handover_test.c: Add missing header Fixes following compilation warning: osmo-bsc/tests/handover/handover_test.c:48:83: warning: ‘struct mgcp_conn_peer’ declared inside parameter list will not be visible outside of this definition or declaration int __real_mgcp_conn_modify(struct osmo_fsm_inst *fi, uint32_t parent_evt, struct mgcp_conn_peer *conn_peer); ^~ Change-Id: I1b5e91adee3daaec71122a7691a214aa8240bce2 --- M tests/handover/handover_test.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/28/7328/1 diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index b03b65a..280861c 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -27,6 +27,8 @@ #include #include +#include + #include #include #include -- To view, visit https://gerrit.osmocom.org/7328 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b5e91adee3daaec71122a7691a214aa8240bce2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: bsc_subscr_conn_fsm.c: Fix wrong param list passed to LOGPFSML
Review at https://gerrit.osmocom.org/7327 bsc_subscr_conn_fsm.c: Fix wrong param list passed to LOGPFSML Fixes: 3561bd48976dbee8dbd4659dad15be85a3e79ace Change-Id: Ifbf84bd3b64eea5bf315b83c95561e4534acc3b7 --- M src/libbsc/bsc_subscr_conn_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/7327/1 diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c index 652fdcd..2542ee7 100644 --- a/src/libbsc/bsc_subscr_conn_fsm.c +++ b/src/libbsc/bsc_subscr_conn_fsm.c @@ -369,7 +369,7 @@ /* An unsupported channel is requested, so we have to * reject this request by sending an assignment failure * message immediately */ - LOGPFSML(fi, LOGL_ERROR, "Requested channel mode is not supported!\n", + LOGPFSML(fi, LOGL_ERROR, "Requested channel mode is not supported! chan_mode=%s full_rate=%d\n", get_value_string(gsm48_chan_mode_names, conn->user_plane.chan_mode), conn->user_plane.full_rate); -- To view, visit https://gerrit.osmocom.org/7327 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbf84bd3b64eea5bf315b83c95561e4534acc3b7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: contrib: jenkins.sh: Add --enable-werror flag
Review at https://gerrit.osmocom.org/7329 contrib: jenkins.sh: Add --enable-werror flag Change-Id: Ife9ca2a5b835dfd6d03c981dcf0e48265eb861eb --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/29/7329/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5b57532..0be4fe0 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -40,12 +40,12 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize --enable-external-tests +./configure --enable-sanitize --enable-external-tests --enable-werror $MAKE $PARALLEL_MAKE LD_LIBRARY_PATH="$inst/lib" $MAKE check \ || cat-testlogs.sh LD_LIBRARY_PATH="$inst/lib" \ - DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror" \ $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7329 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife9ca2a5b835dfd6d03c981dcf0e48265eb861eb Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: bsc_api.c: bsc_handle_lchan_signal: Remove unused variable
Review at https://gerrit.osmocom.org/7326 bsc_api.c: bsc_handle_lchan_signal: Remove unused variable Variable is unused since 3561bd48976dbee8dbd4659dad15be85a3e79ace. Change-Id: I8ecff940ae848b965b26b7dc07153dd88b365fe4 --- M src/libbsc/bsc_api.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/26/7326/1 diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index c476547..156ea1a 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -866,8 +866,6 @@ static void handle_release(struct gsm_subscriber_connection *conn, struct bsc_api *bsc, struct gsm_lchan *lchan) { - int destruct = 1; - if (conn->secondary_lchan == lchan) { osmo_timer_del(>T10); conn->secondary_lchan = NULL; @@ -879,7 +877,7 @@ /* clear the connection now */ if (bsc->clear_request) - destruct = bsc->clear_request(conn, 0); + bsc->clear_request(conn, 0); /* now give up all channels */ if (conn->lchan == lchan) @@ -914,4 +912,3 @@ { osmo_signal_register_handler(SS_LCHAN, bsc_handle_lchan_signal, NULL); } - -- To view, visit https://gerrit.osmocom.org/7326 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ecff940ae848b965b26b7dc07153dd88b365fe4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
Build failure of network:osmocom:nightly/osmo-bsc in Debian_9.0/aarch64
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: [ 489s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 489s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 489s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 489s] make[4]: Nothing to be done for 'install-exec-am'. [ 489s] make[4]: Nothing to be done for 'install-data-am'. [ 489s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 489s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 489s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 489s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 489s]dh_install [ 489s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 489s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 489s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 489s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 489s] dh_install: missing files, aborting [ 489s] debian/rules:45: recipe for target 'binary' failed [ 489s] make: *** [binary] Error 2 [ 489s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 489s] [ 489s] obs-arm-2 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 22:08:50 UTC 2018. [ 489s] [ 489s] ### VM INTERACTION START ### [ 493s] [ 460.137822] sysrq: SysRq : Power Off [ 493s] [ 460.172809] reboot: Power down [ 493s] qemu-system-aarch64: Failed to unlink socket /var/cache/obs/worker/root_25/root.monitor: Permission denied [ 493s] ### VM INTERACTION END ### [ 493s] [ 493s] obs-arm-2 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 22:08:54 UTC 2018. [ 493s] -- 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/x86_64
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: [ 215s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 215s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 215s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 215s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 215s] make[4]: Nothing to be done for 'install-exec-am'. [ 215s] make[4]: Nothing to be done for 'install-data-am'. [ 215s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 215s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 215s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 215s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 215s]dh_install [ 215s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 215s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 215s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 215s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 215s] dh_install: missing files, aborting [ 215s] debian/rules:45: recipe for target 'binary' failed [ 215s] make: *** [binary] Error 2 [ 215s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 215s] [ 215s] cloud109 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:03:22 UTC 2018. [ 215s] [ 215s] ### VM INTERACTION START ### [ 219s] [ 185.666868] reboot: Power down [ 220s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_1/root.monitor: Permission denied [ 220s] ### VM INTERACTION END ### [ 220s] [ 220s] cloud109 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:03:27 UTC 2018. [ 220s] -- 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
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: [ 219s] make[5]: Nothing to be done for 'install-data-am'. [ 219s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests' [ 219s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 219s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 219s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 219s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 219s] make[4]: Nothing to be done for 'install-exec-am'. [ 219s] make[4]: Nothing to be done for 'install-data-am'. [ 219s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 219s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 219s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 219s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 219s]dh_install [ 219s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 219s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 219s] dh_install: missing files, aborting [ 219s] debian/rules:45: recipe for target 'binary' failed [ 219s] make: *** [binary] Error 2 [ 219s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 219s] [ 219s] cloud107 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:03:26 UTC 2018. [ 219s] [ 219s] ### VM INTERACTION START ### [ 222s] [ 202.816902] reboot: Power down [ 224s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_4/root.monitor: Permission denied [ 224s] ### VM INTERACTION END ### [ 224s] [ 224s] cloud107 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:03:31 UTC 2018. [ 224s] -- 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
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: [ 224s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 225s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 225s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 225s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 225s] make[4]: Nothing to be done for 'install-exec-am'. [ 225s] make[4]: Nothing to be done for 'install-data-am'. [ 225s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 225s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 225s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 225s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 225s]dh_install [ 225s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 225s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 225s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 225s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 225s] dh_install: missing files, aborting [ 225s] debian/rules:45: recipe for target 'binary' failed [ 225s] make: *** [binary] Error 2 [ 225s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 225s] [ 225s] lamb60 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:03:20 UTC 2018. [ 225s] [ 225s] ### VM INTERACTION START ### [ 228s] [ 218.531256] reboot: Power down [ 228s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_7/root.monitor: Permission denied [ 228s] ### VM INTERACTION END ### [ 228s] [ 228s] lamb60 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:03:24 UTC 2018. [ 228s] -- 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
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: [ 114s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 114s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 114s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 114s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 114s] make[4]: Nothing to be done for 'install-exec-am'. [ 114s] make[4]: Nothing to be done for 'install-data-am'. [ 114s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 114s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 114s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 114s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 114s]dh_install [ 114s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 114s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 114s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 114s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 114s] dh_install: missing files, aborting [ 114s] debian/rules:45: recipe for target 'binary' failed [ 114s] make: *** [binary] Error 2 [ 114s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 114s] [ 114s] lamb11 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:01:27 UTC 2018. [ 114s] [ 114s] ### VM INTERACTION START ### [ 118s] [ 109.303994] reboot: Power down [ 118s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_1/root.monitor: Permission denied [ 118s] ### VM INTERACTION END ### [ 118s] [ 118s] lamb11 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:01:31 UTC 2018. [ 118s] -- 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
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: [ 144s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 144s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 144s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 144s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 144s] make[4]: Nothing to be done for 'install-exec-am'. [ 144s] make[4]: Nothing to be done for 'install-data-am'. [ 144s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 144s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 144s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 144s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 144s]dh_install [ 144s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 144s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 144s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 144s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 144s] dh_install: missing files, aborting [ 144s] debian/rules:45: recipe for target 'binary' failed [ 144s] make: *** [binary] Error 2 [ 144s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 144s] [ 144s] lamb53 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:00:04 UTC 2018. [ 144s] [ 144s] ### VM INTERACTION START ### [ 147s] [ 137.419504] reboot: Power down [ 147s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_8/root.monitor: Permission denied [ 147s] ### VM INTERACTION END ### [ 147s] [ 147s] lamb53 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 21:00:08 UTC 2018. [ 147s] -- 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
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: [ 211s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 211s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 211s] make[4]: Nothing to be done for 'install-exec-am'. [ 211s] make[4]: Nothing to be done for 'install-data-am'. [ 211s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 211s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 211s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 211s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 211s]dh_install [ 211s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in ., debian/tmp) [ 211s] [ 211s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 211s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in ., debian/tmp) [ 211s] [ 211s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 211s] dh_install: missing files, aborting [ 211s] debian/rules:45: recipe for target 'binary' failed [ 211s] make: *** [binary] Error 25 [ 211s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 211s] [ 211s] cloud116 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:57:15 UTC 2018. [ 211s] [ 211s] ### VM INTERACTION START ### [ 214s] [ 189.658920] reboot: Power down [ 216s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_3/root.monitor: Permission denied [ 216s] ### VM INTERACTION END ### [ 216s] [ 216s] cloud116 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:57:20 UTC 2018. [ 216s] -- 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
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: [ 138s] make[5]: Nothing to be done for 'install-data-am'. [ 138s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests' [ 138s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 138s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 138s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 138s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 138s] make[4]: Nothing to be done for 'install-exec-am'. [ 138s] make[4]: Nothing to be done for 'install-data-am'. [ 138s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 138s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 138s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 138s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 138s]dh_install [ 138s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 138s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 138s] dh_install: missing files, aborting [ 138s] debian/rules:45: recipe for target 'binary' failed [ 138s] make: *** [binary] Error 2 [ 138s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 138s] [ 138s] lamb11 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:55:08 UTC 2018. [ 138s] [ 138s] ### VM INTERACTION START ### [ 141s] [ 133.374139] reboot: Power down [ 141s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_7/root.monitor: Permission denied [ 141s] ### VM INTERACTION END ### [ 141s] [ 141s] lamb11 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:55:12 UTC 2018. [ 141s] -- 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
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: [ 118s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 118s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 118s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 118s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 118s] make[4]: Nothing to be done for 'install-exec-am'. [ 118s] make[4]: Nothing to be done for 'install-data-am'. [ 118s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 118s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 118s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 118s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 118s]dh_install [ 118s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 118s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 118s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 118s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 118s] dh_install: missing files, aborting [ 118s] debian/rules:45: recipe for target 'binary' failed [ 118s] make: *** [binary] Error 2 [ 118s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 118s] [ 118s] lamb11 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:51:52 UTC 2018. [ 118s] [ 118s] ### VM INTERACTION START ### [ 121s] [ 113.787200] reboot: Power down [ 121s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_1/root.monitor: Permission denied [ 121s] ### VM INTERACTION END ### [ 121s] [ 121s] lamb11 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:51:55 UTC 2018. [ 121s] -- 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
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: [ 197s] make[5]: Nothing to be done for 'install-data-am'. [ 197s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests' [ 197s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 197s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 197s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 197s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 197s] make[4]: Nothing to be done for 'install-exec-am'. [ 197s] make[4]: Nothing to be done for 'install-data-am'. [ 197s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 197s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 197s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 197s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 197s]dh_install [ 197s] cp: cannot stat 'debian/tmp/usr/bin/ipaccess-config': No such file or directory [ 197s] dh_install: cp -a debian/tmp/usr/bin/ipaccess-config debian/osmo-bsc-ipaccess-utils//usr/bin/ returned exit code 1 [ 197s] debian/rules:45: recipe for target 'binary' failed [ 197s] make: *** [binary] Error 2 [ 197s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 197s] [ 197s] lamb21 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:52:35 UTC 2018. [ 197s] [ 197s] ### VM INTERACTION START ### [ 199s] Powering off. [ 199s] [ 191.400344] reboot: Power down [ 199s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_1/root.monitor: Permission denied [ 199s] ### VM INTERACTION END ### [ 199s] [ 199s] lamb21 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:52:37 UTC 2018. [ 199s] -- 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
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: [ 129s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 129s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 129s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 129s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 129s] make[4]: Nothing to be done for 'install-exec-am'. [ 129s] make[4]: Nothing to be done for 'install-data-am'. [ 129s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 129s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 129s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 129s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 129s]dh_install [ 129s] dh_install: Cannot find (any matches for) "usr/bin/ipaccess-config" (tried in "." and "debian/tmp") [ 129s] dh_install: osmo-bsc-ipaccess-utils missing files: usr/bin/ipaccess-config [ 129s] dh_install: Cannot find (any matches for) "usr/bin/bs11_config" (tried in "." and "debian/tmp") [ 129s] dh_install: osmo-bsc-bs11-utils missing files: usr/bin/bs11_config [ 129s] dh_install: missing files, aborting [ 129s] debian/rules:45: recipe for target 'binary' failed [ 129s] make: *** [binary] Error 2 [ 129s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 129s] [ 129s] lamb55 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:48:57 UTC 2018. [ 129s] [ 129s] ### VM INTERACTION START ### [ 132s] [ 125.171474] reboot: Power down [ 132s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_4/root.monitor: Permission denied [ 132s] ### VM INTERACTION END ### [ 132s] [ 132s] lamb55 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:49:00 UTC 2018. [ 132s] -- 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
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: [ 144s] make[5]: Nothing to be done for 'install-data-am'. [ 144s] make[5]: Leaving directory '/usr/src/packages/BUILD/tests' [ 144s] make[4]: Leaving directory '/usr/src/packages/BUILD/tests' [ 144s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 144s] make[3]: Entering directory '/usr/src/packages/BUILD' [ 144s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 144s] make[4]: Nothing to be done for 'install-exec-am'. [ 144s] make[4]: Nothing to be done for 'install-data-am'. [ 144s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 144s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 144s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 144s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 144s]dh_install [ 144s] cp: cannot stat 'debian/tmp/usr/bin/ipaccess-config': No such file or directory [ 144s] dh_install: cp -a debian/tmp/usr/bin/ipaccess-config debian/osmo-bsc-ipaccess-utils//usr/bin/ returned exit code 1 [ 144s] debian/rules:45: recipe for target 'binary' failed [ 144s] make: *** [binary] Error 2 [ 144s] dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 [ 144s] [ 144s] lamb24 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:42:33 UTC 2018. [ 144s] [ 144s] ### VM INTERACTION START ### [ 145s] Powering off. [ 145s] [ 137.546016] reboot: Power down [ 145s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_4/root.monitor: Permission denied [ 145s] ### VM INTERACTION END ### [ 145s] [ 145s] lamb24 failed "build osmo-bsc_1.1.2.20180316.dsc" at Fri Mar 16 20:42:34 UTC 2018. [ 145s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 5: mh. I thought we didn't expect any regressions in the tests according to pmaier? https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-bsc-test/test_results_analyzer/ says something else: 8 testcases fail which passed before the merge :( -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] osmo-msc[master]: msc_mgcp: to not access higher layers after release
Harald Welte has submitted this change and it was merged. Change subject: msc_mgcp: to not access higher layers after release .. msc_mgcp: to not access higher layers after release The higher layers (gsm_04_08.c) are informed errors occur. But it is not checked if the call was already released. If an error occurs after the call control stack calls msc_mgcp_call_release() then the higher layers might already have cleaned up and the code accesses memory that is already freed (trans) - fix use after free by guarding the call to mncc_tx_to_cc() Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Related OS#2881 Related OS#2882 --- M src/libmsc/msc_mgcp.c 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c index 8e874d8..5c615a9 100644 --- a/src/libmsc/msc_mgcp.c +++ b/src/libmsc/msc_mgcp.c @@ -197,10 +197,15 @@ osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); } - /* Request the higher layers to release the call */ - mncc_set_cause(, GSM48_CAUSE_LOC_TRANS_NET, - GSM48_CC_CAUSE_RESOURCE_UNAVAIL); - mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, ); + /* Request the higher layers (gsm_04_08.c) to release the call. If the +* problem occured after msc_mgcp_call_release() was calls, remain +* silent because we already got informed and the higher layers might +* already freed their context information (trans). */ + if (!mgcp_ctx->free_ctx) { + mncc_set_cause(, GSM48_CAUSE_LOC_TRANS_NET, + GSM48_CC_CAUSE_RESOURCE_UNAVAIL); + mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, ); + } } /* Timer callback to shut down in case of connectivity problems */ -- To view, visit https://gerrit.osmocom.org/7325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
libosmocore[master]: add a regression test for TLV parsing with repeated IEs
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] libosmocore[master]: add a regression test for TLV parsing with repeated IEs
Harald Welte has submitted this change and it was merged. Change subject: add a regression test for TLV parsing with repeated IEs .. add a regression test for TLV parsing with repeated IEs Since commit bf383a1d83661af26ccd6521c49b655fb22531d4 tlv_parse() will return the first occurrence of a repeated IE. Add a test to verify this behaviour. This test passes with the current code and fails if bf383a1d83661af26ccd6521c49b655fb22531d4 is reverted. While here, fix lies in documentation about the return value of tlv_parse() and fix a typo in another comment. Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Related: OS#2904 --- M src/gsm/tlv_parser.c M tests/tlv/tlv_test.c 2 files changed, 33 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index b8c7149..f693971 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -48,7 +48,7 @@ struct tlv_definition tvlv_att_def; struct tlv_definition vtvlv_gan_att_def; -/*! Dump pasred TLV structure to stdout */ +/*! Dump parsed TLV structure to stdout */ int tlv_dump(struct tlv_parsed *dec) { int i; @@ -227,7 +227,7 @@ * \param[in] buf_len length of the input data buffer * \param[in] lv_tag an initial LV tag at the start of the buffer * \param[in] lv_tag2 a second initial LV tag following the \a lv_tag - * \returns number of bytes consumed by the TLV entry / IE parsed; negative in case of error + * \returns number of TLV entries parsed; negative in case of error */ int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def, const uint8_t *buf, int buf_len, uint8_t lv_tag, diff --git a/tests/tlv/tlv_test.c b/tests/tlv/tlv_test.c index 87b002f..2e28e54 100644 --- a/tests/tlv/tlv_test.c +++ b/tests/tlv/tlv_test.c @@ -245,11 +245,42 @@ } } +/* Most GSM related protocols clearly indicate that in case of duplicate + * IEs, only the first occurrence shall be used, while any further occurrences + * shall be ignored. See e.g. 3GPP TS 24.008 Section 8.6.3 */ +static void test_tlv_repeated_ie() +{ + uint8_t test_data[768]; + int i, rc; + const uint8_t tag = 0x1a; + struct tlv_parsed dec; + struct tlv_definition def; + + memset(, 0, sizeof(def)); + + /* tag:1:255, tag:1:254, tag:1:253, ..., tag:1:3, tag:1:2, tag:1:1, tag:1:0 */ + for (i = 0; i < ARRAY_SIZE(test_data) - 1; i += 3) { + test_data[i] = tag; + test_data[i + 1] = 1; + test_data[i + 2] = (uint8_t)(0xff - i/2); + } + + def.def[tag].type = TLV_TYPE_TLV; + + rc = tlv_parse(, , _data[1], sizeof(test_data) - 1, tag, 0); + OSMO_ASSERT(rc == i/3); + OSMO_ASSERT(dec.lv[tag].len == 1); + /* Value pointer should point at first value in test data array. */ + OSMO_ASSERT(dec.lv[tag].val == _data[2]); + OSMO_ASSERT(*dec.lv[tag].val == test_data[2]); +} + int main(int argc, char **argv) { //osmo_init_logging(); test_tlv_shift_functions(); + test_tlv_repeated_ie(); printf("Done.\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-bsc[master]: ipaccess-config: Check cmdlie arg unit-id format
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7324 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70906939b3320473c56a87929c4886aac9d7d064 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: abisip-find: Improve use information output
Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/7323/1//COMMIT_MSG Commit Message: Line 10: requires root permissions. However, the same target can be accomplished THe rationale is probably simple: SO_BINDTODEVICE bypasses the system-wide (by root) configured routing tables, while binding to a local IP doesn't. -- To view, visit https://gerrit.osmocom.org/7323 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie123c45005d68b186cb06538f7bd31f3b2513007 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes
[MERGED] osmo-bsc[master]: abisip-find: Improve use information output
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: Improve use information output .. abisip-find: Improve use information output Interestingly, SO_BINDTODEVICE used to bind to a specific iface requires root permissions. However, the same target can be accomplished by binding to a local IP addr set on the target interface, which doesn't require root permissions in this case. Change-Id: Ie123c45005d68b186cb06538f7bd31f3b2513007 --- M src/ipaccess/abisip-find.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 03f579b..21ed50e 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -436,9 +436,11 @@ handle_options(argc, argv); - if (!cmdline_opts.ifname) - fprintf(stdout, "- You might need to specify the outgoing\n" - " network interface, e.g. ``%s eth0''\n", argv[0]); + if (!cmdline_opts.ifname && !cmdline_opts.bind_ip) + fprintf(stdout, "- You might need to specify the outgoing network interface,\n" + " e.g. ``%s eth0'' (requires root permissions),\n" + " or alternatively use -b to bind to the source address\n" + " assigned to that interface\n", argv[0]); if (!cmdline_opts.list_view) fprintf(stdout, "- You may find the --list-view option convenient.\n"); else if (cmdline_opts.send_interval >= cmdline_opts.list_view_timeout) -- To view, visit https://gerrit.osmocom.org/7323 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie123c45005d68b186cb06538f7bd31f3b2513007 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-bsc[master]: ipaccess-config: Check cmdlie arg unit-id format
Harald Welte has submitted this change and it was merged. Change subject: ipaccess-config: Check cmdlie arg unit-id format .. ipaccess-config: Check cmdlie arg unit-id format Print a clear error when the format in not correct. I was in the situation several times in which I was passing "123" instead of "123/0/0", and spent a while seeing what was wrong. Change-Id: I70906939b3320473c56a87929c4886aac9d7d064 --- M src/ipaccess/ipaccess-config.c 1 file changed, 38 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index b83846d..7b9bd02 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -782,6 +783,41 @@ talloc_free(tall_firm_ctx); } +static bool check_unitid_fmt(const char* unit_id) +{ + const char *p = unit_id; + bool must_digit = true; + uint8_t remain_slash = 2; + + if (strlen(unit_id) < 5) + goto wrong_fmt; + + while (*p != '\0') { + if (*p != '/' && !isdigit(*p)) + goto wrong_fmt; + if (*p == '/' && must_digit) + goto wrong_fmt; + if (*p == '/') { + must_digit = true; + remain_slash--; + if (remain_slash < 0) + goto wrong_fmt; + } else { + must_digit = false; + } + p++; + } + + if (*(p-1) == '/') + goto wrong_fmt; + + return true; + +wrong_fmt: + fprintf(stderr, "ERROR: unit-id wrong format. Must be '\\d+/\\d+/\\d+'\n"); + return false; +} + static void print_usage(void) { printf("Usage: ipaccess-config IP_OF_BTS\n"); @@ -904,6 +940,8 @@ switch (c) { case 'u': + if (!check_unitid_fmt(optarg)) + exit(2); unit_id = optarg; break; case 'o': -- To view, visit https://gerrit.osmocom.org/7324 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I70906939b3320473c56a87929c4886aac9d7d064 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: gitignore Makefiles produced by 'make compile'
Harald Welte has submitted this change and it was merged. Change subject: gitignore Makefiles produced by 'make compile' .. gitignore Makefiles produced by 'make compile' Change-Id: Ia71e76f0dce2ba2f9f5837f4d3d099dff92e8787 --- M .gitignore 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 6973828..bf5baa0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,9 @@ *.hh !library/*.cc !library/*.hh +*/*Test +*/*_Tests +selftest/Selftest +*/Makefile +!bin/Makefile +!deps/Makefile -- To view, visit https://gerrit.osmocom.org/7314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia71e76f0dce2ba2f9f5837f4d3d099dff92e8787 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-ttcn3-hacks[master]: ignore results of .ttcnpp files
Harald Welte has submitted this change and it was merged. Change subject: ignore results of .ttcnpp files .. ignore results of .ttcnpp files Add another macro ignore_pp_results to gen_links.sh.inc and call from all gen_links.sh files, to add results of *.ttcnpp files, i.e. generated *.ttcn files, to .gitignore. Change-Id: Ic7fb176226771212d7700dafaf27ac71f12a4a61 --- M bsc-nat/gen_links.sh M bsc/gen_links.sh M bts/gen_links.sh M gen_links.sh.inc M ggsn_tests/gen_links.sh M hlr/gen_links.sh M lapdm/gen_links.sh M mgw/gen_links.sh M msc/gen_links.sh M pcu/gen_links.sh M selftest/gen_links.sh M sgsn/gen_links.sh M sysinfo/gen_links.sh 13 files changed, 30 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/gen_links.sh b/bsc-nat/gen_links.sh index 946fbaf..77c9563 100755 --- a/bsc-nat/gen_links.sh +++ b/bsc-nat/gen_links.sh @@ -50,3 +50,5 @@ DIR=../library FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn BSSAP_CodecPort.ttcn" gen_links $DIR $FILES + +ignore_pp_results diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index 50d7329..ee55c3e 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -75,3 +75,5 @@ DIR=../library FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn " gen_links $DIR $FILES + +ignore_pp_results diff --git a/bts/gen_links.sh b/bts/gen_links.sh index b2b7e92..b6c4e12 100755 --- a/bts/gen_links.sh +++ b/bts/gen_links.sh @@ -43,3 +43,5 @@ FILES+="TRXC_Types.ttcn TRXC_CodecPort.ttcn TRXC_CodecPort_CtrlFunct.ttcn TRXC_CodecPort_CtrlFunctDef.cc " FILES+="PCUIF_Types.ttcn PCUIF_CodecPort.ttcn " gen_links $DIR $FILES + +ignore_pp_results diff --git a/gen_links.sh.inc b/gen_links.sh.inc index aba8ca1..8a87359 100644 --- a/gen_links.sh.inc +++ b/gen_links.sh.inc @@ -19,3 +19,10 @@ gen_link "$DIR/$f" "$f" done } + +ignore_pp_results() { + for pp in *.ttcnpp; do + ttcn_file="$(echo $pp | sed 's/pp$//')" + echo "$ttcn_file" >> .gitignore + done +} diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh index 25990d3..6ef52e1 100755 --- a/ggsn_tests/gen_links.sh +++ b/ggsn_tests/gen_links.sh @@ -44,3 +44,5 @@ FILES="General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Templates.ttcn " gen_links $DIR $FILES + +ignore_pp_results diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh index 391ef73..c265eb8 100755 --- a/hlr/gen_links.sh +++ b/hlr/gen_links.sh @@ -27,3 +27,5 @@ FILES+="Osmocom_VTY_Functions.ttcn " gen_links $DIR $FILES + +ignore_pp_results diff --git a/lapdm/gen_links.sh b/lapdm/gen_links.sh index 83c6699..6236edd 100755 --- a/lapdm/gen_links.sh +++ b/lapdm/gen_links.sh @@ -16,3 +16,5 @@ DIR=../library FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn RLCMAC_CSN1_Types.ttcn Osmocom_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc L1CTL_Types.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn RLCMAC_Types.ttcn RLCMAC_EncDec.cc" gen_links $DIR $FILES + +ignore_pp_results diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh index 445be50..d307148 100755 --- a/mgw/gen_links.sh +++ b/mgw/gen_links.sh @@ -32,3 +32,5 @@ DIR=../library FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc RTP_CodecPort.ttcn" gen_links $DIR $FILES + +ignore_pp_results diff --git a/msc/gen_links.sh b/msc/gen_links.sh index fe09155..a7144a6 100755 --- a/msc/gen_links.sh +++ b/msc/gen_links.sh @@ -75,3 +75,5 @@ FILES+="RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunctDef.cc "
osmo-ttcn3-hacks[master]: sgsn: test GMM Attach with 3-digit leading-zero MNC
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7316 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-ttcn3-hacks[master]: gitignore *.{cc, hh}, whitelist library/*.{cc, hh}
Harald Welte has submitted this change and it was merged. Change subject: gitignore *.{cc,hh}, whitelist library/*.{cc,hh} .. gitignore *.{cc,hh}, whitelist library/*.{cc,hh} ttcn3 creates these files, and they clutter 'git status' output. Change-Id: I6b7868ae71d3d3e710232b22a964f701ae8bd05d --- M .gitignore 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index cc06c3c..6973828 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -bin/*.cc -bin/*.hh deps/*/ *.o *.log *.so compile */.gitignore +*.cc +*.hh +!library/*.cc +!library/*.hh -- To view, visit https://gerrit.osmocom.org/7313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b7868ae71d3d3e710232b22a964f701ae8bd05d Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-ttcn3-hacks[master]: sgsn: test GMM Attach with 3-digit leading-zero MNC
Harald Welte has submitted this change and it was merged. Change subject: sgsn: test GMM Attach with 3-digit leading-zero MNC .. sgsn: test GMM Attach with 3-digit leading-zero MNC Add general infrastructure to - pass an MCC-MNC for BSSGP to use into f_init(); - verify that the Attach Accept PLMN matches the BSSGP one. Add TC_attach_mnc3() to feed an MNC with three digits and a leading zero, to verify the recent mnc3 patches. When testing against a libosmocore and osmo-sgsn before mnc3, this results in: Test case TC_attach_mnc3 finished. Verdict: fail reason: "mismatching PLMN in Attach Accept: 02342F; expected 023042" With the current master branches the proper 3-digit MNC with leading zero is fed back into the Attach Accept message. Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab --- M library/L3_Common.ttcn M sgsn/SGSN_Tests.ttcn 2 files changed, 31 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/L3_Common.ttcn b/library/L3_Common.ttcn index 19e52eb..5b36056 100644 --- a/library/L3_Common.ttcn +++ b/library/L3_Common.ttcn @@ -84,5 +84,15 @@ return ret; } +function f_RAI_to_plmn_hexstr(RoutingAreaIdentificationV rai) return hexstring { + var hexstring plmn := + rai.mccDigit1 + & rai.mccDigit2 + & rai.mccDigit3 + & rai.mncDigit1 + & rai.mncDigit2 + & rai.mncDigit3; + return plmn; +} } diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index a853c6d..79aa166 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -33,6 +33,8 @@ import from TELNETasp_PortType all; import from Osmocom_VTY_Functions all; +import from GSM_RR_Types all; + modulepar { /* IP/port on which we run our internal GSUP/HLR emulation */ @@ -157,7 +159,7 @@ } -function f_init() runs on test_CT { +function f_init(BcdMccMnc mcc_mnc := '26242F'H) runs on test_CT { if (g_initialized == true) { return; } @@ -168,7 +170,7 @@ cell_id := { ra_id := { lai := { - mcc_mnc := '26242F'H, lac := 13135}, + mcc_mnc := mcc_mnc, lac := 13135}, rac := 0 }, cell_id := 20960 @@ -271,7 +273,7 @@ } altstep as_mm_identity() runs on BSSGP_ConnHdlr { - var MobileIdentityLV mi; + var MobileL3_CommonIE_Types.MobileIdentityLV mi; [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); BSSGP.send(ts_GMM_ID_RESP(mi)); @@ -325,6 +327,12 @@ function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on BSSGP_ConnHdlr { /* mandatory IE */ + var hexstring aa_plmn := f_RAI_to_plmn_hexstr(aa.routingAreaIdentification); + if (not (g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc == aa_plmn)) { + setverdict(fail, "mismatching PLMN in Attach Accept: " & hex2str(aa_plmn) + & "; expected " & hex2str(g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc)); + self.stop; + } g_pars.ra := aa.routingAreaIdentification; if (ispresent(aa.allocatedPTMSI)) { if (not g_pars.net.expect_ptmsi) { @@ -375,7 +383,7 @@ } /* return a MobileIdentityLV: P-TMSI if we have one, IMSI otherwise */ -private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileIdentityLV { +private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileL3_CommonIE_Types.MobileIdentityLV { if (ispresent(g_pars.p_tmsi)) { return valueof(ts_MI_TMSI_LV(g_pars.p_tmsi)); } else { @@ -416,6 +424,14 @@ f_init(); f_sleep(1.0); vc_conn := f_start_handler(refers(f_TC_attach), testcasename(), g_gb[0], 1); + vc_conn.done; +} + +testcase TC_attach_mnc3() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init('023042'H); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_attach), testcasename(), g_gb[0], 1001); vc_conn.done; } @@ -1136,6 +1152,7 @@ control { execute( TC_attach() ); + execute( TC_attach_mnc3() ); execute( TC_attach_auth_id_timeout() ); execute( TC_attach_auth_sai_timeout() ); execute( TC_attach_auth_sai_reject() ); -- To view, visit https://gerrit.osmocom.org/7316 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte
osmo-msc[master]: msc_mgcp: to not access higher layers after release
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-msc[master]: msc_mgcp: to not access higher layers after release
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7325 to look at the new patch set (#2). msc_mgcp: to not access higher layers after release The higher layers (gsm_04_08.c) are informed errors occur. But it is not checked if the call was already released. If an error occurs after the call control stack calls msc_mgcp_call_release() then the higher layers might already have cleaned up and the code accesses memory that is already freed (trans) - fix use after free by guarding the call to mncc_tx_to_cc() Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Related OS#2881 Related OS#2882 --- M src/libmsc/msc_mgcp.c 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/25/7325/2 diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c index 8e874d8..5c615a9 100644 --- a/src/libmsc/msc_mgcp.c +++ b/src/libmsc/msc_mgcp.c @@ -197,10 +197,15 @@ osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); } - /* Request the higher layers to release the call */ - mncc_set_cause(, GSM48_CAUSE_LOC_TRANS_NET, - GSM48_CC_CAUSE_RESOURCE_UNAVAIL); - mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, ); + /* Request the higher layers (gsm_04_08.c) to release the call. If the +* problem occured after msc_mgcp_call_release() was calls, remain +* silent because we already got informed and the higher layers might +* already freed their context information (trans). */ + if (!mgcp_ctx->free_ctx) { + mncc_set_cause(, GSM48_CAUSE_LOC_TRANS_NET, + GSM48_CC_CAUSE_RESOURCE_UNAVAIL); + mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, ); + } } /* Timer callback to shut down in case of connectivity problems */ -- To view, visit https://gerrit.osmocom.org/7325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Jenkins Builder
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 4: interestingly, I don't get any such compiler warnings on debian unstable, using gcc-7.3. Let's merge this now, it has been pending for a lng time due to missing TTCN-3 tests, and now that we have the tests, merge it. We can always fix some warnings in a follow-up. -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] osmo-msc[master]: msc_mgcp: to not access higher layers after release
Review at https://gerrit.osmocom.org/7325 msc_mgcp: to not access higher layers after release The higher layers (gsm_04_08.c) are informed errors occur. But it is not checked if the call was already released. If an error occurs after the call control stack calls msc_mgcp_call_release() then the higher layers might already have cleaned up and the code accesses memory that is already freed (trans) - fix use after free by guarding the call to mncc_tx_to_cc() Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Related OS#2881 Related OS#2882 --- M src/libmsc/msc_mgcp.c 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/25/7325/1 diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c index 8e874d8..f8618f1 100644 --- a/src/libmsc/msc_mgcp.c +++ b/src/libmsc/msc_mgcp.c @@ -197,10 +197,15 @@ osmo_fsm_inst_dispatch(fi, EV_TEARDOWN_ERROR, mgcp_ctx); } - /* Request the higher layers to release the call */ - mncc_set_cause(, GSM48_CAUSE_LOC_TRANS_NET, - GSM48_CC_CAUSE_RESOURCE_UNAVAIL); - mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, ); + /* Request the higher layers (gsm_04_08.c) to release the call. If the +* problem occured after msc_mgcp_call_release() was calls, remain +* silent because we already got informed and the higher layers might +* already freed their context information (trans). */ + if(!mgcp_ctx->free_ctx) { + mncc_set_cause(, GSM48_CAUSE_LOC_TRANS_NET, + GSM48_CC_CAUSE_RESOURCE_UNAVAIL); + mncc_tx_to_cc(mgcp_ctx->trans->net, MNCC_REL_REQ, ); + } } /* Timer callback to shut down in case of connectivity problems */ -- To view, visit https://gerrit.osmocom.org/7325 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78f1b6a9149488a4ad3f120c1e190a83c07d4b89 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexter
[ABANDON] osmo-msc[master]: gsm_04_08: clear SCCP connection when release is not acknowl...
dexter has abandoned this change. Change subject: gsm_04_08: clear SCCP connection when release is not acknowledged .. Abandoned Analyzed it further. trans_free() should indeed be enough so this patch is not the right solution. Somehow the usage count does not go back to zero. -- To view, visit https://gerrit.osmocom.org/7278 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ibb00c889e7ce757aa93abc81418caf9e48d0908d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[PATCH] osmo-ttcn3-hacks[master]: sgsn: test GMM Attach with 3-digit leading-zero MNC
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7316 to look at the new patch set (#2). sgsn: test GMM Attach with 3-digit leading-zero MNC Add general infrastructure to - pass an MCC-MNC for BSSGP to use into f_init(); - verify that the Attach Accept PLMN matches the BSSGP one. Add TC_attach_mnc3() to feed an MNC with three digits and a leading zero, to verify the recent mnc3 patches. When testing against a libosmocore and osmo-sgsn before mnc3, this results in: Test case TC_attach_mnc3 finished. Verdict: fail reason: "mismatching PLMN in Attach Accept: 02342F; expected 023042" With the current master branches the proper 3-digit MNC with leading zero is fed back into the Attach Accept message. Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab --- M library/L3_Common.ttcn M sgsn/SGSN_Tests.ttcn 2 files changed, 31 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/7316/2 diff --git a/library/L3_Common.ttcn b/library/L3_Common.ttcn index 19e52eb..5b36056 100644 --- a/library/L3_Common.ttcn +++ b/library/L3_Common.ttcn @@ -84,5 +84,15 @@ return ret; } +function f_RAI_to_plmn_hexstr(RoutingAreaIdentificationV rai) return hexstring { + var hexstring plmn := + rai.mccDigit1 + & rai.mccDigit2 + & rai.mccDigit3 + & rai.mncDigit1 + & rai.mncDigit2 + & rai.mncDigit3; + return plmn; +} } diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index a853c6d..79aa166 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -33,6 +33,8 @@ import from TELNETasp_PortType all; import from Osmocom_VTY_Functions all; +import from GSM_RR_Types all; + modulepar { /* IP/port on which we run our internal GSUP/HLR emulation */ @@ -157,7 +159,7 @@ } -function f_init() runs on test_CT { +function f_init(BcdMccMnc mcc_mnc := '26242F'H) runs on test_CT { if (g_initialized == true) { return; } @@ -168,7 +170,7 @@ cell_id := { ra_id := { lai := { - mcc_mnc := '26242F'H, lac := 13135}, + mcc_mnc := mcc_mnc, lac := 13135}, rac := 0 }, cell_id := 20960 @@ -271,7 +273,7 @@ } altstep as_mm_identity() runs on BSSGP_ConnHdlr { - var MobileIdentityLV mi; + var MobileL3_CommonIE_Types.MobileIdentityLV mi; [] BSSGP.receive(tr_BD_L3_MT(tr_GMM_ID_REQ('001'B))) { mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); BSSGP.send(ts_GMM_ID_RESP(mi)); @@ -325,6 +327,12 @@ function f_process_attach_accept(PDU_GMM_AttachAccept aa) runs on BSSGP_ConnHdlr { /* mandatory IE */ + var hexstring aa_plmn := f_RAI_to_plmn_hexstr(aa.routingAreaIdentification); + if (not (g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc == aa_plmn)) { + setverdict(fail, "mismatching PLMN in Attach Accept: " & hex2str(aa_plmn) + & "; expected " & hex2str(g_pars.bssgp_cell_id.ra_id.lai.mcc_mnc)); + self.stop; + } g_pars.ra := aa.routingAreaIdentification; if (ispresent(aa.allocatedPTMSI)) { if (not g_pars.net.expect_ptmsi) { @@ -375,7 +383,7 @@ } /* return a MobileIdentityLV: P-TMSI if we have one, IMSI otherwise */ -private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileIdentityLV { +private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileL3_CommonIE_Types.MobileIdentityLV { if (ispresent(g_pars.p_tmsi)) { return valueof(ts_MI_TMSI_LV(g_pars.p_tmsi)); } else { @@ -416,6 +424,14 @@ f_init(); f_sleep(1.0); vc_conn := f_start_handler(refers(f_TC_attach), testcasename(), g_gb[0], 1); + vc_conn.done; +} + +testcase TC_attach_mnc3() runs on test_CT { + var BSSGP_ConnHdlr vc_conn; + f_init('023042'H); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_TC_attach), testcasename(), g_gb[0], 1001); vc_conn.done; } @@ -1136,6 +1152,7 @@ control { execute( TC_attach() ); + execute( TC_attach_mnc3() ); execute( TC_attach_auth_id_timeout() ); execute( TC_attach_auth_sai_timeout() ); execute( TC_attach_auth_sai_reject() ); -- To view, visit https://gerrit.osmocom.org/7316 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8901ec0b090e342ebb04a04f9d759fc46c7d9cab Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer:
osmo-ttcn3-hacks[master]: gitignore Makefiles produced by 'make compile'
Patch Set 2: Code-Review+2 re-add earlier +2, lost from trivial merge conflict resolution -- To view, visit https://gerrit.osmocom.org/7314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia71e76f0dce2ba2f9f5837f4d3d099dff92e8787 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] osmo-ttcn3-hacks[master]: gitignore Makefiles produced by 'make compile'
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7314 to look at the new patch set (#2). gitignore Makefiles produced by 'make compile' Change-Id: Ia71e76f0dce2ba2f9f5837f4d3d099dff92e8787 --- M .gitignore 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/7314/2 diff --git a/.gitignore b/.gitignore index 6973828..bf5baa0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,9 @@ *.hh !library/*.cc !library/*.hh +*/*Test +*/*_Tests +selftest/Selftest +*/Makefile +!bin/Makefile +!deps/Makefile -- To view, visit https://gerrit.osmocom.org/7314 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia71e76f0dce2ba2f9f5837f4d3d099dff92e8787 Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[PATCH] osmo-ttcn3-hacks[master]: gitignore *.{cc, hh}, whitelist library/*.{cc, hh}
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7313 to look at the new patch set (#2). gitignore *.{cc,hh}, whitelist library/*.{cc,hh} ttcn3 creates these files, and they clutter 'git status' output. Change-Id: I6b7868ae71d3d3e710232b22a964f701ae8bd05d --- M .gitignore 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/7313/2 diff --git a/.gitignore b/.gitignore index cc06c3c..6973828 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -bin/*.cc -bin/*.hh deps/*/ *.o *.log *.so compile */.gitignore +*.cc +*.hh +!library/*.cc +!library/*.hh -- To view, visit https://gerrit.osmocom.org/7313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6b7868ae71d3d3e710232b22a964f701ae8bd05d Gerrit-PatchSet: 2 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-ttcn3-hacks[master]: gitignore */*.cc and */*.hh
Patch Set 1: > I think I explicitly suggested to white-list the *.cc and *.hh > files in "library/" where most (if not all) of the user-developed > C++ code is located. AFAIK you can have negated entries in > gitignore, see the examples at the end of the "man gitignore" page. understood it the other way round, ok, makes sense now -- To view, visit https://gerrit.osmocom.org/7313 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6b7868ae71d3d3e710232b22a964f701ae8bd05d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] osmo-bsc[master]: abisip-find: Improve use information output
Review at https://gerrit.osmocom.org/7323 abisip-find: Improve use information output Interestingly, SO_BINDTODEVICE used to bind to a specific iface requires root permissions. However, the same target can be accomplished by binding to a local IP addr set on the target interface, which doesn't require root permissions in this case. Change-Id: Ie123c45005d68b186cb06538f7bd31f3b2513007 --- M src/ipaccess/abisip-find.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/23/7323/1 diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index 03f579b..21ed50e 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -436,9 +436,11 @@ handle_options(argc, argv); - if (!cmdline_opts.ifname) - fprintf(stdout, "- You might need to specify the outgoing\n" - " network interface, e.g. ``%s eth0''\n", argv[0]); + if (!cmdline_opts.ifname && !cmdline_opts.bind_ip) + fprintf(stdout, "- You might need to specify the outgoing network interface,\n" + " e.g. ``%s eth0'' (requires root permissions),\n" + " or alternatively use -b to bind to the source address\n" + " assigned to that interface\n", argv[0]); if (!cmdline_opts.list_view) fprintf(stdout, "- You may find the --list-view option convenient.\n"); else if (cmdline_opts.send_interval >= cmdline_opts.list_view_timeout) -- To view, visit https://gerrit.osmocom.org/7323 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie123c45005d68b186cb06538f7bd31f3b2513007 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: ipaccess-config: Check cmdlie arg unit-id format
Review at https://gerrit.osmocom.org/7324 ipaccess-config: Check cmdlie arg unit-id format Print a clear error when the format in not correct. I was in the situation several times in which I was passing "123" instead of "123/0/0", and spent a while seeing what was wrong. Change-Id: I70906939b3320473c56a87929c4886aac9d7d064 --- M src/ipaccess/ipaccess-config.c 1 file changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/24/7324/1 diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index b83846d..7b9bd02 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -782,6 +783,41 @@ talloc_free(tall_firm_ctx); } +static bool check_unitid_fmt(const char* unit_id) +{ + const char *p = unit_id; + bool must_digit = true; + uint8_t remain_slash = 2; + + if (strlen(unit_id) < 5) + goto wrong_fmt; + + while (*p != '\0') { + if (*p != '/' && !isdigit(*p)) + goto wrong_fmt; + if (*p == '/' && must_digit) + goto wrong_fmt; + if (*p == '/') { + must_digit = true; + remain_slash--; + if (remain_slash < 0) + goto wrong_fmt; + } else { + must_digit = false; + } + p++; + } + + if (*(p-1) == '/') + goto wrong_fmt; + + return true; + +wrong_fmt: + fprintf(stderr, "ERROR: unit-id wrong format. Must be '\\d+/\\d+/\\d+'\n"); + return false; +} + static void print_usage(void) { printf("Usage: ipaccess-config IP_OF_BTS\n"); @@ -904,6 +940,8 @@ switch (c) { case 'u': + if (!check_unitid_fmt(optarg)) + exit(2); unit_id = optarg; break; case 'o': -- To view, visit https://gerrit.osmocom.org/7324 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70906939b3320473c56a87929c4886aac9d7d064 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
Build failure of network:osmocom:latest/eclipse-titan in Debian_9.0/armv7l
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Debian_9.0/armv7l Package network:osmocom:latest/eclipse-titan failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 953s]-x: disable schema validation but generate TTCN-3 modules [ 953s]-z: zap URI scheme from module name [ 953s] Makefile:284: recipe for target 'TitanLoggerApi.ttcn' failed [ 953s] make[4]: *** [TitanLoggerApi.ttcn] Error 1 [ 953s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 953s] ../../Makefile.genrules:60: recipe for target '../../core/RInt.o' failed [ 953s] make[3]: *** [../../core/RInt.o] Error 2 [ 953s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 953s] Makefile:32: recipe for target 'all' failed [ 953s] make[2]: *** [all] Error 2 [ 953s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 953s] Makefile:65: recipe for target 'all' failed [ 953s] make[1]: *** [all] Error 2 [ 953s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 953s] dh_auto_build: make -j1 returned exit code 2 [ 953s] debian/rules:6: recipe for target 'build' failed [ 953s] make: *** [build] Error 2 [ 953s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 953s] [ 953s] armbuild16 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:33:56 UTC 2018. [ 953s] [ 953s] ### VM INTERACTION START ### [ 956s] [ 915.492140] SysRq : Power Off [ 956s] [ 915.493505] reboot: Power down [ 956s] qemu-system-arm: Failed to unlink socket /var/cache/obs/worker/root_2/root.monitor: Permission denied [ 956s] ### VM INTERACTION END ### [ 956s] [ 956s] armbuild16 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:33:59 UTC 2018. [ 956s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:latest/eclipse-titan in Debian_9.0/aarch64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Debian_9.0/aarch64 Package network:osmocom:latest/eclipse-titan failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 1176s]-x: disable schema validation but generate TTCN-3 modules [ 1176s]-z: zap URI scheme from module name [ 1176s] Makefile:284: recipe for target 'TitanLoggerApi.ttcn' failed [ 1176s] make[4]: *** [TitanLoggerApi.ttcn] Error 1 [ 1176s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 1176s] ../../Makefile.genrules:60: recipe for target '../../core/RInt.o' failed [ 1176s] make[3]: *** [../../core/RInt.o] Error 2 [ 1176s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 1176s] Makefile:32: recipe for target 'all' failed [ 1176s] make[2]: *** [all] Error 2 [ 1176s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 1176s] Makefile:65: recipe for target 'all' failed [ 1176s] make[1]: *** [all] Error 2 [ 1176s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 1176s] dh_auto_build: make -j1 returned exit code 2 [ 1176s] debian/rules:6: recipe for target 'build' failed [ 1176s] make: *** [build] Error 2 [ 1176s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 1176s] [ 1176s] obs-arm-4 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:29:37 UTC 2018. [ 1176s] [ 1176s] ### VM INTERACTION START ### [ 1179s] [ 1151.577120] sysrq: SysRq : Power Off [ 1179s] [ 1151.594130] reboot: Power down [ 1179s] qemu-system-aarch64: Failed to unlink socket /var/cache/obs/worker/root_6/root.monitor: Permission denied [ 1180s] ### VM INTERACTION END ### [ 1180s] [ 1180s] obs-arm-4 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:29:41 UTC 2018. [ 1180s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:latest/eclipse-titan in xUbuntu_17.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/xUbuntu_17.04/i586 Package network:osmocom:latest/eclipse-titan failed to build in xUbuntu_17.04/i586 Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 768s]"Build date (Base Library): " __DATE__ " " __TIME__ "\n" [ 768s] ^~~~ [ 768s] ar -r libttcn3-parallel.a RT1/TitanLoggerApi.o RT1/TitanLoggerControl.o config_process.lex.o config_process.tab.o RT1/PreGenRecordOf.o Addfunc.o Array.o ASN_Any.o ASN_CharacterString.o ASN_EmbeddedPDV.o ASN_External.o ASN_Null.o Basetype.o BER.o Bitstring.o Boolean.o Charstring.o Communication.o Component.o Default.o Encdec.o Error.o Float.o Hexstring.o RInt.o Integer.o Logger.o LoggerPlugin.o LoggerPluginManager.o LegacyLogger.o LoggingBits.o Module_list.o Objid.o Octetstring.o Port.o RAW.o Runtime.o Snapshot.o Struct_of.o Template.o TEXT.o Textbuf.o Timer.o Param_Types.o Universal_charstring.o Verdicttype.o XER.o XmlReader.o TitanLoggerControlImpl.o TCov.o JSON.o Profiler.o ProfilerTools.o Debugger.o DebuggerUI.o OER.o ../common/memory.o ../common/pattern_la.o ../common/pattern_p.o ../common/config_preproc.o ../common/config_preproc_la.o ../common/config_preproc_p.tab.o ../common/path.o ../common/pattern_uni.o ../common/Quadruple.o ../common/NetworkHandler.o ../common/Path2.o ../common/ModuleVersion.o ../common/JSON_Tokenizer.o ../common/UnicharPattern.o LoggerPlugin_static.o Parallel_main.o [ 768s] ar: creating libttcn3-parallel.a [ 768s] g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -DYY_NO_INPUT -DNDEBUG -DLINUX -DUSE_EPOLL -DYY_NO_INPUT -DNDEBUG -DLINUX -DUSE_EPOLL -I. -IRT1 -I/usr/include/libxml2 -I../common -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-long-long -O2 -fPIC -Wall -Wno-long-long -O2 -fPIC LoggerPlugin_dynamic.cc -o LoggerPlugin_dynamic.o [ 769s] g++ -shared -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -fPIC -fPIC -o libttcn3-dynamic.so RT1/TitanLoggerApi.o RT1/TitanLoggerControl.o config_process.lex.o config_process.tab.o RT1/PreGenRecordOf.o Addfunc.o Array.o ASN_Any.o ASN_CharacterString.o ASN_EmbeddedPDV.o ASN_External.o ASN_Null.o Basetype.o BER.o Bitstring.o Boolean.o Charstring.o Communication.o Component.o Default.o Encdec.o Error.o Float.o Hexstring.o RInt.o Integer.o Logger.o LoggerPlugin.o LoggerPluginManager.o LegacyLogger.o LoggingBits.o Module_list.o Objid.o Octetstring.o Port.o RAW.o Runtime.o Snapshot.o Struct_of.o Template.o TEXT.o Textbuf.o Timer.o Param_Types.o Universal_charstring.o Verdicttype.o XER.o XmlReader.o TitanLoggerControlImpl.o TCov.o JSON.o Profiler.o ProfilerTools.o Debugger.o DebuggerUI.o OER.o ../common/memory.o ../common/pattern_la.o ../common/pattern_p.o ../common/config_preproc.o ../common/config_preproc_la.o ../common/config_preproc_p.tab.o ../common/path.o ../common/pattern_uni.o ../common/Quadruple.o ../common/NetworkHandler.o ../common/Path2.o ../common/ModuleVersion.o ../common/JSON_Tokenizer.o ../common/UnicharPattern.o LoggerPlugin_dynamic.o Single_main.o -Ldefault/lib -lcrypto -lxml2 [ 769s] /usr/bin/ld: LoggerPlugin_dynamic.o: undefined reference to symbol 'dlopen@@GLIBC_2.1' [ 769s] //lib/i386-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line [ 769s] collect2: error: ld returned 1 exit status [ 769s] Makefile:344: recipe for target 'libttcn3-dynamic.so' failed [ 769s] make[2]: *** [libttcn3-dynamic.so] Error 1 [ 769s] make[2]: Leaving directory '/usr/src/packages/BUILD/core' [ 769s] Makefile:65: recipe for target 'all' failed [ 769s] make[1]: *** [all] Error 2 [ 769s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 769s] dh_auto_build: make -j1 returned exit code 2 [ 769s] debian/rules:6: recipe for target 'build' failed [ 769s] make: *** [build] Error 2 [ 769s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 769s] [ 769s] cloud131 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:23:50 UTC 2018. [ 769s] [ 769s] ### VM INTERACTION START ### [ 772s] [ 747.182139] reboot: Power down [ 774s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_2/root.monitor: Permission denied [ 774s] ### VM INTERACTION END ### [ 774s] [ 774s] cloud131 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:23:56 UTC 2018. [ 774s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:latest/eclipse-titan in xUbuntu_17.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/xUbuntu_17.04/x86_64 Package network:osmocom:latest/eclipse-titan failed to build in xUbuntu_17.04/x86_64 Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 556s]"Build date (Base Library): " __DATE__ " " __TIME__ "\n" [ 556s] ^~~~ [ 556s] ar -r libttcn3-parallel.a RT1/TitanLoggerApi.o RT1/TitanLoggerControl.o config_process.lex.o config_process.tab.o RT1/PreGenRecordOf.o Addfunc.o Array.o ASN_Any.o ASN_CharacterString.o ASN_EmbeddedPDV.o ASN_External.o ASN_Null.o Basetype.o BER.o Bitstring.o Boolean.o Charstring.o Communication.o Component.o Default.o Encdec.o Error.o Float.o Hexstring.o RInt.o Integer.o Logger.o LoggerPlugin.o LoggerPluginManager.o LegacyLogger.o LoggingBits.o Module_list.o Objid.o Octetstring.o Port.o RAW.o Runtime.o Snapshot.o Struct_of.o Template.o TEXT.o Textbuf.o Timer.o Param_Types.o Universal_charstring.o Verdicttype.o XER.o XmlReader.o TitanLoggerControlImpl.o TCov.o JSON.o Profiler.o ProfilerTools.o Debugger.o DebuggerUI.o OER.o ../common/memory.o ../common/pattern_la.o ../common/pattern_p.o ../common/config_preproc.o ../common/config_preproc_la.o ../common/config_preproc_p.tab.o ../common/path.o ../common/pattern_uni.o ../common/Quadruple.o ../common/NetworkHandler.o ../common/Path2.o ../common/ModuleVersion.o ../common/JSON_Tokenizer.o ../common/UnicharPattern.o LoggerPlugin_static.o Parallel_main.o [ 556s] ar: creating libttcn3-parallel.a [ 556s] g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -DYY_NO_INPUT -DNDEBUG -DLINUX -DUSE_EPOLL -DYY_NO_INPUT -DNDEBUG -DLINUX -DUSE_EPOLL -I. -IRT1 -I/usr/include/libxml2 -I../common -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-long-long -O2 -fPIC -Wall -Wno-long-long -O2 -fPIC LoggerPlugin_dynamic.cc -o LoggerPlugin_dynamic.o [ 557s] g++ -shared -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -fPIC -fPIC -o libttcn3-dynamic.so RT1/TitanLoggerApi.o RT1/TitanLoggerControl.o config_process.lex.o config_process.tab.o RT1/PreGenRecordOf.o Addfunc.o Array.o ASN_Any.o ASN_CharacterString.o ASN_EmbeddedPDV.o ASN_External.o ASN_Null.o Basetype.o BER.o Bitstring.o Boolean.o Charstring.o Communication.o Component.o Default.o Encdec.o Error.o Float.o Hexstring.o RInt.o Integer.o Logger.o LoggerPlugin.o LoggerPluginManager.o LegacyLogger.o LoggingBits.o Module_list.o Objid.o Octetstring.o Port.o RAW.o Runtime.o Snapshot.o Struct_of.o Template.o TEXT.o Textbuf.o Timer.o Param_Types.o Universal_charstring.o Verdicttype.o XER.o XmlReader.o TitanLoggerControlImpl.o TCov.o JSON.o Profiler.o ProfilerTools.o Debugger.o DebuggerUI.o OER.o ../common/memory.o ../common/pattern_la.o ../common/pattern_p.o ../common/config_preproc.o ../common/config_preproc_la.o ../common/config_preproc_p.tab.o ../common/path.o ../common/pattern_uni.o ../common/Quadruple.o ../common/NetworkHandler.o ../common/Path2.o ../common/ModuleVersion.o ../common/JSON_Tokenizer.o ../common/UnicharPattern.o LoggerPlugin_dynamic.o Single_main.o -Ldefault/lib -lcrypto -lxml2 [ 557s] /usr/bin/ld: LoggerPlugin_dynamic.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5' [ 557s] //lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line [ 557s] collect2: error: ld returned 1 exit status [ 557s] Makefile:344: recipe for target 'libttcn3-dynamic.so' failed [ 557s] make[2]: *** [libttcn3-dynamic.so] Error 1 [ 557s] make[2]: Leaving directory '/usr/src/packages/BUILD/core' [ 557s] Makefile:65: recipe for target 'all' failed [ 557s] make[1]: *** [all] Error 2 [ 557s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 557s] dh_auto_build: make -j1 returned exit code 2 [ 557s] debian/rules:6: recipe for target 'build' failed [ 557s] make: *** [build] Error 2 [ 557s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 557s] [ 557s] lamb69 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:19:42 UTC 2018. [ 557s] [ 557s] ### VM INTERACTION START ### [ 560s] [ 551.893398] reboot: Power down [ 560s] qemu-system-x86_64: Failed to unlink socket /var/cache/obs/worker/root_2/root.monitor: Permission denied [ 560s] ### VM INTERACTION END ### [ 560s] [ 560s] lamb69 failed "build eclipse-titan_6.3.1-1.dsc" at Fri Mar 16 16:19:45 UTC 2018. [ 560s] -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/)
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 4: I confirm after applying this patch I can run one single osmo-mgw shared between osmo-bsc and osmo-msc and place a call between to MS connected to the network with voice working fine. But let's fix the compile warnings first. -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 4: I think this patch is introducing several compiler warnings, in my PC I can see: /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/fsm.h:123:38: warning: too many arguments for format [-Wformat-extra-args] LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \ ^ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/logging.h:93:54: note: in definition of macro ‘LOGPSRCC’ logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ ^~~ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/logging.h:47:2: note: in expansion of macro ‘LOGPSRC’ LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/fsm.h:123:3: note: in expansion of macro ‘LOGP’ LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \ ^~~~ /home/pespin/dev/sysmocom/git/osmo-bsc/src/libbsc/bsc_subscr_conn_fsm.c:372:4: note: in expansion of macro ‘LOGPFSML’ LOGPFSML(fi, LOGL_ERROR, "Requested channel mode is not supported!\n", ^~~~ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/fsm.h:123:38: warning: too many arguments for format [-Wformat-extra-args] LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \ ^ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/logging.h:95:53: note: in definition of macro ‘LOGPSRCC’ logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \ ^~~ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/logging.h:47:2: note: in expansion of macro ‘LOGPSRC’ LOGPSRC(ss, level, NULL, 0, fmt, ## args) ^~~ /home/pespin/dev/sysmocom/build/new/out/include/osmocom/core/fsm.h:123:3: note: in expansion of macro ‘LOGP’ LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \ ^~~~ /home/pespin/dev/sysmocom/git/osmo-bsc/src/libbsc/bsc_subscr_conn_fsm.c:372:4: note: in expansion of macro ‘LOGPFSML’ LOGPFSML(fi, LOGL_ERROR, "Requested channel mode is not supported!\n", ^~~~ -- /home/pespin/dev/sysmocom/git/osmo-bsc/tests/handover/handover_test.c:48:83: warning: ‘struct mgcp_conn_peer’ declared inside parameter list will not be visible outside of this definition or declaration int __real_mgcp_conn_modify(struct osmo_fsm_inst *fi, uint32_t parent_evt, struct mgcp_conn_peer *conn_peer); ^~ /home/pespin/dev/sysmocom/git/osmo-bsc/tests/handover/handover_test.c:49:83: warning: ‘struct mgcp_conn_peer’ declared inside parameter list will not be visible outside of this definition or declaration int __wrap_mgcp_conn_modify(struct osmo_fsm_inst *fi, uint32_t parent_evt, struct mgcp_conn_peer *conn_peer) -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] libosmocore[master]: add a regression test for TLV parsing with repeated IEs
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7322 to look at the new patch set (#2). add a regression test for TLV parsing with repeated IEs Since commit bf383a1d83661af26ccd6521c49b655fb22531d4 tlv_parse() will return the first occurrence of a repeated IE. Add a test to verify this behaviour. This test passes with the current code and fails if bf383a1d83661af26ccd6521c49b655fb22531d4 is reverted. While here, fix lies in documentation about the return value of tlv_parse() and fix a typo in another comment. Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Related: OS#2904 --- M src/gsm/tlv_parser.c M tests/tlv/tlv_test.c 2 files changed, 34 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/7322/2 diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index b8c7149..f693971 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -48,7 +48,7 @@ struct tlv_definition tvlv_att_def; struct tlv_definition vtvlv_gan_att_def; -/*! Dump pasred TLV structure to stdout */ +/*! Dump parsed TLV structure to stdout */ int tlv_dump(struct tlv_parsed *dec) { int i; @@ -227,7 +227,7 @@ * \param[in] buf_len length of the input data buffer * \param[in] lv_tag an initial LV tag at the start of the buffer * \param[in] lv_tag2 a second initial LV tag following the \a lv_tag - * \returns number of bytes consumed by the TLV entry / IE parsed; negative in case of error + * \returns number of TLV entries parsed; negative in case of error */ int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def, const uint8_t *buf, int buf_len, uint8_t lv_tag, diff --git a/tests/tlv/tlv_test.c b/tests/tlv/tlv_test.c index 87b002f..462fa07 100644 --- a/tests/tlv/tlv_test.c +++ b/tests/tlv/tlv_test.c @@ -245,11 +245,43 @@ } } +/* Most GSM related protocols clearly indicate that in case of duplicate + * IEs, only the first occurrence shall be used, while any further occurrences + * shall be ignored. See e.g. 3GPP TS 24.008 Section 8.6.3 */ +static void test_tlv_repeated_ie() +{ + uint8_t test_data[768]; + int i, rc; + const uint8_t tag = 0x1a; + struct tlv_parsed dec; + struct tlv_definition def; + + memset(, 0, sizeof(dec)); + memset(, 0, sizeof(def)); + + /* tag:1:255, tag:1:254, tag:1:253, ..., tag:1:3, tag:1:2, tag:1:1, tag:1:0 */ + for (i = 0; i < ARRAY_SIZE(test_data) - 1; i += 3) { + test_data[i] = tag; + test_data[i + 1] = 1; + test_data[i + 2] = (uint8_t)(0xff - i/2); + } + + def.def[tag].type = TLV_TYPE_TLV; + + rc = tlv_parse(, , _data[1], sizeof(test_data) - 1, tag, 0); + OSMO_ASSERT(rc == i/3); + OSMO_ASSERT(dec.lv[tag].len == 1); + /* Value pointer should point at first value in test data array. */ + OSMO_ASSERT(dec.lv[tag].val == _data[2]); + OSMO_ASSERT(*dec.lv[tag].val == test_data[2]); +} + int main(int argc, char **argv) { //osmo_init_logging(); test_tlv_shift_functions(); + test_tlv_repeated_ie(); printf("Done.\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Jenkins Builder
libosmocore[master]: libosmogsm: add support for XOR authentication
Patch Set 1: Thanks! Just let me know. -- To view, visit https://gerrit.osmocom.org/7310 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: daniel Gerrit-HasComments: No
[PATCH] libosmocore[master]: add a regression test for TLV parsing with repeated IEs
Review at https://gerrit.osmocom.org/7322 add a regression test for TLV parsing with repeated IEs Since commit bf383a1d83661af26ccd6521c49b655fb22531d4 tlv_parse() will return the first occurrence of a repeated IE. Add a test to verify this behaviour. This test passes with the current code and fails if bf383a1d83661af26ccd6521c49b655fb22531d4 is reverted. While here, fix lies in documentation about the return value of tlv_parse() and fix a typo in another comment. Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Related: OS#2904 --- M src/gsm/tlv_parser.c M tests/tlv/tlv_test.c 2 files changed, 31 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/7322/1 diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index b8c7149..f693971 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -48,7 +48,7 @@ struct tlv_definition tvlv_att_def; struct tlv_definition vtvlv_gan_att_def; -/*! Dump pasred TLV structure to stdout */ +/*! Dump parsed TLV structure to stdout */ int tlv_dump(struct tlv_parsed *dec) { int i; @@ -227,7 +227,7 @@ * \param[in] buf_len length of the input data buffer * \param[in] lv_tag an initial LV tag at the start of the buffer * \param[in] lv_tag2 a second initial LV tag following the \a lv_tag - * \returns number of bytes consumed by the TLV entry / IE parsed; negative in case of error + * \returns number of TLV entries parsed; negative in case of error */ int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def, const uint8_t *buf, int buf_len, uint8_t lv_tag, diff --git a/tests/tlv/tlv_test.c b/tests/tlv/tlv_test.c index 87b002f..e1c2301 100644 --- a/tests/tlv/tlv_test.c +++ b/tests/tlv/tlv_test.c @@ -245,11 +245,40 @@ } } +/* Most GSM related protocols clearly indicate that in case of duplicate + * IEs, only the first occurrence shall be used, while any further occurrences + * shall be ignored. See e.g. 3GPP TS 24.008 Section 8.6.3 */ +static void test_tlv_repeated_ie() +{ + uint8_t test_data[768]; + int i, rc; + const uint8_t tag = 0x1a; + struct tlv_parsed dec = { 0 }; + struct tlv_definition def = { 0 }; + + /* tag:1:255, tag:1:254, tag:1:253, ..., tag:1:3, tag:1:2, tag:1:1, tag:1:0 */ + for (i = 0; i < ARRAY_SIZE(test_data) - 1; i += 3) { + test_data[i] = tag; + test_data[i + 1] = 1; + test_data[i + 2] = (uint8_t)(0xff - i/2); + } + + def.def[tag].type = TLV_TYPE_TLV; + + rc = tlv_parse(, , _data[1], sizeof(test_data) - 1, tag, 0); + OSMO_ASSERT(rc == i/3); + OSMO_ASSERT(dec.lv[tag].len == 1); + /* Value pointer should point at first value in test data array. */ + OSMO_ASSERT(dec.lv[tag].val == _data[2]); + OSMO_ASSERT(*dec.lv[tag].val == test_data[2]); +} + int main(int argc, char **argv) { //osmo_init_logging(); test_tlv_shift_functions(); + test_tlv_repeated_ie(); printf("Done.\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7322 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I041f38548c5e4236920991d6c681c1c1e04de9ca Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
osmo-gsm-tester[master]: ms: Create a cumulative distribution function class
Patch Set 6: > I think your new cdf_test is not yet being executed. I had to add > the import _prep to successfully run them locally. Did you try > yourself? I had a PYTHONPATH changed and emulated a "testsuite -k testname" behavior by setting the array of tests. I thought _prep is a python internal module and I wondered how it would help me.. it took me a bit to realize that it is our test preparation. :} -- To view, visit https://gerrit.osmocom.org/6230 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Holger FreytherGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No
[PATCH] osmo-gsm-tester[master]: ms: Create a cumulative distribution function class
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6230 to look at the new patch set (#7). ms: Create a cumulative distribution function class We are using the CDF to decide which percentage of the jobs should be running at a given point. The x-axis is time and the y-axis the percentage of how many jobs should be running. There are three functions to do this. The first one is a constant which would result in everything being started right now, one to start them linearly and the last (formula from Qt/3rdparty) to first accelerate and decelerate slowly. Change-Id: I9e3064f4c3c4c7af5d3491f850090516e541f4d3 --- A selftest/cdf_test.ok A selftest/cdf_test.py A src/osmo_ms_driver/__init__.py A src/osmo_ms_driver/cdf.py 4 files changed, 266 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/30/6230/7 diff --git a/selftest/cdf_test.ok b/selftest/cdf_test.ok new file mode 100644 index 000..aa753e4 --- /dev/null +++ b/selftest/cdf_test.ok @@ -0,0 +1,57 @@ +Testing the immediate CDF +Done True +1 1.0 False +Testing linear with duration +Done False +0.0 0.0 True +Done False +0.2 0.2 True +Done False +0.4 0.4 True +Done False +0.6 0.6 True +Done False +0.8 0.8 True +Done True +1.0 1.0 True +Testing linear with duration scaled +Done False +0.0 0.0 True +0.0 0.0 True +Done False +0.2 0.2 True +200 200 True +Done False +0.4 0.4 True +400 400 True +Done False +0.6 0.6 True +600 600 True +Done False +0.8 0.8 True +800 800 True +Done True +1.0 1.0 True +100 100 True +Testing in_out +0.5 0.5 True +0.87 0.87 True +0.9 0.9 True +0.95 0.95 True +1.0 1.0 True +Testing ease In and Out +Done False +0.0 0.0 True +0.0 0.0 True +Done False +5.0 5.0 True +0.1 0.1 True +Done False +10.0 10.0 True +0.5 0.5 True +Done False +15.0 15.0 True +0.8 0.8 True +Done True +20.0 20 True +1.0 1.0 True diff --git a/selftest/cdf_test.py b/selftest/cdf_test.py new file mode 100755 index 000..8d837c1 --- /dev/null +++ b/selftest/cdf_test.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 + +import _prep + +from osmo_ms_driver import cdf +from datetime import timedelta + +def print_fuzzy_compare(want, expe, len=3): +want_str = str(want)[0:len] +expe_str = str(expe)[0:len] +print(want_str, expe_str, want_str == expe_str) + + +def check_steps(a, steps, fun): +print("Done", a.is_done()) +for step in steps: +# Verify we can step + +# Compare and step once +fun(a, step) +if a.is_done(): +break +a.step_once() +print("Done", a.is_done()) + +def compare_value(a, step): +print_fuzzy_compare(a.current_value(), step) + +def compare_scaled_value(a, val): +(step, scale) = val +print_fuzzy_compare(a.current_value(), step) +print_fuzzy_compare(a.current_scaled_value(), scale) + +def compare_x_value(a, val): +(x, step) = val +print(a._x, x, x == a._x) +print_fuzzy_compare(a.current_value(), step) + +def testImmediate(): +print("Testing the immediate CDF") +a = cdf.immediate() +print("Done", a.is_done()) +print_fuzzy_compare(a.current_value(), 1.0) + + +def testLinearWithDuration(): +print("Testing linear with duration") +a = cdf.linear_with_duration(timedelta(seconds=10), step_size=timedelta(seconds=2)) +steps = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] +check_steps(a, steps, compare_value) + +print("Testing linear with duration scaled") +a = cdf.linear_with_duration(timedelta(seconds=10), step_size=timedelta(seconds=2)) +a.set_target(1000) +steps = [(0.0, 0.0), (0.2, 200), (0.4, 400), (0.6, 600), (0.8, 800), (1.0, 1)] +check_steps(a, steps, compare_scaled_value) + +def testInOut(): +print("Testing in_out") +print_fuzzy_compare(cdf._in_out(0.5), 0.5, 3) +print_fuzzy_compare(cdf._in_out(0.75), 0.875, 4) +print_fuzzy_compare(cdf._in_out(0.8), 0.92, 3) +print_fuzzy_compare(cdf._in_out(0.85), 0.955, 4) +print_fuzzy_compare(cdf._in_out(1.0), 1.0, 3) + +def testEaseInOutDuration(): +print("Testing ease In and Out") +a = cdf.ease_in_out_duration(duration=timedelta(seconds=20), step_size=timedelta(seconds=5)) +steps = [(0.0, 0.0), (5.0, 0.125), (10.0, 0.5), (15.0, 0.875), (20, 1.0)] +check_steps(a, steps, compare_x_value) + +testImmediate() +testLinearWithDuration() +testInOut() +testEaseInOutDuration() diff --git a/src/osmo_ms_driver/__init__.py b/src/osmo_ms_driver/__init__.py new file mode 100644 index 000..d3c1590 --- /dev/null +++ b/src/osmo_ms_driver/__init__.py @@ -0,0 +1,29 @@ +# osmo_gsm_tester: automated cellular network hardware tests +# +# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH +# +# Authors: D. Lazlo Sitzer+# Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +#
libosmocore[master]: libosmogsm: add support for XOR authentication
Patch Set 1: I'd normally simply send you a batch of cards. Given how difficult it is for mail to reach you, I would suggest that we simply connect a card to a reader and attach it to a machine with SSH access for you. Then you could use it as needed to generate as much test data in whatever configuration needed. -- To view, visit https://gerrit.osmocom.org/7310 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: daniel Gerrit-HasComments: No
[MERGED] libosmocore[master]: fix bug in parse_cell_id_ci_list()
Harald Welte has submitted this change and it was merged. Change subject: fix bug in parse_cell_id_ci_list() .. fix bug in parse_cell_id_ci_list() Cell ID lists with CI were misparsed because parse_cell_id_ci_list() failed to report the amount of consumed bytes to its caller. Also add a regression test which uncovered the bug. Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Depends: If6b941720de33dca66b6b1aa2cb95a3275708b7f Related: OS#2847 --- M src/gsm/gsm0808_utils.c M tests/gsm0808/gsm0808_test.c 2 files changed, 36 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index ac1e852..0165e8a 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -756,7 +756,7 @@ if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) return -ENOSPC; cil->id_list[i++].ci = osmo_load16be(ci_be++); - consumed += elemlen; + *consumed += elemlen; remain -= elemlen; } return i; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 4da3929..2ce4ab2 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -920,6 +920,40 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_ci() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x09, 0x02, + 0x00, 0x01, + 0x00, 0x02, + 0x00, 0x77, + 0x01, 0xff, + }; + uint8_t rc_enc; + int rc_dec; + + memset(_cil, 0, sizeof(enc_cil)); + enc_cil.id_discr = CELL_IDENT_CI; + enc_cil.id_list[0].ci = 1; + enc_cil.id_list[1].ci = 2; + enc_cil.id_list[2].ci = 119; + enc_cil.id_list[3].ci = 511; + enc_cil.id_list_len = 4; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + OSMO_ASSERT(memcmp(_cil, _cil, sizeof(enc_cil)) == 0); + + msgb_free(msg); +} + int main(int argc, char **argv) { printf("Testing generation of GSM0808 messages\n"); @@ -956,6 +990,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_lac(); test_gsm0808_enc_dec_cell_id_list_bss(); test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac(); + test_gsm0808_enc_dec_cell_id_list_multi_ci(); printf("Done\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
libosmocore[master]: add a test for CELL_IDENT_WHOLE_GLOBAL cell identifier lists
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie633d9e55c6a30555c0153d35aaf9f982d6e0088 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
libosmocore[master]: fix bug in parse_cell_id_ci_list()
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-ttcn3-hacks[master]: MSC_Tests: Test SCCP clearing on release timeout
Harald Welte has submitted this change and it was merged. Change subject: MSC_Tests: Test SCCP clearing on release timeout .. MSC_Tests: Test SCCP clearing on release timeout Provoke a timeout error in the MGCP FSM which then triggers a release on the CC layer. Ignore this release and let the CC leyer timeout. The MSC is expected to clear the SCCP connection. Change-Id: If3e0bee11763f1c6b2cfae91f2a818ff7d0df9e7 Related: OS#2881 Related: OS#2882 --- M msc/MSC_Tests.ttcn 1 file changed, 39 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 485fd37..e154911 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1703,6 +1703,44 @@ } } +/* Test MO Call with no response to RAN-side CRCX or DTAP Release */ +private function f_tc_mo_release_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + var MNCC_PDU mncc; + var MgcpCommand mgcp_cmd; + + f_perform_lu(); + + f_establish_fully(valueof(ts_MI_IMSI_LV(g_pars.imsi))); + f_create_mncc_expect(hex2str(cpars.called_party)); + f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); + MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party -> value mncc; + cpars.mncc_callref := mncc.u.signal.callref; + MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); + + /* Drop CRCX */ + MGCP.receive(tr_CRCX) -> value mgcp_cmd; + + /* Drop DTAP Release */ + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + + /* Drop resent DTAP Release */ + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + + f_expect_clear(60.0); +} +testcase TC_mo_release_timeout() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_mo_release_timeout), 40); + vc_conn.done; +} + /* TODO: @@ -1760,6 +1798,7 @@ execute( TC_lu_imsi_auth_tmsi_encr_3_1_no_cm() ); execute( TC_lu_imsi_auth_tmsi_encr_13_2() ); execute( TC_lu_imsi_auth_tmsi_encr_013_2() ); + execute( TC_mo_release_timeout() ); execute( TC_lu_and_mt_call() ); -- To view, visit https://gerrit.osmocom.org/7319 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3e0bee11763f1c6b2cfae91f2a818ff7d0df9e7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] libosmocore[master]: add a test for CELL_IDENT_WHOLE_GLOBAL cell identifier lists
Harald Welte has submitted this change and it was merged. Change subject: add a test for CELL_IDENT_WHOLE_GLOBAL cell identifier lists .. add a test for CELL_IDENT_WHOLE_GLOBAL cell identifier lists Add a regression test which encodes and decodes a cell identifier list of type CELL_IDENT_WHOLE_GLOBAL. Change-Id: Ie633d9e55c6a30555c0153d35aaf9f982d6e0088 Depends: If0fafbc7171da2a3044bfa9a167208a1afa1c07b Related: OS#2847 --- M tests/gsm0808/gsm0808_test.c 1 file changed, 61 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 6a589a3..4bd81b4 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -995,6 +995,66 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_global() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x16, 0x00, + 0x92, 0x61, 0x54, 0x23, 0x42, 0x00, 0x1, + 0x92, 0x72, 0x54, 0x24, 0x43, 0x00, 0x2, + 0x92, 0x83, 0x54, 0x25, 0x44, 0x00, 0x77 + }; + struct osmo_cell_global_id id; + uint8_t rc_enc; + int rc_dec, i; + + memset(_cil, 0, sizeof(enc_cil)); + + enc_cil.id_discr = CELL_IDENT_WHOLE_GLOBAL; + + id.lai.plmn.mcc = 0x123; + osmo_mnc_from_str("456", , _3_digits); + id.lai.lac = 0x2342; + id.cell_identity = 1; + memcpy(_cil.id_list[0].global, , sizeof(id)); + + id.lai.plmn.mcc = 0x124; + osmo_mnc_from_str("457", , _3_digits); + id.lai.lac = 0x2443; + id.cell_identity = 2; + memcpy(_cil.id_list[1].global, , sizeof(id)); + + id.lai.plmn.mcc = 0x125; + osmo_mnc_from_str("458", , _3_digits); + id.lai.lac = 0x2544; + id.cell_identity = 119; + memcpy(_cil.id_list[2].global, , sizeof(id)); + + enc_cil.id_list_len = 3; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + + /* Check MAXLEN elements to ensure everything has been initialized. */ + for (i = 0; i < GSM0808_CELL_ID_LIST2_MAXLEN; i++) { + struct osmo_cell_global_id *enc_id; + struct osmo_cell_global_id *dec_id; + enc_id = _cil.id_list[i].global; + dec_id = _cil.id_list[i].global; + OSMO_ASSERT(osmo_plmn_cmp(_id->lai.plmn, _id->lai.plmn) == 0); + OSMO_ASSERT(enc_id->lai.lac == dec_id->lai.lac); + OSMO_ASSERT(enc_id->cell_identity == dec_id->cell_identity); + } + + msgb_free(msg); +} + int main(int argc, char **argv) { printf("Testing generation of GSM0808 messages\n"); @@ -1033,6 +1093,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac(); test_gsm0808_enc_dec_cell_id_list_multi_ci(); test_gsm0808_enc_dec_cell_id_list_multi_lac_and_ci(); + test_gsm0808_enc_dec_cell_id_list_multi_global(); printf("Done\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie633d9e55c6a30555c0153d35aaf9f982d6e0088 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
libosmocore[master]: fix parse_cell_id_lac_and_ci_list()
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7318 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If0fafbc7171da2a3044bfa9a167208a1afa1c07b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-ttcn3-hacks[master]: MGCP_Test: fix config file include path
Harald Welte has submitted this change and it was merged. Change subject: MGCP_Test: fix config file include path .. MGCP_Test: fix config file include path The config file mistakenly references the defaults for the MSC. - correct include path to use MGCP_Test.default Change-Id: I12c6907717dfba1c31790a2b71f42e37743351af --- M mgw/MGCP_Test.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/mgw/MGCP_Test.cfg b/mgw/MGCP_Test.cfg index 0cca79e..90d736b 100644 --- a/mgw/MGCP_Test.cfg +++ b/mgw/MGCP_Test.cfg @@ -2,7 +2,7 @@ # Common configuration, shared between test suites "../Common.cfg" # testsuite specific configuration, not expected to change -"./MSC_Tests.default" +"./MGCP_Test.default" # Local configuration below -- To view, visit https://gerrit.osmocom.org/7321 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12c6907717dfba1c31790a2b71f42e37743351af Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-ttcn3-hacks[master]: MSC_Tests: Test SCCP clearing on release timeout
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7319 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3e0bee11763f1c6b2cfae91f2a818ff7d0df9e7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: MGCP_Test: fix config file include path
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7321 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I12c6907717dfba1c31790a2b71f42e37743351af Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-ttcn3-hacks[master]: MGCP_Test: fix config file include path
Review at https://gerrit.osmocom.org/7321 MGCP_Test: fix config file include path The config file mistakenly references the defaults for the MSC. - correct include path to use MGCP_Test.default Change-Id: I12c6907717dfba1c31790a2b71f42e37743351af --- M mgw/MGCP_Test.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/7321/1 diff --git a/mgw/MGCP_Test.cfg b/mgw/MGCP_Test.cfg index 0cca79e..90d736b 100644 --- a/mgw/MGCP_Test.cfg +++ b/mgw/MGCP_Test.cfg @@ -2,7 +2,7 @@ # Common configuration, shared between test suites "../Common.cfg" # testsuite specific configuration, not expected to change -"./MSC_Tests.default" +"./MGCP_Test.default" # Local configuration below -- To view, visit https://gerrit.osmocom.org/7321 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12c6907717dfba1c31790a2b71f42e37743351af Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexter
osmo-msc[master]: trans_free: tear down conn when last transaction is done
Patch Set 2: another thought... The main reason why the FSM allocation was separate from the subscr_conn struct allocation was that in the osmo-nitb, libbsc allocated the subscr_conn and handed it over to libmsc, and only then were we "allowed" to start an FSM. That limitation has gone away now, and we might actually pair up subscr_conn allocation with FSM allocation now. The FSM might not need a ref count on the subscr_conn, and maybe things would get clearer for people other than me. -- To view, visit https://gerrit.osmocom.org/7303 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I46ff2e9b09b67e4e0d79cccf8c04936f17281fcb Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] libosmocore[master]: add a test for CELL_IDENT_WHOLE_GLOBAL cell identifier lists
Review at https://gerrit.osmocom.org/7320 add a test for CELL_IDENT_WHOLE_GLOBAL cell identifier lists Add a regression test which encodes and decodes a cell identifier list of type CELL_IDENT_WHOLE_GLOBAL. Change-Id: Ie633d9e55c6a30555c0153d35aaf9f982d6e0088 Depends: If0fafbc7171da2a3044bfa9a167208a1afa1c07b Related: OS#2847 --- M tests/gsm0808/gsm0808_test.c 1 file changed, 61 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/7320/1 diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 6a589a3..4bd81b4 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -995,6 +995,66 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_global() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x16, 0x00, + 0x92, 0x61, 0x54, 0x23, 0x42, 0x00, 0x1, + 0x92, 0x72, 0x54, 0x24, 0x43, 0x00, 0x2, + 0x92, 0x83, 0x54, 0x25, 0x44, 0x00, 0x77 + }; + struct osmo_cell_global_id id; + uint8_t rc_enc; + int rc_dec, i; + + memset(_cil, 0, sizeof(enc_cil)); + + enc_cil.id_discr = CELL_IDENT_WHOLE_GLOBAL; + + id.lai.plmn.mcc = 0x123; + osmo_mnc_from_str("456", , _3_digits); + id.lai.lac = 0x2342; + id.cell_identity = 1; + memcpy(_cil.id_list[0].global, , sizeof(id)); + + id.lai.plmn.mcc = 0x124; + osmo_mnc_from_str("457", , _3_digits); + id.lai.lac = 0x2443; + id.cell_identity = 2; + memcpy(_cil.id_list[1].global, , sizeof(id)); + + id.lai.plmn.mcc = 0x125; + osmo_mnc_from_str("458", , _3_digits); + id.lai.lac = 0x2544; + id.cell_identity = 119; + memcpy(_cil.id_list[2].global, , sizeof(id)); + + enc_cil.id_list_len = 3; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + + /* Check MAXLEN elements to ensure everything has been initialized. */ + for (i = 0; i < GSM0808_CELL_ID_LIST2_MAXLEN; i++) { + struct osmo_cell_global_id *enc_id; + struct osmo_cell_global_id *dec_id; + enc_id = _cil.id_list[i].global; + dec_id = _cil.id_list[i].global; + OSMO_ASSERT(osmo_plmn_cmp(_id->lai.plmn, _id->lai.plmn) == 0); + OSMO_ASSERT(enc_id->lai.lac == dec_id->lai.lac); + OSMO_ASSERT(enc_id->cell_identity == dec_id->cell_identity); + } + + msgb_free(msg); +} + int main(int argc, char **argv) { printf("Testing generation of GSM0808 messages\n"); @@ -1033,6 +1093,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac(); test_gsm0808_enc_dec_cell_id_list_multi_ci(); test_gsm0808_enc_dec_cell_id_list_multi_lac_and_ci(); + test_gsm0808_enc_dec_cell_id_list_multi_global(); printf("Done\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7320 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie633d9e55c6a30555c0153d35aaf9f982d6e0088 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
libosmocore[master]: libosmogsm: add support for XOR authentication
Patch Set 1: And BTW, I am also working on Milenage-2G support for both OsmoNiTB and OsmoHLR. Is Milenage supported by Sysmocom SIM? If yes, additional sample data would also make me happy ;) -- To view, visit https://gerrit.osmocom.org/7310 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: daniel Gerrit-HasComments: No
libosmocore[master]: libosmogsm: add support for XOR authentication
Patch Set 1: Hi Harald, > do you have any sysmoUSIM-SJS1 card? Yes, I do have one from 34c3. I've contacted lynxis, and he provided me all data, including ADM1. But, as it turns out, a SIM was brute-forced / blocked by its previous owner as I am always getting 6983. And as I understand, it isn't possible to switch A3A8 params without authentication :/ > ... or to generate "expected values" I someone else has a SIM with ADM1, I would be more than happy if one could send me a set of reference data. This way I could make some basic test coverage... -- To view, visit https://gerrit.osmocom.org/7310 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim YanitskiyGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: daniel Gerrit-HasComments: No
osmo-bsc[master]: introduce an osmo_fsm for gsm_subscriber_connection
Patch Set 3: (1 comment) want to get BSC_Tests.ttcn running on jenkins first, then run it one more time before merging this, merge the patch and re-trigger it. https://gerrit.osmocom.org/#/c/7142/3/tests/handover/handover_test.c File tests/handover/handover_test.c: Line 63: * Unfortunately, the fi pointer we get here is (normally) unpopulated > "normally", the fi is of course populated, just in this artificial test set Eventually, we should migrate to TTCN-3. But given that we're already more than three months late with many of the ongoing developments (Inter-BSC HO, LCLS) we cannot afford to spend time on it now. -- To view, visit https://gerrit.osmocom.org/7142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68286d26e2014048b054f39ef29c35fef420cc97 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes
osmo-ci[master]: jenkins: add job osmo-gsm-tester_gerrit
Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If661675528059bc8a95d39a6489a5a9381f52677 Gerrit-PatchSet: 6 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
osmo-ci[master]: jenkins: add osmo-gsm-tester_run-{prod,rnd}
Patch Set 5: Code-Review-1 Waiting for this patch to be updated to fullfill new resources.conf changes. See my last comment in this patch regarding this topic. -- To view, visit https://gerrit.osmocom.org/7021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0 Gerrit-PatchSet: 5 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
osmo-ci[master]: jenkins: add job osmo-gsm-tester_build-trigger-all
Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dcf2a6fa2991cb73b4807f8a10d251f3dca77dd Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-ci[master]: jenkins: add osmo-gsm-tester-build jobs
Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic49c94e9e6639e43f6ae14b868bc826af3ce2085 Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
[PATCH] osmo-ttcn3-hacks[master]: MSC_Tests: Test SCCP clearing on release timeout
Review at https://gerrit.osmocom.org/7319 MSC_Tests: Test SCCP clearing on release timeout Provoke a timeout error in the MGCP FSM which then triggers a release on the CC layer. Ignore this release and let the CC leyer timeout. The MSC is expected to clear the SCCP connection. Change-Id: If3e0bee11763f1c6b2cfae91f2a818ff7d0df9e7 Related: OS#2881 Related: OS#2882 --- M msc/MSC_Tests.ttcn 1 file changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/19/7319/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 485fd37..e154911 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1703,6 +1703,44 @@ } } +/* Test MO Call with no response to RAN-side CRCX or DTAP Release */ +private function f_tc_mo_release_timeout(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + var MNCC_PDU mncc; + var MgcpCommand mgcp_cmd; + + f_perform_lu(); + + f_establish_fully(valueof(ts_MI_IMSI_LV(g_pars.imsi))); + f_create_mncc_expect(hex2str(cpars.called_party)); + f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); + MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party -> value mncc; + cpars.mncc_callref := mncc.u.signal.callref; + MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); + + /* Drop CRCX */ + MGCP.receive(tr_CRCX) -> value mgcp_cmd; + + /* Drop DTAP Release */ + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + + /* Drop resent DTAP Release */ + BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + + f_expect_clear(60.0); +} +testcase TC_mo_release_timeout() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_mo_release_timeout), 40); + vc_conn.done; +} + /* TODO: @@ -1760,6 +1798,7 @@ execute( TC_lu_imsi_auth_tmsi_encr_3_1_no_cm() ); execute( TC_lu_imsi_auth_tmsi_encr_13_2() ); execute( TC_lu_imsi_auth_tmsi_encr_013_2() ); + execute( TC_mo_release_timeout() ); execute( TC_lu_and_mt_call() ); -- To view, visit https://gerrit.osmocom.org/7319 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3e0bee11763f1c6b2cfae91f2a818ff7d0df9e7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexter
[PATCH] libosmocore[master]: fix parse_cell_id_lac_and_ci_list()
Review at https://gerrit.osmocom.org/7318 fix parse_cell_id_lac_and_ci_list() The implementation was entirely broken, reading data from wrong offsets and always writing to the first element of the decoded list. Also, add a new test for this function which found the problems. Change-Id: If0fafbc7171da2a3044bfa9a167208a1afa1c07b Related: OS#2847 Depends: Ife4e485e2b86c6f3321c9700611700115ad247b2 --- M src/gsm/gsm0808_utils.c M tests/gsm0808/gsm0808_test.c 2 files changed, 49 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/7318/1 diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 0165e8a..b58a4b8 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -719,7 +719,7 @@ { uint16_t *lacp_be, *ci_be; struct osmo_lac_and_ci_id *id; - int i = 0; + int i = 0, j = 0; const size_t elemlen = sizeof(*lacp_be) + sizeof(*ci_be); *consumed = 0; @@ -727,18 +727,19 @@ if (remain < elemlen) return -EINVAL; - lacp_be = (uint16_t *)([0]); - ci_be = (uint16_t *)([2]); + lacp_be = (uint16_t *)([j]); + ci_be = (uint16_t *)([j + elemlen/2]); while (remain >= elemlen) { if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) return -ENOSPC; - id = >id_list[i].lac_and_ci; + id = >id_list[i++].lac_and_ci; id->lac = osmo_load16be(lacp_be); id->ci = osmo_load16be(ci_be); *consumed += elemlen; remain -= elemlen; - lacp_be++; - ci_be++; + j += elemlen; + lacp_be = (uint16_t *)([j]); + ci_be = (uint16_t *)([j + elemlen/2]); } return i; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 2ce4ab2..6a589a3 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -954,6 +954,47 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_lac_and_ci() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x15, 0x01, + 0x23, 0x42, 0x00, 0x01, + 0x24, 0x43, 0x00, 0x02, + 0x25, 0x44, 0x00, 0x77, + 0x26, 0x45, 0x01, 0xff, + 0x27, 0x46, 0x02, 0xfe, + }; + uint8_t rc_enc; + int rc_dec; + + memset(_cil, 0, sizeof(enc_cil)); + enc_cil.id_discr = CELL_IDENT_LAC_AND_CI; + enc_cil.id_list[0].lac_and_ci.lac = 0x2342; + enc_cil.id_list[0].lac_and_ci.ci = 1; + enc_cil.id_list[1].lac_and_ci.lac = 0x2443; + enc_cil.id_list[1].lac_and_ci.ci = 2; + enc_cil.id_list[2].lac_and_ci.lac = 0x2544; + enc_cil.id_list[2].lac_and_ci.ci = 119; + enc_cil.id_list[3].lac_and_ci.lac = 0x2645; + enc_cil.id_list[3].lac_and_ci.ci = 511; + enc_cil.id_list[4].lac_and_ci.lac = 0x2746; + enc_cil.id_list[4].lac_and_ci.ci = 766; + enc_cil.id_list_len = 5; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + OSMO_ASSERT(memcmp(_cil, _cil, sizeof(enc_cil)) == 0); + + msgb_free(msg); +} + int main(int argc, char **argv) { printf("Testing generation of GSM0808 messages\n"); @@ -991,6 +1032,7 @@ test_gsm0808_enc_dec_cell_id_list_bss(); test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac(); test_gsm0808_enc_dec_cell_id_list_multi_ci(); + test_gsm0808_enc_dec_cell_id_list_multi_lac_and_ci(); printf("Done\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7318 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0fafbc7171da2a3044bfa9a167208a1afa1c07b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
[PATCH] libosmocore[master]: fix bug in parse_cell_id_ci_list()
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/7317 to look at the new patch set (#2). fix bug in parse_cell_id_ci_list() Cell ID lists with CI were misparsed because parse_cell_id_ci_list() failed to report the amount of consumed bytes to its caller. Also add a regression test which uncovered the bug. Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Depends: If6b941720de33dca66b6b1aa2cb95a3275708b7f Related: OS#2847 --- M src/gsm/gsm0808_utils.c M tests/gsm0808/gsm0808_test.c 2 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/7317/2 diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index ac1e852..0165e8a 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -756,7 +756,7 @@ if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) return -ENOSPC; cil->id_list[i++].ci = osmo_load16be(ci_be++); - consumed += elemlen; + *consumed += elemlen; remain -= elemlen; } return i; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 4da3929..2ce4ab2 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -920,6 +920,40 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_ci() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x09, 0x02, + 0x00, 0x01, + 0x00, 0x02, + 0x00, 0x77, + 0x01, 0xff, + }; + uint8_t rc_enc; + int rc_dec; + + memset(_cil, 0, sizeof(enc_cil)); + enc_cil.id_discr = CELL_IDENT_CI; + enc_cil.id_list[0].ci = 1; + enc_cil.id_list[1].ci = 2; + enc_cil.id_list[2].ci = 119; + enc_cil.id_list[3].ci = 511; + enc_cil.id_list_len = 4; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + OSMO_ASSERT(memcmp(_cil, _cil, sizeof(enc_cil)) == 0); + + msgb_free(msg); +} + int main(int argc, char **argv) { printf("Testing generation of GSM0808 messages\n"); @@ -956,6 +990,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_lac(); test_gsm0808_enc_dec_cell_id_list_bss(); test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac(); + test_gsm0808_enc_dec_cell_id_list_multi_ci(); printf("Done\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan SperlingGerrit-Reviewer: Jenkins Builder
[PATCH] libosmocore[master]: fix bug in parse_cell_id_ci_list()
Review at https://gerrit.osmocom.org/7317 fix bug in parse_cell_id_ci_list() Cell ID lists with CI were misparsed because parse_cell_id_ci_list() failed to report the amount of consumed bytes to its caller. Also add a regression test which uncovered the bug. Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Related: OS#2847 --- M src/gsm/gsm0808_utils.c M tests/gsm0808/gsm0808_test.c 2 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/7317/1 diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index ac1e852..0165e8a 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -756,7 +756,7 @@ if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) return -ENOSPC; cil->id_list[i++].ci = osmo_load16be(ci_be++); - consumed += elemlen; + *consumed += elemlen; remain -= elemlen; } return i; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 4da3929..2ce4ab2 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -920,6 +920,40 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_ci() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x09, 0x02, + 0x00, 0x01, + 0x00, 0x02, + 0x00, 0x77, + 0x01, 0xff, + }; + uint8_t rc_enc; + int rc_dec; + + memset(_cil, 0, sizeof(enc_cil)); + enc_cil.id_discr = CELL_IDENT_CI; + enc_cil.id_list[0].ci = 1; + enc_cil.id_list[1].ci = 2; + enc_cil.id_list[2].ci = 119; + enc_cil.id_list[3].ci = 511; + enc_cil.id_list_len = 4; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + OSMO_ASSERT(memcmp(_cil, _cil, sizeof(enc_cil)) == 0); + + msgb_free(msg); +} + int main(int argc, char **argv) { printf("Testing generation of GSM0808 messages\n"); @@ -956,6 +990,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_lac(); test_gsm0808_enc_dec_cell_id_list_bss(); test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac(); + test_gsm0808_enc_dec_cell_id_list_multi_ci(); printf("Done\n"); return EXIT_SUCCESS; -- To view, visit https://gerrit.osmocom.org/7317 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling
osmo-ci[master]: jenkins: add job osmo-gsm-tester_build-trigger-all
Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dcf2a6fa2991cb73b4807f8a10d251f3dca77dd Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
osmo-ci[master]: jenkins: add osmo-gsm-tester_run-{prod,rnd}
Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0 Gerrit-PatchSet: 5 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
osmo-ci[master]: jenkins: add job osmo-gsm-tester_gerrit
Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If661675528059bc8a95d39a6489a5a9381f52677 Gerrit-PatchSet: 6 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
[MERGED] osmo-ci[master]: add ansible playbooks
Harald Welte has submitted this change and it was merged. Change subject: add ansible playbooks .. add ansible playbooks Introduce playbooks to do: - setup-jenkins-slave - setup a usualy or special jenkins-slave - setup-gsm-tester - setup the gsm-tester Change-Id: I7007a4e6c38f73843390ec2b3b91133aff21e36a --- A ansible/.gitignore A ansible/files/README.md A ansible/hosts A ansible/roles/docker/README.md A ansible/roles/docker/defaults/main.yml A ansible/roles/docker/tasks/main.yml A ansible/roles/gsm-tester-modems/README.md A ansible/roles/gsm-tester-modems/tasks/main.yml A ansible/roles/gsm-tester-network/README.md A ansible/roles/gsm-tester-network/defaults/main.yml A ansible/roles/gsm-tester-network/tasks/main.yml A ansible/roles/gsm-tester-network/templates/interface.j2 A ansible/roles/gsm-tester/defaults/main.yml A ansible/roles/gsm-tester/files/dbus_osmo-gsm-tester.conf A ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh A ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh A ansible/roles/gsm-tester/tasks/main.yml A ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh A ansible/roles/install-coverity/README.md A ansible/roles/install-coverity/defaults/main.yml A ansible/roles/install-coverity/tasks/main.yml A ansible/roles/install-poky-sdk/README.md A ansible/roles/install-poky-sdk/defaults/main.yml A ansible/roles/install-poky-sdk/tasks/main.yml A ansible/roles/osmocom-jenkins-slave/README.md A ansible/roles/osmocom-jenkins-slave/defaults/main.yml A ansible/roles/osmocom-jenkins-slave/files/gitconfig A ansible/roles/osmocom-jenkins-slave/files/jenkins.osmocom.org.pub A ansible/roles/osmocom-jenkins-slave/tasks/debian.yml A ansible/roles/osmocom-jenkins-slave/tasks/generic-slave.yml A ansible/roles/osmocom-jenkins-slave/tasks/main.yml A ansible/setup-gsm-tester.md A ansible/setup-gsm-tester.yml A ansible/setup-jenkins-slave.yml 34 files changed, 843 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified diff --git a/ansible/.gitignore b/ansible/.gitignore new file mode 100644 index 000..2fa603c --- /dev/null +++ b/ansible/.gitignore @@ -0,0 +1,5 @@ +poky-* +cov-analysis-*.tar.gz +*.retry +*.swo +*.swp diff --git a/ansible/files/README.md b/ansible/files/README.md new file mode 100644 index 000..c3c631d --- /dev/null +++ b/ansible/files/README.md @@ -0,0 +1,23 @@ +Place 3rd party firmware/sdk files here. + +# role: gsm-tester-modems + +``` +./gobi +./gobi/UQCN.mbn +./gobi/amss.mbn +./gobi/apps.mbn +``` + +# role: install-coverity + +The filename depends on the variable `coverity_version`. +`coverity_version: 2017.07` + +E.g: `./cov-analysis-linux64-2017.07.tar.gz` + +# role: install-poky-sdk + +The filename depends on the variable `poky_installer_file`. + +`./poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.2.sh` diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 000..4f12cdf --- /dev/null +++ b/ansible/hosts @@ -0,0 +1,11 @@ +[gsm-tester] +# rnd +10.9.25.101 +# production +10.9.25.107 + +[jenkins-slaves] +# admin2-deb9build +2a01:4f8:13b:828::1:300 +# admin2-deb8build +2a01:4f8:13b:828::1:400 diff --git a/ansible/roles/docker/README.md b/ansible/roles/docker/README.md new file mode 100644 index 000..878ddb5 --- /dev/null +++ b/ansible/roles/docker/README.md @@ -0,0 +1 @@ +# Install docker for debian diff --git a/ansible/roles/docker/defaults/main.yml b/ansible/roles/docker/defaults/main.yml new file mode 100644 index 000..2c03d90 --- /dev/null +++ b/ansible/roles/docker/defaults/main.yml @@ -0,0 +1,4 @@ +--- + +# Adds this user to the group docker which is allowed to access docker +jenkins_user: jenkins diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml new file mode 100644 index 000..1603175 --- /dev/null +++ b/ansible/roles/docker/tasks/main.yml @@ -0,0 +1,28 @@ +--- + +- name: add https support + apt: +name: apt-transport-https +cache_valid_time: 3600 +update_cache: yes + +- name: add docker gpg key to apt keyring + apt_key: +id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 +url: https://download.docker.com/linux/debian/gpg + +- apt_repository: +repo: "deb https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable" +state: present +update_cache: yes + when: ansible_distribution == "Debian" + +- name: install docker + apt: +name: docker-ce + +- name: add jenkins to the docker group + user: +name: "{{ jenkins_user }}" +groups: docker +append: yes diff --git a/ansible/roles/gsm-tester-modems/README.md b/ansible/roles/gsm-tester-modems/README.md new file mode 100644 index 000..9f5f29b --- /dev/null +++ b/ansible/roles/gsm-tester-modems/README.md @@ -0,0 +1 @@ +# Install drivers for multiple modems or BTS's diff --git a/ansible/roles/gsm-tester-modems/tasks/main.yml
osmo-ci[master]: add ansible playbooks
Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/7127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7007a4e6c38f73843390ec2b3b91133aff21e36a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
osmo-ci[master]: add ansible playbooks
Patch Set 1: Code-Review+2 approving now, after 4 days without feedback from neels. -- To view, visit https://gerrit.osmocom.org/7127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7007a4e6c38f73843390ec2b3b91133aff21e36a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
[MERGED] osmo-sgsn[master]: compiler warnings: use enum ranap_nsap_addr_enc, constify lo...
Harald Welte has submitted this change and it was merged. Change subject: compiler warnings: use enum ranap_nsap_addr_enc, constify local var .. compiler warnings: use enum ranap_nsap_addr_enc, constify local var Use the proper enum ranap_nsap_addr_enc instead of int, and properly exclude that member when we're building without Iu support: sgsn_vty.c:1323:31: error: passing argument 2 of ‘ranap_iu_vty_init’ from incompatible pointer type [-Werror=incompatible-pointer-types] ranap_iu_vty_init(SGSN_NODE, _cfg->iu.rab_assign_addr_enc); Add const to a local var to silence compiler warning retrieving TLVP_VAL: gprs_gmm.c:1657:18: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] uint8_t *mi = TLVP_VAL(, GSM48_IE_GMM_ALLOC_PTMSI); ^~~~ Change-Id: I1168ce6425c31db3f6c3bf1f3682ae96b028c59b --- M include/osmocom/sgsn/sgsn.h M src/gprs/gprs_gmm.c 2 files changed, 10 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 7e0b5d4..829a8fc 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -9,6 +9,12 @@ #include #include +#include "../../bscconfig.h" + +#if BUILD_IU +#include +#endif + #include #include @@ -113,9 +119,11 @@ int p2; } dcomp_v42bis; +#if BUILD_IU struct { - int rab_assign_addr_enc; + enum ranap_nsap_addr_enc rab_assign_addr_enc; } iu; +#endif }; struct sgsn_instance { diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index c9fb8da..ff993cc 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -1654,7 +1654,7 @@ /* In Iu mode search only for ptmsi */ char mi_string[GSM48_MI_SIZE]; uint8_t mi_len = TLVP_LEN(, GSM48_IE_GMM_ALLOC_PTMSI); - uint8_t *mi = TLVP_VAL(, GSM48_IE_GMM_ALLOC_PTMSI); + const uint8_t *mi = TLVP_VAL(, GSM48_IE_GMM_ALLOC_PTMSI); uint8_t mi_type = *mi & GSM_MI_TYPE_MASK; uint32_t tmsi; -- To view, visit https://gerrit.osmocom.org/7297 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1168ce6425c31db3f6c3bf1f3682ae96b028c59b Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-ci[master]: jenkins: add osmo-gsm-tester-build jobs
Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/7019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic49c94e9e6639e43f6ae14b868bc826af3ce2085 Gerrit-PatchSet: 4 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: MSC_Tests: Support wildcarded endpoints (follow up)
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7305 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16cb2582b9d1764d7cb7e4b787368a4dd5ddf69c Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: dexterGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-ttcn3-hacks[master]: MSC_Tests: Support wildcarded endpoints (follow up)
Harald Welte has submitted this change and it was merged. Change subject: MSC_Tests: Support wildcarded endpoints (follow up) .. MSC_Tests: Support wildcarded endpoints (follow up) The following tests still lack support for wildcarded endpoints: MSC_Tests.TC_lu_and_mo_call MSC_Tests.TC_emerg_call_imsi MSC_Tests.TC_mo_crcx_ran_reject MSC_Tests.TC_mt_crcx_ran_reject - Also add support for wildcarded endpoints for those tests. This is a follow up patch for: Change-Id I0efeae0f8a6e98deb843e79648f84a262f1d98f8 Change-Id: I16cb2582b9d1764d7cb7e4b787368a4dd5ddf69c Related: OS#2710 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 46 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 48da793..561cf19 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -563,8 +563,14 @@ /* First MGCP CRCX (for BSS/RAN side) */ [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - /* TODO: dynamic EP allocation case */ - cpars.mgcp_ep := mgcp_cmd.line.ep; + + /* When the endpoint contains a wildcard we keep the endpoint +* identifier we have set up in cpars. Otherwise we use the +* endpoint name that the call agent has supplied */ + if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { + cpars.mgcp_ep := mgcp_cmd.line.ep; + } + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, hex2str(cpars.mgcp_call_id), "42", cpars.mgw_rtp_port_bss, @@ -572,7 +578,11 @@ { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp)); + + var template MgcpResponse mgcp_resp; + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); + f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); + MGCP.send(mgcp_resp); } } /* Second MGCP CRCX (this time for MSS/CN side) */ diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index e7ee9e7..485fd37 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -556,6 +556,7 @@ cpars.bss_rtp_port := 1110; cpars.mgcp_connection_id_bss := '2'H; cpars.mgcp_connection_id_mss := '3'H; + cpars.mgcp_ep := "rtpbridge/1@mgw"; f_perform_lu(); f_mo_call(cpars); @@ -848,6 +849,7 @@ private function f_emerg_call(MobileIdentityLV mi) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('112'H, 0)); cpars.emergency := true; + cpars.mgcp_ep := "rtpbridge/1@mgw"; f_mo_call(cpars); } @@ -1196,8 +1198,18 @@ BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); MGCP.receive(tr_CRCX) -> value mgcp_cmd; + + /* Detect if the received CRCX is a wildcarded CRCX request. If yes, +* set an endpoint name that fits the pattern. If not, just use the +* endpoint name from the request */ + if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) { + cpars.mgcp_ep := "rtpbridge/1@mgw"; + } else { + cpars.mgcp_ep := mgcp_cmd.line.ep; + } + cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - cpars.mgcp_ep := mgcp_cmd.line.ep; + /* Respond to CRCX with error */ var MgcpResponse mgcp_rsp := { line := { @@ -1205,9 +1217,13 @@ trans_id := mgcp_cmd.line.trans_id, string := "FORCED_FAIL" }, - params := omit, sdp := omit } + var MgcpParameter mgcp_rsp_param := { + code := "Z", + val := cpars.mgcp_ep + }; + mgcp_rsp.params[0] := mgcp_rsp_param; MGCP.send(mgcp_rsp); timer T := 30.0; @@ -1291,7 +1307,16 @@ MGCP.receive(tr_CRCX) -> value mgcp_cmd; cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - cpars.mgcp_ep := mgcp_cmd.line.ep; + + /* Detect if the received CRCX is a wildcarded CRCX request. If yes, +* set an endpoint name that fits the pattern. If not, just use the +*
osmo-sgsn[master]: compiler warnings: use enum ranap_nsap_addr_enc, constify lo...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7297 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1168ce6425c31db3f6c3bf1f3682ae96b028c59b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] libosmocore[master]: use gsm48_decode_lai2() in gsm0808_dec_cell_id_list()
Harald Welte has submitted this change and it was merged. Change subject: use gsm48_decode_lai2() in gsm0808_dec_cell_id_list() .. use gsm48_decode_lai2() in gsm0808_dec_cell_id_list() This makes gsm0808_dec_cell_id_list() properly decode 3-digit MNCs. Add a test which encodes/decodes a LAI_AND_LAC list with 3-digit MNCs. Change-Id: If6b941720de33dca66b6b1aa2cb95a3275708b7f Related: OS#2847 --- M src/gsm/gsm0808_utils.c M tests/gsm0808/gsm0808_test.c 2 files changed, 63 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 2d95ec6..ac1e852 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -677,16 +677,15 @@ return *tlv_len + 2; } -/* Decode 5-byte LAI list element data (see TS 08.08 3.2.2.27) into MCC/MNC/LAC. - * Return 0 if successful, negative on error. */ -static int decode_lai(const uint8_t *data, uint16_t *mcc, uint16_t *mnc, uint16_t *lac) +/* Decode 5-byte LAI list element data (see TS 08.08 3.2.2.27) into MCC/MNC/LAC. */ +static void decode_lai(const uint8_t *data, struct osmo_location_area_id *decoded) { struct gsm48_loc_area_id lai; - /* Copy data to stack to prevent unaligned access in gsm48_decode_lai(). */ + /* Copy data to stack to prevent unaligned access in gsm48_decode_lai2(). */ memcpy(, data, sizeof(lai)); /* don't byte swap yet */ - return gsm48_decode_lai(, mcc, mnc, lac) ? -1 : 0; + gsm48_decode_lai2(, decoded); } static int parse_cell_id_global_list(struct gsm0808_cell_id_list2 *cil, const uint8_t *data, size_t remain, @@ -704,8 +703,7 @@ return -ENOSPC; id = >id_list[i].global; lai_offset = i * elemlen; - if (decode_lai([lai_offset], >lai.plmn.mcc, >lai.plmn.mnc, >lai.lac) != 0) - return -EINVAL; + decode_lai([lai_offset], >lai); ci_be = (uint16_t *)([lai_offset + sizeof(struct gsm48_loc_area_id)]); id->cell_identity = osmo_load16be(ci_be); *consumed += elemlen; @@ -776,8 +774,7 @@ if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) return -ENOSPC; id = >id_list[i].lai_and_lac; - if (decode_lai([i * elemlen], >plmn.mcc, >plmn.mnc, >lac) != 0) - return -EINVAL; + decode_lai([i * elemlen], id); *consumed += elemlen; remain -= elemlen; i++; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 8e21b0c..4da3929 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -864,6 +864,62 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_cell_id_list_multi_lai_and_lac() +{ + struct gsm0808_cell_id_list2 enc_cil; + struct gsm0808_cell_id_list2 dec_cil; + struct osmo_location_area_id id; + struct msgb *msg; + uint8_t cil_enc_expected[] = { GSM0808_IE_CELL_IDENTIFIER_LIST, 0x10, 0x04, + 0x92, 0x61, 0x54, 0x23, 0x42, + 0x92, 0x72, 0x54, 0x24, 0x43, + 0x92, 0x83, 0x54, 0x25, 0x44 + }; + uint8_t rc_enc; + int rc_dec, i; + + memset(_cil, 0, sizeof(enc_cil)); + enc_cil.id_discr = CELL_IDENT_LAI_AND_LAC; + + id.plmn.mcc = 0x123; + osmo_mnc_from_str("456", , _3_digits); + id.lac = 0x2342; + memcpy(_cil.id_list[0].lai_and_lac, , sizeof(id)); + + id.plmn.mcc = 0x124; + osmo_mnc_from_str("457", , _3_digits); + id.lac = 0x2443; + memcpy(_cil.id_list[1].lai_and_lac, , sizeof(id)); + + id.plmn.mcc = 0x125; + osmo_mnc_from_str("458", , _3_digits); + id.lac = 0x2544; + memcpy(_cil.id_list[2].lai_and_lac, , sizeof(id)); + + enc_cil.id_list_len = 3; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_cell_id_list2(msg, _cil); + OSMO_ASSERT(rc_enc == sizeof(cil_enc_expected)); + OSMO_ASSERT(memcmp(cil_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_cell_id_list2(_cil, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == msg->len - 2); + + OSMO_ASSERT(dec_cil.id_list_len == 3); + /* Check MAXLEN elements to ensure everything has been initialized. */ + for (i = 0; i < GSM0808_CELL_ID_LIST2_MAXLEN; i++) { + struct osmo_location_area_id *enc_id; + struct osmo_location_area_id *dec_id; + enc_id = _cil.id_list[i].lai_and_lac; + dec_id = _cil.id_list[i].lai_and_lac; + OSMO_ASSERT(osmo_plmn_cmp(_id->plmn, _id->plmn) == 0); + OSMO_ASSERT(enc_id->lac == dec_id->lac); + } + + msgb_free(msg); +} + int main(int argc, char