path: root/utils/cec-compliance/cec-compliance.h
diff options
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-09-30 13:35:25 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-09-30 13:35:25 +0200
commit6c9c63d98d60a4478d0e2a2f45fe0e54793f5582 (patch)
tree86ba59d8ba767dc4cbf5337304104bc7d52d0d48 /utils/cec-compliance/cec-compliance.h
parent9b773c22aee1b871031f3455c519fabb7e789585 (diff)
cec-compliance: add --test-fuzzing option
Add fuzzing support. Randomly generate CEC messages. After every 10 random messages check that you can still get the CEC version from the remote device. This is an initial implementation. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-compliance/cec-compliance.h')
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec-compliance.h
index 023c34d4..9468f535 100644
--- a/utils/cec-compliance/cec-compliance.h
+++ b/utils/cec-compliance/cec-compliance.h
@@ -297,6 +297,7 @@ int cec_named_ioctl(struct node *node, const char *name,
#define doioctl(n, r, p) cec_named_ioctl(n, #r, r, p)
+const char *opcode2s(__u8 opcode);
std::string opcode2s(const struct cec_msg *msg);
static inline bool is_tv(unsigned la, unsigned prim_type)
@@ -400,6 +401,9 @@ int testLostMsgs(struct node *node);
void testAdapter(struct node &node, struct cec_log_addrs &laddrs,
const char *device);
+// CEC fuzzing test
+int testFuzzing(struct node &node, unsigned me, unsigned la);
// CEC core tests
int testCore(struct node *node);
int core_unknown(struct node *node, unsigned me, unsigned la, bool interactive);
@@ -419,7 +423,7 @@ int testProcessing(struct node *node, unsigned me);
void testRemote(struct node *node, unsigned me, unsigned la, unsigned test_tags,
bool interactive);
-// cec-audio.cpp
+// cec-test-audio.cpp
extern struct remote_subtest sac_subtests[];
extern const unsigned sac_subtests_size;
extern struct remote_subtest dal_subtests[];
@@ -429,7 +433,7 @@ extern const unsigned arc_subtests_size;
extern struct remote_subtest audio_rate_ctl_subtests[];
extern const unsigned audio_rate_ctl_subtests_size;
-// cec-power.cpp
+// cec-test-power.cpp
bool util_interactive_ensure_power_state(struct node *node, unsigned me, unsigned la, bool interactive,
__u8 target_pwr);
extern struct remote_subtest standby_subtests[];

Privacy Policy