Re: [PATCH] io_uring: fix error handling for io_uring_cmd

Jens Axboe
2022-08-11T18:08:50Z

On 8/11/22 11:57 AM, Kanchan Joshi wrote:
>>> BTW, we noticed the original issue while testing fixedbufs support.
>>> Thinking to add a liburing test that involves sending a command which
>>> nvme will fail during submission. Can come in handy.
>>
>> I think that's a good idea - if you had eg a NOP linked after a passthru
>> command that failed, then that would catch this case.
>
> Right. For now in liburing test we don't do anything that is guranteed
> to fail from nvme-side. Test issues iopoll (that fails) but that failure
> comes from io_uring itself (as .iopoll is not set). So another test that
> will form a bad passthru command (e.g. wrong nsid) which only nvme can
> (and will) fail.

Yes, that's a good idea in general, testing only successful completions
doesn't really give full coverage.

--
Jens Axboe