Skip to content

Commit

Permalink
selftests: ublk: kublk: fix an error log line
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20250401-ublk_selftests-v1-2-98129c9bc8bb@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Uday Shankar authored and Jens Axboe committed Apr 1, 2025
1 parent 53c9592 commit f8554f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/ublk/kublk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f8554f5

Please sign in to comment.