add tests for drain io with multishot requests
PATCH 1/1 add tests for drain io with multishot requests
add new tests to test drain io with multishot requests
Signed-off-by Hao Xu <[email protected]>
--- src/include/liburing/io_uring.h | 13 ++++ test/Makefile | 2 + test/multicqes_drain.c | 129 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 test/multicqes_drain.c
src/include/liburing/io_uring.h +13 -0
@@ -74,6 +74,7 @@ enum {IOSQE_IO_HARDLINK_BIT ,IOSQE_ASYNC_BIT ,IOSQE_BUFFER_SELECT_BIT , + IOSQE_MULTI_CQES_BIT, };/*
@@ -91,6 +92,8 @@ enum {#define IOSQE_ASYNC (1U << IOSQE_ASYNC_BIT)/* select buffer from sqe->buf_group */ #define IOSQE_BUFFER_SELECT (1U << IOSQE_BUFFER_SELECT_BIT) +/* may generate multiple cqes */ +#define IOSQE_MULTI_CQES (1U << IOSQE_MULTI_CQES_BIT)/* * io_uring_setup() flags
@@ -165,6 +168,16 @@ enum {#define SPLICE_F_FD_IN_FIXED (1U << 31)/* the last bit of __u32 */ /* +* POLL_ADD flags. Note that since sqe->poll_events is the flag space, the +* command flags for POLL_ADD are stored in sqe->len. +* +* IORING_POLL_UPDATE Update existing poll request, matching +* sqe->addr as the old user_data field. +*/ +#define IORING_POLL_UPDATE_EVENTS (1U << 1) +#define IORING_POLL_UPDATE_USER_DATA (1U << 2) + +/* * IO completion data structure (Completion Queue Entry) */ struct io_uring_cqe {
test/Makefile +2 -0
@@ -115,6 +115,7 @@ test_targets += \ unlink \ wakeup-hang \ sendmsg_fs_cve \ + multicqes_drain # EOL all_targets += $(test_targets)
@@ -253,6 +254,7 @@ test_srcs := \ unlink.c \ wakeup-hang.c \ sendmsg_fs_cve.c \ + multicqes_drain.c # EOL test_objs := $(patsubst %.c,%.ol,$(patsubst %.cc,%.ol,$(test_srcs)))
test/multicqes_drain.c new file +129 -0
129 lines not on this page · raw message
Signature · 1 line
1.8.3.1