v4l2-compliance: add event order test
PATCH 1/1 v4l2-compliance: add event order test
Add a new vivid-specific test to verify the order in which control events arrive. 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]>
--- utils/v4l2-compliance/v4l2-compliance.cpp | 2 + utils/v4l2-compliance/v4l2-compliance.h | 3 ++ utils/v4l2-compliance/v4l2-test-controls.cpp | 48 ++++++++++++++++++++ 3 files changed, 53 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 +3 -0
@@ -82,6 +82,8 @@ 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_STRING (VIVID_CID_CUSTOM_BASE + 5)#define VIVID_CID_AREA (VIVID_CID_CUSTOM_BASE + 11)
@@ -355,6 +357,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 +48 -0
54 lines not on this page · raw message
Signature · 1 line
2.51.0