Re: [PATCH 0/2] liburing: test: replace ublk test with kernel selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/19/25 13:47, 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.

It might be easier to duplicate ublk_cmd.h under tests/ublk, hmm?

And just a reminder, liburing and hence this test will often be run
on kernels that don't have particular ublk features or where ublk is
not implemented / available at all, and we should skip the tests in
such cases, that would be the main difference to a typical selftest.
But maybe it's already handled, and I worry for nothing.

--
Pavel Begunkov





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux