aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-10-08 09:35:16 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-10-08 09:35:16 +0200
commit3f1c6b85a1a35cb353818cd45acb01b8ff1c3b62 (patch)
tree493a9b2e2979f1e54a6ebdc340cf300439cf4b50 /utils/cec-compliance
parent5287fcd5259bf096564fad68d1f26a0d9c373b72 (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/cec-compliance')
-rw-r--r--utils/cec-compliance/cec-compliance.cpp5
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");

Privacy Policy