liburingutils: Use io_uring_peek_batch_cqe API
1: Use io_uring_peek_batch_cqe() API to check if there are CQEs
pending in the ring. If so, consume them before invoking next syscall.
This will ensure that all the CQEs are quickly processed which
are already waiting to be consumed from the ring.
2: Remove TASK_RUN flag. Since wait_cqe() will ensure syscall is
generated, this flag is not required.
3: Add unit test which generates different size messages and verifies
data integrity.
4: Cap the max threads to 1 always.
Bug: 406299670
Test: ./IOUringSocketHandler_tests
[----------] 1024 tests from Io/IOUringSocketHandlerTest (122980 ms total)
[----------] Global test environment tear-down
[==========] 1027 tests from 2 test suites ran. (122986 ms total)
[ PASSED ] 1027 tests.
Change-Id: Ib205018b200f482c211fad3d181dfbe386a737e4
Signed-off-by: Akilesh Kailash <akailash@google.com>
3 files changed