public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com
Subject: [PATCH v5 0/6] io_uring/mock: add basic infra for test mock files
Date: Mon, 30 Jun 2025 19:16:50 +0100	[thread overview]
Message-ID: <cover.1750599274.git.asml.silence@gmail.com> (raw)

io_uring commands provide an ioctl style interface for files to
implement file specific operations. io_uring provides many features and
advanced api to commands, and it's getting hard to test as it requires
specific files/devices.

Add basic infrastucture for creating special mock files that will be
implementing the cmd api and using various io_uring features we want to
test. It'll also be useful to test some more obscure read/write/polling
edge cases in the future, which was initially suggested by Chase.

v5: moves headers to uapi/
    taint the kernel
v4: require CAP_ADMIN and limit to KASAN builds
v3: fix memleak, + release fop callback
v2: add rw support with basic options
    implement features not as bitmask but sequence number

Pavel Begunkov (6):
  io_uring/mock: add basic infra for test mock files
  io_uring/mock: add cmd using vectored regbufs
  io_uring/mock: add sync read/write
  io_uring/mock: allow to choose FMODE_NOWAIT
  io_uring/mock: support for async read/write
  io_uring/mock: add trivial poll handler

 MAINTAINERS                             |   1 +
 include/uapi/linux/io_uring/mock_file.h |  47 +++
 init/Kconfig                            |  11 +
 io_uring/Makefile                       |   1 +
 io_uring/mock_file.c                    | 363 ++++++++++++++++++++++++
 5 files changed, 423 insertions(+)
 create mode 100644 include/uapi/linux/io_uring/mock_file.h
 create mode 100644 io_uring/mock_file.c

-- 
2.49.0


             reply	other threads:[~2025-06-30 18:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30 18:16 Pavel Begunkov [this message]
2025-06-30 18:16 ` [PATCH v5 1/6] io_uring/mock: add basic infra for test mock files Pavel Begunkov
2025-06-30 18:16 ` [PATCH v5 2/6] io_uring/mock: add cmd using vectored regbufs Pavel Begunkov
2025-06-30 18:16 ` [PATCH v5 3/6] io_uring/mock: add sync read/write Pavel Begunkov
2025-06-30 18:16 ` [PATCH v5 4/6] io_uring/mock: allow to choose FMODE_NOWAIT Pavel Begunkov
2025-06-30 18:16 ` [PATCH v5 5/6] io_uring/mock: support for async read/write Pavel Begunkov
2025-06-30 18:16 ` [PATCH v5 6/6] io_uring/mock: add trivial poll handler Pavel Begunkov
2025-07-02 14:17 ` [PATCH v5 0/6] io_uring/mock: add basic infra for test mock files 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=cover.1750599274.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /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