selftests: ublk: move common code into common.c
authorMing Lei <ming.lei@redhat.com>
Sat, 22 Mar 2025 09:32:12 +0000 (17:32 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 22 Mar 2025 14:35:08 +0000 (08:35 -0600)
commit10d962dae2f6b4a7d86579cc6fe9d8987117fa8f
tree7470dcf413037dc3d5d9cd9e0f605eb557b78b7b
parent9413c0ca8e455efb16b81f2c99061f6eb3d38281
selftests: ublk: move common code into common.c

Move two functions for initializing & de-initializing backing file
into common.c.

Also move one common helper into kublk.h.

Prepare for supporting ublk-stripe.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250322093218.431419-5-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/Makefile
tools/testing/selftests/ublk/common.c [new file with mode: 0644]
tools/testing/selftests/ublk/file_backed.c
tools/testing/selftests/ublk/kublk.h