mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 17:42:03 +02:00
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>
26 lines
495 B
Bash
Executable File
26 lines
495 B
Bash
Executable File
#!/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
|