dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35144?usp=email )
Change subject: PCU_Tests: tell PCU a more realistic BTS model
......................................................................
PCU_Tests: tell PCU a more realistic BTS model
In ts_PCUIF_INFO_default we set the bts_model member to
PCU_IF_BTS_MODEL_UNSPEC. This means that the PCU will not know the BTS
model and thus it is not able to comply to the specific pecularities of
the BTS model that is used. In PCU_Tests.ttcn we simulate the behavior
of an OsmoBTS with OsmoTRX, therefore we should set the BTS model to
PCU_IF_BTS_MODEL_TRX.
This will also fix the problems we have with unexpected DUMMY messages
we currently receive since in an OsmoTRX based BTS model those frames
will be generated by OsmoTRX and do not appear on the PCUIF interface.
When the BTS model is left unspecified, then the PCU will generate those
DUMMY messages and irretate the testsuite.
Related: OS#6191
Change-Id: I6b516eece6acc96ebde9759bcb609197a245dd84
---
M pcu/PCU_Tests.ttcn
1 file changed, 24 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/44/35144/1
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index fb935d9..442d617 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -112,7 +112,7 @@
remote_port := { mp_nsconfig.nsvc[0].provider.ip.local_udp_port, 0 },
remote_addr := f_PCUIF_RemoteAddr(
f_PCUIF_AF2addr_type(mp_nsconfig.nsvc[0].provider.ip.address_family), mp_nsconfig.nsvc[0].provider.ip.local_ip),
- bts_model := PCU_IF_BTS_MODEL_UNSPEC
+ bts_model := PCU_IF_BTS_MODEL_TRX
}
/* Passed in RAN-INFO message from emulated neighbor using RIM */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35144?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6b516eece6acc96ebde9759bcb609197a245dd84
Gerrit-Change-Number: 35144
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email )
Change subject: logging: ensure ANSI color escape is sent in same line/before newline
......................................................................
logging: ensure ANSI color escape is sent in same line/before newline
This fixes multi-line color clobbering in logging daemons like
systemd-journald, which work with single-lines only.
Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Closes: OS#6249
(cherry picked from commit 11a416827dd9f2da6b7c1db0e1e83adb1e6e5cc8)
---
M src/core/logging.c
M tests/loggingrb/logging_test.err
2 files changed, 25 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/core/logging.c b/src/core/logging.c
index c6774f5..dc19cf3 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -616,7 +616,15 @@
}
if (target->use_color && c_subsys) {
- ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ /* Ensure the last color escape is sent before the newline
+ * (to not clobber journald, which works on single-lines only) */
+ if (offset > 0 && buf[offset - 1] == '\n') {
+ offset--; rem++;
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END "\n");
+ } else {
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ }
+
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
diff --git a/tests/loggingrb/logging_test.err b/tests/loggingrb/logging_test.err
index b59d2e8..e070561 100644
--- a/tests/loggingrb/logging_test.err
+++ b/tests/loggingrb/logging_test.err
@@ -1,3 +1,2 @@
-[1;31mYou should see this
-[0;m[1;32mYou should see this
-[0;m
\ No newline at end of file
+[1;31mYou should see this[0;m
+[1;32mYou should see this[0;m
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.9.1
Gerrit-Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Gerrit-Change-Number: 35142
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email )
Change subject: logging: ensure ANSI color escape is sent in same line/before newline
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.9.1
Gerrit-Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Gerrit-Change-Number: 35142
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 28 Nov 2023 11:17:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email )
Change subject: logging: ensure ANSI color escape is sent in same line/before newline
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
The patch is quite the usability improvement for "journalctl -a", making a backport of it as discussed in today's meeting.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.9.1
Gerrit-Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Gerrit-Change-Number: 35142
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Comment-Date: Tue, 28 Nov 2023 10:27:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email )
Change subject: logging: ensure ANSI color escape is sent in same line/before newline
......................................................................
logging: ensure ANSI color escape is sent in same line/before newline
This fixes multi-line color clobbering in logging daemons like
systemd-journald, which work with single-lines only.
Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Closes: OS#6249
(cherry picked from commit 11a416827dd9f2da6b7c1db0e1e83adb1e6e5cc8)
---
M src/core/logging.c
M tests/loggingrb/logging_test.err
2 files changed, 25 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/35142/1
diff --git a/src/core/logging.c b/src/core/logging.c
index c6774f5..dc19cf3 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -616,7 +616,15 @@
}
if (target->use_color && c_subsys) {
- ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ /* Ensure the last color escape is sent before the newline
+ * (to not clobber journald, which works on single-lines only) */
+ if (offset > 0 && buf[offset - 1] == '\n') {
+ offset--; rem++;
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END "\n");
+ } else {
+ ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END);
+ }
+
if (ret < 0)
goto err;
OSMO_SNPRINTF_RET(ret, rem, offset, len);
diff --git a/tests/loggingrb/logging_test.err b/tests/loggingrb/logging_test.err
index b59d2e8..e070561 100644
--- a/tests/loggingrb/logging_test.err
+++ b/tests/loggingrb/logging_test.err
@@ -1,3 +1,2 @@
-[1;31mYou should see this
-[0;m[1;32mYou should see this
-[0;m
\ No newline at end of file
+[1;31mYou should see this[0;m
+[1;32mYou should see this[0;m
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35142?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.9.1
Gerrit-Change-Id: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433
Gerrit-Change-Number: 35142
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-CC: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/docker-playground/+/35136?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: ttcn3-pcu-test/sns: fix PCUIF version number
......................................................................
ttcn3-pcu-test/sns: fix PCUIF version number
The current master of OsmoPCU is now using PCUIF version number 12.
However, the configuration file of the the SNS tests still sets it to
11.
Related: OS#6275
Change-Id: I0b37f01f4c7bb829053231339e39ab734f4c8cbc
---
M ttcn3-pcu-test/jenkins-sns.sh
M ttcn3-pcu-test/sns/PCU_Tests.cfg
2 files changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/36/35136/2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/35136?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0b37f01f4c7bb829053231339e39ab734f4c8cbc
Gerrit-Change-Number: 35136
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset