mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
selftests: ublk: add UBLK_F_IO_DESC_SIZE test
Add test loop_08, which creates a ublk device with UBLK_F_IO_DESC_SIZE enabled and io_desc_size set to 64. The test issues verified I/O to the device using fio. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Link: https://patch.msgid.link/20260803211441.2538144-8-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
fc01b96d74
commit
d61d0f95e6
|
|
@ -34,6 +34,7 @@ TEST_PROGS += test_loop_04.sh
|
|||
TEST_PROGS += test_loop_05.sh
|
||||
TEST_PROGS += test_loop_06.sh
|
||||
TEST_PROGS += test_loop_07.sh
|
||||
TEST_PROGS += test_loop_08.sh
|
||||
|
||||
TEST_PROGS += test_integrity_01.sh
|
||||
TEST_PROGS += test_integrity_02.sh
|
||||
|
|
|
|||
25
tools/testing/selftests/ublk/test_loop_08.sh
Executable file
25
tools/testing/selftests/ublk/test_loop_08.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh
|
||||
|
||||
ERR_CODE=0
|
||||
|
||||
if ! _have_program fio; then
|
||||
exit "$UBLK_SKIP_CODE"
|
||||
fi
|
||||
|
||||
_prep_test "loop" "write and verify with io_desc_size"
|
||||
|
||||
_create_backfile 0 256M
|
||||
|
||||
dev_id=$(_add_ublk_dev -t loop --io_desc_size 64 "${UBLK_BACKFILES[0]}")
|
||||
_check_add_dev $TID $?
|
||||
|
||||
# run fio over the ublk disk
|
||||
_run_fio_verify_io --filename=/dev/ublkb"${dev_id}" --size=256M
|
||||
ERR_CODE=$?
|
||||
|
||||
_cleanup_test
|
||||
|
||||
_show_result $TID $ERR_CODE
|
||||
Loading…
Reference in New Issue
Block a user