Skip to content

io_uring/mock: add basic infra for test mock files

Pavel Begunkov io-uring 5 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 1 replyApplied
  2. v46 patches 24 repliesSuperseded
  3. v36 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches0 repliesSuperseded
v1 RFC2 patches0 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/6io_uring/mock: add basic infra for test mock filesMAINTAINERS include/uapi/linux/io_uring/mock_file.h init/Kconfig +2 more+183 -00 replies
2/6io_uring/mock: add cmd using vectored regbufsinclude/uapi/linux/io_uring/mock_file.h io_uring/mock_file.c+83 -10 replies
3/6io_uring/mock: add sync read/writeinclude/uapi/linux/io_uring/mock_file.h io_uring/mock_file.c+65 -60 replies
4/6io_uring/mock: allow to choose FMODE_NOWAITinclude/uapi/linux/io_uring/mock_file.h io_uring/mock_file.c+12 -10 replies
5/6io_uring/mock: support for async read/writeinclude/uapi/linux/io_uring/mock_file.h io_uring/mock_file.c+58 -50 replies
6/6io_uring/mock: add trivial poll handlerinclude/uapi/linux/io_uring/mock_file.h io_uring/mock_file.c+37 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/6] io_uring/mock: add basic infra for test mock files

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
Signature · 1 line
2.49.0