From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
<[email protected]>
Cc: <[email protected]>, Dylan Yudaken <[email protected]>
Subject: [PATCH liburing 03/11] add a t_probe_defer_taskrun helper function for tests
Date: Mon, 15 Aug 2022 06:09:39 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Help tests to determine if they can use IORING_SETUP_DEFER_TASKRUN
Signed-off-by: Dylan Yudaken <[email protected]>
---
test/helpers.c | 12 ++++++++++++
test/helpers.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/test/helpers.c b/test/helpers.c
index 014653313f41..12ae727accef 100644
--- a/test/helpers.c
+++ b/test/helpers.c
@@ -235,3 +235,15 @@ errno_cleanup:
close(fd[1]);
return ret;
}
+
+bool t_probe_defer_taskrun(void)
+{
+ struct io_uring ring;
+ int ret;
+
+ ret = io_uring_queue_init(1, &ring, IORING_SETUP_DEFER_TASKRUN);
+ if (ret < 0)
+ return false;
+ io_uring_queue_exit(&ring);
+ return true;
+}
diff --git a/test/helpers.h b/test/helpers.h
index 6d5726c9deb6..efce4b344f87 100644
--- a/test/helpers.h
+++ b/test/helpers.h
@@ -75,6 +75,8 @@ enum t_setup_ret t_register_buffers(struct io_uring *ring,
const struct iovec *iovecs,
unsigned nr_iovecs);
+bool t_probe_defer_taskrun(void);
+
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#ifdef __cplusplus
--
2.30.2
next prev parent reply other threads:[~2022-08-15 13:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 13:09 [PATCH liburing 00/11] Defer taskrun changes Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 01/11] Copy defer task run definition from kernel Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 02/11] add io_uring_submit_and_get_events and io_uring_get_events Dylan Yudaken
2022-08-15 13:09 ` Dylan Yudaken [this message]
2022-08-15 13:09 ` [PATCH liburing 04/11] update existing tests for defer taskrun Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 05/11] add a defer-taskrun test Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 06/11] fix documentation shortenings Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 07/11] update io_uring_enter.2 docs for IORING_FEAT_NODROP Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 08/11] add docs for overflow lost errors Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 09/11] expose CQ ring overflow state Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 10/11] overflow: add tests Dylan Yudaken
2022-08-15 13:09 ` [PATCH liburing 11/11] file-verify test: log if short read Dylan Yudaken
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 \
[email protected] \
[email protected] \
[email protected] \
[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