From: Ming Lei <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 0/2] liburing: test: replace ublk test with kernel selftests
Date: Thu, 20 Mar 2025 09:54:00 +0800 [thread overview]
Message-ID: <Z9t1OIWJyzJDCcCW@fedora> (raw)
In-Reply-To: <[email protected]>
On Wed, Mar 19, 2025 at 07:51:02AM -0600, Jens Axboe wrote:
> On 3/19/25 7:47 AM, Jens Axboe wrote:
> > On 3/19/25 3:26 AM, Ming Lei wrote:
> >> Hi Jens,
> >>
> >> The 1st patch removes the liburing ublk test source, and the 2nd patch
> >> adds the test back with the kernel ublk selftest source.
> >>
> >> The original test case is covered, and io_uring kernel fixed buffer and
> >> ublk zero copy is covered too.
> >>
> >> Now the ublk source code is one generic ublk server implementation, and
> >> test code is shell script, this way is flexible & easy to add new tests.
> >
> > Fails locally here, I think you'll need a few ifdefs for having a not
> > completely uptodate header:
> >
> > ublk//kublk.c: In function ?cmd_dev_get_features?:
> > ublk//kublk.c:997:30: error: ?UBLK_F_USER_RECOVERY_FAIL_IO? undeclared (first use in this function); did you mean ?UBLK_F_USER_RECOVERY_REISSUE??
> > 997 | [const_ilog2(UBLK_F_USER_RECOVERY_FAIL_IO)] = "RECOVERY_FAIL_IO",
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > With
> >
> > #ifndef UBLK_F_USER_RECOVERY_FAIL_IO
> > #define UBLK_F_USER_RECOVERY_FAIL_IO (1ULL << 9)
> > #endif
> >
> > added it works as expected for me, but might not be a bad idea to
> > include a few more? Looks like there's a good spot for it in kublk.h
> > where there's already something for UBLK_U_IO_REGISTER_IO_BUF.
> >
> > Outside of that, when running this in my usual vm testing, I see:
> >
> > Running test ublk/test_stress_02.sh modprobe: FATAL: Module ublk_drv not found in directory /lib/modules/6.14.0-rc7-00360-ge07e8363c5e8
> >
> > as I have ublk built-in. The test still runs, but would be nice to
> > get rid of that complaint.
>
> Oh, and looks like it should also skip the test if an argument is
> passed in. My usual setup has 4-5 devices/paths defined for
> testing, and tests that don't take a file argument should just
> skip.
>
> Forgot to mention, that unifying the selftests and liburing test
> is a really good idea! Will make it easier to sync them up and
> get coverage both ways.
Yeah, the kernel selftest side can be thought as upstream, :-)
I just sent three ublk kernel selftest patches, which covers all
the above problems. With the three changes, only three lines of code
change on test_common.sh is needed for liburing test:
```
#liburing
UBLK_TEST_SHOW_RESULT=0
UBLK_SKIP_CODE=77
[ $# -ne 0 ] && exit "$UBLK_SKIP_CODE"
```
Thanks,
Ming
next prev parent reply other threads:[~2025-03-20 1:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 9:26 [PATCH 0/2] liburing: test: replace ublk test with kernel selftests Ming Lei
2025-03-19 9:26 ` [PATCH 1/2] liburing: test: remove test/uring_cmd_ublk.c Ming Lei
2025-03-19 9:26 ` [PATCH 2/2] liburing: test: replace ublk test with kernel selftests Ming Lei
2025-03-19 13:47 ` [PATCH 0/2] " Jens Axboe
2025-03-19 13:51 ` Jens Axboe
2025-03-20 1:54 ` Ming Lei [this message]
2025-03-20 9:22 ` 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=Z9t1OIWJyzJDCcCW@fedora \
[email protected] \
[email protected] \
[email protected] \
/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