Commit 58eec4f3 authored by Caleb Sander Mateos's avatar Caleb Sander Mateos Committed by Jens Axboe
Browse files

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: default avatarCaleb Sander Mateos <csander@purestorage.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent fe8c0182
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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" $?

+1 −1
Original line number Diff line number Diff line
@@ -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: $*"
+1 −1
Original line number Diff line number Diff line
@@ -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: $*"
+1 −1
Original line number Diff line number Diff line
@@ -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: $*"