linux/tools/testing
Ming Lei 60cf863720 selftests/ublk: add test for async partition scan
Add test_generic_15.sh to verify that async partition scan prevents
IO hang when reading partition tables.

The test creates ublk devices with fault_inject target and very large
delay (60s) to simulate blocked partition table reads, then kills the
daemon to verify proper state transitions without hanging:

1. Without recovery support:
   - Create device with fault_inject and 60s delay
   - Kill daemon while partition scan may be blocked
   - Verify device transitions to DEAD state

2. With recovery support (-r 1):
   - Create device with fault_inject, 60s delay, and recovery
   - Kill daemon while partition scan may be blocked
   - Verify device transitions to QUIESCED state

Before the async partition scan fix, killing the daemon during
partition scan would cause deadlock as partition scan held ub->mutex
while waiting for IO. With the async fix, partition scan happens in
a work function and flush_work() ensures proper synchronization.

Add _add_ublk_dev_no_settle() helper function to skip udevadm settle,
which would otherwise hang waiting for partition scan events to
complete when partition table read is delayed.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-12-28 09:25:26 -07:00
..
crypto/chacha20-s390
cxl
fault-injection
ktest
kunit
memblock
nvdimm nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe() 2025-09-25 12:49:46 -05:00
radix-tree Patch series in this pull request: 2025-10-02 18:44:54 -07:00
rbtree
scatterlist mm: remove nth_page() 2025-09-21 14:22:10 -07:00
selftests selftests/ublk: add test for async partition scan 2025-12-28 09:25:26 -07:00
shared Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
vma Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
vsock vsock/test: Extend transport change null-ptr-deref test 2025-11-25 19:16:21 -08:00