Attention is currently required from: falconia.
Jenkins Builder has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38139?usp=email )
Change subject: tests: add unit tests for trau2rtp conversion, FR & EFR
......................................................................
Patch Set 2:
(6 comments)
File tests/trau_conv/trau16_to_rtp.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18530):
https://gerrit.osmocom.org/c/libosmo-abis/+/38139/comment/17ff3df0_bbd28759… :
PS2, Line 196: /* The only valid 1-byte payload is TEH by itself
'TEH' may be misspelled - perhaps 'THE'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18530):
https://gerrit.osmocom.org/c/libosmo-abis/+/38139/comment/62b7b07b_b3c0f542… :
PS2, Line 200: printf(" TW-TS-001 TEH octet: 0x%02X\n", rtp_pl[0]);
'TEH' may be misspelled - perhaps 'THE'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18530):
https://gerrit.osmocom.org/c/libosmo-abis/+/38139/comment/7b15e122_0efaf453… :
PS2, Line 213: printf(" TW-TS-001 TEH octet: 0x%02X\n", rtp_pl[0]);
'TEH' may be misspelled - perhaps 'THE'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18530):
https://gerrit.osmocom.org/c/libosmo-abis/+/38139/comment/39632be1_2c1b962f… :
PS2, Line 250: /* The only valid 1-byte payload is TEH by itself
'TEH' may be misspelled - perhaps 'THE'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18530):
https://gerrit.osmocom.org/c/libosmo-abis/+/38139/comment/33f41c57_5d7177cb… :
PS2, Line 254: printf(" TW-TS-001 TEH octet: 0x%02X\n", rtp_pl[0]);
'TEH' may be misspelled - perhaps 'THE'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18530):
https://gerrit.osmocom.org/c/libosmo-abis/+/38139/comment/20ba6fa1_45bae8a5… :
PS2, Line 267: printf(" TW-TS-001 TEH octet: 0x%02X\n", rtp_pl[0]);
'TEH' may be misspelled - perhaps 'THE'?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38139?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie319900125baa8f20595cac83343771d780a5b4e
Gerrit-Change-Number: 38139
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Sat, 14 Sep 2024 07:42:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: falconia.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-abis/+/38139?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: add unit tests for trau2rtp conversion, FR & EFR
......................................................................
tests: add unit tests for trau2rtp conversion, FR & EFR
The present set of tests exercises osmo_trau_frame_decode_16k()
and osmo_trau2rtp() functions for frame types of FR speech and
EFR speech. Both standard (RFC 3551) and TW-TS-001 output modes
are tested.
Change-Id: Ie319900125baa8f20595cac83343771d780a5b4e
---
M .gitignore
M tests/Makefile.am
M tests/testsuite.at
A tests/trau_conv/trau16_efr.in
A tests/trau_conv/trau16_efr_std.ok
A tests/trau_conv/trau16_efr_twts001.ok
A tests/trau_conv/trau16_fr.in
A tests/trau_conv/trau16_fr_std.ok
A tests/trau_conv/trau16_fr_twts001.ok
A tests/trau_conv/trau16_to_rtp.c
10 files changed, 1,124 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/39/38139/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38139?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie319900125baa8f20595cac83343771d780a5b4e
Gerrit-Change-Number: 38139
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email )
Change subject: trau2rtp FR & EFR: fix uninitialized memory bug
......................................................................
trau2rtp FR & EFR: fix uninitialized memory bug
The implementation of osmo_trau2rtp() for FR and EFR speech frames
had this bug: when moving individual bits from TRAU to RTP payload
representation, the code would only set bits in the output buffer,
but never clear them. The result is correct output only when the
RTP payload buffer has been zeroed prior to calling the function,
garbage otherwise.
OsmoMGW was not affected by this bug because it calls osmo_trau2rtp()
with the output buffer pointed to a freshly allocated msgb, and
msgb allocation in libosmocore memsets buffer memory to zeros.
However, a sane API should not depend on previous content of output
buffer memory, hence the function implementation in libosmotrau
was still in the wrong.
Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5
---
M src/trau/trau_rtp_conv.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/38/38138/1
diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c
index 06979c6..1a200c7 100644
--- a/src/trau/trau_rtp_conv.c
+++ b/src/trau/trau_rtp_conv.c
@@ -133,6 +133,7 @@
return 0;
out[0] = 0xd << 4;
+ memset(out + 1, 0, GSM_FR_BYTES - 1);
/* reassemble d-bits */
i = 0; /* counts bits */
j = 4; /* counts output bits */
@@ -391,6 +392,7 @@
return 0;
out[0] = 0xc << 4;
+ memset(out + 1, 0, GSM_EFR_BYTES - 1);
/* reassemble d-bits */
for (i = 1, j = 4; i < 39; i++, j++)
out[j/8] |= (tf->d_bits[i] << (7-(j%8)));
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5
Gerrit-Change-Number: 38138
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Attention is currently required from: falconia, fixeria.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria
Change subject: osmo_trau_frame_decode_8k: check all sync bits
......................................................................
osmo_trau_frame_decode_8k: check all sync bits
The decoding of unknown TRAU-8k frames (the direction and 8 kbit/s
submux are known, but nothing else) begins by trial-and-error
checking of 4 possible GSM 08.61 sync patterns. In the case of
classic HR speech/data and AMR-low sync patterns, not all bits
were checked.
Change-Id: I47b055b4d3b92f018508fd7baa0784dfcabe6262
---
M src/trau/trau_frame.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/30/38130/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I47b055b4d3b92f018508fd7baa0784dfcabe6262
Gerrit-Change-Number: 38130
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38137?usp=email )
Change subject: tests: fix for --disable-ortp
......................................................................
tests: fix for --disable-ortp
osmo_ortp part of libosmotrau is now optional, can be disabled
for systems on which libortp dependency is too onerous. Fix the
testsuite so it can run when built with --disable-ortp.
Related: OS#6474
Change-Id: I3c59cfab78f58935a5ab6ce7b5f0ed8aadd853a8
---
M tests/Makefile.am
M tests/testsuite.at
2 files changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/37/38137/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 580c38b..a01f381 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -7,10 +7,13 @@
ipa_proxy_test \
subchan_demux/subchan_demux_test \
ipa_recv/ipa_recv_test \
- rtp_test/rtp_test \
trau_sync/trau_sync_test \
trau_pcu_ericsson/trau_pcu_ericsson_test
+if ENABLE_ORTP
+check_PROGRAMS += rtp_test/rtp_test
+endif
+
e1inp_ipa_bsc_test_SOURCES = e1inp_ipa_bsc_test.c
e1inp_ipa_bsc_test_LDADD = $(top_builddir)/src/libosmoabis.la \
$(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS)
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 4dfb793..818e4fa 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -25,6 +25,7 @@
AT_SETUP([rtp_test])
AT_KEYWORDS([rtp_test])
+AT_SKIP_IF([test "x$ENABLE_ORTP" != "xyes"])
cat $abs_srcdir/rtp_test/rtp_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/rtp_test/rtp_test], [ignore], [expout])
AT_CLEANUP
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38137?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I3c59cfab78f58935a5ab6ce7b5f0ed8aadd853a8
Gerrit-Change-Number: 38137
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38136?usp=email )
Change subject: testenv: display current test name on ^C
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38136?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2eb639f47440447ac71027956b9c234323565956
Gerrit-Change-Number: 38136
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Sep 2024 17:34:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38135?usp=email )
Change subject: testenv: on crash, wait until test stopped
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38135?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
Gerrit-Change-Number: 38135
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Sep 2024 17:34:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38135?usp=email )
Change subject: testenv: on crash, wait until test stopped
......................................................................
testenv: on crash, wait until test stopped
When the IUT (or other test component) crashes, wait until
ttcn3-tcpdump-stop.sh has closed the pcap, as otherwise the last
buffered data may be lost.
Add a timeout of 2 minutes in case the test doesn't stop on its own.
I considered making this feature optional, but impatient users can still
immediately kill everything with ^C.
Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
---
M _testenv/testenv/daemons.py
M _testenv/testenv/testsuite.py
M ttcn3-tcpdump-start.sh
M ttcn3-tcpdump-stop.sh
4 files changed, 47 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/38135/1
diff --git a/_testenv/testenv/daemons.py b/_testenv/testenv/daemons.py
index c211cd7..c7e8722 100644
--- a/_testenv/testenv/daemons.py
+++ b/_testenv/testenv/daemons.py
@@ -9,6 +9,7 @@
import testenv
import testenv.testdir
import time
+import sys
daemons = {}
run_shell_on_stop = False
@@ -100,6 +101,24 @@
kill_process_tree(pid, ppids)
+def check_if_crashed():
+ crashed = False
+ for daemon_name, daemon_proc in daemons.items():
+ if not testenv.testsuite.is_running(daemon_proc.pid):
+ crashed = True
+ break
+ if not crashed:
+ return
+
+ current_test = testenv.testsuite.get_current_test()
+ if current_test:
+ logging.error(f"{daemon_name} crashed during {current_test}!")
+ testenv.testsuite.wait_until_test_stopped()
+ else:
+ logging.error(f"{daemon_name} crashed!")
+ sys.exit(1)
+
+
def stop():
global daemons
global run_shell_on_stop
diff --git a/_testenv/testenv/testsuite.py b/_testenv/testenv/testsuite.py
index d14d36f..7a42216 100644
--- a/_testenv/testenv/testsuite.py
+++ b/_testenv/testenv/testsuite.py
@@ -200,9 +200,7 @@
stop()
break
- for daemon_name, daemon_proc in testenv.daemons.daemons.items():
- if not is_running(daemon_proc.pid):
- raise testenv.NoTraceException(f"{daemon_name} crashed!")
+ testenv.daemons.check_if_crashed()
merge_log_files(cfg)
format_log_files(cfg)
@@ -217,6 +215,29 @@
testenv.cmd.run(section_data["prepare"])
+def get_current_test():
+ path = os.path.join(testenv.testdir.testdir, "testsuite/.current_test")
+ try:
+ with open(path, "r") as h:
+ return h.readline().rstrip()
+ except:
+ # File may not exist, e.g. if test was stopped
+ return None
+
+
+def wait_until_test_stopped():
+ path = os.path.join(testenv.testdir.testdir, "testsuite/.current_test")
+
+ logging.debug("Waiting until test has stopped...")
+
+ for i in range(0, 1200):
+ time.sleep(0.1)
+ if not os.path.exists(path):
+ return
+
+ raise testenv.NoTraceError("Timeout in wait_until_test_stopped()")
+
+
def stop():
global testsuite_proc
diff --git a/ttcn3-tcpdump-start.sh b/ttcn3-tcpdump-start.sh
index 4068b26..9575a68 100755
--- a/ttcn3-tcpdump-start.sh
+++ b/ttcn3-tcpdump-start.sh
@@ -120,3 +120,5 @@
fi
done
kill $PID
+
+echo "$TESTCASE" > "$TTCN3_PCAP_PATH/.current_test"
diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh
index 0ac1b5e..def10d8 100755
--- a/ttcn3-tcpdump-stop.sh
+++ b/ttcn3-tcpdump-stop.sh
@@ -83,3 +83,5 @@
PCAP_FILENAME="$TTCN3_PCAP_PATH/$TESTCASE.$i.pcap"
fi
gzip -f "$PCAP_FILENAME"
+
+rm -f "$TTCN3_PCAP_PATH/.current_test"
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38135?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
Gerrit-Change-Number: 38135
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>