test/poll-mshot-wake: ensure multishot is terminated for nested wakes

This tests for a kernel bug with EPOLL_URING_WAKE, where io_uring
uses this flag to detect nested wakes. When this happens, io_uring
will terminate a multishot request. But the kernel side did not
fully propagate the flag for that, EPOLLONESHOT, and hence it did
not terminate the request. This means that the last CQE posted will
still have IORING_CQE_F_MORE set, even though no further CQEs will
be posted from this request.

See:

https://lore.kernel.org/io-uring/bc35ebeb-69f8-491c-98bd-b563b8ff6778@kernel.dk/T/#u

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 files changed