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, chase xd <sl1589472800@gmail.com>
Subject: [RFC 0/2] mock files for advanced io_uring testing
Date: Thu, 22 May 2025 16:10:05 +0100	[thread overview]
Message-ID: <cover.1747922436.git.asml.silence@gmail.com> (raw)

There are core io_uring features that are hard to test without having
some specific file types. That includes various read/write and polling
edge cases, but the problem got even more distinct with the introduction
of commands and io_uring adding new features for them.

For improving testing we need a finer control over file behaviour. Add
special / mock files we can create and configure. First, the file is
implementing a set of io_uring commands that uses various cmd io_uring
features.
Chase also suggestedd adding read/write/poll file operations and varying
their characteristics: pollability, nowait support, whether the IO is
async, etc., which will be added in the future.

Liburing tests:

https://github.com/isilence/liburing/tree/mock-file-tests
git https://github.com/isilence/liburing.git mock-file-tests

Pavel Begunkov (2):
  io_uring/mock: add basic infra for test mock files
  io_uring/mock: add cmd using vectored regbufs

 init/Kconfig         |  11 +++
 io_uring/Makefile    |   1 +
 io_uring/mock_file.c | 207 +++++++++++++++++++++++++++++++++++++++++++
 io_uring/mock_file.h |  34 +++++++
 4 files changed, 253 insertions(+)
 create mode 100644 io_uring/mock_file.c
 create mode 100644 io_uring/mock_file.h

-- 
2.49.0


             reply	other threads:[~2025-05-22 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 15:10 Pavel Begunkov [this message]
2025-05-22 15:10 ` [PATCH 1/2] io_uring/mock: add basic infra for test mock files Pavel Begunkov
2025-05-22 15:10 ` [PATCH 2/2] io_uring/mock: add cmd using vectored regbufs Pavel Begunkov

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.1747922436.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=sl1589472800@gmail.com \
    /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