lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[XS] Change in libosmo-netif[master]: src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo
by fixeria 03 Sep '24

03 Sep '24
Attention is currently required from: laforge. fixeria has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38004?usp=email ) Change subject: src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38004?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Idf9c0fa4db65ab6ea34a9cb2011400aadf3dd54e Gerrit-Change-Number: 38004 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 03 Sep 2024 10:49:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmocore[master]: Fix building in environments that define _GNU_SOURCE
by fixeria 03 Sep '24

03 Sep '24
Attention is currently required from: laforge. fixeria has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email ) Change subject: Fix building in environments that define _GNU_SOURCE ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 Gerrit-Change-Number: 38003 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 03 Sep 2024 10:41:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-netif[master]: src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo
by pespin 03 Sep '24

03 Sep '24
Attention is currently required from: laforge. pespin has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38004?usp=email ) Change subject: src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38004?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Idf9c0fa4db65ab6ea34a9cb2011400aadf3dd54e Gerrit-Change-Number: 38004 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 03 Sep 2024 10:34:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-netif[master]: coverity CID#322728
by laforge 03 Sep '24

03 Sep '24
Attention is currently required from: neels, pespin. laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email ) Change subject: coverity CID#322728 ...................................................................... Patch Set 1: (1 comment) File src/stream.c: https://gerrit.osmocom.org/c/libosmo-netif/+/37991/comment/44cafc61_5150c60… : PS1, Line 282: ret = sctp_recvmsg(fd, msg->tail, msgb_tailroom(msg), NULL, NULL, &sinfo, &flags); > I would assume that any such socket related call will not need zero-initialization of pure output ar […] See https://gerrit.osmocom.org/c/libosmo-netif/+/38004/1 for fixing the actual logical error. -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ia4c6b7c6f16331932e3f584b800e86d422a4f019 Gerrit-Change-Number: 37991 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 03 Sep 2024 10:32:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: Fix building in environments that define _GNU_SOURCE
by pespin 03 Sep '24

03 Sep '24
Attention is currently required from: laforge. pespin has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email ) Change subject: Fix building in environments that define _GNU_SOURCE ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 Gerrit-Change-Number: 38003 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 03 Sep 2024 10:31:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-netif[master]: stream_test: don't check if uint8_t is negative
by laforge 03 Sep '24

03 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37820?usp=email ) Change subject: stream_test: don't check if uint8_t is negative ...................................................................... stream_test: don't check if uint8_t is negative Change-Id: Ic4fac424dcd06c3e235e7bd64c934eb446edb906 Closes: CID#323030 --- M tests/stream/stream_test.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index 67f7429..f2f1d4f 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -516,7 +516,7 @@ } LOGCLI(osc, "Received message from stream (payload len = %" PRIu16 ")\n", msgb_length(msg)); - if (ipac_msg_type < 0 || 5 < ipac_msg_type) { + if (5 < ipac_msg_type) { fprintf(stderr, "Received unexpected IPAC message type %"PRIu8"\n", ipac_msg_type); msgb_free(msg); return -ENOMSG; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37820?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ic4fac424dcd06c3e235e7bd64c934eb446edb906 Gerrit-Change-Number: 37820 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-netif[master]: stream_test: don't check if uint8_t is negative
by laforge 03 Sep '24

03 Sep '24
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmo-netif/+/37820?usp=email ) Change subject: stream_test: don't check if uint8_t is negative ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/37820?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ic4fac424dcd06c3e235e7bd64c934eb446edb906 Gerrit-Change-Number: 37820 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 03 Sep 2024 10:30:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-netif[master]: src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo
by laforge 03 Sep '24

03 Sep '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/38004?usp=email ) Change subject: src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo ...................................................................... src/stream.c: Use sctp_assoc_id 'canary' to detect misisng sinfo sctp_rcvinfo() has a successful return path that does *not* fill the caller-provided sinfo structure. This would be highly unexpected as we cannot determine the stream_id and PPID then. Our osmo_io code path already handles that situation correctly by logging a related error message. The non-osmo-io path however would silently hide that error. See also: https://github.com/sctp/lksctp-tools/issues/37 Change-Id: Idf9c0fa4db65ab6ea34a9cb2011400aadf3dd54e --- M src/stream.c 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/04/38004/1 diff --git a/src/stream.c b/src/stream.c index f8cbed6..5033f4c 100644 --- a/src/stream.c +++ b/src/stream.c @@ -279,8 +279,14 @@ int flags = 0; int ret; + /* Canary to detect if kernel returns sinfo; see https://github.com/sctp/lksctp-tools/issues/37 */ + sinfo.sinfo_assoc_id = 0; + ret = sctp_recvmsg(fd, msg->tail, msgb_tailroom(msg), NULL, NULL, &sinfo, &flags); - return stream_sctp_recvmsg_trailer(log_pfx, msg, ret, &sinfo, flags); + if (sinfo.sinfo_assoc_id) + return stream_sctp_recvmsg_trailer(log_pfx, msg, ret, &sinfo, flags); + else + return stream_sctp_recvmsg_trailer(log_pfx, msg, ret, NULL, flags); } /*! wrapper for osmo_io asynchronous recvmsg response */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/38004?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Idf9c0fa4db65ab6ea34a9cb2011400aadf3dd54e Gerrit-Change-Number: 38004 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in libosmocore[master]: Fix building in environments that define _GNU_SOURCE
by laforge 03 Sep '24

03 Sep '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email ) Change subject: Fix building in environments that define _GNU_SOURCE ...................................................................... Fix building in environments that define _GNU_SOURCE On Debian unstable, this is now the case as liburing 2.7 has the following in its pkg-config file: Cflags: -I${includedir} -D_GNU_SOURCE As our configure script inherits that, we are building all of the source with that, and we will get compilation errors about re-defining something that's already defined... Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 --- M src/core/exec.c M src/core/socket.c M src/core/thread.c M src/vty/cpu_sched_vty.c M tests/fr/fr_test.c M tests/logging/logging_vty_test.c M tests/tdef/tdef_vty_config_root_test.c M tests/tdef/tdef_vty_config_subnode_test.c M tests/tdef/tdef_vty_dynamic_test.c 9 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/38003/1 diff --git a/src/core/exec.c b/src/core/exec.c index 2e33788..2d1df82 100644 --- a/src/core/exec.c +++ b/src/core/exec.c @@ -19,7 +19,9 @@ #include "config.h" #ifndef EMBEDDED +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <unistd.h> #include <errno.h> diff --git a/src/core/socket.c b/src/core/socket.c index 90cf4ca..915c70e 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -26,7 +26,9 @@ * \file socket.c */ #ifdef HAVE_SYS_SOCKET_H +#ifndef _GNU_SOURCE #define _GNU_SOURCE /* for struct ucred on glibc >= 2.8 */ +#endif #include <osmocom/core/logging.h> #include <osmocom/core/select.h> diff --git a/src/core/thread.c b/src/core/thread.c index d9a9842..116eaea 100644 --- a/src/core/thread.c +++ b/src/core/thread.c @@ -28,8 +28,10 @@ /* If HAVE_GETTID, then "_GNU_SOURCE" may need to be defined to use gettid() */ #if HAVE_GETTID +#ifndef _GNU_SOURCE #define _GNU_SOURCE -#endif +#endif /* ifndef _GNU_SOURCE */ +#endif /* if HAVE_GETTID */ #include <unistd.h> #include <sys/types.h> diff --git a/src/vty/cpu_sched_vty.c b/src/vty/cpu_sched_vty.c index 7198f74..60fe930 100644 --- a/src/vty/cpu_sched_vty.c +++ b/src/vty/cpu_sched_vty.c @@ -23,7 +23,9 @@ * SPDX-License-Identifier: GPLv2+ */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include "config.h" diff --git a/tests/fr/fr_test.c b/tests/fr/fr_test.c index cdcdb43..64ae710 100644 --- a/tests/fr/fr_test.c +++ b/tests/fr/fr_test.c @@ -14,7 +14,9 @@ * */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <osmocom/core/application.h> #include <osmocom/gprs/gprs_ns.h> diff --git a/tests/logging/logging_vty_test.c b/tests/logging/logging_vty_test.c index c1a2853..16a8277 100644 --- a/tests/logging/logging_vty_test.c +++ b/tests/logging/logging_vty_test.c @@ -17,7 +17,9 @@ * */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <getopt.h> #include <signal.h> diff --git a/tests/tdef/tdef_vty_config_root_test.c b/tests/tdef/tdef_vty_config_root_test.c index 8c46d95..7810c0b 100644 --- a/tests/tdef/tdef_vty_config_root_test.c +++ b/tests/tdef/tdef_vty_config_root_test.c @@ -19,7 +19,9 @@ * GNU General Public License for more details. */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <getopt.h> #include <signal.h> #include <limits.h> diff --git a/tests/tdef/tdef_vty_config_subnode_test.c b/tests/tdef/tdef_vty_config_subnode_test.c index e3e165d..a249f46 100644 --- a/tests/tdef/tdef_vty_config_subnode_test.c +++ b/tests/tdef/tdef_vty_config_subnode_test.c @@ -19,7 +19,9 @@ * GNU General Public License for more details. */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <getopt.h> #include <signal.h> #include <limits.h> diff --git a/tests/tdef/tdef_vty_dynamic_test.c b/tests/tdef/tdef_vty_dynamic_test.c index b646c54..f901f6c 100644 --- a/tests/tdef/tdef_vty_dynamic_test.c +++ b/tests/tdef/tdef_vty_dynamic_test.c @@ -19,7 +19,9 @@ * GNU General Public License for more details. */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <getopt.h> #include <signal.h> #include <limits.h> -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 Gerrit-Change-Number: 38003 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: StatsD_Checker: Simplify by getting rid of StatsDExpectPriv
by pespin 03 Sep '24

03 Sep '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37979?usp=email ) Change subject: StatsD_Checker: Simplify by getting rid of StatsDExpectPriv ...................................................................... StatsD_Checker: Simplify by getting rid of StatsDExpectPriv Get rid of extra record, we have plenty of them and we'll have more once we add new APIs to work without VTY. While doing so, simplify the expect loop by maintaining a counter. Change-Id: Ib14c838c5f0647d050249853327671542182636f --- M library/StatsD_Checker.ttcnpp 1 file changed, 27 insertions(+), 43 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/StatsD_Checker.ttcnpp b/library/StatsD_Checker.ttcnpp index ee299e4..8f0feba 100644 --- a/library/StatsD_Checker.ttcnpp +++ b/library/StatsD_Checker.ttcnpp @@ -32,6 +32,7 @@ import from StatsD_CodecPort all; import from StatsD_CodecPort_CtrlFunct all; +import from General_Types all; import from Osmocom_Types all; #ifdef STATSD_HAVE_VTY import from Osmocom_VTY_Functions all; @@ -52,13 +53,6 @@ type set of StatsDExpect StatsDExpects; -type record StatsDExpectPriv { - StatsDExpect expect, - integer seen -} - -type set of StatsDExpectPriv StatsDExpectPrivs; - type enumerated StatsDResultType { e_Matched, e_Mismatched, @@ -151,27 +145,27 @@ } } -private function f_statsd_checker_metric_expects(StatsDExpectPrivs exp_seen, StatsDMetric metric) +private function f_statsd_checker_metric_expects(StatsDExpects expects, StatsDMetric metric) return StatsDExpectResult { var StatsDExpectResult result := { kind := e_NotFound, idx := -1 }; - for (var integer i := 0; i < lengthof(exp_seen); i := i + 1) { - var StatsDExpectPriv exp := exp_seen[i]; - if (exp.expect.name != metric.name) { + for (var integer i := 0; i < lengthof(expects); i := i + 1) { + var StatsDExpect exp := expects[i]; + if (exp.name != metric.name) { continue; } - if (not f_compare_expect(metric, exp.expect)) { - log("EXP mismatch: ", metric, " vs ", exp.expect); + if (not f_compare_expect(metric, exp)) { + log("EXP mismatch: ", metric, " vs ", exp); result := { kind := e_Mismatched, idx := i }; break; } else { - log("EXP match: ", metric, " vs ", exp.expect); + log("EXP match: ", metric, " vs ", exp); result := { kind := e_Matched, idx := i @@ -182,19 +176,16 @@ return result; } -template StatsDExpectPriv t_statsd_expect_priv(template StatsDExpect expect) := { - expect := expect, - seen := 0 -} - private function f_statsd_checker_expect(StatsDExpects expects) runs on StatsD_Checker_CT return boolean { var default t; var StatsDMessage msg; var StatsDExpectResult res; - var StatsDExpectPrivs exp_seen := {}; + var Booleans matched := {}; + var integer matched_remain := 0; for (var integer i := 0; i < lengthof(expects); i := i + 1) { - exp_seen := exp_seen & {valueof(t_statsd_expect_priv(expects[i]))}; + matched := matched & {false}; + matched_remain := matched_remain + 1; } /* Dismiss any messages we might have skipped from the last report */ @@ -206,20 +197,19 @@ /* Assume caller knows previous state, eg. gauges may have been 0 due to IUT being reset */ #endif - var boolean seen_all := false; T_statsd.start; - while (not seen_all) { + while (matched_remain > 0) { var StatsD_RecvFrom rf; alt { [] STATS.receive(tr_StatsD_RecvFrom(?, ?)) -> value rf { msg := rf.msg; } [] T_statsd.timeout { - for (var integer i := 0; i < lengthof(exp_seen); i := i + 1) { + for (var integer i := 0; i < lengthof(expects); i := i + 1) { /* We're still missing some expects, keep looking */ - if (exp_seen[i].seen == 0) { - log("Timeout waiting for ", exp_seen[i].expect.name, " (min: ", exp_seen[i].expect.min, - ", max: ", exp_seen[i].expect.max, ")"); + if (not matched[i]) { + log("Timeout waiting for ", expects[i].name, + " (min: ", expects[i].min, ", max: ", expects[i].max, ")"); } } setverdict(fail, "Timeout waiting for metrics"); @@ -230,34 +220,28 @@ for (var integer i := 0; i < lengthof(msg); i := i + 1) { var StatsDMetric metric := msg[i]; - res := f_statsd_checker_metric_expects(exp_seen, metric); + res := f_statsd_checker_metric_expects(expects, metric); if (res.kind == e_NotFound) { continue; } - if (res.kind == e_Mismatched) { log("Metric: ", metric); - log("Expect: ", exp_seen[res.idx].expect); - setverdict(fail, "Metric failed expectation ", metric, " vs ", exp_seen[res.idx].expect); + log("Expect: ", expects[res.idx]); + setverdict(fail, "Metric failed expectation ", metric, " vs ", expects[res.idx]); return false; - } else if (res.kind == e_Matched) { - exp_seen[res.idx].seen := exp_seen[res.idx].seen + 1; } - } - - /* Check if all expected metrics were received */ - seen_all := true; - for (var integer i := 0; i < lengthof(exp_seen); i := i + 1) { - /* We're still missing some expects, keep looking */ - if (exp_seen[i].seen == 0) { - seen_all := false; - break; + if (res.kind == e_Matched) { + if (not matched[res.idx]) { + matched[res.idx] := true; + matched_remain := matched_remain - 1; + } + continue; } } } T_statsd.stop; - return seen_all; + return true; } function f_init_statsd(charstring id, inout StatsD_Checker_CT vc_STATSD, charstring local_addr, integer local_port) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37979?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib14c838c5f0647d050249853327671542182636f Gerrit-Change-Number: 37979 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.