libosmocore[master]: support for more cell ID list types in libosmocore
Patch Set 16: (3 comments) https://gerrit.osmocom.org/#/c/6509/16/src/gsm/gsm0808_utils.c File src/gsm/gsm0808_utils.c: Line 711: remain -= sizeof(struct gsm48_loc_area_id) + sizeof(*ci_be); and might be nice to define a local var for sizeof(struct gsm48_loc_area_id) + sizeof(*ci_be) instead of repeating over and over Line 739: remain -= sizeof(*lacp_be) + sizeof(*ci_be); same repetition of sizes Line 758: remain -= sizeof(*ci_be); same repetition, even if it's only one sizeof(), would be nice to formalize that it's the identical step size each time. Same below. -- To view, visit https://gerrit.osmocom.org/6509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Gerrit-PatchSet: 16 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: Yes
libosmocore[master]: support for more cell ID list types in libosmocore
Patch Set 16: Code-Review-1 (1 comment) found an error https://gerrit.osmocom.org/#/c/6509/16/src/gsm/gsm0808_utils.c File src/gsm/gsm0808_utils.c: Line 705: if (decode_lai(&data[lai_offset], &id->lai.plmn.mcc, &id->lai.plmn.mnc, &id->lai.lac) != 0) error here: lai_offset is unset in the first loop, and uses the value of the respective previous loop iteration. -- To view, visit https://gerrit.osmocom.org/6509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Gerrit-PatchSet: 16 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: Yes
[PATCH] osmo-msc[master]: vlr_ciph_result: fix use after free of imeisv
Review at https://gerrit.osmocom.org/7264 vlr_ciph_result: fix use after free of imeisv Define the struct vlr_ciph_result member .imeisv not as a char* but a char[] of appropriate length, to avoid the need to point to external memory. Thus fix a use-after-free in msc_cipher_mode_compl(), which defined the imeisv[] buffer in a sub-scope within that function, so that the .imeisv pointer was already invalid when fed to vlr_subscr_rx_ciph_res(). Did you notice that the commit summary rhymes? Closes: OS#3053 Change-Id: I90cfb952a7dec6d104200872164ebadb25d0260d --- M include/osmocom/msc/vlr.h M src/libmsc/osmo_msc.c M src/libvlr/vlr_access_req_fsm.c M src/libvlr/vlr_lu_fsm.c 4 files changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/64/7264/1 diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index c4b8cf6..37702a9 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -74,7 +74,7 @@ struct vlr_ciph_result { enum vlr_ciph_result_cause cause; - const char *imeisv; + char imeisv[GSM48_MI_SIZE]; }; enum vlr_subscr_security_context { diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index f6df0d2..323baf9 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -173,7 +173,6 @@ unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh); struct tlv_parsed tp; uint8_t mi_type; - char imeisv[GSM48_MI_SIZE] = ""; if (!gh) { LOGP(DRR, LOGL_ERROR, "invalid: msgb without l3 header\n"); @@ -187,10 +186,9 @@ mi_type = TLVP_VAL(&tp, GSM48_IE_MOBILE_ID)[0] & GSM_MI_TYPE_MASK; if (mi_type == GSM_MI_TYPE_IMEISV && TLVP_LEN(&tp, GSM48_IE_MOBILE_ID) > 0) { - gsm48_mi_to_string(imeisv, sizeof(imeisv), + gsm48_mi_to_string(ciph_res.imeisv, sizeof(ciph_res.imeisv), TLVP_VAL(&tp, GSM48_IE_MOBILE_ID), TLVP_LEN(&tp, GSM48_IE_MOBILE_ID)); - ciph_res.imeisv = imeisv; } } } diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c index 95a618d..3845f26 100644 --- a/src/libvlr/vlr_access_req_fsm.c +++ b/src/libvlr/vlr_access_req_fsm.c @@ -500,7 +500,7 @@ } - if (res.imeisv) { + if (*res.imeisv) { LOGPFSM(fi, "got IMEISV: %s\n", res.imeisv); vlr_subscr_set_imeisv(vsub, res.imeisv); } diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index c6fd080..9a4a239 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -1165,7 +1165,7 @@ return; } - if (res.imeisv) { + if (*res.imeisv) { LOGPFSM(fi, "got IMEISV: %s\n", res.imeisv); vlr_subscr_set_imeisv(vsub, res.imeisv); } -- To view, visit https://gerrit.osmocom.org/7264 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90cfb952a7dec6d104200872164ebadb25d0260d Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
osmo-bsc[master]: abis_rsl: properly handle RSL Release Ind from MS
Patch Set 1: > At first sight I'm not entirely convinced. > > An RLL REL IND indicates release of one SAPI (on either DCCH or > SACCH), not release of the radio channel. The MS could release > SAPI3 as no SMS transmissions are pending but still keep SAPI 0 for > other signaling? > > Imagine SMS over SACCH while a call is ongoing. Yes, I was wondering about that. Our code walks all over that by just flattening the SAPI indicator out completely. It appears this needs a proper revisit and tests to go with it. I opened https://osmocom.org/issues/3060 -- To view, visit https://gerrit.osmocom.org/7221 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f8c9c4e6b6850b15c70250fd3f88bdf75f9accf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-sgsn[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifea235feb073a276302436936e908d9125c77a82 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-mgw[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Ia66aa48e957f4dcbdf8a7df3010b84f472c33f76 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 859acd1..fed44f0 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + # Enable/disable transcoding within osmo-bsc_mgcp? AC_ARG_ENABLE([mgcp-transcoding], [AS_HELP_STRING([--enable-mgcp-transcoding], [Build the MGCP gateway with internal transcoding enabled.])], [osmo_ac_mgcp_transcoding="$enableval"],[osmo_ac_mgcp_transcoding="no"]) @@ -126,6 +144,9 @@ AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + dnl Generate the output AM_CONFIG_HEADER(bscconfig.h) -- To view, visit https://gerrit.osmocom.org/7116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia66aa48e957f4dcbdf8a7df3010b84f472c33f76 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-mgw[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia66aa48e957f4dcbdf8a7df3010b84f472c33f76 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-sgsn[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Ifea235feb073a276302436936e908d9125c77a82 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 504157b..1b23d27 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " @@ -158,6 +176,9 @@ AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + dnl Generate the output AM_CONFIG_HEADER(bscconfig.h) -- To view, visit https://gerrit.osmocom.org/7119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifea235feb073a276302436936e908d9125c77a82 Gerrit-PatchSet: 2 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-pcu[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I0f735913fc3bbda695c4e66449dcfc94f417dafb --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 3706b6c..8cddd1a 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,24 @@ LDFLAGS="$LDFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + AC_ARG_ENABLE(profile, [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], [profile=$enableval], [profile="no"]) @@ -116,6 +134,9 @@ STD_DEFINES_AND_INCLUDES="-Wall" AC_SUBST(STD_DEFINES_AND_INCLUDES) +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT( osmo-pcu.pc include/Makefile -- To view, visit https://gerrit.osmocom.org/7118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f735913fc3bbda695c4e66449dcfc94f417dafb Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-msc[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0528dcb14bf79d0920905a718cc2edea1434c0e5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-msc[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I0528dcb14bf79d0920905a718cc2edea1434c0e5 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index feb3de9..e8ae88c 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + # Enable/disable smpp support in the msc? AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])], [osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"]) @@ -175,6 +193,9 @@ AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + dnl Generate the output AM_CONFIG_HEADER(bscconfig.h) -- To view, visit https://gerrit.osmocom.org/7117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0528dcb14bf79d0920905a718cc2edea1434c0e5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-pcu[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f735913fc3bbda695c4e66449dcfc94f417dafb Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-ggsn[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: I64e542ad4da34a7ac3bc1b599a122ecff47e892d --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 033eed7..19df974 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,7 +38,7 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" $GTP +./configure --enable-sanitize --enable-werror $GTP $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/7112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64e542ad4da34a7ac3bc1b599a122ecff47e892d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-hlr[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Id5c0740a37067cbe8986d52d63c6134769c71c47 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index ef234c5..723c43f 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + AC_ARG_ENABLE([external_tests], AC_HELP_STRING([--enable-external-tests], [Include the VTY/CTRL tests in make check [default=no]]), @@ -74,6 +92,9 @@ AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT( Makefile doc/Makefile -- To view, visit https://gerrit.osmocom.org/7113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5c0740a37067cbe8986d52d63c6134769c71c47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-iuh[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Id659512d2d9fb3f28584ec5f071907f6b6e72e0d --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index dd1d75e..8a654dc 100644 --- a/configure.ac +++ b/configure.ac @@ -58,9 +58,30 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + CFLAGS="$CFLAGS -Wall" CPPFLAGS="$CPPFLAGS -Wall" +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT( libosmo-ranap.pc src/Makefile -- To view, visit https://gerrit.osmocom.org/7115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id659512d2d9fb3f28584ec5f071907f6b6e72e0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-iuh[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id659512d2d9fb3f28584ec5f071907f6b6e72e0d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-hlr[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: I5fe776cf9ccb5d462c3c1fbbb1e31abe6f42bde6 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index eaf4f2b..8dc0162 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize --enable-external-tests CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize --enable-external-tests --enable-werror $MAKE $PARALLEL_MAKE $MAKE check || cat-testlogs.sh $MAKE distcheck || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5fe776cf9ccb5d462c3c1fbbb1e31abe6f42bde6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-ggsn[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifcde5a110cbed0eaa250dd946927e3b0f4f9bd13 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-ggsn[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64e542ad4da34a7ac3bc1b599a122ecff47e892d Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-hlr[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id5c0740a37067cbe8986d52d63c6134769c71c47 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-ggsn[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Ifcde5a110cbed0eaa250dd946927e3b0f4f9bd13 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 1193e46..b9073e9 100644 --- a/configure.ac +++ b/configure.ac @@ -151,6 +151,27 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_CONFIG_FILES([Makefile doc/Makefile doc/examples/Makefile -- To view, visit https://gerrit.osmocom.org/7111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifcde5a110cbed0eaa250dd946927e3b0f4f9bd13 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-hlr[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fe776cf9ccb5d462c3c1fbbb1e31abe6f42bde6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-bts[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5b37602a117350159183fb53ac330294b94f4195 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-bsc[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I8cf0f135131c348d0b43f25b1d444af5827f148d --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index e95a16d..c74402a 100644 --- a/configure.ac +++ b/configure.ac @@ -81,6 +81,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " @@ -140,6 +158,9 @@ AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + dnl Generate the output AM_CONFIG_HEADER(bscconfig.h) -- To view, visit https://gerrit.osmocom.org/7108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cf0f135131c348d0b43f25b1d444af5827f148d Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-bts[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I5b37602a117350159183fb53ac330294b94f4195 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index db8a97d..b375806 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0) @@ -185,6 +203,9 @@ CPPFLAGS=$oldCPPFLAGS fi +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AM_CONFIG_HEADER(btsconfig.h) AC_OUTPUT( -- To view, visit https://gerrit.osmocom.org/7110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b37602a117350159183fb53ac330294b94f4195 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libsmpp34[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib09a4aa3167e5dc24d02e3e59307baa6f7ee3f2c Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libsmpp34[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I5280a692eaf8f626523e0fd929d1febaa2859104 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 85270bc..8ecbb77 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,27 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT([Makefile def_frame/Makefile def_list/Makefile -- To view, visit https://gerrit.osmocom.org/7106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5280a692eaf8f626523e0fd929d1febaa2859104 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libosmocore[master]: jenkins_amd64.sh: use --enable-werror configure flag, not CF...
Patch Set 1: marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81b50c39cd6e908c4c95651829b679425de87a28 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libosmo-sccp[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: I5c3f11586d48a076479eb19ed80a11caad4251d8 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index ecaa1fe..d15cebe 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -36,7 +36,7 @@ set -x autoreconf --install --force -./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize --enable-werror $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c3f11586d48a076479eb19ed80a11caad4251d8 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libosmocore[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5c8e68b64cd890b3309b4b26c7f22bde1edba83 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-bsc[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cf0f135131c348d0b43f25b1d444af5827f148d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libsmpp34[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: Ib09a4aa3167e5dc24d02e3e59307baa6f7ee3f2c --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 0768d71..8680cde 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -6,8 +6,8 @@ osmo-clean-workspace.sh autoreconf --install --force -./configure --enable-sanitize -$MAKE CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize --enable-werror +$MAKE $MAKE $PARALLEL_MAKE $MAKE distcheck || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib09a4aa3167e5dc24d02e3e59307baa6f7ee3f2c Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] libosmocore[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Ic5c8e68b64cd890b3309b4b26c7f22bde1edba83 --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 60c177f..7f2aabd 100644 --- a/configure.ac +++ b/configure.ac @@ -272,6 +272,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + CFLAGS="$CFLAGS -DBUILDING_LIBOSMOCORE -Wall" CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOCORE -Wall" @@ -318,6 +336,9 @@ CHECK_BUILTIN_SUPPORT([__builtin_cpu_supports], [Runtime SIMD detection will be disabled]) +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT( libosmocore.pc libosmocodec.pc -- To view, visit https://gerrit.osmocom.org/7104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5c8e68b64cd890b3309b4b26c7f22bde1edba83 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] libosmo-sccp[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Idb579d546d6f228e86bd49ca15aa87b86978205a --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 7b18db7..a73bc82 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " @@ -80,6 +98,9 @@ AC_PATH_PROG(DOXYGEN,doxygen,false) AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false && test "x$doxygen" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT( libosmo-sigtran.pc libosmo-sccp.pc -- To view, visit https://gerrit.osmocom.org/7102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb579d546d6f228e86bd49ca15aa87b86978205a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libosmocore[master]: jenkins_amd64.sh: use --enable-werror configure flag, not CF...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81b50c39cd6e908c4c95651829b679425de87a28 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libsmpp34[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5280a692eaf8f626523e0fd929d1febaa2859104 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libosmocore[master]: jenkins_amd64.sh: use --enable-werror configure flag, not CF...
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins_amd64.sh: use --enable-werror configure flag, not CFLAGS .. jenkins_amd64.sh: use --enable-werror configure flag, not CFLAGS Note that the jenkins_arm.sh passes various CFLAGS and potentially overwrites ./configure internal CFLAGS like that. I'm staying out of that for now. Change-Id: I81b50c39cd6e908c4c95651829b679425de87a28 --- M contrib/jenkins_amd64.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins_amd64.sh b/contrib/jenkins_amd64.sh index ff1cfdc..c3af378 100755 --- a/contrib/jenkins_amd64.sh +++ b/contrib/jenkins_amd64.sh @@ -15,7 +15,7 @@ prep_build "$src_dir" "$build_dir" -"$src_dir"/configure --disable-silent-rules --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror" +"$src_dir"/configure --disable-silent-rules --enable-static $ENABLE_SANITIZE --enable-werror run_make } -- To view, visit https://gerrit.osmocom.org/7105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81b50c39cd6e908c4c95651829b679425de87a28 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libosmo-sccp[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c3f11586d48a076479eb19ed80a11caad4251d8 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libosmo-sccp[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c3f11586d48a076479eb19ed80a11caad4251d8 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libosmo-netif[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I68e4781ec5dfaf1dac46510a092a87e35691f082 --- M configure.ac 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index d146513..f01dac9 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + CFLAGS="$CFLAGS -Wall" CPPFLAGS="$CPPFLAGS -Wall" -- To view, visit https://gerrit.osmocom.org/7100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68e4781ec5dfaf1dac46510a092a87e35691f082 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] libosmo-abis[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: I20d5f18cf05c9e277d914ada259a95187b73fe39 --- M configure.ac 1 file changed, 20 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 0e07330..ce4bf39 100644 --- a/configure.ac +++ b/configure.ac @@ -78,6 +78,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + _cflags_save=$CFLAGS CFLAGS="$CFLAGS $ORTP_CFLAGS" AC_COMPILE_IFELSE( @@ -105,6 +123,8 @@ [rtp_session_signal_connect requires ulong parameter])]) CFLAGS=$_cflags_save +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) AC_OUTPUT( libosmoabis.pc -- To view, visit https://gerrit.osmocom.org/7098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I20d5f18cf05c9e277d914ada259a95187b73fe39 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libosmo-netif[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I739f4562a96b7b6031075d47d94f46af7a37b4b4 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libosmo-sccp[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb579d546d6f228e86bd49ca15aa87b86978205a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libosmo-abis[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I20d5f18cf05c9e277d914ada259a95187b73fe39 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libasn1c[master]: configure: add --enable-werror
Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-werror .. configure: add --enable-werror Provide a sane means of adding the -Werror compiler flag. Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"', but that actually *overwrites* all the other CFLAGS we might want to have set. Maintain these exceptions from -Werror: a) deprecation (allow upstream to mark deprecation without breaking builds); b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) As a last configure step before generating the output files, print the complete CFLAGS and CPPFLAGS by means of AC_MSG_RESULT. Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c --- M configure.ac 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 4d65c2f..1610973 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,24 @@ CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: +a) deprecation (allow upstream to mark deprecation without breaking builds); +b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + # The following test is taken from WebKit's webkit.m4 saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden " @@ -44,6 +62,9 @@ [build_debug="$enableval"], [build_debug="no"]) AM_CONDITIONAL(BUILD_DEBUG, test "x$build_debug" = "xyes") +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + AC_OUTPUT( libasn1c.pc src/Makefile -- To view, visit https://gerrit.osmocom.org/7096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c Gerrit-PatchSet: 1 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[MERGED] libosmo-netif[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: I739f4562a96b7b6031075d47d94f46af7a37b4b4 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index c289d2d..f2013a5 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -35,7 +35,7 @@ set -x autoreconf --install --force -./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize --enable-werror $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I739f4562a96b7b6031075d47d94f46af7a37b4b4 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libasn1c[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7097 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4791c6a32d983869692df36172f93adee819debb Gerrit-PatchSet: 1 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libosmo-abis[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I487ab6f2e391aa57404725de2c8ab5447ca9f725 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libosmo-netif[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68e4781ec5dfaf1dac46510a092a87e35691f082 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] libosmo-abis[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: I487ab6f2e391aa57404725de2c8ab5447ca9f725 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 45e540e..6a76044 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -33,7 +33,7 @@ set -x autoreconf --install --force -./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-sanitize --enable-werror $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I487ab6f2e391aa57404725de2c8ab5447ca9f725 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] libasn1c[master]: jenkins.sh: use --enable-werror configure flag, not CFLAGS
Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use --enable-werror configure flag, not CFLAGS .. jenkins.sh: use --enable-werror configure flag, not CFLAGS Change-Id: I4791c6a32d983869692df36172f93adee819debb --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5f31710..7d68736 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -13,7 +13,7 @@ set -x autoreconf --install --force -./configure CFLAGS="-Werror" CPPFLAGS="-Werror" +./configure --enable-werror $MAKE $PARALLEL_MAKE $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/7097 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4791c6a32d983869692df36172f93adee819debb Gerrit-PatchSet: 1 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
libasn1c[master]: configure: add --enable-werror
Patch Set 1: Code-Review+2 marking +2 because I'm (barely) allowed to by the comment at https://gerrit.osmocom.org/7096 (03-09 13:04 CET) -- To view, visit https://gerrit.osmocom.org/7096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c Gerrit-PatchSet: 1 Gerrit-Project: libasn1c Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
libosmocore[master]: support for more cell ID list types in libosmocore
Patch Set 16: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Gerrit-PatchSet: 16 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: No
[PATCH] osmocom-bb[master]: Merge branch 'fixeria/trx' into master
Review at https://gerrit.osmocom.org/7263 Merge branch 'fixeria/trx' into master This change introduces the following: - trxcon - a similar to the osmocon application, which implements both L1CTL and TRX interfaces, and intended to connect the L2&3 applications with a transciever, such as FakeTRX, OsmoTRX or GR-GSM TRX. - trx_toolkit - a set of tools in Python, intended for hacking and debugging a TRX interface between both transceiver and L1 software, and for creating a virtual Um-interface between both OsmocomBB and OsmoBTS. For more details, see: https://osmocom.org/projects/baseband/wiki/TRX_Interface https://osmocom.org/projects/baseband/wiki/FakeTRX src/target/trx_toolkit/README Change-Id: I83094ca021a0b84c107f7301e10a603e4b342e6e --- M src/Makefile 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/63/7263/1 diff --git a/src/Makefile b/src/Makefile index 3a6ba55..d92acbc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -12,12 +12,8 @@ TOPDIR=$(shell pwd) all: libosmocore-target nofirmware firmware mtk-firmware -<<< HEAD (8b9d31 mobile: Fix memory leak when not using a LUA script) -nofirmware: layer23 osmocon gsmmap gprsdecode virtphy -=== -nofirmware: layer23 osmocon trxcon gsmmap virtphy ->>> BRANCH (23914b Rename 'fake_trx' to 'trx_toolkit') +nofirmware: layer23 osmocon trxcon gsmmap gprsdecode virtphy libosmocore-target: shared/libosmocore/build-target/src/.libs/libosmocore.a -- To view, visit https://gerrit.osmocom.org/7263 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83094ca021a0b84c107f7301e10a603e4b342e6e Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy
[PATCH] osmo-bsc[master]: ipaccess-config: Enable logging all categories to print errors
Review at https://gerrit.osmocom.org/7260 ipaccess-config: Enable logging all categories to print errors log_parse_category_mask is preventing errors from being printed, which makes debugging issues with the application harder. Change-Id: I69ee2de921979f8bfaa8b501c6b05db1717b0c36 --- M src/ipaccess/ipaccess-config.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/7260/1 diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index a1985b7..35500c9 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -843,7 +843,8 @@ .name = "DNM", .description = "A-bis Network Management / O&M (NM/OML)", .color = "\033[1;36m", - .enabled = 1, .loglevel = LOGL_INFO, + .loglevel = LOGL_DEBUG, + .enabled = 1, }, }; @@ -862,7 +863,6 @@ msgb_talloc_ctx_init(tall_ctx_config, 0); osmo_init_logging(&log_info); - log_parse_category_mask(osmo_stderr_target, "DNM,0"); bts_model_nanobts_init(); printf("ipaccess-config (C) 2009-2010 by Harald Welte and others\n"); -- To view, visit https://gerrit.osmocom.org/7260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69ee2de921979f8bfaa8b501c6b05db1717b0c36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: ipaccess-config: Improve handling of last parameter
Review at https://gerrit.osmocom.org/7262 ipaccess-config: Improve handling of last parameter Check exact number of parameters to avoid explicit void params ("") to be used as BTS IP by an incorrect caller. Exit successfully if firmware analysis is requested and there's no BTS IP provided (meaning no BTS set up is required). Save BTS IP into bts_ip variable as using optind is tricky. Use new bts_ip variable to print the IP of the BTS we are trying to connect to. Change-Id: I8071aaf2be217207261ad698f87344f7ca15ccc4 --- M src/ipaccess/ipaccess-config.c 1 file changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/62/7262/1 diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 8f527cd..b83846d 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -858,6 +858,7 @@ { struct gsm_bts *bts; struct sockaddr_in sin; + char *bts_ip; int rc, option_index = 0, stream_id = 0xff; tall_ctx_config = talloc_named_const(NULL, 0, "ipaccess-config"); @@ -982,15 +983,17 @@ } }; - if (firmware_analysis) + if (firmware_analysis) { analyze_firmware(firmware_analysis); - - if (optind >= argc) { - /* only warn if we have not done anything else */ - if (!firmware_analysis) - fprintf(stderr, "you have to specify the IP address of the BTS. Use --help for more information\n"); + if (argc == optind) /* Nothing more to do, exit successfully */ + exit(EXIT_SUCCESS); + } + if (argc - optind != 1) { + fprintf(stderr, "you have to specify the IP address of the BTS. Use --help for more information\n"); exit(2); } + bts_ip = argv[optind++]; + libosmo_abis_init(tall_ctx_config); bsc_gsmnet = bsc_network_init(tall_bsc_ctx); @@ -1010,11 +1013,11 @@ ipac_nwl_init(); - printf("Trying to connect to ip.access BTS ...\n"); + printf("Trying to connect to ip.access BTS %s...\n", bts_ip); memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; - inet_aton(argv[optind], &sin.sin_addr); + inet_aton(bts_ip, &sin.sin_addr); rc = ia_config_connect(bts, &sin); if (rc < 0) { perror("Error connecting to the BTS"); -- To view, visit https://gerrit.osmocom.org/7262 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8071aaf2be217207261ad698f87344f7ca15ccc4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-bsc[master]: ipaccess-config: Add missing path with log error
Review at https://gerrit.osmocom.org/7261 ipaccess-config: Add missing path with log error Change-Id: Id903e3e20e12a143cedab72dc14669c07f4d11ac --- M src/ipaccess/ipaccess-config.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/61/7261/1 diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 35500c9..8f527cd 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -117,6 +117,7 @@ ret = osmo_fd_register(bfd); if (ret < 0) { + LOGP(DLINP, LOGL_ERROR, "unable to register socket fd\n"); close(bfd->fd); return ret; } -- To view, visit https://gerrit.osmocom.org/7261 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id903e3e20e12a143cedab72dc14669c07f4d11ac Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
osmo-bts[master]: LC15: Fix missing fill frame and GSM 05.08 mandatory frame
Patch Set 5: (8 comments) I'm not familiar with these parts of the spec. So my comments are only cosmetic in nature. https://gerrit.osmocom.org/#/c/5753/5/src/common/msg_utils.c File src/common/msg_utils.c: Line 388: else Add curly braces to this else block? It spans more than one line due to indentation. I wonder though if we should just remove the 'else' line and then indent the line below it one column to the left. Line 489: if (!!lchan->tch.dtx.len) Is !! intentional? Might be clearer to write this as something like if (len) or if (len == 0) or if (len != 0)? Line 529: /* Debug print */ Comment adds no information and could be removed. Line 565: /* Debug print */ Comment adds no information and could be removed. https://gerrit.osmocom.org/#/c/5753/5/src/osmo-bts-litecell15/l1_if.c File src/osmo-bts-litecell15/l1_if.c: Line 365: /* Debug print */ This comment could be deleted, it doesn't add additional information. Line 504: if (lchan->rsl_cmode == RSL_CMOD_SPD_SIGN) This if-block should use curly braces because it spans more than one line due to the comment Line 508: if (lchan->ts->trx->bts->dtxd) likewise Line 511: else This else block should use curly braces, too. -- To view, visit https://gerrit.osmocom.org/5753 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I40e9bf9438c0b400e4d29eb39ffae37207e34db6 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes
[MERGED] osmo-bsc[master]: abisip-find: Force stdout buffer flush
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: Force stdout buffer flush .. abisip-find: Force stdout buffer flush If list-view is not enabled, then a line with the new BTS is printed to stdout buffer. That's fine if stdout goes to the terminal, since it's line buffered, but if abisip-find write to a pite or to a file, then the buffer won't be flushed until a full page is full, which may take a while, and produce delays in scripts using abisip-find. Change-Id: I19f8c7f747fa7a130a436e5e07a8648932404bf0 --- M src/ipaccess/abisip-find.c 1 file changed, 3 insertions(+), 2 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 a4ed93e..defe2e4 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -339,9 +339,10 @@ talloc_free(bs); base_stations_bump(changed); printf("RX: %u \r", responses); - fflush(stdout); - } else + } else { printf("%s\n", parse_response(ctx, buf, len)); + } + fflush(stdout); } static int read_response(int fd) -- To view, visit https://gerrit.osmocom.org/7258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19f8c7f747fa7a130a436e5e07a8648932404bf0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-bsc[master]: abisip-find: Add --format-json option
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib2d461c79fbc242141dc342578467c3e9c6ed5fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-bsc[master]: abisip-find: Add option to bind to a specific source address
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: Add option to bind to a specific source address .. abisip-find: Add option to bind to a specific source address When the BTS answers, it uses the src addr used by abisip-find to send the boardcast packets. This way a different IP than the one automatically specified by default routing can be used. An extra benefit: more than one abisip-find process can now be run in parallel on the same interface. Change-Id: I6b805f22d261003239d7002d9e568ea4797a2b0b --- M src/ipaccess/abisip-find.c 1 file changed, 20 insertions(+), 4 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 0f398b4..a4ed93e 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -39,11 +39,13 @@ static struct { const char *ifname; + const char *bind_ip; int send_interval; bool list_view; time_t list_view_timeout; } cmdline_opts = { .ifname = NULL, + .bind_ip = NULL, .send_interval = 5, .list_view = false, .list_view_timeout = 10, @@ -55,6 +57,8 @@ printf("Usage: abisip-find [-l] []\n"); printf("Specify the outgoing network interface,\n" "e.g. 'eth0'\n"); + printf(" -b --bind-ip Specify the local IP to bind to,\n" + "e.g. '192.168.1.10'\n"); printf(" -i --interval Send broadcast frames every seconds.\n"); printf(" -l --list-viewInstead of printing received responses,\n" "output a sorted list of currently present\n" @@ -70,13 +74,14 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"bind-ip", 1, 0, 'b'}, {"send-interval", 1, 0, 'i'}, {"list-view", 0, 0, 'l'}, {"timeout", 1, 0, 't'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hi:lt:", + c = getopt_long(argc, argv, "hb:i:lt:", long_options, &option_index); if (c == -1) break; @@ -85,6 +90,9 @@ case 'h': print_help(); exit(EXIT_SUCCESS); + case 'b': + cmdline_opts.bind_ip = optarg; + break; case 'i': errno = 0; cmdline_opts.send_interval = strtoul(optarg, NULL, 10); @@ -122,7 +130,7 @@ } } -static int udp_sock(const char *ifname) +static int udp_sock(const char *ifname, const char *bind_ip) { int fd, rc, bc = 1; struct sockaddr_in sa; @@ -146,7 +154,15 @@ memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_port = htons(3006); - sa.sin_addr.s_addr = INADDR_ANY; + if (bind_ip) { + rc = inet_pton(AF_INET, bind_ip, &sa.sin_addr); + if (rc != 1) { + fprintf(stderr, "bind ip addr: inet_pton failed, returned %d\n", rc); + goto err; + } + } else { + sa.sin_addr.s_addr = INADDR_ANY; + } rc = bind(fd, (struct sockaddr *)&sa, sizeof(sa)); if (rc < 0) @@ -395,7 +411,7 @@ bfd.cb = bfd_cb; bfd.when = BSC_FD_READ | BSC_FD_WRITE; - bfd.fd = udp_sock(cmdline_opts.ifname); + bfd.fd = udp_sock(cmdline_opts.ifname, cmdline_opts.bind_ip); if (bfd.fd < 0) { perror("Cannot create local socket for broadcast udp"); exit(1); -- To view, visit https://gerrit.osmocom.org/7257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b805f22d261003239d7002d9e568ea4797a2b0b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-bsc[master]: abisip-find: Add --format-json option
Harald Welte has submitted this change and it was merged. Change subject: abisip-find: Add --format-json option .. abisip-find: Add --format-json option This format outputs json format which can be more easily parsed if launched by scripting launguage with json support like python. Change-Id: Ib2d461c79fbc242141dc342578467c3e9c6ed5fc --- M src/ipaccess/abisip-find.c 1 file changed, 38 insertions(+), 4 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 defe2e4..03f579b 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -43,12 +43,14 @@ int send_interval; bool list_view; time_t list_view_timeout; + bool format_json; } cmdline_opts = { .ifname = NULL, .bind_ip = NULL, .send_interval = 5, .list_view = false, .list_view_timeout = 10, + .format_json = false, }; static void print_help() @@ -66,6 +68,7 @@ printf(" -t --timeout Drop base stations after seconds of\n" "receiving no more replies from it.\n" "Implies --list-view.\n"); + printf(" -j --format-json Print BTS information using json syntax.\n"); } static void handle_options(int argc, char **argv) @@ -78,10 +81,11 @@ {"send-interval", 1, 0, 'i'}, {"list-view", 0, 0, 'l'}, {"timeout", 1, 0, 't'}, + {"format-json", 0, 0, 'j'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hb:i:lt:", + c = getopt_long(argc, argv, "hb:i:lt:j", long_options, &option_index); if (c == -1) break; @@ -111,6 +115,9 @@ /* fall through to imply list-view: */ case 'l': cmdline_opts.list_view = true; + break; + case 'j': + cmdline_opts.format_json = true; break; default: /* catch unknown options *as well as* missing arguments. */ @@ -217,18 +224,32 @@ static char *parse_response(void *ctx, unsigned char *buf, int len) { + unsigned int out_len; uint8_t t_len; uint8_t t_tag; uint8_t *cur = buf; char *out = talloc_zero_size(ctx, 512); + if (cmdline_opts.format_json) + out = talloc_asprintf_append(out,"{ "); + while (cur < buf + len) { t_len = *cur++; t_tag = *cur++; - - out = talloc_asprintf_append(out, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); + + if (cmdline_opts.format_json) + out = talloc_asprintf_append(out, "\"%s\": \"%s\", ", ipa_ccm_idtag_name(t_tag), cur); + else + out = talloc_asprintf_append(out, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur); cur += t_len; + } + + if (cmdline_opts.format_json) { + out_len = strlen(out); + if (out[out_len-2] == ',') + out[out_len-2] = ' '; + out[out_len-1] = '}'; } return out; @@ -308,10 +329,23 @@ int count = 0; print_timestamp(); + if (cmdline_opts.format_json) + printf("["); + llist_for_each_entry(bs, &base_stations, entry) { - printf("%3d: %s\n", count, bs->line); + if (cmdline_opts.format_json) { + if (count) + printf(","); + printf("\n%s", bs->line); + } else { + printf("%3d: %s\n", count, bs->line); + } count++; } + + if (cmdline_opts.format_json) + printf("%c]\n", count ? '\n': ' '); + printf("\nTotal: %d\n", count); } -- To view, visit https://gerrit.osmocom.org/7259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2d461c79fbc242141dc342578467c3e9c6ed5fc Gerrit-PatchSet: 2 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-bsc[master]: abisip-find: Add option to bind to a specific source address
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6b805f22d261003239d7002d9e568ea4797a2b0b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-bsc[master]: abisip-find: Force stdout buffer flush
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I19f8c7f747fa7a130a436e5e07a8648932404bf0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-msc[master]: Track libosmocore API change in osmo-msc.
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67377270cf3b081ac5dc9cd7b4dc28f74143753a Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
libosmocore[master]: support for more cell ID list types in libosmocore
Patch Set 16: Code-Review+1 leaving it to Neels to see if his comments are all addressed. -- To view, visit https://gerrit.osmocom.org/6509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Gerrit-PatchSet: 16 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: No
libosmocore[master]: support for more cell ID list types in libosmocore
Patch Set 14: (2 comments) https://gerrit.osmocom.org/#/c/6509/14/include/osmocom/gsm/gsm0808.h File include/osmocom/gsm/gsm0808.h: Line 33: struct gsm0808_cell_id_list; > this structs is defined in above protocol/gsm_08_08.h so no real point in a Yep, will do in next patch set. https://gerrit.osmocom.org/#/c/6509/14/include/osmocom/gsm/gsm0808_utils.h File include/osmocom/gsm/gsm0808_utils.h: Line 35: struct gsm0808_cell_id_list2 { > why don't you define it next to gsm0808_cell_id_list in protocol/gsm_08_08. Because this is not a protocol-layer structure. It is a parsed representation, not a network packet format. -- To view, visit https://gerrit.osmocom.org/6509 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Gerrit-PatchSet: 14 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Stefan Sperling Gerrit-HasComments: Yes
[PATCH] libosmocore[master]: support for more cell ID list types in libosmocore
Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6509 to look at the new patch set (#16). support for more cell ID list types in libosmocore Introduce gsm0808_dec_cell_id_list2() with supports additional types of cell identifier lists. The new parsing routines are based on similar routines used by the paging code in osmo-bsc's osmo_bsc_bssap.c. Likewise, introduce gsm0808_enc_cell_id_list2() with support for the same additional types of cell identifier lists. The old API using struct gsm0808_cell_id_list is deprecated. The previous definition was insufficient because it assumed that all decoded cell ID types could be represented with a single uint16_t. It was declared in a GSM protocol header (gsm/protocol/gsm_08_08.h) despite being a host-side representation of data in an IE. The only user I am aware of is in osmo-msc, where this struct is used for one local variable. osmo-msc releases >= 1.1.0 make use of this API. While here, fix a small bug in a test: test_gsm0808_enc_dec_cell_id_list_bss() set the cell ID type to 'LAC' but obviously wants to use type 'BSS'. Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Related: OS#2847 --- M include/osmocom/gsm/gsm0808.h M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/gsm23003.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map M tests/gsm0808/gsm0808_test.c 8 files changed, 355 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/6509/16 diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 8c276f5..9153d99 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -30,6 +30,7 @@ struct sockaddr_storage; struct msgb; +struct gsm0808_cell_id_list2; struct msgb *gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc, uint16_t cc, int lac, uint16_t _ci); @@ -70,9 +71,13 @@ *scl); struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause); struct msgb *gsm0808_create_clear_rqst(uint8_t cause); +struct msgb *gsm0808_create_paging2(const char *imsi, const uint32_t *tmsi, + const struct gsm0808_cell_id_list2 *cil, + const uint8_t *chan_needed); struct msgb *gsm0808_create_paging(const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list *cil, - const uint8_t *chan_needed); + const uint8_t *chan_needed) + OSMO_DEPRECATED("use gsm0808_create_paging2 instead"); struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id); void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id); diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 7432164..363fc39 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -26,6 +26,27 @@ struct sockaddr_storage; #include +#include + + /*! (225-1)/2 is the maximum number of elements in a cell identifier list. */ +#define GSM0808_CELL_ID_LIST2_MAXLEN 127 + +/*! Parsed representation of a cell identifier list IE. */ +struct gsm0808_cell_id_list2 { + enum CELL_IDENT id_discr; + union { + /*! +* All elements of these arrays contain parsed representations of the +* data in the corresponding IE, in host-byte order. +*/ + struct osmo_cell_global_id global; + struct osmo_lac_and_ci_id lac_and_ci; + uint16_tci; + struct osmo_location_area_idlai_and_lac; + uint16_tlac; + } id_list[GSM0808_CELL_ID_LIST2_MAXLEN]; + unsigned int id_list_len; +}; uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, const struct sockaddr_storage *ss); @@ -48,10 +69,14 @@ const struct gsm0808_encrypt_info *ei); int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei, const uint8_t *elem, uint8_t len); +uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, const struct gsm0808_cell_id_list2 *cil); uint8_t gsm0808_enc_cell_id_list(struct msgb *msg, -const struct gsm0808_cell_id_list *cil); +const struct gsm0808_cell_id_list *cil) +OSMO_DEPRECATED("use gsm0808_enc_cell_id_list2 instead"); +int gsm0808_dec_cell_id_list2(struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len); int gsm0808_dec_cell_id_list(struct gsm0808_cell_i
[PATCH] osmo-msc[master]: Track libosmocore API change in osmo-msc.
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6518 to look at the new patch set (#2). Track libosmocore API change in osmo-msc. struct gsm0808_cell_id_list in libosmocore is deprecated by https://gerrit.osmocom.org/#/c/6509/ This updates the only API user I am aware of. Change-Id: I67377270cf3b081ac5dc9cd7b4dc28f74143753a Depends: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb --- M src/libmsc/a_iface.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/18/6518/2 diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 79b1b4c..fa8c5c3 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -194,7 +194,7 @@ int a_iface_tx_paging(const char *imsi, uint32_t tmsi, uint16_t lac) { struct bsc_context *bsc_ctx; - struct gsm0808_cell_id_list cil; + struct gsm0808_cell_id_list2 cil; struct msgb *msg; int page_count = 0; struct osmo_ss7_instance *ss7; @@ -202,7 +202,7 @@ OSMO_ASSERT(imsi); cil.id_discr = CELL_IDENT_LAC; - cil.id_list_lac[0] = lac; + cil.id_list[0].lac = lac; cil.id_list_len = 1; ss7 = osmo_ss7_instance_find(gsm_network->a.cs7_instance); @@ -215,7 +215,7 @@ "Tx BSSMAP paging message from MSC %s to BSC %s (imsi=%s, tmsi=0x%08x, lac=%u)\n", osmo_sccp_addr_name(ss7, &bsc_ctx->msc_addr), osmo_sccp_addr_name(ss7, &bsc_ctx->bsc_addr), imsi, tmsi, lac); - msg = gsm0808_create_paging(imsi, &tmsi, &cil, NULL); + msg = gsm0808_create_paging2(imsi, &tmsi, &cil, NULL); osmo_sccp_tx_unitdata_msg(bsc_ctx->sccp_user, &bsc_ctx->msc_addr, &bsc_ctx->bsc_addr, msg); page_count++; -- To view, visit https://gerrit.osmocom.org/6518 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I67377270cf3b081ac5dc9cd7b4dc28f74143753a Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Stefan Sperling Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] libosmocore[master]: support for more cell ID list types in libosmocore
Hello Neels Hofmeyr, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6509 to look at the new patch set (#15). support for more cell ID list types in libosmocore Introduce gsm0808_dec_cell_id_list2() with supports additional types of cell identifier lists. The new parsing routines are based on similar routines used by the paging code in osmo-bsc's osmo_bsc_bssap.c. Likewise, introduce gsm0808_enc_cell_id_list2() with support for the same additional types of cell identifier lists. The old API using struct gsm0808_cell_id_list is deprecated. The previous definition was insufficient because it assumed that all decoded cell ID types could be represented with a single uint16_t. It was declared in a GSM protocol header (gsm/protocol/gsm_08_08.h) despite being a host-side representation of data in an IE. The only user I am aware of is in osmo-msc, where this struct is used for one local variable. osmo-msc releases >= 1.1.0 make use of this API. While here, fix a small bug in a test: test_gsm0808_enc_dec_cell_id_list_bss() set the cell ID type to 'LAC' but obviously wants to use type 'BSS'. Change-Id: Ib7e754f538df0c83298a3c958b4e15a32fcb8abb Related: OS#2847 --- M include/osmocom/gsm/gsm0808.h M include/osmocom/gsm/gsm0808_utils.h M include/osmocom/gsm/gsm23003.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map M tests/gsm0808/gsm0808_test.c 8 files changed, 356 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/6509/15 diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 8c276f5..92c931e 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -30,6 +30,8 @@ struct sockaddr_storage; struct msgb; +struct gsm0808_cell_id_list; +struct gsm0808_cell_id_list2; struct msgb *gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc, uint16_t cc, int lac, uint16_t _ci); @@ -70,9 +72,13 @@ *scl); struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause); struct msgb *gsm0808_create_clear_rqst(uint8_t cause); +struct msgb *gsm0808_create_paging2(const char *imsi, const uint32_t *tmsi, + const struct gsm0808_cell_id_list2 *cil, + const uint8_t *chan_needed); struct msgb *gsm0808_create_paging(const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list *cil, - const uint8_t *chan_needed); + const uint8_t *chan_needed) + OSMO_DEPRECATED("use gsm0808_create_paging2 instead"); struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id); void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id); diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 7432164..363fc39 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -26,6 +26,27 @@ struct sockaddr_storage; #include +#include + + /*! (225-1)/2 is the maximum number of elements in a cell identifier list. */ +#define GSM0808_CELL_ID_LIST2_MAXLEN 127 + +/*! Parsed representation of a cell identifier list IE. */ +struct gsm0808_cell_id_list2 { + enum CELL_IDENT id_discr; + union { + /*! +* All elements of these arrays contain parsed representations of the +* data in the corresponding IE, in host-byte order. +*/ + struct osmo_cell_global_id global; + struct osmo_lac_and_ci_id lac_and_ci; + uint16_tci; + struct osmo_location_area_idlai_and_lac; + uint16_tlac; + } id_list[GSM0808_CELL_ID_LIST2_MAXLEN]; + unsigned int id_list_len; +}; uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, const struct sockaddr_storage *ss); @@ -48,10 +69,14 @@ const struct gsm0808_encrypt_info *ei); int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei, const uint8_t *elem, uint8_t len); +uint8_t gsm0808_enc_cell_id_list2(struct msgb *msg, const struct gsm0808_cell_id_list2 *cil); uint8_t gsm0808_enc_cell_id_list(struct msgb *msg, -const struct gsm0808_cell_id_list *cil); +const struct gsm0808_cell_id_list *cil) +OSMO_DEPRECATED("use gsm0808_enc_cell_id_list2 instead"); +int gsm0808_dec_cell_id_list2(struct gsm0808_cell_id_list2 *cil, const uint8_t *elem, uint8_t len); int gsm0808_dec_cell
[MERGED] osmo-ttcn3-hacks[master]: L1CTL/bts: Fix tons of compiler warnings by splitting rx+tx ...
Harald Welte has submitted this change and it was merged. Change subject: L1CTL/bts: Fix tons of compiler warnings by splitting rx+tx templates .. L1CTL/bts: Fix tons of compiler warnings by splitting rx+tx templates Change-Id: I9c8be0856516a6a168795c792f76d14c08c3dabb --- M bts/BTS_Tests.ttcn M library/GSM_RR_Types.ttcn M library/L1CTL_PortType.ttcn M library/L1CTL_Types.ttcn M library/LAPDm_RAW_PT.ttcn 5 files changed, 128 insertions(+), 75 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 32269e2..f3b7a28 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -149,8 +149,8 @@ } /* Default SYSTEM INFORMATION 3 */ -template SystemInformation ts_SI3_default := { - header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 18), +template (value) SystemInformation ts_SI3_default := { + header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_3, 18), payload := { si3 := { cell_id := 23, @@ -179,8 +179,8 @@ } } -template SystemInformation ts_SI2_default := { - header := t_RrHeader(SYSTEM_INFORMATION_TYPE_2, 22), +template (value) SystemInformation ts_SI2_default := { + header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_2, 22), payload := { si2 := { bcch_freq_list := ''O, @@ -190,8 +190,8 @@ } } -template SystemInformation ts_SI4_default := { - header := t_RrHeader(SYSTEM_INFORMATION_TYPE_4, 12), /* no CBCH / restoct */ +template (value) SystemInformation ts_SI4_default := { + header := ts_RrHeader(SYSTEM_INFORMATION_TYPE_4, 12), /* no CBCH / restoct */ payload := { si4 := { lai := ts_LAI_default, @@ -324,11 +324,13 @@ } private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr { - f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi))); + var TrxcMessage ret; + ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_RSSI(rssi))); } private function f_trx_fake_toffs256(int16_t toffs256) runs on ConnHdlr { - f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); + var TrxcMessage ret; + ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); } /* first function started in ConnHdlr component */ @@ -632,8 +634,9 @@ } private function f_rach_toffs(int16_t toffs256, boolean expect_pass) runs on test_CT { + var TrxcMessage ret; /* tell fake_trx to use a given timing offset for all bursts */ - f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); + ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(toffs256))); f_sleep(0.5); /* Transmit RACH request + wait for confirmation */ @@ -708,23 +711,23 @@ /* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */ altstep as_l1_sacch() runs on ConnHdlr { var L1ctlDlMessage l1_dl; - [] L1CTL.receive(t_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { log("SACCH received: ", l1_dl.payload.data_ind.payload); var GsmRrL3Message meas_rep := valueof(ts_MEAS_REP(true, 23, 23, 0, 0, omit)); var LapdmFrameB lb := valueof(ts_LAPDm_B(0, false, false, enc_GsmRrL3Message(meas_rep))); log("LAPDm: ", lb); var octetstring pl := ''O & enc_LapdmFrameB(lb); - L1CTL.send(t_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_SACCH(0), pl)); + L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_SACCH(0), pl)); repeat; } } altstep as_l1_dcch() runs on ConnHdlr { var L1ctlDlMessage l1_dl; - [] L1CTL.receive(t_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(?))) -> value l1_dl { + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(?))) -> value l1_dl { log("DCCH received: ", l1_dl.payload.data_ind.payload); var octetstring pl := '010301'O; - L1CTL.send(t_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), pl)); + L1CTL.send(ts_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), pl)); repeat; } } @@ -950,7 +953,7 @@ f_est_dchan(); f_sleep(2.0); - L1CTL.send(t_L1CTL_DM_REL_REQ(g_chan_nr)); + L1CTL.send(ts_L1CTL_DM_REL_REQ(g_chan_nr)); timer T := 40.0; T.start; @@ -990,10 +993,10 @@ altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer num_paging_rcv_ids) runs on
[MERGED] osmo-ttcn3-hacks[master]: bts: Align default SI contents with what we see from OsmoBSC
Harald Welte has submitted this change and it was merged. Change subject: bts: Align default SI contents with what we see from OsmoBSC .. bts: Align default SI contents with what we see from OsmoBSC Change-Id: I8d0fa73e1a9b859e1833b0d2ce8cb6bbf07938cc --- M bts/BTS_Tests.ttcn 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 324436d..2cf17ae 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -128,16 +128,16 @@ } template (value) RachControlParameters ts_RachCtrl_default := { - max_retrans := RACH_MAX_RETRANS_1, - tx_integer := ''B, /* 3 slots */ + max_retrans := RACH_MAX_RETRANS_7, + tx_integer := '1001'B, /* 12 slots */ cell_barr_access := false, re_not_allowed := true, acc := '0100'B }; template (value) CellSelectionParameters ts_CellSelPar_default := { - cell_resel_hyst_2dB := 0, - ms_txpwr_max_cch := 0, + cell_resel_hyst_2dB := 2, + ms_txpwr_max_cch := 7, acs := '0'B, neci := true, rxlev_access_min := 0 @@ -170,7 +170,7 @@ dn_ind := false, pwrc := false, dtx := MS_MAY_USE_UL_DTX, - radio_link_tout_div4 := 4/4 + radio_link_tout_div4 := (32/4)-1 }, cell_sel_par := ts_CellSelPar_default, rach_control := ts_RachCtrl_default, -- To view, visit https://gerrit.osmocom.org/7241 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d0fa73e1a9b859e1833b0d2ce8cb6bbf07938cc Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Add TC_sacch_info_mod and TC_sacch_filling
Harald Welte has submitted this change and it was merged. Change subject: bts: Add TC_sacch_info_mod and TC_sacch_filling .. bts: Add TC_sacch_info_mod and TC_sacch_filling Change-Id: I38b3e302eddb699b2dbdae06fc929dd59de7b2dc --- M bts/BTS_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 118 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index dcdf32b..5e0b3fb 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -636,8 +636,111 @@ f_shutdown(); } +private function f_sacch_present(template octetstring l3_exp) runs on ConnHdlr { + var L1ctlDlMessage dl; + /* check that the specified SI5 value is actually sent */ + timer T_sacch := 3.0; + L1CTL.clear; + T_sacch.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(0))) -> value dl { + var octetstring l3 := substr(dl.payload.data_ind.payload, 4, 19); + if (match(l3, l3_exp)) { + setverdict(pass); + } else { + repeat; + } + } + [] L1CTL.receive { repeat; } + [] T_sacch.timeout { + setverdict(fail, "Timeout waiting for SACCH ", l3_exp); + self.stop; + } + } +} + /* Test for default SACCH FILL transmitted in DL SACCH (all channel types) */ +private function f_TC_sacch_filling(charstring id) runs on ConnHdlr { + /* Set a known default SACCH filling for SI5 */ + var octetstring si5 := f_rnd_octstring(19); + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, si5)); + + f_l1_tune(L1CTL); + RSL.clear; + + /* activate the logical channel */ + f_est_dchan(); + + /* check that the specified SI5 value is actually sent */ + f_sacch_present(si5); + + /* release the channel */ + RSL.clear; + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_filling() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_filling), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + f_shutdown(); +} + /* Test for lchan-specific SACCH INFO MODIFY (TS 48.058 4.12) */ +private function f_TC_sacch_info_mod(charstring id) runs on ConnHdlr { + /* Set a known default SACCH filling for SI5 */ + var octetstring si5 := f_rnd_octstring(19); + var octetstring si5_diff := f_rnd_octstring(19); + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, si5)); + + f_l1_tune(L1CTL); + RSL.clear; + + log("Activating channel, expecting standard SI5"); + /* activate the logical channel */ + f_est_dchan(); + /* check that the specified SI5 value is actually sent */ + f_sacch_present(si5); + + /* set channel-specific different SI5 */ + log("Setting channel specific SACCH INFO, expecting it"); + RSL.send(ts_RSL_SACCH_INF_MOD(g_chan_nr, RSL_SYSTEM_INFO_5, si5_diff)) + /* check that the specified lchan-specific value is now used */ + f_sacch_present(si5_diff); + + /* deactivate the channel and re-activate it, this should result in default SI5 */ + log("De-activating and re-activating channel, expecting standard SI5"); + f_rsl_chan_deact(); + f_rsl_chan_act(valueof(ts_RSL_ChanMode_SIGN)); + /* Verify that the TRX-wide default SACCH filling is present again */ + f_sacch_present(si5); + + /* release the channel */ + RSL.clear; + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_info_mod() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_info_mod), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + f_shutdown(); +} + /* Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ @@ -2427,6 +2530,8 @@ execute( TC_chan_deact_not_active() ); execute( TC_chan_act_wrong_nr() ); execute( TC_deact_sacch() ); + execute( TC_sacch_filling() );
[MERGED] osmo-ttcn3-hacks[master]: WIP: Work towards a more real DL TBF receiver implementation
Harald Welte has submitted this change and it was merged. Change subject: WIP: Work towards a more real DL TBF receiver implementation .. WIP: Work towards a more real DL TBF receiver implementation Change-Id: I300312734d99f2b8a406f39e04b4f738940f7579 --- M library/RLCMAC_Types.ttcn M pcu/GPRS_TBF.ttcn 2 files changed, 161 insertions(+), 17 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn index 3ae1203..c946594 100644 --- a/library/RLCMAC_Types.ttcn +++ b/library/RLCMAC_Types.ttcn @@ -113,7 +113,14 @@ boolean e } with { variant (e) "FIELDLENGTH(1)" + encode "RAW" }; + + external function enc_LlcBlockHdr(in LlcBlockHdr si) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + external function dec_LlcBlockHdr(in octetstring stream) return LlcBlockHdr + with { extension "prototype(convert) decode(RAW)" }; + type record LlcBlock { /* Header is only present if LI field was present */ LlcBlockHdr hdr optional, diff --git a/pcu/GPRS_TBF.ttcn b/pcu/GPRS_TBF.ttcn index a35c780..3e8658e 100644 --- a/pcu/GPRS_TBF.ttcn +++ b/pcu/GPRS_TBF.ttcn @@ -18,8 +18,25 @@ import from LLC_Types all; import from GPRS_Context all; -/* input parameters into TBF (mostly mode/cs + LLC PDUs */ +private const integer RLC_GPRS_SNS := 128; +private const integer RLC_GPRS_WS := 64; +private const integer RLC_EGPRS_MIN_WS := 64; +private const integer RLC_EGPRS_MAX_WS := 1024; +private const integer RLC_EGPRS_SNS := 2048; +private const integer RLC_EGPRS_MAX_BSN_DELTA := 512; +private const integer RLC_MAX_SNS := RLC_EGPRS_SNS; +private const integer RLC_MAX_WS := RLC_EGPRS_MAX_WS; +private const integer RLC_MAX_LEN := 74 /* MCS-9 data unit */ +private const integer sns_half := (RLC_MAX_SNS / 2); +private const integer mod_sns_half := (RLC_MAX_SNS / 2) - 1; + + +/*** + * Uplink TBF handling + ***/ + +/* input parameters into TBF (mostly mode/cs + LLC PDUs */ type record UlTbfPars { /* Acknowledged mode (true) or unacknowledged (false) */ boolean ack_mode, @@ -45,22 +62,6 @@ ep.v_a := 0; ep.v_b := int2bit(0, 128); /* FIXME: EGPRS 2048 bits length */ } - -type record RlcEndpointRx { - /* receive state variable V(R) (9.1.5): BSN one higher than highest BSN yet received (mod SNS) */ - integer v_r, - /* receive window state variable V(Q) (9.1.6): Lowest BSN not yet received (mod SNS) */ - integer v_q, - /* receive state array V(N) (9.1.7) */ - bitstring v_n -} - -private function f_RlcEndpointRx_init(inout RlcEndpointRx ep) { - ep.v_r := 0; - ep.v_q := 0; - ep.v_n := int2bit(0, 128); /* FIXME: EGPRS 2048 bits length */ -} - type record UlTbfState { /* "const" input state with TBF Data */ @@ -360,6 +361,142 @@ } } +/*** + * Downlink TBF handling + ***/ + +type record RlcEndpointRx { + /* receive state variable V(R) (9.1.5): BSN one higher than highest BSN yet received (mod SNS) */ + integer v_r, + /* receive window state variable V(Q) (9.1.6): Lowest BSN not yet received (mod SNS) */ + integer v_q, + /* receive state array V(N) (9.1.7) */ + bitstring v_n +} + +private function f_RlcEndpointRx_init(inout RlcEndpointRx ep) { + ep.v_r := 0; + ep.v_q := 0; + ep.v_n := int2bit(0, 128); /* FIXME: EGPRS 2048 bits length */ +} + +type record DlTbfPars { + /* Acknowledged mode (true) or unacknowledged (false) */ + boolean ack_mode, + /* Coding Scheme for transmission, determines block size */ + GprsCodingSchemeinitial_cs, + /* Sequence Number Space */ + integer sns, + /* Window Size */ + integer ws +} + +type record DlTbfState { + /* "const" input state with TBF Data */ + DlTbfPars tbf, + uint8_t num_ts, + + RlcEndpointRx er, + + integer tfi, + + /* list of abstract/decoded RLC PDUs */ + record of RlcmacDlBlock rlc_received +} + +function f_dl_tbf_mod_sns(DlTbfState ds, integer val) return integer +{ + return (val mod ds.tbf.sns); +} + +function f_dl_tbf_is_in_window(integer bsn) return boolean { + setverdict(fail, "pleaes implement me"); +
[MERGED] osmo-ttcn3-hacks[master]: bts: Make f_TC_meas_res_periodic work with real BTS
Harald Welte has submitted this change and it was merged. Change subject: bts: Make f_TC_meas_res_periodic work with real BTS .. bts: Make f_TC_meas_res_periodic work with real BTS In a real BTS + OsmocomBB-L1, we cannot control fake ToA/RSSI, but we simply assume the signal is strong/good. Change-Id: I55a79f9e23118d2bb28f27cbcc7ab28712570ef1 --- M bts/BTS_Tests.ttcn 1 file changed, 10 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index e97c6d9..7b6fc2f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -921,12 +921,17 @@ f_l1_tune(L1CTL); RSL.clear; - g_pars.l1_pars.meas_ul.full.rxlev := dbm2rxlev(-100); - g_pars.l1_pars.meas_ul.sub.rxlev := g_pars.l1_pars.meas_ul.full.rxlev; - f_trxc_fake_rssi(100); + if (mp_bb_trxc_port != -1) { + g_pars.l1_pars.meas_ul.full.rxlev := dbm2rxlev(-100); + f_trxc_fake_rssi(100); - g_pars.l1_pars.timing_offset_256syms := 512; /* 2 symbols */ - f_trx_fake_toffs256(g_pars.l1_pars.timing_offset_256syms); + g_pars.l1_pars.timing_offset_256syms := 512; /* 2 symbols */ + f_trx_fake_toffs256(g_pars.l1_pars.timing_offset_256syms); + } else { + g_pars.l1_pars.timing_offset_256syms := 0; /* FIXME */ + g_pars.l1_pars.meas_ul.full.rxlev := dbm2rxlev(-55); /* FIXME */ + } + g_pars.l1_pars.meas_ul.sub.rxlev := g_pars.l1_pars.meas_ul.full.rxlev; f_est_dchan(); -- To view, visit https://gerrit.osmocom.org/7245 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55a79f9e23118d2bb28f27cbcc7ab28712570ef1 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Add f_rsl_transceive() flag to ignore all unrelated mes...
Harald Welte has submitted this change and it was merged. Change subject: bts: Add f_rsl_transceive() flag to ignore all unrelated messages .. bts: Add f_rsl_transceive() flag to ignore all unrelated messages f_rsl_transceive() is currently using a number of default altsteps, but those are not applicable in all cases. Let's make this configurable, and use that flag during channel release. Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad --- M bts/BTS_Tests.ttcn 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index b0a2bca..dcdf32b 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -392,7 +392,8 @@ fn.apply(id); } -function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id) +function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id, + boolean ignore_other := false) runs on ConnHdlr { timer T := 3.0; RSL.send(tx); @@ -406,12 +407,13 @@ setverdict(fail, "Timeout expecting " & id); self.stop; } - [] as_l1_sacch(); - [] as_meas_res(); - [] as_l1_dcch(); - [] RSL.receive { + [not ignore_other] as_l1_sacch(); + [not ignore_other] as_meas_res(); + [not ignore_other] as_l1_dcch(); + [not ignore_other] RSL.receive { setverdict(fail, "Unexpected RSL message received"); } + [ignore_other] RSL.receive { repeat; } } } @@ -422,7 +424,7 @@ function f_rsl_chan_deact() runs on ConnHdlr { f_rsl_transceive(ts_RSL_RF_CHAN_REL(g_chan_nr), tr_RSL_RF_CHAN_REL_ACK(g_chan_nr), - "RF CHAN REL"); + "RF CHAN REL", true); } private template ConnHdlrPars t_Pars(template RslChannelNr chan_nr, -- To view, visit https://gerrit.osmocom.org/7250 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Send DM_REL_REQ to L1 when closing logical channel
Harald Welte has submitted this change and it was merged. Change subject: bts: Send DM_REL_REQ to L1 when closing logical channel .. bts: Send DM_REL_REQ to L1 when closing logical channel Change-Id: I0c0bb52b4de20dfd2d4ea8d0045ea63d84686ac5 --- M bts/BTS_Tests.ttcn M library/L1CTL_PortType.ttcn 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 80500f2..8d789bd 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -957,6 +957,7 @@ } } f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); } testcase TC_meas_res_sign_tchf() runs on test_CT { var ConnHdlr vc_conn; diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index ba47414..231ebe3 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -161,6 +161,11 @@ pt.send(ts_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc)); } + /* Send DM_REL_REQ from parameters derived from IMM ASS */ + function f_L1CTL_DM_REL_REQ(L1CTL_PT pt, RslChannelNr chan_nr) { + pt.send(ts_L1CTL_DM_REL_REQ(chan_nr)); + } + function f_L1CTL_RESET(L1CTL_PT pt, L1ctlResetType res_type := L1CTL_RES_T_FULL) { timer T := 2.0; pt.send(t_L1ctlResetReq(res_type)); -- To view, visit https://gerrit.osmocom.org/7247 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c0bb52b4de20dfd2d4ea8d0045ea63d84686ac5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: pcu: First DL TBF hack
Harald Welte has submitted this change and it was merged. Change subject: pcu: First DL TBF hack .. pcu: First DL TBF hack Change-Id: Ib3f09e125a7a4492d9072f8e9f5896eaac7ed03b --- M library/GSM_RR_Types.ttcn M library/L1CTL_PortType.ttcn M library/LAPDm_RAW_PT.ttcn M library/RLCMAC_CSN1_Types.ttcn M library/RLCMAC_Types.ttcn M pcu/PCU_Tests.ttcn 6 files changed, 279 insertions(+), 20 deletions(-) Approvals: Harald Welte: Looks good to me, approved; Verified Jenkins Builder: Verified diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index 75be6f8..b1e6809 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -706,6 +706,57 @@ } }; + template ImmediateAssignment t_IMM_ASS_TBF_DL(template GprsTlli tlli) := { + ded_or_tbf := { + spare := ?, + tma := ?, + downlink := ?, + tbf := true + }, + page_mode := ?, + chan_desc := omit, + pkt_chan_desc := { + channel_Type_spare := ?, + tn := ?, + tsc := ?, + presence := ?, + zero := *, + one := omit + }, + req_ref := ?, + timing_advance := ?, + mobile_allocation := ?, + rest_octets := { + presence := '11'B, + ll := omit, + lh := omit, + hl := omit, + hh := { + presence := '01'B, + ul := omit, + dl := { + tlli := tlli, + group1_present := ?, + group1 := *, + ta_index_present := ?, + ta_index := *, + tbf_starting_time_present := ?, + tbf_starting_time := *, + p0_present := ?, + p0 := *, + pr_mode := * + } + } + } + }; + + template GsmRrMessage t_RR_IMM_ASS_TBF_DL(template GprsTlli tlli) := { + header := t_RrHeader(IMMEDIATE_ASSIGNMENT, ?), + payload := { + imm_ass := t_IMM_ASS_TBF_DL(tlli) + } + }; + } with { encode "RAW" ; variant "FIELDORDER(msb)" } diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 2775e19..eadc74a 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -90,6 +90,28 @@ return rr.payload.imm_ass; } + function f_L1CTL_WAIT_IMM_ASS_TBF_DL(L1CTL_PT pt, GprsTlli tlli) return ImmediateAssignment { + var L1ctlDlMessage dl; + var GsmRrMessage rr; + timer T := 10.0; + T.start; + alt { + [] pt.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl { + rr := dec_GsmRrMessage(dl.payload.data_ind.payload); + log("PCH/AGCN DL RR: ", rr); + if (match(rr, t_RR_IMM_ASS_TBF_DL(tlli))) { + log("Received IMM.ASS for our TLLI!"); + } else { + repeat; + } + }; + [] pt.receive { repeat }; + [] T.timeout { setverdict(fail, "Timeout waiting for IMM ASS") }; + } + T.stop; + return rr.payload.imm_ass; + } + function f_L1CTL_TBF_CFG(L1CTL_PT pt, boolean is_uplink, TfiUsfArr tfi_usf) { timer T := 2.0; T.start; diff --git a/library/LAPDm_RAW_PT.ttcn b/library/LAPDm_RAW_PT.ttcn index ab99538..f5d1926 100644 --- a/library/LAPDm_RAW_PT.ttcn +++ b/library/LAPDm_RAW_PT.ttcn @@ -26,7 +26,21 @@ charstring err optional } - type record TBF_establish_res { + type record length(8) of uint8_t TfiList; + type record TbfPars { + GsmArfcnarfcn optional, + /* Temporary Flow Identifier for each TN */ + TfiList tfi + } + type record length(8) of TbfPars TbfParsPerTs; + + template TbfPars t_TbfParsInit := { + arfcn := omit, + tfi := { 255, 255, 255, 255, 255, 255, 255, 255 } +
[MERGED] osmo-ttcn3-hacks[master]: L1CTL: Have proper timeout during reset
Harald Welte has submitted this change and it was merged. Change subject: L1CTL: Have proper timeout during reset .. L1CTL: Have proper timeout during reset Change-Id: Ib6b33f522eddb1377e9857cc5d88363852732b46 --- M library/L1CTL_PortType.ttcn 1 file changed, 16 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 6c4fe70..ba47414 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -161,15 +161,28 @@ pt.send(ts_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc)); } + function f_L1CTL_RESET(L1CTL_PT pt, L1ctlResetType res_type := L1CTL_RES_T_FULL) { + timer T := 2.0; + pt.send(t_L1ctlResetReq(res_type)); + T.start; + alt { + [] pt.receive(tr_L1CTL_MsgType(L1CTL_RESET_CONF)) { } + [] pt.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for RESET.conf"); + self.stop; + } + } + + } + function f_connect_reset(L1CTL_PT pt, charstring l1ctl_sock_path := m_l1ctl_sock_path) { var f_UD_getMsgLen vl_f := refers(f_L1CTL_getMsgLen); f_L1CTL_setGetMsgLen(pt, -1, vl_f, {}); pt.send(L1CTL_connect:{path:=l1ctl_sock_path}); pt.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit}); f_L1CTL_setGetMsgLen(pt, 0, vl_f, {}); - - pt.send(t_L1ctlResetReq(L1CTL_RES_T_FULL)); - pt.receive; + f_L1CTL_RESET(pt); } private function L1CTL_to_UD_connect(in L1CTL_connect pin, out UD_connect pout) { -- To view, visit https://gerrit.osmocom.org/7239 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib6b33f522eddb1377e9857cc5d88363852732b46 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Add TC_deact_sacch()
Harald Welte has submitted this change and it was merged. Change subject: bts: Add TC_deact_sacch() .. bts: Add TC_deact_sacch() This test case checks on each logical channel if the DEACT SACCH RSL message actually deactivates downlink SACCH as expected. Change-Id: Id8219ffce0635071cb50669b89368de51fe82843 --- M bts/BTS_Tests.ttcn M library/GSM_Types.ttcn M library/L1CTL_Types.ttcn 3 files changed, 118 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index a345d75..b0a2bca 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -52,6 +52,8 @@ integer mp_tolerance_rxlev := 3; } +type record of RslChannelNr ChannelNrs; + type component test_CT extends CTRL_Adapter_CT { /* IPA Emulation component underneath RSL */ var IPA_Emulation_CT vc_IPA; @@ -94,6 +96,9 @@ si21_present := false, si22_present := false }; + + /* all logical channels available on the BTS */ + var ChannelNrs g_AllChannels; } /* an individual call / channel */ @@ -259,6 +264,22 @@ /* global init function */ function f_init(charstring id := "BTS-Test") runs on test_CT { + g_AllChannels := { + /* TS 1..4: TCH/F */ + valueof(ts_RslChanNr_Bm(1)), valueof(ts_RslChanNr_Bm(2)), + valueof(ts_RslChanNr_Bm(3)), valueof(ts_RslChanNr_Bm(4)), + /* TS 5: TCH/H */ + valueof(ts_RslChanNr_Lm(5,0)), valueof(ts_RslChanNr_Lm(5,1)), + /* TS 0: SDCCH/4 */ + valueof(ts_RslChanNr_SDCCH4(0,0)), valueof(ts_RslChanNr_SDCCH4(0,1)), + valueof(ts_RslChanNr_SDCCH4(0,2)), valueof(ts_RslChanNr_SDCCH4(0,3)), + /* TS 6: SDCCH/8 */ + valueof(ts_RslChanNr_SDCCH8(6,0)), valueof(ts_RslChanNr_SDCCH8(6,1)), + valueof(ts_RslChanNr_SDCCH8(6,2)), valueof(ts_RslChanNr_SDCCH8(6,3)), + valueof(ts_RslChanNr_SDCCH8(6,4)), valueof(ts_RslChanNr_SDCCH8(6,5)), + valueof(ts_RslChanNr_SDCCH8(6,6)), valueof(ts_RslChanNr_SDCCH8(6,7)) + }; + f_init_rsl(id); RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}); f_sleep(0.5); /* workaround for OS#3000 */ @@ -548,6 +569,75 @@ } f_shutdown(); } + +/*** + * SACCH handling + ***/ + +private function f_exp_sacch(boolean exp) runs on ConnHdlr { + timer T_sacch := 3.0; + T_sacch.start; + alt { + [not exp] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(0))) { + setverdict(fail, "Received SACCH when not expecting it"); + } + [not exp] T_sacch.timeout { + setverdict(pass); + } + [exp] L1CTL.receive(tr_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(0))) { + setverdict(pass); + } + [exp] T_sacch.timeout { + setverdict(fail, "Timeout waiting for SACCH on ", g_chan_nr); + } + [] L1CTL.receive { repeat; } + [] RSL.receive { repeat; } + } +} + +/* Test if DEACTIVATE SACCH actualy deactivates its transmission (TS 48.058 4.6) */ +private function f_TC_deact_sacch(charstring id) runs on ConnHdlr { + f_l1_tune(L1CTL); + RSL.clear; + + /* activate the logical channel */ + f_est_dchan(); + L1CTL.clear; + + /* check that SACCH actually are received as expected */ + f_exp_sacch(true); + + /* deactivate SACCH on the logical channel */ + RSL.send(ts_RSL_DEACT_SACCH(g_chan_nr)); + f_sleep(1.0); + L1CTL.clear; + + /* check that no SACCH are received anymore */ + f_exp_sacch(false); + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_deact_sacch() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + //for (var integer i := 0; i < 1; i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_deact_sacch), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + f_shutdown(); +} + +/* Test for default SACCH FILL transmitted in DL SACCH (all channel types) */ +/* Test for lchan-specific SACCH INFO MODIFY (TS 48.058 4.12) */ +/* Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ + /**
[MERGED] osmo-ttcn3-hacks[master]: L1CTL: make sure to self.stop in all setverdict(fail) cases
Harald Welte has submitted this change and it was merged. Change subject: L1CTL: make sure to self.stop in all setverdict(fail) cases .. L1CTL: make sure to self.stop in all setverdict(fail) cases Change-Id: I2013a8ec0641d8ef935e6615c1bde599f42db260 --- M library/L1CTL_PortType.ttcn M library/L1CTL_Types.ttcn 2 files changed, 44 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 40a4c75..6c4fe70 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -34,7 +34,7 @@ } function f_L1CTL_FBSB(L1CTL_PT pt, Arfcn arfcn, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) { - timer T := 5.0; + timer T := 15.0; for (var integer i := 0; i < 10; i := i+1) { pt.send(ts_L1CTL_FBSB_REQ(arfcn, valueof(t_L1CTL_FBSB_F_ALL), 0, ccch_mode, 57)); T.start @@ -45,11 +45,27 @@ self.stop; }; [] pt.receive(tr_L1CTL_FBSB_CONF(?)) { - pt.send(t_L1ctlResetReq(L1CTL_RES_T_FULL)); - pt.receive; + f_sleep(1.0); } [] pt.receive { repeat; }; - [] T.timeout { setverdict(fail, "Timeout in FBSB") }; + [] T.timeout { + setverdict(fail, "Timeout in FBSB") + self.stop; + }; + } + } + } + + function f_L1CTL_CCCH_MODE(L1CTL_PT pt, L1ctlCcchMode ccch_mode) { + timer T := 2.0; + pt.send(ts_L1CTL_CCCH_MODE_REQ(ccch_mode)); + T.start; + alt { + [] pt.receive(tr_L1CTL_CCCH_MODE_CONF) { } + [] pt.receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout in CCH_MODE"); + self.stop; } } } @@ -63,7 +79,10 @@ alt { [] pt.receive(tr_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr }; [] pt.receive { repeat; }; - [] T.timeout { setverdict(fail, "Timeout in RACH") }; + [] T.timeout { + setverdict(fail, "Timeout in RACH"); + self.stop; + } } return fn; } @@ -88,7 +107,10 @@ } }; [] pt.receive { repeat }; - [] T.timeout { setverdict(fail, "Timeout waiting for IMM ASS") }; + [] T.timeout { + setverdict(fail, "Timeout waiting for IMM ASS"); + self.stop; + } } T.stop; return rr.payload.imm_ass; @@ -110,7 +132,10 @@ } }; [] pt.receive { repeat }; - [] T.timeout { setverdict(fail, "Timeout waiting for IMM ASS") }; + [] T.timeout { + setverdict(fail, "Timeout waiting for IMM ASS"); + self.stop; + } } T.stop; return rr.payload.imm_ass; @@ -123,7 +148,10 @@ alt { [] pt.receive(tr_L1CTL_TBF_CFG_CONF(is_uplink)) {} [] pt.receive { repeat }; - [] T.timeout { setverdict(fail, "Timeout waiting for TBF-CFG.conf") }; + [] T.timeout { + setverdict(fail, "Timeout waiting for TBF-CFG.conf"); + self.stop; + }; } T.stop; } @@ -140,7 +168,7 @@ pt.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit}); f_L1CTL_setGetMsgLen(pt, 0, vl_f, {}); - pt.send(t_L1ctlResetReq(L1CTL_RES_T_SCHED)); + pt.send(t_L1ctlResetReq(L1CTL_RES_T_FULL)); pt.receive; } diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 34650d0..814e7df 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -437,13 +437,14 @@ } }; - template L1ctlUlMessage ts_L1CTL_CCCH_MODE_CONF := { - header := ts_L1ctlHeader
[MERGED] osmo-ttcn3-hacks[master]: BTS_Tests: Access Control Classes are inverted
Harald Welte has submitted this change and it was merged. Change subject: BTS_Tests: Access Control Classes are inverted .. BTS_Tests: Access Control Classes are inverted No normal phone would ever send us a RACH request due to all ACC being barred in the SI of BTS_Tests Change-Id: I149dca67971bde3072ec2081d9ad7e8f43434ebf --- M bts/BTS_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index f3b7a28..324436d 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -132,7 +132,7 @@ tx_integer := ''B, /* 3 slots */ cell_barr_access := false, re_not_allowed := true, - acc := ''B + acc := '0100'B }; template (value) CellSelectionParameters ts_CellSelPar_default := { -- To view, visit https://gerrit.osmocom.org/7240 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I149dca67971bde3072ec2081d9ad7e8f43434ebf Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Ignore first MEAS REP as it often contains bogus values
Harald Welte has submitted this change and it was merged. Change subject: bts: Ignore first MEAS REP as it often contains bogus values .. bts: Ignore first MEAS REP as it often contains bogus values The first measurement report typically has bad performance as it contains measurements taken before the MS actually started to transmit on it. Let's make sure we only validate all but the first MEAS REP Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c --- M bts/BTS_Tests.ttcn 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index a50d3f6..e97c6d9 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -108,6 +108,7 @@ var ConnHdlrPars g_pars; var uint8_t g_next_meas_res_nr := 0; + var boolean g_first_meas_res := true; } function f_init_rsl(charstring id) runs on test_CT { @@ -858,8 +859,15 @@ repeat; } [] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value rsl { - setverdict(fail, "Received unspecific MEAS RES ", rsl); - self.stop; + /* increment counter of next to-be-expected meas rep */ + g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256; + if (g_first_meas_res) { + g_first_meas_res := false; + repeat; + } else { + setverdict(fail, "Received unspecific MEAS RES ", rsl); + self.stop; + } } [] RSL.receive(tr_RSL_MEAS_RES(?)) -> value rsl { setverdict(fail, "Received unexpected MEAS RES ", rsl); @@ -904,6 +912,8 @@ ia_um := f_L1CTL_WAIT_IMM_ASS(L1CTL, ra, fn); /* enable dedicated mode */ f_L1CTL_DM_EST_REQ_IA(L1CTL, ia_um); + + g_first_meas_res := true; } /* establish DChan, verify existance + contents of measurement reports */ -- To view, visit https://gerrit.osmocom.org/7244 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: f_rsl_transceive: Add altsteps for sacch/facch/meas_rep
Harald Welte has submitted this change and it was merged. Change subject: bts: f_rsl_transceive: Add altsteps for sacch/facch/meas_rep .. bts: f_rsl_transceive: Add altsteps for sacch/facch/meas_rep It may be that during CHAN DEACT we still receive any of those messages, which is not an error condition. Let's activate the related altsteps. Change-Id: Ic27b28ead3fc4bff82655d0e8d88fda01b71eca7 --- M bts/BTS_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7b6fc2f..80500f2 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -379,6 +379,9 @@ setverdict(fail, "Timeout expecting " & id); self.stop; } + [] as_l1_sacch(); + [] as_meas_res(); + [] as_l1_dcch(); [] RSL.receive { setverdict(fail, "Unexpected RSL message received"); } -- To view, visit https://gerrit.osmocom.org/7246 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic27b28ead3fc4bff82655d0e8d88fda01b71eca7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Add f_shutdown() for clean shutdown; use it from tests
Harald Welte has submitted this change and it was merged. Change subject: bts: Add f_shutdown() for clean shutdown; use it from tests .. bts: Add f_shutdown() for clean shutdown; use it from tests Change-Id: I225d2363c77dce969bda95ff27506bece586a34a --- M bts/BTS_Tests.ttcn 1 file changed, 35 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 8d789bd..a345d75 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -280,6 +280,12 @@ } } +function f_shutdown() runs on test_CT { + /* shut down all "externally interfaced" components first to avoid unclean shutdown */ + vc_IPA.stop; + vc_RSL.stop; +} + /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */ function f_init_l1ctl() runs on test_CT { map(self:L1CTL, system:L1CTL); @@ -442,6 +448,7 @@ f_init(testcasename()); vc_conn := f_start_handler(refers(f_TC_chan_act_stress), pars); vc_conn.done; + f_shutdown(); } /* Test if re-activation of an already active channel fails as expected */ @@ -462,9 +469,10 @@ testcase TC_chan_act_react() runs on test_CT { var ConnHdlr vc_conn; var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); - f_init(testcasename()); + f_init(); vc_conn := f_start_handler(refers(f_TC_chan_act_react), pars); vc_conn.done; + f_shutdown(); } /* Attempt to de-activate a channel that's not active */ @@ -483,9 +491,10 @@ } testcase TC_chan_deact_not_active() runs on test_CT { var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); - f_init(testcasename()); + f_init(); var ConnHdlr vc_conn := f_start_handler(refers(f_TC_chan_deact_not_active), pars); vc_conn.done; + f_shutdown(); } /* attempt to activate channel with wrong RSL Channel Nr IE; expect NACK */ @@ -514,7 +523,7 @@ var ConnHdlr vc_conn; var ConnHdlrPars pars; - f_init(testcasename()); + f_init(); var WrongChanNrCases wrong := { valueof(t_WCN(t_RslChanNr_RACH(0), "RACH is not a dedicated channel")), @@ -537,6 +546,7 @@ vc_conn := f_start_handler(refers(f_TC_chan_act_wrong_nr), pars); vc_conn.done; } + f_shutdown(); } /*** @@ -603,12 +613,14 @@ } } setverdict(pass); + f_shutdown(); } /* Send 1000 RACH Requests (flood ~ 89/s) and count if count(Abis) == count(Um) */ testcase TC_rach_count() runs on test_CT { - f_init(testcasename()); + f_init(); f_init_l1ctl(); + f_sleep(1.0); f_l1_tune(L1CTL); var GsmFrameNumber fn_last := 0; @@ -638,6 +650,7 @@ } else { setverdict(fail, "Received only ", rsl_chrqd, " out of 1000 RACH"); } + f_shutdown(); } private function f_main_trxc_connect() runs on test_CT { @@ -700,6 +713,7 @@ /* more than 63 bits is not legal / permitted */ f_rach_toffs(64*256, false); f_rach_toffs(127*256, false); + f_shutdown(); } /*** @@ -968,6 +982,7 @@ vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); vc_conn.done; } + f_shutdown(); } testcase TC_meas_res_sign_tchh() runs on test_CT { var ConnHdlr vc_conn; @@ -978,6 +993,7 @@ vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); vc_conn.done; } + f_shutdown(); } testcase TC_meas_res_sign_sdcch4() runs on test_CT { var ConnHdlr vc_conn; @@ -988,6 +1004,7 @@ vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); vc_conn.done; } + f_shutdown(); } testcase TC_meas_res_sign_sdcch8() runs on test_CT { var ConnHdlr vc_conn; @@ -998,6 +1015,7 @@ vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); vc_conn.done; } + f_shutdown(); } testcase TC_meas_res_sign_tchh_toa256() runs on test_CT { var ConnHdlr vc_conn; @@ -1010,6 +1028,7 @@ vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); vc_conn.done; } + f_shutdown(); } @@ -1205,6 +1224,8 @@ [] as_rsl_res_ind(); } + f_shutdown(); + log("num_paging_sent=", st.num_paging_sent, " rcvd_msgs=", st.num_paging_rcv_msgs, " rcvd_ids=", st.num_paging_rcv_ids); return st; @@ -1317,6 +1338,7 @@ /* FIXME: check if imm.ass arrive on Um side */ /* FIXM
[MERGED] osmo-ttcn3-hacks[master]: bts: Make PCU and TRXC sockets optional
Harald Welte has submitted this change and it was merged. Change subject: bts: Make PCU and TRXC sockets optional .. bts: Make PCU and TRXC sockets optional If we want to test with a real (remote) BTS, we can neither access the PCU socket nor is there any fake_trx control socket for fake toa/rssi Change-Id: Ibb02cf289b0d2e77170f146463822c164efc21cd --- M bts/BTS_Tests.ttcn 1 file changed, 13 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 2cf17ae..931c9ab 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -236,6 +236,10 @@ timer T := 2.0; var PCUIF_send_data sd; map(self:PCU, system:PCU); + if (mp_pcu_socket == "") { + g_pcu_conn_id := -1; + return; + } g_pcu_conn_id := f_pcuif_connect(PCU, mp_pcu_socket); T.start; @@ -265,9 +269,12 @@ f_init_pcu(id); - /* start with a default moderate timing offset equalling TA=2 */ - f_main_trxc_connect(); - f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(2*256))); + if (mp_bb_trxc_port != -1) { + var TrxcMessage ret; + /* start with a default moderate timing offset equalling TA=2 */ + f_main_trxc_connect(); + ret := f_TRXC_transceive(BB_TRXC, g_bb_trxc_conn_id, valueof(ts_TRXC_FAKE_TIMING(2*256))); + } } /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */ @@ -342,7 +349,9 @@ map(self:L1CTL, system:L1CTL); f_connect_reset(L1CTL); - f_trxc_connect(); + if (mp_bb_trxc_port != -1) { + f_trxc_connect(); + } g_Tguard.start(pars.t_guard); activate(as_Tguard()); -- To view, visit https://gerrit.osmocom.org/7242 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb02cf289b0d2e77170f146463822c164efc21cd Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[MERGED] osmo-ttcn3-hacks[master]: bts: Introduce RxLev/RxQual tolerance values
Harald Welte has submitted this change and it was merged. Change subject: bts: Introduce RxLev/RxQual tolerance values .. bts: Introduce RxLev/RxQual tolerance values In real-world measurements there's always some tolerance. Use templates for integer ranges of rxlev + rxqual and add some module parameters to make them configurable. Change-Id: I41396ad081706a0dbd6cc992b81d9bba266b6d6d --- M bts/BTS_Tests.ttcn 1 file changed, 43 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 931c9ab..a50d3f6 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -48,6 +48,8 @@ charstring mp_bb_trxc_ip := "127.0.0.1"; integer mp_bb_trxc_port := 6701; charstring mp_pcu_socket := PCU_SOCK_DEFAULT; + integer mp_tolerance_rxqual := 1; + integer mp_tolerance_rxlev := 3; } type component test_CT extends CTRL_Adapter_CT { @@ -766,6 +768,43 @@ return 63 + (toffs256s/256); } +private function f_max(integer a, integer b) return integer { + if (a > b) { + return a; + } else { + return b; + } +} + +private function f_min(integer a, integer b) return integer { + if (a < b) { + return a; + } else { + return b; + } +} + +/* compute negative tolerance val-tolerance, ensure >= min */ +private function f_tolerance_neg(integer val, integer min, integer tolerance) return integer { + val := val - tolerance; + return f_max(val, min); +} + +/* compute positive tolerance val+tolerance, ensure <= max */ +private function f_tolerance_pos(integer val, integer max, integer tolerance) return integer { + val := val + tolerance; + return f_min(val, max); +} + +/* return a template of (val-tolerance .. val+tolerance) ensuring it is within (min .. max) */ +private function f_tolerance(integer val, integer min, integer max, integer tolerance) +return template integer { + var template integer ret; + ret := (f_tolerance_neg(val, min, tolerance) .. f_tolerance_pos(val, max, tolerance)); + return ret; +} + + /* build a template for matching measurement results against */ private function f_build_meas_res_tmpl() runs on ConnHdlr return template RSL_Message { var ConnL1Pars l1p := g_pars.l1_pars; @@ -773,12 +812,12 @@ len := 3, rfu := '0'B, dtx_d := l1p.dtx_enabled, - rxlev_f_u := l1p.meas_ul.full.rxlev, + rxlev_f_u := f_tolerance(l1p.meas_ul.full.rxlev, 0, 63, mp_tolerance_rxlev), reserved1 := '00'B, - rxlev_s_u := l1p.meas_ul.sub.rxlev, + rxlev_s_u := f_tolerance(l1p.meas_ul.sub.rxlev, 0, 63, mp_tolerance_rxlev), reserved2 := '00'B, - rxq_f_u := l1p.meas_ul.full.rxqual, - rxq_s_u := l1p.meas_ul.sub.rxqual, + rxq_f_u := f_tolerance(l1p.meas_ul.full.rxqual, 0, 7, mp_tolerance_rxqual), + rxq_s_u := f_tolerance(l1p.meas_ul.sub.rxqual, 0, 7, mp_tolerance_rxqual), supp_meas_info := omit }; if (l1p.toa256_enabled) { -- To view, visit https://gerrit.osmocom.org/7243 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41396ad081706a0dbd6cc992b81d9bba266b6d6d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-ttcn3-hacks[master]: bts: Add f_rsl_transceive() flag to ignore all unrelated mes...
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7250 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34d8e9350dbe2b032a7454d7f003262e27c802ad Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Add TC_sacch_multi to test for scheduling of multiple S...
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b9a68a0dc004c2ebc8a39f0c7b7aad690675a2d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Add TC_deact_sacch()
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7249 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id8219ffce0635071cb50669b89368de51fe82843 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Add TC_sacch_info_mod and TC_sacch_filling
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7251 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I38b3e302eddb699b2dbdae06fc929dd59de7b2dc Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Align default SI contents with what we see from OsmoBSC
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7241 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d0fa73e1a9b859e1833b0d2ce8cb6bbf07938cc Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Make f_TC_meas_res_periodic work with real BTS
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7245 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I55a79f9e23118d2bb28f27cbcc7ab28712570ef1 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Send DM_REL_REQ to L1 when closing logical channel
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7247 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c0bb52b4de20dfd2d4ea8d0045ea63d84686ac5 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Add f_shutdown() for clean shutdown; use it from tests
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7248 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I225d2363c77dce969bda95ff27506bece586a34a Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: f_rsl_transceive: Add altsteps for sacch/facch/meas_rep
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7246 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic27b28ead3fc4bff82655d0e8d88fda01b71eca7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Introduce RxLev/RxQual tolerance values
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7243 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41396ad081706a0dbd6cc992b81d9bba266b6d6d Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Ignore first MEAS REP as it often contains bogus values
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7244 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5edfdca0c2b5c63073dca7f12f9c0d447e37995c Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: bts: Make PCU and TRXC sockets optional
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7242 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb02cf289b0d2e77170f146463822c164efc21cd Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-ttcn3-hacks[master]: L1CTL: make sure to self.stop in all setverdict(fail) cases
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/7238 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2013a8ec0641d8ef935e6615c1bde599f42db260 Gerrit-PatchSet: 3 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No