Re: [PATCH v2 2/2] selftests: ublk: test that teardown after incomplete recovery completes
From: Ming Lei
Date: Mon Apr 06 2026 - 10:26:36 EST
On Sun, Apr 05, 2026 at 10:25:31PM -0600, Uday Shankar wrote:
> Before the fix, teardown of a ublk server that was attempting to recover
> a device, but died when it had submitted a nonempty proper subset of the
> fetch commands to any queue would loop forever. Add a test to verify
> that, after the fix, teardown completes. This is done by:
>
> - Adding a new argument to the fault_inject target that causes it die
> after fetching a nonempty proper subset of the IOs to a queue
> - Using that argument in a new test while trying to recover an
> already-created device
> - Attempting to delete the ublk device at the end of the test; this
> hangs forever if teardown from the fault-injected ublk server never
> completed.
>
> It was manually verified that the test passes with the fix and hangs
> without it.
>
> Signed-off-by: Uday Shankar <ushankar@xxxxxxxxxxxxxxx>
Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>
Thanks,
Ming