v4l2-compliance: add event order test
PATCH v2 1/1 v4l2-compliance: add event order test
Add a new vivid-specific test to verify the order in which control events arrive and whether the correct sequence counters are reported.
This verifies the behavior of this kernel patch:
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
Signed-off-by Hans Verkuil <[email protected]>
---
Changes since v1: validate sequence counters in the events.
--- utils/v4l2-compliance/v4l2-compliance.cpp | 2 + utils/v4l2-compliance/v4l2-compliance.h | 4 ++ utils/v4l2-compliance/v4l2-test-controls.cpp | 62 ++++++++++++++++++++ 3 files changed, 68 insertions(+)
utils/v4l2-compliance/v4l2-compliance.cpp +2 -0
@@ -1440,6 +1440,8 @@ void testNode(struct node &node, struct node &node_m2m_cap, struct node &expbuf_ printf("\ttest VIDIOC_G/S_CTRL: %s\n", ok(testSimpleControls(&node))); printf("\ttest VIDIOC_G/S/TRY_EXT_CTRLS: %s\n", ok(testExtendedControls(&node))); printf("\ttest VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: %s\n", ok(testEvents(&node))); + if (is_vivid) + printf("\ttest Control Events: %s\n", ok(testVividEvents(&node))); printf("\ttest VIDIOC_G/S_JPEGCOMP: %s\n", ok(testJpegComp(&node))); printf("\tStandard Controls: %d Private Controls: %d\n", node.std_controls - node.std_compound_controls,
utils/v4l2-compliance/v4l2-compliance.h +4 -0
@@ -82,7 +82,10 @@ enum poll_mode {#define VIVID_CID_REQ_VALIDATE_ERROR (VIVID_CID_VIVID_BASE + 72)#define VIVID_CID_CUSTOM_BASE (V4L2_CID_USER_BASE | 0xf000) +#define VIVID_CID_BOOLEAN (VIVID_CID_CUSTOM_BASE + 1) +#define VIVID_CID_INTEGER (VIVID_CID_CUSTOM_BASE + 2)#define VIVID_CID_INTEGER64 (VIVID_CID_CUSTOM_BASE + 3) +#define VIVID_CID_MENU (VIVID_CID_CUSTOM_BASE + 4)#define VIVID_CID_STRING (VIVID_CID_CUSTOM_BASE + 5)#define VIVID_CID_AREA (VIVID_CID_CUSTOM_BASE + 11)#define VIVID_CID_RO_INTEGER (VIVID_CID_CUSTOM_BASE + 12)
@@ -355,6 +358,7 @@ int testQueryControls(struct node *node);int testSimpleControls (struct node *node);int testExtendedControls (struct node *node);int testEvents (struct node *node); +int testVividEvents (struct node *node);int testVividDisconnect (struct node *node);int testJpegComp (struct node *node);
utils/v4l2-compliance/v4l2-test-controls.cpp +62 -0
68 lines not on this page · raw message
Signature · 1 line
2.51.0