[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-19 Thread daniel
daniel has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..

tests: Test gsmtap logging if write queue fills up

Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
---
M tests/Makefile.am
A tests/logging/logging_test_gsmtap.c
A tests/logging/logging_test_gsmtap.err
M tests/testsuite.at
4 files changed, 285 insertions(+), 0 deletions(-)

Approvals:
  daniel: Looks good to me, approved
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve




diff --git a/tests/Makefile.am b/tests/Makefile.am
index d4bfe26..4eac635 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -15,6 +15,7 @@
  gsm0808/gsm0808_test gsm0408/gsm0408_test \
 gprs/gprs_test kasumi/kasumi_test gea/gea_test \
 logging/logging_test codec/codec_test  \
+logging/logging_test_gsmtap\
 loggingrb/loggingrb_test strrb/strrb_test  \
 comp128/comp128_test   \
 bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test\
@@ -242,6 +243,8 @@
 logging_logging_vty_test_SOURCES = logging/logging_vty_test.c
 logging_logging_vty_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)

+logging_logging_test_gsmtap_SOURCES = logging/logging_test_gsmtap.c
+
 vty_vty_transcript_test_SOURCES = vty/vty_transcript_test.c
 vty_vty_transcript_test_LDADD = $(top_builddir)/src/vty/libosmovty.la $(LDADD)

@@ -419,6 +422,7 @@
  msgfile/msgfile_test.ok msgfile/msgconfig.cfg \
  logging/logging_test.ok logging/logging_test.err  \
  logging/logging_vty_test.vty  \
+logging/logging_test_gsmtap.err\
  fr/fr_test.ok loggingrb/logging_test.ok   \
  loggingrb/logging_test.errstrrb/strrb_test.ok 
\
  codec/codec_test.ok \
@@ -574,6 +578,8 @@
logging/logging_test \
>$(srcdir)/logging/logging_test.ok \
2>$(srcdir)/logging/logging_test.err
+   logging/logging_test_gsmtap \
+   2>&1 |grep -v "enqueueing message failed" 
>$(srcdir)/logging/logging_test_gsmtap.err
codec/codec_test \
>$(srcdir)/codec/codec_test.ok
codec/codec_ecu_fr_test \
diff --git a/tests/logging/logging_test_gsmtap.c 
b/tests/logging/logging_test_gsmtap.c
new file mode 100644
index 000..5ede5a4
--- /dev/null
+++ b/tests/logging/logging_test_gsmtap.c
@@ -0,0 +1,64 @@
+/* simple test for gsmtap logging */
+/*
+ * (C) 2023 by sysmocom - s.f.m.c. GmbH 
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+
+static const struct log_info_cat default_categories[] = {};
+
+const struct log_info log_info = {
+   .cat = default_categories,
+   .num_cat = ARRAY_SIZE(default_categories),
+};
+
+extern struct log_info *osmo_log_info;
+
+int main(int argc, char **argv)
+{
+   struct log_target *stderr_target;
+   struct log_target *gsmtap_target;
+
+   log_init(_info, NULL);
+   stderr_target = log_target_create_stderr();
+   log_add_target(stderr_target);
+   log_set_all_filter(stderr_target, 1);
+   log_set_print_filename2(stderr_target, LOG_FILENAME_NONE);
+   log_set_print_category_hex(stderr_target, 0);
+   log_set_print_category(stderr_target, 1);
+   log_set_use_color(stderr_target, 0);
+   log_parse_category_mask(stderr_target, "DLGLOBAL,1");
+
+   gsmtap_target = log_target_create_gsmtap("127.0.0.2", 4729, "gsmtap", 
1, 1);
+   log_add_target(gsmtap_target);
+   log_set_all_filter(gsmtap_target, 1);
+   log_parse_category_mask(gsmtap_target, "DLGLOBAL,1");
+
+   log_target_file_switch_to_stream(stderr_target);
+
+   log_set_category_filter(stderr_target, DLIO, 1, LOGL_DEBUG);
+
+   for (int i = 0; i < 200; i++)
+   DEBUGP(DLGLOBAL, "Repeating message (i = %d)\n", i);
+
+   for (int i = 0; i < 200; i++)
+   osmo_select_main(1);
+
+   return 0;
+}
diff --git a/tests/logging/logging_test_gsmtap.err 
b/tests/logging/logging_test_gsmtap.err
new file mode 100644
index 

[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-19 Thread daniel
Attention is currently required from: arehbein, fixeria, laforge.

daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 5: Code-Review+2

(1 comment)

Patchset:

PS5:
Re-adding +1 from reviewers before



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 5
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 19 Dec 2023 13:46:11 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread pespin
Attention is currently required from: arehbein, daniel, fixeria, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 5
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Mon, 18 Dec 2023 16:27:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread daniel
Attention is currently required from: arehbein, daniel, fixeria, laforge.

Hello Jenkins Builder, arehbein, fixeria, laforge,

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

https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: tests: Test gsmtap logging if write queue fills up
..

tests: Test gsmtap logging if write queue fills up

Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
---
M tests/Makefile.am
A tests/logging/logging_test_gsmtap.c
A tests/logging/logging_test_gsmtap.err
M tests/testsuite.at
4 files changed, 285 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/5
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 5
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread daniel
Attention is currently required from: arehbein, fixeria, laforge.

daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 4:

(1 comment)

Patchset:

PS4:
My second-to-last attempt. After that I'll simply rip out all the error 
messages (ideally I'd like to ensure we actually hit the error).



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 4
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 18 Dec 2023 15:19:51 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread daniel
Attention is currently required from: arehbein, daniel, fixeria, laforge.

Hello Jenkins Builder, arehbein, fixeria, laforge,

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

https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder


Change subject: tests: Test gsmtap logging if write queue fills up
..

tests: Test gsmtap logging if write queue fills up

Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
---
M tests/Makefile.am
A tests/logging/logging_test_gsmtap.c
A tests/logging/logging_test_gsmtap.err
M tests/testsuite.at
4 files changed, 422 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 4
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread fixeria
Attention is currently required from: arehbein, daniel, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 3: Code-Review+1

(1 comment)

File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/97304284_26e5c135
PS2, Line 108: 0x61100328
> Thanks for the hint. […]
But now we're printing numeric value of `-ENOSPC`, which may be different on 
different systems. I think we even faced such a problem already. Let's hope we 
won't face it again :P



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Mon, 18 Dec 2023 11:13:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread pespin
Attention is currently required from: arehbein, daniel, fixeria, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 3:

(1 comment)

File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/168a7791_3017bca3
PS3, Line 66: DLIO iofd(gsmtap_inst.io_fd)enqueueing message failed (-28). 
Rejecting msgb
printing error code values in here may be problematic, since error codes can 
differ in different systems/architectures.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Mon, 18 Dec 2023 11:10:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread daniel
Attention is currently required from: arehbein, fixeria, laforge, pespin.

Hello Jenkins Builder, arehbein, fixeria, laforge,

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

https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by arehbein, Code-Review+1 by laforge, Code-Review-1 by fixeria, 
Verified-1 by Jenkins Builder


Change subject: tests: Test gsmtap logging if write queue fills up
..

tests: Test gsmtap logging if write queue fills up

Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
---
M tests/Makefile.am
A tests/logging/logging_test_gsmtap.c
A tests/logging/logging_test_gsmtap.err
M tests/testsuite.at
4 files changed, 421 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-18 Thread daniel
Attention is currently required from: arehbein, fixeria, laforge, pespin.

daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 3:

(5 comments)

File tests/Makefile.am:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/b76ccc94_bd49d1b5
PS2, Line 18: logging/logging_test_gsmtap
> This file needs to be updated properly: […]
Done


https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/a19cb23e_29d84576
PS2, Line 566: logging/logging_test
> add the respective statement for `logging_test_gsmtap` here
Done


File tests/logging/logging_test_gsmtap.c:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/673690cd_7398e8ee
PS2, Line 3: 2008, 2009 by Holger Hans Peter Freyther 
> I doubt it was Holger who wrote this test
He was the spiritual author but I get your point


File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/7ea7b0ba_1e827898
PS2, Line 108: 0x61100328
> I think we do patch stuff in output in some places already. […]
Thanks for the hint. It's even easier now since we're using the txqueue of 
osmo_io and it doesn't log any pointers.


File tests/testsuite.at:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/60bbad5a_5646f7a1
PS2, Line 206: logging_test_gsmtap.ok
> no such file?
Done



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 18 Dec 2023 11:03:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-12-17 Thread laforge
Attention is currently required from: daniel, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
ping? Can we get this cleaned up and merged, please @dwillm...@sysmocom.de



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Sun, 17 Dec 2023 13:14:31 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-30 Thread pespin
Attention is currently required from: daniel, fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2:

(1 comment)

File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/6617b38b_dc91df15
PS2, Line 108: 0x61100328
> Yeah, do you see any other way of removing such information without changing 
> the log message? […]
I think we do patch stuff in output in some places already.
See for instance:

osmo-msc/tests/testsuite.at
24:AT_CHECK([$abs_top_builddir/tests/db_sms/db_sms_test 3>&1 1>&2 2>&3 | 
grep -v "Failed to load driver" | grep -v "cannot open shared object file"], 
[], [expout], [experr])



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 30 Nov 2023 14:56:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-30 Thread daniel
Attention is currently required from: fixeria.

daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2:

(1 comment)

File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/d158b54a_45ea80e2 
PS2, Line 108: 0x61100328
> this is non-deterministic output, we should not match it
Yeah, do you see any other way of removing such information without changing 
the log message?
Do we need a name in osmo_wqueue (and default to %p) so we can print that?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 30 Nov 2023 13:39:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-15 Thread fixeria
Attention is currently required from: daniel.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2:

(1 comment)

File tests/logging/logging_test_gsmtap.c:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/0eccdc17_56efdb64
PS2, Line 3: 2008, 2009 by Holger Hans Peter Freyther 
I doubt it was Holger who wrote this test



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 16 Nov 2023 06:57:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-09 Thread fixeria
Attention is currently required from: daniel.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2: Code-Review-1

(4 comments)

File tests/Makefile.am:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/b0f29678_b196770f
PS2, Line 18: logging/logging_test_gsmtap
This file needs to be updated properly:

* define `logging_test_gsmtap_SOURCES`,
* add `logging_test_gsmtap.err` to `EXTRA_DIST`.


https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/742cd617_f1dc078e
PS2, Line 566: logging/logging_test
add the respective statement for `logging_test_gsmtap` here


File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/207ec47b_9dddbd44
PS2, Line 108: 0x61100328
this is non-deterministic output, we should not match it


File tests/testsuite.at:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/cc41c509_d39525a8 
PS2, Line 206: logging_test_gsmtap.ok
no such file?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 11:51:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-06 Thread arehbein
Attention is currently required from: daniel.

arehbein has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Mon, 06 Nov 2023 21:42:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-03 Thread laforge
Attention is currently required from: daniel.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2: Code-Review+1

(1 comment)

Patchset:

PS2:
i guess you don't want the wqueue code logging the pointer?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Fri, 03 Nov 2023 20:39:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-03 Thread daniel
Attention is currently required from: daniel.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: tests: Test gsmtap logging if write queue fills up
..

tests: Test gsmtap logging if write queue fills up

Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
---
M tests/Makefile.am
A tests/logging/logging_test_gsmtap.c
A tests/logging/logging_test_gsmtap.err
M tests/testsuite.at
4 files changed, 417 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-03 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 1:

(3 comments)

File tests/logging/logging_test_gsmtap.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12292):
https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/e654eaaf_92b1cc35
PS1, Line 57:   for (int i = 0; i < 200; i++) {
braces {} are not necessary for single statement blocks


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12292):
https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/7f9350c7_afc521ec
PS1, Line 58:   DEBUGP(DLGLOBAL, "Repeating message (i = %i)\n", i);
Use %d instead of %i


Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12292):
https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/f3c2cda0_9a241246
PS1, Line 61:   for (int i = 0; i < 200; i++) {
braces {} are not necessary for single statement blocks



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Fri, 03 Nov 2023 20:23:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-03 Thread daniel
daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )


Change subject: tests: Test gsmtap logging if write queue fills up
..

tests: Test gsmtap logging if write queue fills up

Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
---
M tests/Makefile.am
A tests/logging/logging_test_gsmtap.c
A tests/logging/logging_test_gsmtap.err
M tests/testsuite.at
4 files changed, 419 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/1

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5f4914e..8c8e370 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -15,6 +15,7 @@
  gsm0808/gsm0808_test gsm0408/gsm0408_test \
 gprs/gprs_test kasumi/kasumi_test gea/gea_test \
 logging/logging_test codec/codec_test  \
+logging/logging_test_gsmtap\
 loggingrb/loggingrb_test strrb/strrb_test  \
 comp128/comp128_test   \
 bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test\
diff --git a/tests/logging/logging_test_gsmtap.c 
b/tests/logging/logging_test_gsmtap.c
new file mode 100644
index 000..f84cdce
--- /dev/null
+++ b/tests/logging/logging_test_gsmtap.c
@@ -0,0 +1,66 @@
+/* simple test for the debug interface */
+/*
+ * (C) 2008, 2009 by Holger Hans Peter Freyther 
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+
+static const struct log_info_cat default_categories[] = {};
+
+const struct log_info log_info = {
+   .cat = default_categories,
+   .num_cat = ARRAY_SIZE(default_categories),
+};
+
+extern struct log_info *osmo_log_info;
+
+int main(int argc, char **argv)
+{
+   struct log_target *stderr_target;
+   struct log_target *gsmtap_target;
+
+   log_init(_info, NULL);
+   stderr_target = log_target_create_stderr();
+   log_add_target(stderr_target);
+   log_set_all_filter(stderr_target, 1);
+   log_set_print_filename2(stderr_target, LOG_FILENAME_NONE);
+   log_set_print_category_hex(stderr_target, 0);
+   log_set_print_category(stderr_target, 1);
+   log_set_use_color(stderr_target, 0);
+   log_parse_category_mask(stderr_target, "DLGLOBAL,1");
+
+   gsmtap_target = log_target_create_gsmtap("127.0.0.2", 4729, "gsmtap", 
1, 1);
+   log_add_target(gsmtap_target);
+   log_set_all_filter(gsmtap_target, 1);
+   log_parse_category_mask(gsmtap_target, "DLGLOBAL,1");
+
+   log_target_file_switch_to_stream(stderr_target);
+
+   log_set_category_filter(stderr_target, DLGLOBAL, 1, LOGL_DEBUG);
+
+   for (int i = 0; i < 200; i++) {
+   DEBUGP(DLGLOBAL, "Repeating message (i = %i)\n", i);
+   }
+
+   for (int i = 0; i < 200; i++) {
+   osmo_select_main(1);
+   }
+
+   return 0;
+}
diff --git a/tests/logging/logging_test_gsmtap.err 
b/tests/logging/logging_test_gsmtap.err
new file mode 100644
index 000..dcba5cf
--- /dev/null
+++ b/tests/logging/logging_test_gsmtap.err
@@ -0,0 +1,336 @@
+DLGLOBAL Repeating message (i = 0)
+DLGLOBAL Repeating message (i = 1)
+DLGLOBAL Repeating message (i = 2)
+DLGLOBAL Repeating message (i = 3)
+DLGLOBAL Repeating message (i = 4)
+DLGLOBAL Repeating message (i = 5)
+DLGLOBAL Repeating message (i = 6)
+DLGLOBAL Repeating message (i = 7)
+DLGLOBAL Repeating message (i = 8)
+DLGLOBAL Repeating message (i = 9)
+DLGLOBAL Repeating message (i = 10)
+DLGLOBAL Repeating message (i = 11)
+DLGLOBAL Repeating message (i = 12)
+DLGLOBAL Repeating message (i = 13)
+DLGLOBAL Repeating message (i = 14)
+DLGLOBAL Repeating message (i = 15)
+DLGLOBAL Repeating message (i = 16)
+DLGLOBAL Repeating message (i = 17)
+DLGLOBAL Repeating message (i = 18)
+DLGLOBAL Repeating message (i = 19)
+DLGLOBAL Repeating message (i = 20)
+DLGLOBAL Repeating message (i = 21)
+DLGLOBAL Repeating message (i = 22)
+DLGLOBAL Repeating message (i = 23)
+DLGLOBAL Repeating message (i = 24)
+DLGLOBAL Repeating message (i = 25)
+DLGLOBAL Repeating message (i = 26)
+DLGLOBAL Repeating message (i = 27)
+DLGLOBAL Repeating message (i = 28)
+DLGLOBAL Repeating message (i = 29)
+DLGLOBAL Repeating message (i = 30)
+DLGLOBAL Repeating message (i = 31)
+DLGLOBAL Repeating message (i =