diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-02-18 18:30:17 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-18 13:12:35 -0700 |
commit | 0a3b79c82d11f9d9a65351fd9cc130da50f1da65 (patch) | |
tree | c8a4d8da47fbe8f8ee71ab2682641e0959c3c756 | |
parent | d0984a9677c129fda406d749001d9be0d8f45c2f (diff) | |
download | liburing-0a3b79c82d11f9d9a65351fd9cc130da50f1da65.tar.gz liburing-0a3b79c82d11f9d9a65351fd9cc130da50f1da65.tar.bz2 |
test: don't expect links to be partially executed
When we link a buggy request, the whole link collected by that moment
may be cancelled even before it got issued. Don't expect it to be
partially executed.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | test/register-restrictions.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/register-restrictions.c b/test/register-restrictions.c index 04a0ed9..bcae67c 100644 --- a/test/register-restrictions.c +++ b/test/register-restrictions.c @@ -351,13 +351,19 @@ static int test_restrictions_flags(void) io_uring_sqe_set_flags(sqe, IOSQE_FIXED_FILE | IOSQE_IO_LINK); sqe->user_data = 3; + ret = io_uring_submit(&ring); + if (ret != 3) { + fprintf(stderr, "submit: %d\n", ret); + return TEST_FAILED; + } + sqe = io_uring_get_sqe(&ring); io_uring_prep_writev(sqe, 1, &vec, 1, 0); io_uring_sqe_set_flags(sqe, IOSQE_FIXED_FILE | IOSQE_IO_DRAIN); sqe->user_data = 4; ret = io_uring_submit(&ring); - if (ret != 4) { + if (ret != 1) { fprintf(stderr, "submit: %d\n", ret); return TEST_FAILED; } |