pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34552?usp=email )
Change subject: RTP_Emulation: Log the different failure verdicts before stopping
......................................................................
RTP_Emulation: Log the different failure verdicts before stopping
Change-Id: I177b2f4e56ac89fcab20ba6235bf968ac1873046
---
M library/RTP_Emulation.ttcn
1 file changed, 26 insertions(+), 6 deletions(-)
Approvals:
neels: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 5e10b3f..9095214 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -280,38 +280,49 @@
* check that will fit most situations and is intended to be executed by
* the testcases as as needed. */
function f_rtpem_stats_err_check(RtpemStats s) {
+ var boolean do_stop := false;
log("stats: ", s);
/* Check if there was some activity at either on the RX or on the
* TX side, but complete silence would indicate some problem */
if (s.num_pkts_tx < 1 and s.num_pkts_rx < 1) {
setverdict(fail, "no RTP packet activity detected (packets)");
- mtc.stop;
+ do_stop := true;
}
if (s.bytes_payload_tx < 1 and s.bytes_payload_rx < 1) {
setverdict(fail, "no RTP packet activity detected (bytes)");
- mtc.stop;
+ do_stop := true;
}
/* Check error counters */
if (s.num_pkts_rx_err_seq != 0) {
setverdict(fail, log2str(s.num_pkts_rx_err_seq, " RTP packet sequence number
errors occurred"));
- mtc.stop;
+ do_stop := true;
}
if (s.num_pkts_rx_err_ts != 0) {
setverdict(fail, log2str(s.num_pkts_rx_err_ts, " RTP packet timestamp errors
occurred"));
- mtc.stop;
+ do_stop := true;
}
if (s.num_pkts_rx_err_pt != 0) {
setverdict(fail, log2str(s.num_pkts_rx_err_pt, " RTP packet payload type errors
occurred"));
- mtc.stop;
+ do_stop := true;
}
if (s.num_pkts_rx_err_disabled != 0) {
setverdict(fail, log2str(s.num_pkts_rx_err_disabled, " RTP packets received while
RX was disabled"));
- mtc.stop;
+ do_stop := true;
}
if (s.num_pkts_rx_err_payload != 0) {
setverdict(fail, log2str(s.num_pkts_rx_err_payload, " RTP packets with mismatching
payload received"));
+ do_stop := true;
+ }
+
+ if (do_stop) {
+ if (self == mtc) {
+ /* Properly stop all ports before disconnecting them. This avoids
+ * running into the dynamic testcase error due to messages arriving on
+ * unconnected ports. */
+ all component.stop;
+ }
mtc.stop;
}
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34552?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: I177b2f4e56ac89fcab20ba6235bf968ac1873046
Gerrit-Change-Number: 34552
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged