aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-09-27 18:14:27 +0200
committerpespin <pespin@sysmocom.de>2023-09-28 14:36:12 +0000
commit64f2086e68cccfdb601a45aa011ff6ceb6667fc7 (patch)
tree5c0cb020202e3c2491ce628d344614f9d5b3d415
parent60c69a1ba04cbca6249ddc902a91772729915e16 (diff)
RTP_Emulation: Log the different failure verdicts before stopping
-rw-r--r--library/RTP_Emulation.ttcn23
1 files changed, 17 insertions, 6 deletions
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 5e10b3fe..90952148 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -280,38 +280,49 @@ function f_rtpem_stats_compare(RtpemStats a, RtpemStats b, integer tolerance :=
* 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;
}
}