aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-29 16:38:36 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-29 16:38:36 (GMT)
commit0852e053d764ac780263bb834b4138eabe368dbb (patch)
treeea7dadc7b421d50745949df5677055145288bbb2
parent0caa3c7d126cc4c2ee53e075cda16368ff295255 (diff)
v4l2-compliance: fix broken test if the Request API is disabled
If the Request API is disabled in the kernel, then the test that allocates a request object fails. But in that case the ioctl returns ENOTTY, so that should just be returned and it shouldn't fail. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-compliance/v4l2-test-buffers.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index fcfa68e..f51a001 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -1600,7 +1600,12 @@ int testRequests(struct node *node, bool test_streaming)
ctrls.request_fd = 10;
fail_on_test(doioctl(node, VIDIOC_G_EXT_CTRLS, &ctrls) != EINVAL);
}
- fail_on_test(doioctl_fd(media_fd, MEDIA_IOC_REQUEST_ALLOC, &req_fd));
+ ret = doioctl_fd(media_fd, MEDIA_IOC_REQUEST_ALLOC, &req_fd);
+ if (ret == ENOTTY) {
+ fail_on_test(node->buf_caps & V4L2_BUF_CAP_SUPPORTS_REQUESTS);
+ return ENOTTY;
+ }
+ fail_on_test(ret);
fhs.add(req_fd);
fail_on_test(req_fd < 0);
if (have_controls) {

Privacy Policy