Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/io_uring_register: fix poll testing
The test is buggy in that it sets up a ring with a size of 1, and then expects POLLOUT or POLLIN to be set when polling the ring. However, POLLIN will only be set if there are CQEs ready to reap, and the test doesn't ensure that is the case. Which is fine since it's also testing for POLLOUT, however POLLOUT is only true if the ring has SQE entries available. But since it's a ring of size 1 AND the only SQE is already being used, that is not going to be true either. Hence it'll wait forever. This used to work by accident as the internal io_uring test for whether the SQ ring is full or not was buggy, and didn't take into account whether they were committed already or not. Bump the ring size to 2 so that the test will actually (kind of) work. While at it, ensure that we test both SQPOLL and !SQPOLL for the poll testing. Signed-off-by: Jens Axboe <axboe@kernel.dk>
- Loading branch information