[igt-dev] [PATCH i-g-t] tests/vc4_dmabuf_poll: Fix checking for POLLOUT

Neil Roberts nroberts at igalia.com
Thu Mar 11 10:08:25 UTC 2021


This test has two subtests, one which polls for POLLIN on the dmabuf fd,
and the other which looks like it's supposed to poll for POLLOUT. They
are both implemented with a helper function that takes the polling flag
as an argument. It looks like the helper actually ignores the argument
and both subtests end up checking for POLLIN. This just fixes it to use
the argument.

Fixes: da42b17e45c1 ("igt/vc4_dmabuf_poll: Add a test for polling to wait for dmabuf")
Signed-off-by: Neil Roberts <nroberts at igalia.com>
---
 tests/vc4_dmabuf_poll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/vc4_dmabuf_poll.c b/tests/vc4_dmabuf_poll.c
index ac44d4cf..260e30c3 100644
--- a/tests/vc4_dmabuf_poll.c
+++ b/tests/vc4_dmabuf_poll.c
@@ -45,7 +45,7 @@ poll_write_bo_test(int fd, int poll_flag)
 	int dmabuf_fd = prime_handle_to_fd(fd, handle);
 	struct pollfd p = {
 		.fd = dmabuf_fd,
-		.events = POLLIN,
+		.events = poll_flag,
 	};
 	struct drm_vc4_wait_bo wait = {
 		.handle = handle,
-- 
2.29.2



More information about the igt-dev mailing list