selftests: ublk: add generic_01 for verifying sequential IO order
authorMing Lei <ming.lei@redhat.com>
Sat, 22 Mar 2025 09:32:09 +0000 (17:32 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 22 Mar 2025 14:35:08 +0000 (08:35 -0600)
commit723977cab4c0fdcf5ba08da9e30a6ad72efa2464
treeb3228db1bd5a4bcba6396f30a5058a6609a9eb84
parentffde32a49a145a27af07e6acfb0c1d83c26479c4
selftests: ublk: add generic_01 for verifying sequential IO order

block layer, ublk and io_uring might re-order IO in the past

- plug

- queue ublk io command via task work

Add one test for verifying if sequential WRITE IO is dispatched in order.

- null target is taken, so we can just observe io order from
`tracepoint:block:block_rq_complete` which represents the dispatch order

- WRITE IO is taken because READ may come from system-wide utility

Cc: Uday Shankar <ushankar@purestorage.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250322093218.431419-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/Makefile
tools/testing/selftests/ublk/test_common.sh
tools/testing/selftests/ublk/test_generic_01.sh [new file with mode: 0755]
tools/testing/selftests/ublk/trace/seq_io.bt [new file with mode: 0644]