mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
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:
committed by
Jens Axboe
parent
fe8c0182d4
commit
58eec4f3fc
@@ -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" $?
|
||||
|
||||
|
||||
@@ -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: $*"
|
||||
|
||||
@@ -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: $*"
|
||||
|
||||
@@ -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: $*"
|
||||
|
||||
Reference in New Issue
Block a user