selftests: ublk: add functional test for per io daemons
authorUday Shankar <ushankar@purestorage.com>
Thu, 29 May 2025 23:47:16 +0000 (17:47 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 30 May 2025 13:06:52 +0000 (07:06 -0600)
commit5e580d6b7e2004e308148a67d9ade3f26fd5949d
tree2e3cae89ad9c53d3d644f3d0f9cefeb77f8b878b
parent5163fa0f106d7a31c185559f95c7afd3672e69e6
selftests: ublk: add functional test for per io daemons

Add a new test test_generic_12 which:

- sets up a ublk server with per_io_tasks and a different number of ublk
  server threads and ublk_queues. This is possible now that these
  objects are decoupled
- runs some I/O load from a single CPU
- verifies that all the ublk server threads handle some I/O

Before this changeset, this test fails, since I/O issued from one CPU is
always handled by the one ublk server thread. After this changeset, the
test passes.

In the future, the last check above may be strengthened to "verify that
all ublk server threads handle the same amount of I/O." However, this
requires some adjustments/bugfixes to tag allocation, so this work is
postponed to a followup.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-7-e9d3b119336a@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/Makefile
tools/testing/selftests/ublk/test_generic_12.sh [new file with mode: 0755]
tools/testing/selftests/ublk/trace/count_ios_per_tid.bt [new file with mode: 0644]