aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-09-28 12:46:11 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-09-28 12:46:11 +0200
commite27b1132220fe57edf98ece8d02d174470c8dc09 (patch)
treebd089ba0207f1b66ec508de831107648c4c3950f /utils/cec-compliance
parent3874aa8eb1ff0c2e103d024ba5af915b1b26f098 (diff)
cec-compliance: improve fail message
Log how many pending messages and transmitted messages there were. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/cec-compliance')
-rw-r--r--utils/cec-compliance/cec-test-adapter.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/utils/cec-compliance/cec-test-adapter.cpp b/utils/cec-compliance/cec-test-adapter.cpp
index 46513d91..4e6d8944 100644
--- a/utils/cec-compliance/cec-test-adapter.cpp
+++ b/utils/cec-compliance/cec-test-adapter.cpp
@@ -1033,9 +1033,13 @@ int testLostMsgs(struct node *node)
while (!doioctl(node, CEC_RECEIVE, &msg))
pending_msgs++;
- /* Should be at least the size of the internal message queue */
- fail_on_test(pending_msgs < 18 * 3);
- fail_on_test(pending_msgs >= xfer_cnt || pending_msgs < xfer_cnt - 2);
+ /*
+ * Should be at least the size of the internal message queue and
+ * close to the number of transmitted messages.
+ */
+ if (pending_msgs < 18 * 3 || pending_msgs >= xfer_cnt || pending_msgs < xfer_cnt - 2)
+ return fail("There were %d pending messages for %d transmitted messages\n",
+ pending_msgs, xfer_cnt);
mode = CEC_MODE_INITIATOR;
fail_on_test(doioctl(node, CEC_S_MODE, &mode));

Privacy Policy