public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 2/3] tests: test DEFER_TASKRUN in poll-many
Date: Mon, 16 Jan 2023 16:46:08 +0000	[thread overview]
Message-ID: <ab0dd0f1f8d656ad7e647027c5040d0e99dd8828.1673886955.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

We want to extend DEFER_TASKRUN test coverage for polling, so
make poll-many.c to test it.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 test/poll-many.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/poll-many.c b/test/poll-many.c
index ebf22e8..da3da21 100644
--- a/test/poll-many.c
+++ b/test/poll-many.c
@@ -208,6 +208,20 @@ int main(int argc, char *argv[])
 		return T_EXIT_FAIL;
 	}
 	io_uring_queue_exit(&ring);
+
+	if (t_probe_defer_taskrun()) {
+		params.flags |= IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN;
+		ret = io_uring_queue_init_params(RING_SIZE, &ring, &params);
+		if (ret) {
+			fprintf(stderr, "ring DEFER setup failed: %d\n", ret);
+			return T_EXIT_FAIL;
+		}
+		if (do_test(&ring)) {
+			fprintf(stderr, "test (DEFER) failed\n");
+			return T_EXIT_FAIL;
+		}
+		io_uring_queue_exit(&ring);
+	}
 	return 0;
 err_nofail:
 	fprintf(stderr, "poll-many: not enough files available (and not root), "
-- 
2.38.1


  parent reply	other threads:[~2023-01-16 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 16:46 [PATCH liburing 0/3] test lazy poll wq activation Pavel Begunkov
2023-01-16 16:46 ` [PATCH liburing 1/3] tests: refactor poll-many.c Pavel Begunkov
2023-01-16 16:46 ` Pavel Begunkov [this message]
2023-01-16 16:46 ` [PATCH liburing 3/3] tests: lazy pollwq activation for disabled rings Pavel Begunkov
2023-01-16 17:49 ` [PATCH liburing 0/3] test lazy poll wq activation Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab0dd0f1f8d656ad7e647027c5040d0e99dd8828.1673886955.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox