From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org, Keith Busch <kbusch@kernel.org>,
Ming Lei <ming.lei@redhat.com>
Subject: [PATCH V3 0/3] selftests: add ublk selftests
Date: Sat, 1 Mar 2025 00:19:13 +0800 [thread overview]
Message-ID: <20250228161919.2869102-1-ming.lei@redhat.com> (raw)
Hello Jens,
This patchset adds ublk kernel selftests, which is very handy for
developer for verifying kernel change, especially ublk heavily depends
on io_uring subsystem. Also it provides template for target implementation.
Please consider it for v6.15.
The 1st patch adds one ublk utility and one entry test.
The 2nd patch adds test over file backed ublk.
The 3rd patch adds test for ublk zero copy.
How to run:
- make install
- make headers_install INSTALL_HDR_PATH=/usr # in case UAPI is changed
- reboot
- make -C tools/testing/selftests TARGETS=ublk run_test
Thanks,
V3:
- re-organize code, and move target code into standalone source file
- fix one error handling bug
- add licence tag
- add dma limit for zero copy file backed target
- kill checkpatch ERROR
V2:
- fix one sqe allocation bug, so ublk zero copy with io_link can pass
- dump log in case of error
- add one more test for mkfs/mount on zero copy
Ming Lei (3):
selftests: ublk: add kernel selftests for ublk
selftests: ublk: add file backed ublk
selftests: ublk: add ublk zero copy test
MAINTAINERS | 1 +
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/ublk/.gitignore | 3 +
tools/testing/selftests/ublk/Makefile | 16 +
tools/testing/selftests/ublk/config | 1 +
tools/testing/selftests/ublk/file_backed.c | 220 ++++
tools/testing/selftests/ublk/kublk.c | 1110 ++++++++++++++++++
tools/testing/selftests/ublk/kublk.h | 326 +++++
tools/testing/selftests/ublk/null.c | 38 +
tools/testing/selftests/ublk/test_common.sh | 113 ++
tools/testing/selftests/ublk/test_loop_01.sh | 31 +
tools/testing/selftests/ublk/test_loop_02.sh | 22 +
tools/testing/selftests/ublk/test_loop_03.sh | 33 +
tools/testing/selftests/ublk/test_loop_04.sh | 22 +
tools/testing/selftests/ublk/test_null_01.sh | 19 +
15 files changed, 1956 insertions(+)
create mode 100644 tools/testing/selftests/ublk/.gitignore
create mode 100644 tools/testing/selftests/ublk/Makefile
create mode 100644 tools/testing/selftests/ublk/config
create mode 100644 tools/testing/selftests/ublk/file_backed.c
create mode 100644 tools/testing/selftests/ublk/kublk.c
create mode 100644 tools/testing/selftests/ublk/kublk.h
create mode 100644 tools/testing/selftests/ublk/null.c
create mode 100755 tools/testing/selftests/ublk/test_common.sh
create mode 100755 tools/testing/selftests/ublk/test_loop_01.sh
create mode 100755 tools/testing/selftests/ublk/test_loop_02.sh
create mode 100755 tools/testing/selftests/ublk/test_loop_03.sh
create mode 100755 tools/testing/selftests/ublk/test_loop_04.sh
create mode 100755 tools/testing/selftests/ublk/test_null_01.sh
--
2.47.0
next reply other threads:[~2025-02-28 16:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 16:19 Ming Lei [this message]
2025-02-28 16:19 ` [PATCH V3 1/3] selftests: ublk: add kernel selftests for ublk Ming Lei
2025-02-28 16:19 ` [PATCH V3 2/3] selftests: ublk: add file backed ublk Ming Lei
2025-02-28 16:19 ` [PATCH V3 3/3] selftests: ublk: add ublk zero copy test Ming Lei
2025-02-28 16:37 ` [PATCH V3 0/3] selftests: add ublk selftests Jens Axboe
2025-03-01 1:11 ` Ming Lei
2025-03-01 2:19 ` Jens Axboe
2025-02-28 16:38 ` 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=20250228161919.2869102-1-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kselftest@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