From: Hans Verkuil Date: Wed, 22 Jun 2011 14:27:52 +0000 (+0200) Subject: v4l2-compliance: fix QUERYCTRL test when there are no controls. X-Git-Tag: v4l-utils-0.8.5~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a76c2c72d8b249f80f4b169d3d075da6e7f8fbc;p=platform%2Fupstream%2Fv4l-utils.git v4l2-compliance: fix QUERYCTRL test when there are no controls. Signed-off-by: Hans Verkuil --- diff --git a/utils/v4l2-compliance/v4l2-test-controls.cpp b/utils/v4l2-compliance/v4l2-test-controls.cpp index 0d8ff32..35e2aec 100644 --- a/utils/v4l2-compliance/v4l2-test-controls.cpp +++ b/utils/v4l2-compliance/v4l2-test-controls.cpp @@ -179,8 +179,6 @@ int testQueryControls(struct node *node) ret = doioctl(node, VIDIOC_QUERYCTRL, &qctrl); if (ret && ret != EINVAL) return fail("invalid queryctrl return code\n"); - if (ret && id == 0) - return fail("does not support V4L2_CTRL_FLAG_NEXT_CTRL\n"); if (ret) break; if (checkQCtrl(node, qctrl)) @@ -257,6 +255,8 @@ int testQueryControls(struct node *node) priv_user_controls++; } + if (priv_user_controls + user_controls && node->controls.empty()) + return fail("does not support V4L2_CTRL_FLAG_NEXT_CTRL\n"); if (user_controls != user_controls_check) return fail("expected %d user controls, got %d\n", user_controls_check, user_controls);