diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-10-08 09:35:16 +0200 |
---|---|---|
committer | Hans Verkuil <hans.verkuil@cisco.com> | 2018-10-08 09:35:16 +0200 |
commit | 3f1c6b85a1a35cb353818cd45acb01b8ff1c3b62 (patch) | |
tree | 493a9b2e2979f1e54a6ebdc340cf300439cf4b50 /utils | |
parent | 5287fcd5259bf096564fad68d1f26a0d9c373b72 (diff) |
cec-compliance: abort when no remote devices were found
These tests expect that at least one remote device is found.
If not, exit with an error.
Continuing without any remote devices will give weird unexpected
errors, so check for this early on.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/cec-compliance/cec-compliance.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp index 0d3a373b..ad81d80e 100644 --- a/utils/cec-compliance/cec-compliance.cpp +++ b/utils/cec-compliance/cec-compliance.cpp @@ -1308,6 +1308,11 @@ int main(int argc, char **argv) printf("Find remote devices:\n"); printf("\tPolling: %s\n", ok(poll_remote_devs(&node))); + if (!node.remote_la_mask) { + printf("\nFAIL: No remote devices found, exiting.\n"); + exit(1); + } + if (options[OptTestAdapter]) testAdapter(node, laddrs, device); printf("\n"); |