public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] io_uring/mock: add basic infra for test mock files
@ 2025-05-30 12:51 Pavel Begunkov
  2025-05-30 12:51 ` [PATCH v4 1/6] " Pavel Begunkov
                   ` (5 more replies)
  0 siblings, 6 replies; 31+ messages in thread
From: Pavel Begunkov @ 2025-05-30 12:51 UTC (permalink / raw)
  To: io-uring; +Cc: asml.silence

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.

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

 init/Kconfig         |  11 ++
 io_uring/Makefile    |   1 +
 io_uring/mock_file.c | 357 +++++++++++++++++++++++++++++++++++++++++++
 io_uring/mock_file.h |  47 ++++++
 4 files changed, 416 insertions(+)
 create mode 100644 io_uring/mock_file.c
 create mode 100644 io_uring/mock_file.h

-- 
2.49.0


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2025-06-02 15:41 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-30 12:51 [PATCH v4 0/6] io_uring/mock: add basic infra for test mock files Pavel Begunkov
2025-05-30 12:51 ` [PATCH v4 1/6] " Pavel Begunkov
2025-05-30 13:28   ` Jens Axboe
2025-05-30 13:57     ` Pavel Begunkov
2025-05-30 14:36       ` Jens Axboe
2025-05-30 14:09     ` Pavel Begunkov
2025-05-30 14:12       ` Pavel Begunkov
2025-05-30 14:26         ` Pavel Begunkov
2025-05-30 14:41           ` Jens Axboe
2025-05-30 15:11             ` Pavel Begunkov
2025-05-30 15:30               ` Jens Axboe
2025-05-30 18:14                 ` Pavel Begunkov
2025-06-02 15:19                   ` Jens Axboe
2025-06-02 15:31                     ` Pavel Begunkov
2025-06-02 15:41                       ` Jens Axboe
2025-05-30 18:04   ` Keith Busch
2025-05-30 18:21     ` Pavel Begunkov
2025-06-02 13:44       ` Jens Axboe
2025-05-30 12:51 ` [PATCH v4 2/6] io_uring/mock: add cmd using vectored regbufs Pavel Begunkov
2025-05-30 13:25   ` Jens Axboe
2025-05-30 13:40     ` Pavel Begunkov
2025-05-30 14:37       ` Jens Axboe
2025-05-30 14:53         ` Pavel Begunkov
2025-05-30 15:34           ` Jens Axboe
2025-05-30 12:52 ` [PATCH v4 3/6] io_uring/mock: add sync read/write Pavel Begunkov
2025-05-30 12:52 ` [PATCH v4 4/6] io_uring/mock: allow to choose FMODE_NOWAIT Pavel Begunkov
2025-05-30 12:52 ` [PATCH v4 5/6] io_uring/mock: support for async read/write Pavel Begunkov
2025-05-30 13:27   ` Jens Axboe
2025-05-30 13:49     ` Pavel Begunkov
2025-05-30 14:38       ` Jens Axboe
2025-05-30 12:52 ` [PATCH v4 6/6] io_uring/mock: add trivial poll handler Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox