selftests: ublk: fix fio arguments in run_io_and_recover()

run_io_and_recover() invokes fio with --size="${size}", but the variable
size doesn't exist. Thus, the argument expands to --size=, which causes
fio to exit immediately with an error without issuing any I/O. Pass the
value for size as the first argument to the function.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Caleb Sander Mateos
2025-12-12 10:17:02 -07:00
committed by Jens Axboe
parent fe8c0182d4
commit 58eec4f3fc
4 changed files with 6 additions and 5 deletions

View File

@@ -333,11 +333,12 @@ run_io_and_kill_daemon()
run_io_and_recover()
{
local action=$1
local size=$1
local action=$2
local state
local dev_id
shift 1
shift 2
dev_id=$(_add_ublk_dev "$@")
_check_add_dev "$TID" $?

View File

@@ -8,7 +8,7 @@ ERR_CODE=0
ublk_run_recover_test()
{
run_io_and_recover "kill_daemon" "$@"
run_io_and_recover 256M "kill_daemon" "$@"
ERR_CODE=$?
if [ ${ERR_CODE} -ne 0 ]; then
echo "$TID failure: $*"

View File

@@ -8,7 +8,7 @@ ERR_CODE=0
ublk_run_recover_test()
{
run_io_and_recover "kill_daemon" "$@"
run_io_and_recover 256M "kill_daemon" "$@"
ERR_CODE=$?
if [ ${ERR_CODE} -ne 0 ]; then
echo "$TID failure: $*"

View File

@@ -8,7 +8,7 @@ ERR_CODE=0
ublk_run_quiesce_recover()
{
run_io_and_recover "quiesce_dev" "$@"
run_io_and_recover 256M "quiesce_dev" "$@"
ERR_CODE=$?
if [ ${ERR_CODE} -ne 0 ]; then
echo "$TID failure: $*"