This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l2-compliance: only do request-queued checks while streaming is off Author: Hans Verkuil <hverkuil-ci...@xs4all.nl> Date: Wed Aug 28 11:39:01 2024 +0200 The checks that verify if the queued request (and associated buffer) is actually in the queued state should only be done while streamon hasn't been called. Otherwise the request might already been processed and is no longer in the queued state, which causes hard to reproduce failures. This also reinstates the V4L2_BUF_FLAG_QUEUED check as that failed for the same reason. That test is fine as long as streamon wasn't called. Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl> Fixes: 37d02fb3e909 ("v4l2-compliance: testRequests(): drop V4L2_BUF_FLAG_QUEUED check") utils/v4l2-compliance/v4l2-test-buffers.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=e87fefa5d0fea252dc128d6d3fb9340056dde3c3 diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index e614bd896996..f5bd18b769a8 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -2699,13 +2699,16 @@ int testRequests(struct node *node, bool test_streaming) break; } fail_on_test_val(ret, ret); - fail_on_test(buf.querybuf(node, i)); - // Check that the buffer is now queued up (i.e. no longer 'IN_REQUEST') - fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_IN_REQUEST); - fail_on_test(!(buf.g_flags() & V4L2_BUF_FLAG_REQUEST_FD)); - // Re-initing or requeuing the request is no longer possible - fail_on_test(doioctl_fd(buf_req_fds[i], MEDIA_REQUEST_IOC_REINIT, nullptr) != EBUSY); - fail_on_test(doioctl_fd(buf_req_fds[i], MEDIA_REQUEST_IOC_QUEUE, nullptr) != EBUSY); + if (i < min_bufs) { + fail_on_test(buf.querybuf(node, i)); + // Check that the buffer is now queued up (i.e. no longer 'IN_REQUEST') + fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_IN_REQUEST); + fail_on_test(!(buf.g_flags() & V4L2_BUF_FLAG_REQUEST_FD)); + fail_on_test(!(buf.g_flags() & V4L2_BUF_FLAG_QUEUED)); + // Re-initing or requeuing the request is no longer possible + fail_on_test(doioctl_fd(buf_req_fds[i], MEDIA_REQUEST_IOC_REINIT, nullptr) != EBUSY); + fail_on_test(doioctl_fd(buf_req_fds[i], MEDIA_REQUEST_IOC_QUEUE, nullptr) != EBUSY); + } if (i >= min_bufs) { // Close some of the request fds to check that this // is safe to do