RTP_Emulation: Log the different failure verdicts before stopping

Change-Id: I177b2f4e56ac89fcab20ba6235bf968ac1873046
This commit is contained in:
Pau Espin 2023-09-27 18:14:27 +02:00 committed by pespin
parent 60c69a1ba0
commit 64f2086e68
1 changed files with 17 additions and 6 deletions

View File

@ -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;
}
}