summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authoryangerkun <yangerkun@huawei.com>2019-10-21 20:02:17 +0800
committerJens Axboe <axboe@kernel.dk>2019-10-21 08:29:02 -0600
commita4b465536021ee9c4d6d450a9461ddfc116d08b1 (patch)
tree4308a1ee96b8ba70ac20a76a8b2d79c7949bc637 /test/Makefile
parent6b998558791ae8fab37967d44e8da39d6921d0a8 (diff)
downloadliburing-a4b465536021ee9c4d6d450a9461ddfc116d08b1.tar.gz
liburing-a4b465536021ee9c4d6d450a9461ddfc116d08b1.tar.bz2
Add test for overflow of timeout request's sequence
Before 5da0fb1ab34c ("io_uring: consider the overflow of sequence for timeout req"). We can meet some situation like below: 1. setup 2. prepare 4 timeout req which expected count is 1,1,2,UINT_MAX, and the sequence of this 4 requests will be 1,2,4,2, this 4 requests will not lead the change of cached_cq_tail and sq_dropped until the timeout really happened. So the tail_index in io_timeout will still be 0. 3. based on the above and before this patch, the order of timeout_list will be req1->req2->req4->req3, which the right order should be req1->req2->req3->req4. 4. setup two nop requests. And the timeout requests will return correctly with the patch. Add this testcase to cover it. Signed-off-by: yangerkun <yangerkun@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile
index 7736671..93249d4 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -8,7 +8,7 @@ all_targets += poll poll-cancel ring-leak fsync io_uring_setup io_uring_register
send_recvmsg a4c0b3decb33-test 500f9fbadef8-test timeout \
sq-space_left stdout cq-ready cq-peek-batch file-register \
cq-size 8a9973408177-test a0908ae19763-test 232c93d07b74-test \
- socket-rw accept
+ socket-rw accept timeout-overflow
include ../Makefile.quiet
@@ -23,7 +23,8 @@ test_srcs := poll.c poll-cancel.c ring-leak.c fsync.c io_uring_setup.c \
eeed8b54e0df-test.c link.c send_recvmsg.c a4c0b3decb33-test.c \
500f9fbadef8-test.c timeout.c sq-space_left.c stdout.c cq-ready.c\
cq-peek-batch.c file-register.c cq-size.c 8a9973408177-test.c \
- a0908ae19763-test.c 232c93d07b74-test.c socket-rw.c accept.c
+ a0908ae19763-test.c 232c93d07b74-test.c socket-rw.c accept.c \
+ timeout-overflow.c
test_objs := $(patsubst %.c,%.ol,$(test_srcs))