aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-compliance.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-11-21 14:31:57 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-11-21 14:31:57 +0100
commitf71f136a6891541fd16f2775414affb71f7cf436 (patch)
tree43db7bca0c23013e70f0fa3ca1641699386dfb59 /utils/cec-compliance/cec-compliance.h
parent1fc1ee5e6cd2602f3742ba015d82c476073729ab (diff)
cec-compliance: add -e and -l options
The new -l (--list-tests) option lists all tests that are run, and a list of possible test results. The new -e (--expect) option allows the user to specify expected test results. This makes it possible to e.g. check that an optional feature is actually supported, or that a FAIL result is actually expected. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance/cec-compliance.h')
-rw-r--r--utils/cec-compliance/cec-compliance.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 4b3c163c..b584f57c 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -178,12 +178,15 @@ struct remote_subtest {
bool in_standby;
};
-#define PRESUMED_OK 1
-#define FAIL 2
-#define FAIL_CRITICAL 3
-#define NOTSUPPORTED 4
-#define NOTAPPLICABLE 5
-#define REFUSED 6
+#define FAIL 1
+#define OK_PRESUMED 2
+#define OK_NOT_SUPPORTED 3
+#define OK_REFUSED 4
+#define OK_UNEXPECTED 5
+#define OK_EXPECTED_FAIL 6
+#define NOTAPPLICABLE 7
+#define FAIL_CRITICAL 8
+#define DONT_CARE 255
#define CEC_LOG_ADDR_MASK_ALL 0xffff
@@ -390,6 +393,7 @@ int check_0(const void *p, int len);
int util_receive(struct node *node, unsigned la, unsigned timeout,
struct cec_msg *msg, __u8 sent_msg,
__u8 reply1, __u8 reply2 = 0);
+std::string safename(const char *name);
// CEC adapter tests
int testCap(struct node *node);
@@ -423,6 +427,9 @@ int device_osd_transfer_give(struct node *node, unsigned me, unsigned la, bool i
int testProcessing(struct node *node, unsigned me);
// CEC testing
+void collectTests(void);
+void listTests(void);
+int setExpectedResult(char *optarg);
void testRemote(struct node *node, unsigned me, unsigned la, unsigned test_tags,
bool interactive);

Privacy Policy