* [PATCH liburing 1/1] tests: remove test_link_fail_ordering()
@ 2021-05-07 16:42 Pavel Begunkov
2021-05-07 16:48 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2021-05-07 16:42 UTC (permalink / raw)
To: Jens Axboe, io-uring
Apparently old kernels were posting CQEs of a link failed during
submission in a strange order, kill the test.
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/link.c | 53 -----------------------------------------------------
1 file changed, 53 deletions(-)
diff --git a/test/link.c b/test/link.c
index fadd0b5..c89d6b2 100644
--- a/test/link.c
+++ b/test/link.c
@@ -429,53 +429,6 @@ err:
return 1;
}
-static int test_link_fail_ordering(struct io_uring *ring)
-{
- struct io_uring_cqe *cqe;
- struct io_uring_sqe *sqe;
- int ret, i, nr_compl;
-
- sqe = io_uring_get_sqe(ring);
- io_uring_prep_nop(sqe);
- sqe->flags |= IOSQE_IO_LINK;
- sqe->user_data = 0;
-
- sqe = io_uring_get_sqe(ring);
- io_uring_prep_write(sqe, -1, NULL, 100, 0);
- sqe->flags |= IOSQE_IO_LINK;
- sqe->user_data = 1;
-
- sqe = io_uring_get_sqe(ring);
- io_uring_prep_nop(sqe);
- sqe->flags |= IOSQE_IO_LINK;
- sqe->user_data = 2;
-
- nr_compl = ret = io_uring_submit(ring);
- /* at least the first nop should have been submitted */
- if (ret < 1) {
- fprintf(stderr, "sqe submit failed: %d\n", ret);
- goto err;
- }
-
- for (i = 0; i < nr_compl; i++) {
- ret = io_uring_wait_cqe(ring, &cqe);
- if (ret) {
- fprintf(stderr, "wait completion %d\n", ret);
- goto err;
- }
- if (cqe->user_data != i) {
- fprintf(stderr, "wrong CQE order, got %i, expected %i\n",
- (int)cqe->user_data, i);
- goto err;
- }
- io_uring_cqe_seen(ring, cqe);
- }
-
- return 0;
-err:
- return 1;
-}
-
int main(int argc, char *argv[])
{
struct io_uring ring, poll_ring;
@@ -539,11 +492,5 @@ int main(int argc, char *argv[])
return ret;
}
- ret = test_link_fail_ordering(&ring);
- if (ret) {
- fprintf(stderr, "test_link_fail_ordering last failed\n");
- return ret;
- }
-
return 0;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH liburing 1/1] tests: remove test_link_fail_ordering()
2021-05-07 16:42 [PATCH liburing 1/1] tests: remove test_link_fail_ordering() Pavel Begunkov
@ 2021-05-07 16:48 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-05-07 16:48 UTC (permalink / raw)
To: Pavel Begunkov, io-uring
On 5/7/21 10:42 AM, Pavel Begunkov wrote:
> Apparently old kernels were posting CQEs of a link failed during
> submission in a strange order, kill the test.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-07 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-07 16:42 [PATCH liburing 1/1] tests: remove test_link_fail_ordering() Pavel Begunkov
2021-05-07 16:48 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox