laforge has submitted this change. ( 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(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
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: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
Gerrit-Change-Number: 38135
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38136?usp=email )
Change subject: testenv: display current test name on ^C
......................................................................
testenv: display current test name on ^C
When running a whole testsuite and getting a lot of output, it can be
useful to know which test was currently running when pressing ^C. Now
that we have a function that provides this information, show it to the
user.
Change-Id: I2eb639f47440447ac71027956b9c234323565956
---
M _testenv/testenv.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/_testenv/testenv.py b/_testenv/testenv.py
index 6ed1e51..e1f1210 100755
--- a/_testenv/testenv.py
+++ b/_testenv/testenv.py
@@ -119,6 +119,9 @@
sys.exit(2)
except KeyboardInterrupt:
print("") # new line
+ test = testenv.testsuite.get_current_test()
+ if test:
+ logging.critical(f"^C during {test}")
testenv.podman.stop()
sys.exit(3)
except:
--
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: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2eb639f47440447ac71027956b9c234323565956
Gerrit-Change-Number: 38136
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/38140?usp=email )
Change subject: spelling.txt: remove teh||the
......................................................................
spelling.txt: remove teh||the
TEH is a valid acronym in Osmocom+Themyscira universe: it stands
for TRAU-like Extension Header, as defined in this spec:
https://www.freecalypso.org/specs/tw-ts-001-v010100.txt
Various Osmocom components now include support for this family
of Themyscira specs, but the linter outright rejects any and all
patches that have a legitimate need to mention this acronym.
Change-Id: I3d429d723e6cf926ecca9a83e36445575786c228
---
M lint/checkpatch/spelling.txt
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/lint/checkpatch/spelling.txt b/lint/checkpatch/spelling.txt
index f60a02f..6cfb584 100644
--- a/lint/checkpatch/spelling.txt
+++ b/lint/checkpatch/spelling.txt
@@ -1439,7 +1439,6 @@
targetted||targeted
targetting||targeting
taskelt||tasklet
-teh||the
temorary||temporary
temproarily||temporarily
temperture||temperature
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/38140?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I3d429d723e6cf926ecca9a83e36445575786c228
Gerrit-Change-Number: 38140
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: falconia.
laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email )
Change subject: trau2rtp FR & EFR: fix uninitialized memory bug
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
while I tend to agree, we now may end up memset'ing twice.
--
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: comment
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>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Sun, 15 Sep 2024 13:27:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( 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(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
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: merged
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I3c59cfab78f58935a5ab6ce7b5f0ed8aadd853a8
Gerrit-Change-Number: 38137
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38131?usp=email )
Change subject: osmo_trau_frame_decode_8k: fix recognition of O&M UL
......................................................................
osmo_trau_frame_decode_8k: fix recognition of O&M UL
In the case of an O&M frame in UL direction, the bit pattern
in C1-C5 is 01011, not 10011 - see TS 48.061 section 5.2.4.1.1.
Change-Id: I16c6b598ce5c843b5306aa69592a7d66723622d4
---
M src/trau/trau_frame.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 9cb8a66..43b0e6b 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1466,7 +1466,7 @@
return decode8_hr(fr, bits, dir);
case 0x07:
return decode8_data(fr, bits, dir);
- case 0x13:
+ case 0x0B:
return decode8_oam(fr, bits, dir);
}
} else {
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38131?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I16c6b598ce5c843b5306aa69592a7d66723622d4
Gerrit-Change-Number: 38131
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email )
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(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 509021d..9cb8a66 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1376,7 +1376,7 @@
return false;
if (bits[16] != 0 || bits[17] != 1)
return false;
- for (i = 24; i < 20 * 8; i += 16) {
+ for (i = 24; i < 20 * 8; i += 8) {
if (bits[i] != 1)
return false;
}
@@ -1398,7 +1398,7 @@
return false;
if (bits[24] != 0 || bits[25] != 1)
return false;
- for (i = 32; i < 20 * 8; i += 16) {
+ for (i = 32; i < 20 * 8; i += 8) {
if (bits[i] != 1)
return false;
}
--
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: merged
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-Reviewer: laforge <laforge(a)osmocom.org>