diff options
author | Hans Verkuil <hansverk@cisco.com> | 2018-09-14 15:33:07 +0200 |
---|---|---|
committer | Hans Verkuil <hansverk@cisco.com> | 2018-09-14 15:33:07 +0200 |
commit | a919d8cf8a8147bca388c1a41f706f4b4c6f5023 (patch) | |
tree | f99178047fc8047cec2914f8efc82e23df93841f /utils | |
parent | 23a83f637f3c8777e798ab27b420333574330657 (diff) |
cec-compliance: improve adapter test
There is a failure that checks the msg.len after sending a message.
It fails because the transmit times out waiting for a reply.
This fail is very confusing, so improve the test to make it easy to
see that it timed out.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/cec-compliance/cec-test-adapter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/cec-compliance/cec-test-adapter.cpp b/utils/cec-compliance/cec-test-adapter.cpp index 9f47038c..14395ac6 100644 --- a/utils/cec-compliance/cec-test-adapter.cpp +++ b/utils/cec-compliance/cec-test-adapter.cpp @@ -308,6 +308,9 @@ int testTransmit(struct node *node) msg.flags &= ~CEC_MSG_FL_REPLY_TO_FOLLOWERS; cec_msg_give_physical_addr(&msg, true); fail_on_test(doioctl(node, CEC_TRANSMIT, &msg)); + fail_on_test(!(msg.tx_status & CEC_TX_STATUS_OK)); + fail_on_test(msg.rx_status & CEC_RX_STATUS_TIMEOUT); + fail_on_test(!(msg.rx_status & CEC_RX_STATUS_OK)); fail_on_test(msg.len != 5); fail_on_test(check_0(msg.msg + msg.len, sizeof(msg.msg) - msg.len)); fail_on_test(msg.timeout != 1001); @@ -318,7 +321,6 @@ int testTransmit(struct node *node) fail_on_test(msg.rx_status & ~0x07); fail_on_test(msg.tx_ts == 0 || msg.tx_ts == ~0ULL); fail_on_test(msg.rx_ts <= msg.tx_ts); - fail_on_test(!(msg.tx_status & CEC_TX_STATUS_OK)); fail_on_test((msg.tx_status & tx_ok_retry_mask) == tx_ok_retry_mask); fail_on_test(msg.tx_nack_cnt == 0xff); fail_on_test(msg.tx_arb_lost_cnt == 0xff); |