mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] selftests: ublk: fix the fault_inject delay
@ 2026-10-08 14:45 Qiliang Yuan
  2026-10-08 14:45 ` [PATCH 1/2] selftests: ublk: don't keep the fault_inject timespec on the stack Qiliang Yuan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Qiliang Yuan @ 2026-10-08 14:45 UTC (permalink / raw)
  To: Ming Lei, Shuah Khan, Jens Axboe, Uday Shankar
  Cc: Ming Lei, linux-block, linux-kselftest, linux-kernel, Qiliang Yuan

The delay set by --delay_us on the fault_inject target is lost in two
ways. Its timespec is read after it has gone out of scope, which makes
generic_06 fail, and any other completion on the ring ends it early when
more than one I/O is in flight. Patch 1 keeps the timespec alive until
the SQE is submitted, and patch 2 makes the delay a pure timeout.

With both patches, a 1 s delay holds every I/O for 1.000 s at queue
depth 4.

Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
---
Qiliang Yuan (2):
      selftests: ublk: don't keep the fault_inject timespec on the stack
      selftests: ublk: make the fault_inject delay a pure timeout

 tools/testing/selftests/ublk/fault_inject.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
---
base-commit: e1274a6bc40a4618f6fbaebbdc51cca865d51bed
change-id: 20261008-bug-ublk-selftest-fault-inject-delay-46ea414ba226

Best regards,
-- 
Qiliang Yuan <odys.yuan@gmail.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-09 14:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 14:45 [PATCH 0/2] selftests: ublk: fix the fault_inject delay Qiliang Yuan
2026-10-08 14:45 ` [PATCH 1/2] selftests: ublk: don't keep the fault_inject timespec on the stack Qiliang Yuan
2026-10-09 14:07   ` Ming Lei
2026-10-08 14:45 ` [PATCH 2/2] selftests: ublk: make the fault_inject delay a pure timeout Qiliang Yuan
2026-10-09 14:08   ` Ming Lei
2026-10-09 14:37 ` [PATCH 0/2] selftests: ublk: fix the fault_inject delay Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®