aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-12-04 12:13:30 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-12-04 12:13:30 +0100
commitd95200f6b2e12ddac8f9b94ef9fd5ad197897923 (patch)
tree422529cf9e6e138253dae31945baa016d70376d9
parent5ff5635a2671a755f9962f3caf685a2fb779048d (diff)
downloadv4l-utils-d95200f6b2e12ddac8f9b94ef9fd5ad197897923.tar.gz
v4l2-compliance: improve select() check in captureBufs()
This test checks that at least one of the read or write fds are set upon return from select(). But it is possible while streaming that only an event is returned. In that case this check would fail. Add a check for an event (exception) as well. This should solve a regular occuring failure in the compliance test. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-compliance/v4l2-test-buffers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index fbf92653..3122f150 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -990,7 +990,8 @@ static int captureBufs(struct node *node, struct node *node_m2m_cap, const cv4l_
fail_on_test(ret == 0);
fail_on_test(ret < 0);
fail_on_test(!FD_ISSET(node->g_fd(), &rfds) &&
- !FD_ISSET(node->g_fd(), &wfds));
+ !FD_ISSET(node->g_fd(), &wfds) &&
+ !FD_ISSET(node->g_fd(), &efds));
can_read = FD_ISSET(node->g_fd(), &rfds);
have_event = FD_ISSET(node->g_fd(), &efds);
} else if (pollmode == POLL_MODE_EPOLL) {