* [PATCH 0/2] ublk: fixes for selftests
@ 2025-04-01 20:49 Uday Shankar
2025-04-01 20:49 ` [PATCH 1/2] selftests: ublk: kublk: use ioctl-encoded opcodes Uday Shankar
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Uday Shankar @ 2025-04-01 20:49 UTC (permalink / raw)
To: Jens Axboe, Ming Lei, Shuah Khan
Cc: linux-block, linux-kselftest, linux-kernel, Uday Shankar
Fix a couple of issues I saw when developing selftests for ublk. These
patches are split out from the following series:
https://lore.kernel.org/linux-block/20250325-ublk_timeout-v1-0-262f0121a7bd@purestorage.com/T/#t
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
---
Uday Shankar (2):
selftests: ublk: kublk: use ioctl-encoded opcodes
selftests: ublk: kublk: fix an error log line
tools/testing/selftests/ublk/kublk.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
base-commit: 4cfcc398357b0fb3d4c97d47d4a9e3c0653b7903
change-id: 20250325-ublk_selftests-6a055dfbc55b
Best regards,
--
Uday Shankar <ushankar@purestorage.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] selftests: ublk: kublk: use ioctl-encoded opcodes
2025-04-01 20:49 [PATCH 0/2] ublk: fixes for selftests Uday Shankar
@ 2025-04-01 20:49 ` Uday Shankar
2025-04-01 20:49 ` [PATCH 2/2] selftests: ublk: kublk: fix an error log line Uday Shankar
2025-04-02 13:12 ` [PATCH 0/2] ublk: fixes for selftests Jens Axboe
2 siblings, 0 replies; 6+ messages in thread
From: Uday Shankar @ 2025-04-01 20:49 UTC (permalink / raw)
To: Jens Axboe, Ming Lei, Shuah Khan
Cc: linux-block, linux-kselftest, linux-kernel, Uday Shankar
There are a couple of places in the kublk selftests ublk server which
use the legacy ublk opcodes. These operations fail (with -EOPNOTSUPP) on
a kernel compiled without CONFIG_BLKDEV_UBLK_LEGACY_OPCODES set. We
could easily require it to be set as a prerequisite for these selftests,
but since new applications should not be using the legacy opcodes, use
the ioctl-encoded opcodes everywhere in kublk.
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
---
tools/testing/selftests/ublk/kublk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index 83756f97c26eecc984da55b8717e99b89470b904..d39f166c9dc31721381184fb27d68347ecab81b6 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -99,7 +99,7 @@ static int __ublk_ctrl_cmd(struct ublk_dev *dev,
static int ublk_ctrl_stop_dev(struct ublk_dev *dev)
{
struct ublk_ctrl_cmd_data data = {
- .cmd_op = UBLK_CMD_STOP_DEV,
+ .cmd_op = UBLK_U_CMD_STOP_DEV,
};
return __ublk_ctrl_cmd(dev, &data);
@@ -169,7 +169,7 @@ static int ublk_ctrl_get_params(struct ublk_dev *dev,
struct ublk_params *params)
{
struct ublk_ctrl_cmd_data data = {
- .cmd_op = UBLK_CMD_GET_PARAMS,
+ .cmd_op = UBLK_U_CMD_GET_PARAMS,
.flags = CTRL_CMD_HAS_BUF,
.addr = (__u64)params,
.len = sizeof(*params),
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] selftests: ublk: kublk: fix an error log line
2025-04-01 20:49 [PATCH 0/2] ublk: fixes for selftests Uday Shankar
2025-04-01 20:49 ` [PATCH 1/2] selftests: ublk: kublk: use ioctl-encoded opcodes Uday Shankar
@ 2025-04-01 20:49 ` Uday Shankar
2025-04-02 13:12 ` [PATCH 0/2] ublk: fixes for selftests Jens Axboe
2 siblings, 0 replies; 6+ messages in thread
From: Uday Shankar @ 2025-04-01 20:49 UTC (permalink / raw)
To: Jens Axboe, Ming Lei, Shuah Khan
Cc: linux-block, linux-kselftest, linux-kernel, Uday Shankar
When doing io_uring operations using liburing, errno is not used to
indicate errors, so the %m format specifier does not provide any
relevant information for failed io_uring commands. Fix a log line
emitted on get_params failure to translate the error code returned in
the cqe->res field instead.
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
---
tools/testing/selftests/ublk/kublk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c
index d39f166c9dc31721381184fb27d68347ecab81b6..91c282bc767449a418cce7fc816dc8e9fc732d6a 100644
--- a/tools/testing/selftests/ublk/kublk.c
+++ b/tools/testing/selftests/ublk/kublk.c
@@ -215,7 +215,7 @@ static void ublk_ctrl_dump(struct ublk_dev *dev)
ret = ublk_ctrl_get_params(dev, &p);
if (ret < 0) {
- ublk_err("failed to get params %m\n");
+ ublk_err("failed to get params %d %s\n", ret, strerror(-ret));
return;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] ublk: fixes for selftests
2025-04-01 20:49 [PATCH 0/2] ublk: fixes for selftests Uday Shankar
2025-04-01 20:49 ` [PATCH 1/2] selftests: ublk: kublk: use ioctl-encoded opcodes Uday Shankar
2025-04-01 20:49 ` [PATCH 2/2] selftests: ublk: kublk: fix an error log line Uday Shankar
@ 2025-04-02 13:12 ` Jens Axboe
2025-04-02 19:34 ` Uday Shankar
2 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2025-04-02 13:12 UTC (permalink / raw)
To: Ming Lei, Shuah Khan, Uday Shankar
Cc: linux-block, linux-kselftest, linux-kernel
On Tue, 01 Apr 2025 14:49:07 -0600, Uday Shankar wrote:
> Fix a couple of issues I saw when developing selftests for ublk. These
> patches are split out from the following series:
>
> https://lore.kernel.org/linux-block/20250325-ublk_timeout-v1-0-262f0121a7bd@purestorage.com/T/#t
>
>
Applied, thanks!
[1/2] selftests: ublk: kublk: use ioctl-encoded opcodes
(no commit info)
[2/2] selftests: ublk: kublk: fix an error log line
(no commit info)
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] ublk: fixes for selftests
2025-04-02 13:12 ` [PATCH 0/2] ublk: fixes for selftests Jens Axboe
@ 2025-04-02 19:34 ` Uday Shankar
2025-04-02 19:42 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Uday Shankar @ 2025-04-02 19:34 UTC (permalink / raw)
To: Jens Axboe
Cc: Ming Lei, Shuah Khan, linux-block, linux-kselftest, linux-kernel
On Wed, Apr 02, 2025 at 07:12:45AM -0600, Jens Axboe wrote:
>
> On Tue, 01 Apr 2025 14:49:07 -0600, Uday Shankar wrote:
> > Fix a couple of issues I saw when developing selftests for ublk. These
> > patches are split out from the following series:
> >
> > https://lore.kernel.org/linux-block/20250325-ublk_timeout-v1-0-262f0121a7bd@purestorage.com/T/#t
> >
> >
>
> Applied, thanks!
>
> [1/2] selftests: ublk: kublk: use ioctl-encoded opcodes
> (no commit info)
> [2/2] selftests: ublk: kublk: fix an error log line
> (no commit info)
Jens, MAINTAINERS parsing didn't add you to this email - I had to do it
manually. Do we need to add you somewhere so you get a copy of all ublk
patches (since you maintain its tree)?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] ublk: fixes for selftests
2025-04-02 19:34 ` Uday Shankar
@ 2025-04-02 19:42 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2025-04-02 19:42 UTC (permalink / raw)
To: Uday Shankar
Cc: Ming Lei, Shuah Khan, linux-block, linux-kselftest, linux-kernel
On 4/2/25 1:34 PM, Uday Shankar wrote:
> On Wed, Apr 02, 2025 at 07:12:45AM -0600, Jens Axboe wrote:
>>
>> On Tue, 01 Apr 2025 14:49:07 -0600, Uday Shankar wrote:
>>> Fix a couple of issues I saw when developing selftests for ublk. These
>>> patches are split out from the following series:
>>>
>>> https://lore.kernel.org/linux-block/20250325-ublk_timeout-v1-0-262f0121a7bd@purestorage.com/T/#t
>>>
>>>
>>
>> Applied, thanks!
>>
>> [1/2] selftests: ublk: kublk: use ioctl-encoded opcodes
>> (no commit info)
>> [2/2] selftests: ublk: kublk: fix an error log line
>> (no commit info)
>
> Jens, MAINTAINERS parsing didn't add you to this email - I had to do it
> manually. Do we need to add you somewhere so you get a copy of all ublk
> patches (since you maintain its tree)?
It's under ublk, so it should go to linux-block. That should be good
enough, I'll see them.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-02 19:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 20:49 [PATCH 0/2] ublk: fixes for selftests Uday Shankar
2025-04-01 20:49 ` [PATCH 1/2] selftests: ublk: kublk: use ioctl-encoded opcodes Uday Shankar
2025-04-01 20:49 ` [PATCH 2/2] selftests: ublk: kublk: fix an error log line Uday Shankar
2025-04-02 13:12 ` [PATCH 0/2] ublk: fixes for selftests Jens Axboe
2025-04-02 19:34 ` Uday Shankar
2025-04-02 19:42 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).